The SWKM Services: The Registry Service.
About the Registry Service:
The role of the Registry Service is to record and manage metadata information about ontologies, schemas or namespaces stored in the knowledge repository. Furthermore, the registry offers the possibility to keep track of the development lifecycle of a schema through the support of storing versions, their metadata and the relationships among them. Both schema and version information follow the Ontology Registry Schema that is stored in the knowledge repository and is appropriately instantiated for each schema and version stored. Applications using the registry have the possibility to update and retrieve information about the already recorded schemas and their versions by using the available service methods. Notice that the Registry Service offers support for namespaces only; extending the service to also support graphspaces is rather straightforward and can be implemented if this is deemed necessary.
A comparison of some of the existing registries is presented in [DF01]. All of the mentioned systems provide certain searching facilities, but only some of them support editing functions that modify stored information about ontologies and add new ones (such as WebOnto , Ontolingua and Ontology Server. Moreover, only a few provide reasoning mechanisms that make it possible to derive a query-answering mechanism such as WebOnto and Ontolingua. Furthermore, only one of the systems, SHOE, supports a versioning mechanism in order to maintain the changes of ontologies in the registry. Our ontology registry provides all of the aforementioned functionalities, since it is using a query/update service based mechanism. Furthermore, it supports versioning in its more general sense as it will be described later.
The Registry Service is implemented as a web service and the different functionalities offered by it are implemented as web methods. However, this web service is not a self-contained module but rather depends on and uses the services provided by the knowledge repository, such as the Import, Update and Query Services. In particular, the Import Service is used to persistently store ontological descriptions, the Update Service is used to update the metadata information on the ontologies (which is stored in the Ontology Registry Schema, which is an ontology itself and described below) and the Query Service is used to query the metadata information stored in the Ontology Registry Schema (for retrieval purposes). The dependencies between the Registry Service and the aforementioned services are schematically depicted in Figure 6.

Figure 6: High-level view of the Registry Service
As already mentioned, the Registry Service is using its own ontology, encoded in RDF and following the RDF/S, in order to explicitly describe every other ontology stored in the Knowledge Repository. This ontology is called the Ontology Registry Schema and is described in detail later in this section (see Figure 8). For every ontology stored in the Knowledge Repository, an instance of the proper type is created and stored under the Ontology Registry Schema. The Registry is also supporting the recording of the versioning of schemas by allowing for each ontology the creation of multiple instances of the corresponding class Version and relating these instances to the proper instance of the class Schema. Thus, the metadata stored for each namespace are divided into two main categories regarding to whether their values are changing with each version (e.g., the number of classes or the related namespaces) or they are permanent characteristics of the namespace (e.g., the encoding or the URI prefix). This, in turn, imposes the rule that at least one version should exist in the Knowledge Repository for any stored namespace and its instance should be correctly related to the instance representing the namespace in the registry.
Since keeping track of versions has a significant role in the lifecycle of a schema, the registry supports a sophisticated versioning mechanism, accounting for and supporting the fact that different versions of a schema can be developed in parallel. Thus, during the lifecycle of a schema its versions can create a Direct Acyclic Graph (DAG). This means that a version might depend on more than one versions (like Version5 in Figure 7), which might be considered as merging two or more versions. Similarly, two or more versions might depend on a single one (like Version1 and Version2 in Figure 7), which might be considered as forking or parallel development. This way the maximum possible flexibility is provided and all known versioning schemes can be easily supported. The related information is provided by the Versioning Service. Apart from the versioning mechanism, the registry additionally offers the possibility to document the changes that occur on a schema when moving from one version to the next one(s). These changes have the format of the results of the Comparison Service that compares two RDF models.
Finally, as mentioned above, the Registry Service offers the possibility to retrieve ontology metadata information from the repository and also update the information that is already stored. In order to retrieve data from the registry, one can either type an RQL query, or use a query from a set of predefined ones. The latter type (the predefined queries) are exposed through a set of web service methods and are highly configurable by the developer of the service allowing for the necessary flexibility and taking advantage of the knowledge of the Ontology Registry Schema. Similarly, in order to update the information stored in the registry a set of implemented web methods is exposed accounting for most actions that might be needed by the user and assuring the necessary consistency of the information in the registry, imposing for example the rule of necessitating at least one version per schema; nevertheless, the user can always post updates in RUL, in which case (s)he bares also the responsibility for keeping the consistency rules.

Figure 7: A possible DAG created by the versions of a schema. In this
example, the first version is version0 and from it are emanating two
versions, version1 and version2 that are developed in parallel. These
two versions are merged by Version5. Version3 and Version4 are labelled
as permanent versions, meaning that the authors do not plan to work
anymore on them.
The schema of Ontology Registry consists of five basic classes: Schema, Version, Change, foaf#Person and foaf#Organization.
Moreover, some additional classes have been specified that are related to the language, encoding, and physical language used in the document describing a specific namespace. The main classes and properties of Ontology Registry Schema are illustrated in Figure 8. The recording of a schema namespace by the Registry Service might also include the storing into the registry not only of the instances of classes Schema and Version but also instances of the classes Change, foaf#Person, foaf#Organization, Language, Encoding and PhysicalLanguage.

Figure 8: The Ontology Registry Schema
The Registry Service offers functionalities for:
As already mentioned, the methods exposed by the Registry Service are using the underlying methods offered by the Knowledge Repository, more specifically the Import, Update and Query Services. The Registry Service builds on top of these services in order to provide a more intuitive interface between the Knowledge Repository and the applications using the registry. These methods try to hide the possible complexity of producing the right (and optimized) RQL queries or RUL updates by predefining the correct ones, account for the consistency and imposing the necessary rules (which otherwise would have to be imposed manually) and exploit on the knowledge of the Ontology Registry Schema which the application need not know in detail.
A detailed description of the available methods (web services) of the Ontology Registry API for inserting information into the Registry may be found here.
Last modified: February 27, 2008