The version 3.0 of the Alignment API has been designed to provide matching algorithm designers more flexibility. In particular, the version 3.0 does not necessarily rely on the OWL API, so designers who want to use another OWL API can do so at no cost.
Those who already implemented an algorithm under the API will have to implement some changes for upgrading from version 2 to version 3. But first do not panic. This document aims at helping you in this simple task.
Previously you certainly had your class extending BasicAlignment. You must now have it extending OWLAPIAlignment. This guarantee that you will still find all the features found in the previous BasicAlignment.
If you create on the fly new Alignment or new Cell, if they must contain OWLEntity, then be sure that they are created as OWLAPIAlignment and OWLAPICell respectively.
The new implementation of BasicAlignment and BasicCell provides additional new primitives such as getOntology1URI() and getObject1AsURI().
If you used to parse alignments, you certainly used AlignmentParser which returned a BasicAlignment. Now the AlignmentParser returns a URIAlignment. To turn this URIAlignment into a OWLAPIAlignment, just invoke OWLAPIAlignment.toOWLAPIAlignment( URIAlignment ). It will return the corresponding OWLAPIAlignment.
Moreover, AlignmentParser.parse( URI ) used to take a Hashtable as a second argument. This is not true anymore: you must suppress this second argument.
For invoking your alignment class, the sequence used to be the following:
AlignmentProcess al = new MyAlignment(); al.init( OWLOntology, OWLOntology ); al.align( Alignment, Parameters );(You may have used a MyAlignment( OWLOntology, OWLOntology ) constructor and no init. Now the sequence above is compulsory). From version 3, the sequence is the same except that the arguments for init() are the URL where to find the ontologies instead of the ontology themselves. It is thus necessary for you to change your implementation of init() so that it loads the ontologies. Moreover, the init Alignment in align() is a URIAlignment and not a OWLAPIAlignment so it may be necessary to change it as well.
Fortunately, the OWLAPIAlignment class already provides the loadOntology( URI, OntologyCache ) method that loads the required ontology and a loadInit( URI ) method that will load the initial alignment.
If you manipulated the alignment through the attributes (onto1 and onto2), you must now explicitely cast them as (OWLOntology)onto1 because they are now declared as Object.
JWNLDistance.Initialize() now throws an AlignmentException... you must do something with it.
Please report any tweak that we did not mention here so that we can update this document.
You can look at the sources of the Alignment API which contain many examples. In particular, look at the Procalign class for example of the use of OntologyCache.