You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2012/12/14 08:12:12 UTC

[jira] [Resolved] (STANBOL-824) Stanbol Namespace Prefix service

     [ https://issues.apache.org/jira/browse/STANBOL-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler resolved STANBOL-824.
-----------------------------------------

    Resolution: Fixed

implemented with http://svn.apache.org/viewvc?rev=1421100&view=rev
                
> Stanbol Namespace Prefix service
> --------------------------------
>
>                 Key: STANBOL-824
>                 URL: https://issues.apache.org/jira/browse/STANBOL-824
>             Project: Stanbol
>          Issue Type: New Feature
>          Components: Commons
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Currently Namespace Prefixes are defined statically in Enumerations.
> AFAIK Stanbol has at two such enumerations
> 1. Enhancer services api
> 2. Entityhub services api
> ## 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>
> ## 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.
> ## 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.
> ## 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira