|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectowltools.mooncat.PropertyViewOntologyBuilder
public class PropertyViewOntologyBuilder
This class will create a property view or *faceted* view over an ontology using a specified property (relation). One use for this is building Solr indexes - each property view ontology would correspond to a distinct facet. For example, a faceted view over samples classified using a cell type ontology might have individual classifications for sample-by-cell-lineage, sample-by-system, sample-by-disease
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 Summary | |
---|---|
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.OWLOntology elementsOntology,
org.semanticweb.owlapi.model.OWLObjectProperty viewProperty)
|
Method Summary | |
---|---|
void |
addViewEntities(Set<org.semanticweb.owlapi.model.OWLEntity> newEntities)
|
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 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). |
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()
|
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 |
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 |
isFilterUnused()
|
boolean |
isUseOriginalClassIRIs()
|
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 |
setElementsOntology(org.semanticweb.owlapi.model.OWLOntology elementsOntology)
|
void |
setFilterUnused(boolean isFilterUnused)
|
void |
setInferredViewOntology(org.semanticweb.owlapi.model.OWLOntology inferredViewOntology)
|
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()
|
void |
translateABoxToTBox(org.semanticweb.owlapi.model.OWLOntology srcOnt)
generates SubClassOf axioms from ClassAssertion axioms Note that property assertions are currently ignored |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.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
- Method Detail |
---|
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 ontology
public 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.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 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 buildViewOntology() throws org.semanticweb.owlapi.model.OWLOntologyCreationException
buildViewOntology(IRI, IRI)
, but both O(P) and O(P)' have automatically
generated IRIs
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);
avoIRI
- ivoIRI
-
org.semanticweb.owlapi.model.OWLOntologyCreationException
public void buildInferredViewOntology(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
reasoner
- public void translateABoxToTBox(org.semanticweb.owlapi.model.OWLOntology srcOnt) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
srcOnt
- isReplaceOntology
-
org.semanticweb.owlapi.model.OWLOntologyCreationException
public void translateABoxToTBox() throws org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.OWLOntologyCreationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |