Versioning on top of WSMO API

Prototype Fact Sheet, 19 July 2005

This version:
Latest version:
Previous version:
Jacek Kopecký

Copyright © 2005 DERI. All Rights Reserved.

1 Availability and Contacts

Version: 0.1, 19 July 2005.

Download: http://www.omwg.org/tools/versioning/v0.1/versioning.zip

Source control: CVS of the DOME SourceForge project.

Contact person: Jacek Kopecký, jacek.kopecky@deri.org

2 Purpose and Functionality

The purpose of the versioning tool is to enable user-driven creation of versions of WSMO ontologies. It consists of a versioning library described in this document and the GUI tool integrated in DOME.

The library extends WSMO API and WSMO4J with versioning functionality. It is split into two packages:

The downloadable library package contains the following top-level files and directories:

2.1 The Current Version

The requirements for the versioning tool are described in deliverable d6.1 and the design of the tool is described in deliverable d6.2.

The current version has the following major capabilities:

Version identification and metadata — the API contains interfaces and classes for versioned WSMO API Identifiers, and for version metadata containing version comment, date of creation etc.

Ontology versioning API — allows the user of this API to start a new version of an ontology, to go back to the previous version, and to commit (finalize) a version. Further, the user of this API has full control over the version identifier of a committed version.

Version changelog functionality — during the creation of a new version, all changes are logged and when a version is committed, this change log is available to the application.

3 Requirements

Nature: Java library

Interfaces (API, Web Services): a Java API.

Platform: JDK 1.5.

Supported standards: WSMO(?)

Required Libraries (OMWG, SDK Cluster, WSMO-related):

Required Libraries (others):

4 Licensing

4.1 Versioning Library License Agreement

Copyright © 2005, DERI International.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

4.2 Licensing of Third Party Libraries

Licensing of third party libraries and components required for the versioning library:

5 Installation and Usage

5.1 Installation of the versioning library

The library file versioning.jar in the installation package needs to be in the classpath of the application that wishes to use it, together with WSMO4J libraries.

5.2 Usage examples

The class org.omwg.versioningimpl.test.VersionedAPIDemo is a simple demo of the versioning library. The following is the most relevant excerpt of this class:

String FILE =
    "namespace {_\"http://example.com/\"}                     \n" +
    "ontology Workplace                                       \n" +
    "  concept Person                                         \n" +
    "    name ofType _string                                  \n" + 
    "    boss ofType Manager                                  \n" +
    "  concept Manager subConceptOf Person                      ";

// parse the file above
Map map = new HashMap();
map.put(Parser.PARSER_LE_FACTORY, Factory.createLogicalExpressionFactory(new HashMap()));
map.put(Factory.PROVIDER_CLASS, VersionedParserImpl.class.getName());
Entity parsed = Factory.createParser(map).parse(new StringReader(FILE));
map.put(Factory.PROVIDER_CLASS, WSMOFactoryImpl.class.getName());
WsmoFactory factory = Factory.createWsmoFactory(map); 
// we know it is a versioned Ontology
org.omwg.versioning.ontology.Ontology ontology = 
    (org.omwg.versioning.ontology.Ontology) parsed;
ontology.commit(new HashMap());
printOntology("initial workplace ontology", ontology);

// get the first concept, happens to be Person
Concept c = (Concept) ontology.listConcepts().iterator().next(); 

// make some changes
factory.createAttribute(c, factory.createIRI(
printOntology("introduced a new attribute - birthday", ontology);

// drop changes
printOntology("changes dropped", ontology);

// make some changes and commit them
factory.createAttribute(c, factory.createIRI(
ontology.commit(new HashMap());
printOntology("birthday reintroduced and committed", ontology);

// make some more changes
factory.createAttribute(c, factory.createIRI(
printOntology("adding new attribute - salary", ontology);

6 Future Plans

The major driving forces for the future development of the library:

Below follows a non-exhaustive list of tasks, which fit into the short-term development plans:

The next release of the versioning library is planned for December 2005.

Appendix A. References

[WSML0.2] J. de Bruijn, H. Lausen , R. Krummenacher, A. Polleres, L. Predoiu, M. Kifer, D Fensel: The Web Service Modeling Language WSML. Deliverable d16.1v0.2, WSML, 2005. http://www.wsmo.org/TR/d16/d16.1/v0.2/

[WSMO1.2] D. Roman, H. Lausen, U. Keller (eds); J. de Bruijn, Ch. Bussler, J. Domingue, D. Fensel, M. Hepp, M. Kifer, B. Konig-Ries, J. Kopecky, R. Lara, E. Oren, A. Polleres, J. Scicluna, M. Stollberg: Web Service Modeling Ontology (WSMO). Deliverable d2v1.2, WSMO, 2005. http://www.wsmo.org/TR/d2/v1.2/

Valid XHTML 1.1!

$Date: 2005/07/01 13:22:41 $