public class PropertyViewOntologyBuilder extends Object
body part limb part forelimb part hand part finger part phalanx partIf we also have an additional element ontology G containing individuals {gene1, gene2, ...} and class assertions {gene1 Type expressedIn some finger, ...}, where expressedIn is declared as expressedIn o partOf -> expressedIn Then the combined subclass/class assertion hierarchy O(expressedIn,G)' will look like this:
body gene limb gene forelimb gene hand gene finger gene gene1 phalanx geneTODO - allow O(P)' to be exported as SKOS
Constructor and Description |
---|
PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLDataFactory owlDataFactory,
org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager,
org.semanticweb.owlapi.model.OWLOntology sourceOntology,
org.semanticweb.owlapi.model.OWLOntology unitsOntology,
org.semanticweb.owlapi.model.OWLObjectProperty viewProperty) |
PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLOntology sourceOntology,
org.semanticweb.owlapi.model.OWLObjectProperty viewProperty) |
PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLOntology sourceOntology,
org.semanticweb.owlapi.model.OWLOntology elementsOntology,
org.semanticweb.owlapi.model.OWLObjectProperty viewProperty) |
Modifier and Type | Method and Description |
---|---|
void |
addViewEntities(Set<org.semanticweb.owlapi.model.OWLEntity> newEntities) |
void |
build(org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) |
void |
buildInferredViewOntology(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Once the PVO has been constructed, this uses a reasoner to classify it.
|
void |
buildViewOntology()
As
buildViewOntology(IRI, IRI) , but both O(P) and O(P)' have automatically
generated IRIs |
void |
buildViewOntology(org.semanticweb.owlapi.model.IRI voIRI)
as
buildViewOntology(IRI,IRI) , but sets the asserted and inferred view
ontologies to be the same |
void |
buildViewOntology(org.semanticweb.owlapi.model.IRI avoIRI,
org.semanticweb.owlapi.model.IRI ivoIRI)
Constructs a property view ontology O(P) or O(P,E) from source ontology O,
such that every class C in O
has a corresponding view class C' in O(P), such that C' EquivalentTo = P some C
O(P) imports both the O, and optionally the elements ontology E - in which case
we call the ontology O(P,E).
|
Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> |
expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain) |
Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> |
expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain,
int pos) |
org.semanticweb.owlapi.model.OWLClassExpression |
expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain,
org.semanticweb.owlapi.model.OWLClassExpression t) |
org.semanticweb.owlapi.model.OWLOntology |
getAssertedViewOntology()
Automatically generated Property View Ontology O(P)
containing axioms C' == P some C, for each C in source ontology
|
org.semanticweb.owlapi.model.OWLOntology |
getElementsOntology() |
Set<org.semanticweb.owlapi.model.OWLClass> |
getExcludedClasses() |
org.semanticweb.owlapi.model.OWLOntology |
getInferredViewOntology()
Generated after running
buildInferredViewOntology(OWLReasoner)
Note that O(P) and O(P)' can share the same object,
i.e the assertedViewOntology is augmented to become the inferred view ontology |
String |
getLabel(org.semanticweb.owlapi.model.OWLEntity c,
org.semanticweb.owlapi.model.OWLOntology ont) |
Set<org.semanticweb.owlapi.model.OWLClass> |
getLeafClasses() |
org.semanticweb.owlapi.model.OWLClass |
getOriginalClassForViewClass(org.semanticweb.owlapi.model.OWLClass vc) |
Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> |
getPropertyChains(org.semanticweb.owlapi.model.OWLObjectProperty p) |
Set<org.semanticweb.owlapi.model.OWLEntity> |
getViewEntities() |
String |
getViewLabelPrefix() |
String |
getViewLabelSuffix() |
org.semanticweb.owlapi.model.OWLClass |
getViewRootClass()
As the we treat Thing as belonging to O, O(P) will contain "P some Thing", and this
will be the root of O(P)
|
boolean |
isAssumeOBOStyleIRIs() |
boolean |
isClassifyIndividuals() |
boolean |
isCreateReflexiveClasses() |
boolean |
isFilterUnused() |
boolean |
isUseOriginalClassIRIs() |
org.semanticweb.owlapi.model.IRI |
makeViewClassIRI(org.semanticweb.owlapi.model.IRI vcIRI,
org.semanticweb.owlapi.model.IRI vpIRI,
String sep) |
void |
setAssertedViewOntology(org.semanticweb.owlapi.model.OWLOntology assertedViewOntology) |
void |
setAssumeOBOStyleIRIs(boolean isAssumeOBOStyleIRIs)
set to false if IRIs are not OBO purls.
|
void |
setClassifyIndividuals(boolean isClassifyIndividuals) |
void |
setCreateReflexiveClasses(boolean isCreateReflexiveClasses) |
void |
setElementsOntology(org.semanticweb.owlapi.model.OWLOntology elementsOntology) |
void |
setExcludedClasses(Set<org.semanticweb.owlapi.model.OWLClass> excludedClasses) |
void |
setFilterUnused(boolean isFilterUnused) |
void |
setInferredViewOntology(org.semanticweb.owlapi.model.OWLOntology inferredViewOntology) |
void |
setLeafClasses(Set<org.semanticweb.owlapi.model.OWLClass> leafClasses) |
void |
setUseOriginalClassIRIs(boolean isUseOriginalClassIRIs) |
void |
setViewEntities(Set<org.semanticweb.owlapi.model.OWLEntity> viewEntities) |
void |
setViewLabelPrefix(String viewLabelPrefix)
Set this to prefix all class labels in O(P)
|
void |
setViewLabelPrefixAndSuffix(String viewLabelPrefix,
String viewLabelSuffix) |
void |
setViewLabelSuffix(String viewLabelSuffix)
Set this to suffix all class labels in O(P)
|
void |
translateABoxToTBox()
Deprecated.
|
void |
translateABoxToTBox(org.semanticweb.owlapi.model.OWLOntology srcOnt)
Deprecated.
|
public PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLOntology sourceOntology, org.semanticweb.owlapi.model.OWLOntology elementsOntology, org.semanticweb.owlapi.model.OWLObjectProperty viewProperty)
sourceOntology
- elementsOntology
- viewProperty
- public PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLOntology sourceOntology, org.semanticweb.owlapi.model.OWLObjectProperty viewProperty)
public PropertyViewOntologyBuilder(org.semanticweb.owlapi.model.OWLDataFactory owlDataFactory, org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager, org.semanticweb.owlapi.model.OWLOntology sourceOntology, org.semanticweb.owlapi.model.OWLOntology unitsOntology, org.semanticweb.owlapi.model.OWLObjectProperty viewProperty)
owlDataFactory
- owlOntologyManager
- sourceOntology
- unitsOntology
- viewProperty
- public org.semanticweb.owlapi.model.OWLOntology getAssertedViewOntology()
public void setAssertedViewOntology(org.semanticweb.owlapi.model.OWLOntology assertedViewOntology)
public org.semanticweb.owlapi.model.OWLOntology getInferredViewOntology()
buildInferredViewOntology(OWLReasoner)
Note that O(P) and O(P)' can share the same object,
i.e the assertedViewOntology is augmented to become the inferred view ontologypublic void setInferredViewOntology(org.semanticweb.owlapi.model.OWLOntology inferredViewOntology)
public org.semanticweb.owlapi.model.OWLOntology getElementsOntology()
public void setElementsOntology(org.semanticweb.owlapi.model.OWLOntology elementsOntology)
public Set<org.semanticweb.owlapi.model.OWLClass> getLeafClasses()
public void setLeafClasses(Set<org.semanticweb.owlapi.model.OWLClass> leafClasses)
public Set<org.semanticweb.owlapi.model.OWLClass> getExcludedClasses()
public void setExcludedClasses(Set<org.semanticweb.owlapi.model.OWLClass> excludedClasses)
public Set<org.semanticweb.owlapi.model.OWLEntity> getViewEntities()
public void setViewEntities(Set<org.semanticweb.owlapi.model.OWLEntity> viewEntities)
public void addViewEntities(Set<org.semanticweb.owlapi.model.OWLEntity> newEntities)
public org.semanticweb.owlapi.model.OWLClass getViewRootClass()
public String getViewLabelPrefix()
public void setViewLabelPrefix(String viewLabelPrefix)
viewLabelPrefix
- public String getViewLabelSuffix()
public void setViewLabelSuffix(String viewLabelSuffix)
viewLabelSuffix
- public void setViewLabelPrefixAndSuffix(String viewLabelPrefix, String viewLabelSuffix)
public boolean isUseOriginalClassIRIs()
public void setUseOriginalClassIRIs(boolean isUseOriginalClassIRIs)
public boolean isCreateReflexiveClasses()
public void setCreateReflexiveClasses(boolean isCreateReflexiveClasses)
public boolean isClassifyIndividuals()
public void setClassifyIndividuals(boolean isClassifyIndividuals)
public boolean isFilterUnused()
public void setFilterUnused(boolean isFilterUnused)
public boolean isAssumeOBOStyleIRIs()
public void setAssumeOBOStyleIRIs(boolean isAssumeOBOStyleIRIs)
isAssumeOBOStyleIRIs
- - default is truepublic void build(org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
reasonerFactory
- org.semanticweb.owlapi.model.OWLOntologyCreationException
public void buildViewOntology() throws org.semanticweb.owlapi.model.OWLOntologyCreationException
buildViewOntology(IRI, IRI)
, but both O(P) and O(P)' have automatically
generated IRIsorg.semanticweb.owlapi.model.OWLOntologyCreationException
public void buildViewOntology(org.semanticweb.owlapi.model.IRI voIRI) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
buildViewOntology(IRI,IRI)
, but sets the asserted and inferred view
ontologies to be the samevoIRI
- org.semanticweb.owlapi.model.OWLOntologyCreationException
public void buildViewOntology(org.semanticweb.owlapi.model.IRI avoIRI, org.semanticweb.owlapi.model.IRI ivoIRI) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
pvob.buildViewOntology(IRI.create("http://x.org"), IRI.create("http://y.org")); OWLOntology avo = pvob.getAssertedViewOntology(); OWLReasoner vr = reasonerFactory.createReasoner(avo); pvob.buildInferredViewOntology(vr); vr.dispose();
avoIRI
- ivoIRI
- org.semanticweb.owlapi.model.OWLOntologyCreationException
public Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> getPropertyChains(org.semanticweb.owlapi.model.OWLObjectProperty p)
public Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain)
public Set<List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain, int pos)
public org.semanticweb.owlapi.model.OWLClassExpression expandPropertyChain(List<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> chain, org.semanticweb.owlapi.model.OWLClassExpression t)
public org.semanticweb.owlapi.model.OWLClass getOriginalClassForViewClass(org.semanticweb.owlapi.model.OWLClass vc)
public void buildInferredViewOntology(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
reasoner
- public org.semanticweb.owlapi.model.IRI makeViewClassIRI(org.semanticweb.owlapi.model.IRI vcIRI, org.semanticweb.owlapi.model.IRI vpIRI, String sep)
public String getLabel(org.semanticweb.owlapi.model.OWLEntity c, org.semanticweb.owlapi.model.OWLOntology ont)
@Deprecated public void translateABoxToTBox(org.semanticweb.owlapi.model.OWLOntology srcOnt) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
srcOnt
- org.semanticweb.owlapi.model.OWLOntologyCreationException
@Deprecated public void translateABoxToTBox() throws org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.OWLOntologyCreationException
Copyright © 2010–2015. All rights reserved.