Version 2 (modified by endres, 18 years ago) (diff) |
---|
AlignmentOntology (AO) Im-/Exporter Tool
Developer: Björn Endres
Description
This tool enables the user to export any PhaseLibs alignment to an RDF file, specifying the alignment within the AO RDFS scheme. In reverse, it is able to wrap such an RDF file in an PhaseLibs alignment implementation.
Specification
The tool's main class is
de.dfki.km.phaselib.tools.alignmentOntology.AOJenaAlignment
A Jena-like vocabulary class for the AO is provided by the class
de.dfki.km.phaselib.tools.alignmentOntology.AO
Usage
To import an RDF file to a PhaseLibs alignment, call the static
AOJenaAlignment.importAlignment(source, ontologyProvider)
method of the main class. The source parameter should be the RDF file or a InputStream providing the RDF data. The ontologyProvider will be used, to get PhaseLibs ontology adapters for the ontologies referenced in the alignment.
In order to export an arbitrary alignment, the static
AOJenaAlignment.exportAlignment(alignment, uri, sink)
should be called. The uri parameter must provide a URI for the alignment, since PhaseLibs alignments do not have URIs. The sink parameter specifies the OutputStream to write the RDF/XML data to.
Remark: if the alignment provided is an AOJenaAlignment (as produced by the importAlignment(source, ontologyProvider) method), the writeTo(sink) method of this alignment implementation is called. This allows the user to keep all AO extensions that are not reflected in the PhaseLibs alignment concept, since the wrapped RDF Jena model is written out.
Dependencies
Needs the Jena Project, version 2.0 or higher.
License Issues
TODO