Versioning on top of WSMO API

Prototype Fact Sheet, 31 December 2005

Authors:
Jacek Kopecký

Copyright © 2005 DERI. All Rights Reserved.


1 Availability and Contacts

Version: 0.2, 31 December 2005.

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

Source control: In CVS of the DOME SourceForge project at http://cvs.sourceforge.net/viewcvs.py/dome/versioning/.

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

2 Purpose and Functionality

The purpose of the versioning library is to enable user-driven creation of versions of WSMO ontologies. This library implements what is described theoretically in the text of DIP deliverable D2.4. It consists of a versioning library described in this document and the GUI tool integrated in deliverable D2.8.

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

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

2.1 The Current Version

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.

Partial version mapping — from the change log a partial mapping is generated for mediation between the old and the new version. This partial mapping is an input to a human designer who can complete it as appropriate.

3 Requirements

Nature: Java library

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

Platform: JDK 1.4.

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 and the mapping libraries.

5.2 Usage examples

The following is an excerpt from a simple demo program that uses the versioning library:

    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.clear();
    map.put(Factory.PROVIDER_CLASS, WSMOFactoryImpl.class.getName());
    WsmoFactory factory = Factory.createWsmoFactory(map);
    assert parsed.length == 1;
    assert parsed[0] instanceof Ontology;
    assert Versioning.isVersioned((Ontology)parsed[0]);
    
    // create serializer
    map.put(Factory.PROVIDER_CLASS, WSMLSerializerImpl.class.getName());
    serializer = Factory.createSerializer(map);
        
    // we know it is a versioned Ontology
    Ontology ontology = (Ontology) parsed[0];
    Versioning.commit(ontology, 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
    c.createAttribute(factory.createIRI(
            "http://example.com/birthday"));
    printOntology("introduced a new attribute - birthday", ontology);

    // drop changes
    Versioning.dropChanges(ontology);
    printOntology("changes dropped", ontology);
    
    // make some changes and commit them, view the change log
    c.createAttribute(factory.createIRI(
            "http://example.com/birthday"));
    Versioning.commit(ontology, new HashMap());
    printOntology("birthday reintroduced and committed", ontology);
    printChangelog(Versioning.getChangeLog(ontology));
    
    // make some more changes
    c.createAttribute(factory.createIRI(
            "http://example.com/salary"));
    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 June 2006.

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/12/30 16:51:00 $