cz.vse.keg.patomat2.transformation
public class OntologyTransformationImpl extends java.lang.Object implements OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
OntologyTransformation.TransformationStrategy
Constructor and Description |
---|
OntologyTransformationImpl(org.semanticweb.owlapi.model.OWLOntology ont) |
OntologyTransformationImpl(java.lang.String url)
OntologyTransformationImpl constructor loads an ontology resides at given url and initializes parameters such as dictionaryPath and modelsPath from config.properties file.
|
OntologyTransformationImpl(java.lang.String url,
java.lang.String wordnetPath,
java.lang.String modelPath)
OntologyTransformationImpl constructor loads an ontology resides at given url and initializes parameters such as dictionaryPath and modelsPath as specified in arguments of this constructor.
|
OntologyTransformationImpl(java.lang.String url,
java.lang.String wordnetPath,
java.lang.String modelPath,
java.lang.String workingDirectory) |
Modifier and Type | Method and Description |
---|---|
void |
adjustOWLProfile() |
void |
finish() |
java.lang.String |
getBaseURI(java.lang.String namespace) |
java.lang.String |
getDictionaryPath() |
org.semanticweb.owlapi.model.OWLOntologyManager |
getManager() |
java.lang.String |
getModelsPath() |
org.semanticweb.owlapi.model.OWLOntology |
getOntology() |
void |
preprocessOntology()
This method preprocesses the ontology, i.e.
|
java.lang.String |
printOntology()
This method prints the whole ontology on standard output.
|
void |
saveOntology(java.lang.String url)
This method save (to location specified using url) all changes made on the ontology.
|
void |
setInstructions(java.lang.String instructions)
This method loads instructions which should be followed during transformation itself.
|
void |
setOntology(org.semanticweb.owlapi.model.OWLOntology o)
This method loads an ontology.
|
org.semanticweb.owlapi.model.OWLOntology |
transformOntology(OntologyTransformation.TransformationStrategy ts,
boolean addAnnotationsForRemovedAddedAxioms)
This method transforms the ontology according to provided transformation strategy.
|
boolean |
willTransformOntology() |
public OntologyTransformationImpl(java.lang.String url)
url
- a link to the source ontologypublic OntologyTransformationImpl(org.semanticweb.owlapi.model.OWLOntology ont)
public OntologyTransformationImpl(java.lang.String url, java.lang.String wordnetPath, java.lang.String modelPath)
url
- a link to the source ontologywordnetPath
- a path to the root directory of WordNet-3.0 installation, e.g. "/usr/share/WordNet-3.0/"modelPath
- a path to language model (left3words-wsj-0-18.tagger) employed in Stanford POS tagger, e.g. "/usr/share/models/"public OntologyTransformationImpl(java.lang.String url, java.lang.String wordnetPath, java.lang.String modelPath, java.lang.String workingDirectory)
public boolean willTransformOntology()
willTransformOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public java.lang.String getBaseURI(java.lang.String namespace)
getBaseURI
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public void setInstructions(java.lang.String instructions)
setInstructions
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
instructions
- the whole instructions in one stringpublic void setOntology(org.semanticweb.owlapi.model.OWLOntology o)
setOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public org.semanticweb.owlapi.model.OWLOntology transformOntology(OntologyTransformation.TransformationStrategy ts, boolean addAnnotationsForRemovedAddedAxioms)
transformOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
ts
- transformation strategy={Conservative,Progressive,RadicalKeep, Radical, RadicalRemove}addAnnotationsForRemovedAddedAxioms
- true/false logging of adding/removing of axioms as ontology annotationspublic void preprocessOntology()
preprocessOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public void adjustOWLProfile()
adjustOWLProfile
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public void saveOntology(java.lang.String url)
saveOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public java.lang.String printOntology()
printOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public java.lang.String getDictionaryPath()
getDictionaryPath
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public java.lang.String getModelsPath()
getModelsPath
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public org.semanticweb.owlapi.model.OWLOntology getOntology()
getOntology
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public org.semanticweb.owlapi.model.OWLOntologyManager getManager()
getManager
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>
public void finish()
finish
in interface OntologyTransformation<org.semanticweb.owlapi.model.OWLOntology>