Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-824

Stanbol Namespace Prefix service

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • commons-0.11.0
    • Commons
    • None

    Description

      Currently Namespace Prefixes are defined statically in Enumerations.

      AFAIK Stanbol has at two such enumerations

      1. Enhancer services api
      2. Entityhub services api

        1. Architecture

      This issue will introduce a new Service infrastructure for dealing with namespace prefixes. It consists of two services: (1) NamespacePrefixService - user level service used to lookup namespace prefixes. It also allows to set prefix mappings (2) NamespacePrefixProvider - internally used to provide prefix to namespace mappings and

      Here are the APIs

      NamespacePrefixService

      /** bidi mapping prefix - namespace */
      getNamespace(String prefix) : String
      getPrefix(String namespace) : String
      /** A namespace may be mapped to multiple prefixes */
      getPrefixes(String namespace) : List<String>
      /** adds an new Prefix and returns the old mapping */
      setPrefix(String prefix, String namespace) : String

      /** converts prefix:localName to full URIs */
      getFullName(String shortName) : String

      /** converts URIs to prefix:localName */
      getShortName(String uri) : String

      NamespacePrefixProvider

      getNamespace(String prefix) : String
      getPrefix(String namespace) : String
      /** A namespace may be mapped to multiple prefixes */
      getPrefixes(String namespace) : List<String>

        1. Implementation

      There will be a default implementation of the NamespacePrefixService provided by the module that defines the services. This implementation will register itself as OSGI service.
      Custom added prefixes shall be stored in an java properties file located in the storage location of the bundle.

        1. prefix.cc NamespacePrefixProvider

      In an additional module a NamespacePrefixProvider based on prefix.cc will be implemented. This will support the Stanbol Offline mode. This service will register itself with a negative service.ranking.

        1. Backward compatibility

      The module will provide a NamespacePrefixProvider implementation that serves all namespaces currently defined by the NamespaceEnums of the Entityhub and the Enhancer. This provider will register itself with an high "service.ranking" (e.g. 1000000).

      The namespace enumerations of the Enhancer and Stanbol will persist, but only contain namespaces referenced by the Ontologies of the according Components. All other namespaces and also utility methods will be deprecated in favor of the new service.

      Attachments

        Issue Links

          Activity

            People

              rwesten Rupert Westenthaler
              rwesten Rupert Westenthaler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: