|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectowltools.mooncat.Mooncat
public class Mooncat
Given one source ontology referencing one or more referenced ontologies
(e.g. CL referencing PRO, GO, CHEBI, UBERON), merge/copy selected axiom
from the referenced ontologies into the source ontology.
This relies on a OWLGraphWrapper
object being created, in which
the the source ontology is the primary ontology of interest, and the
support ontologies are the set of ontologies from which references are
drawn.
For example, src=CL, sup={PRO,GO,CHEBI,UBERON}
In the future, owl imports will be supported
Constructor Summary | |
---|---|
Mooncat(OWLGraphWrapper g)
|
|
Mooncat(org.semanticweb.owlapi.model.OWLOntologyManager manager,
org.semanticweb.owlapi.model.OWLDataFactory dataFactory,
org.semanticweb.owlapi.model.OWLOntology ontology)
|
Method Summary | |
---|---|
void |
addImport(String importedIRIString)
Deprecated. |
void |
addReferencedOntology(org.semanticweb.owlapi.model.OWLOntology refOnt)
|
void |
addSourceOntologyPrefix(String prefix)
|
boolean |
belongsToSource(org.semanticweb.owlapi.model.OWLEntity obj)
|
Set<org.semanticweb.owlapi.model.OWLOntology> |
getAllOntologies()
|
Set<org.semanticweb.owlapi.model.OWLAxiom> |
getAxiomsForSubset(Set<org.semanticweb.owlapi.model.OWLObject> objs)
"slim down" an ontology. |
Set<org.semanticweb.owlapi.model.OWLAxiom> |
getClosureAxiomsOfExternalReferencedEntities()
find all axioms in closure of external referenced entities. |
Set<org.semanticweb.owlapi.model.OWLObject> |
getClosureOfExternalReferencedEntities()
finds the full closure of all external referenced entities. |
Set<org.semanticweb.owlapi.model.OWLAxiom> |
getDanglingAxioms(org.semanticweb.owlapi.model.OWLOntology ont)
|
Set<org.semanticweb.owlapi.model.OWLClass> |
getDanglingClasses()
|
Set<org.semanticweb.owlapi.model.OWLClass> |
getDanglingClasses(org.semanticweb.owlapi.model.OWLOntology ont)
finds all classes for which isDangling is true |
Set<org.semanticweb.owlapi.model.OWLEntity> |
getExternalReferencedEntities()
returns set of entities that belong to a referenced ontology that are referenced in the source ontology. |
OWLGraphWrapper |
getGraph()
|
org.semanticweb.owlapi.model.OWLOntologyManager |
getManager()
|
org.semanticweb.owlapi.model.OWLOntology |
getOntology()
|
Set<org.semanticweb.owlapi.model.OWLOntology> |
getReferencedOntologies()
delegates to OWLGraphWrapper support ontologies |
Set<String> |
getSourceOntologyPrefixes()
E.g. |
boolean |
isDangling(org.semanticweb.owlapi.model.OWLOntology ont,
org.semanticweb.owlapi.model.OWLEntity obj)
Here a dangling entity is one that has no annotation assertions; this is not a perfect test, as conceivable a class could lack assertions; however, this would not be the case for any ontology following obo library principles. |
org.semanticweb.owlapi.model.OWLOntology |
makeSubsetOntology(Set<org.semanticweb.owlapi.model.OWLClass> subset,
org.semanticweb.owlapi.model.IRI subOntIRI)
Given a set of classes (e.g. |
void |
mergeIntoReferenceOntology(org.semanticweb.owlapi.model.OWLOntology ont)
|
void |
mergeOntologies()
merge minimal subset of referenced ontologies into the source ontology. |
void |
removeDanglingAxioms()
|
void |
removeDanglingAxioms(org.semanticweb.owlapi.model.OWLOntology ont)
Removes any axiom from ont if that axiom contains a dangling reference - i.e. |
void |
removeExternalOntologyClasses(boolean removeDangling)
|
void |
removeSubsetComplementClasses(Set<org.semanticweb.owlapi.model.OWLClass> subset,
boolean removeDangling)
Remove all classes *not* in subset. |
void |
setGraph(OWLGraphWrapper graph)
|
void |
setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
|
void |
setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
|
void |
setReferencedOntologies(Set<org.semanticweb.owlapi.model.OWLOntology> referencedOntologies)
Deprecated. |
void |
setSourceOntologyPrefixes(Set<String> sourceOntologyPrefixes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mooncat(org.semanticweb.owlapi.model.OWLOntologyManager manager, org.semanticweb.owlapi.model.OWLDataFactory dataFactory, org.semanticweb.owlapi.model.OWLOntology ontology)
public Mooncat(OWLGraphWrapper g)
Method Detail |
---|
public Set<String> getSourceOntologyPrefixes()
public void setSourceOntologyPrefixes(Set<String> sourceOntologyPrefixes)
public void addSourceOntologyPrefix(String prefix)
public Set<org.semanticweb.owlapi.model.OWLOntology> getReferencedOntologies()
public Set<org.semanticweb.owlapi.model.OWLOntology> getAllOntologies()
@Deprecated public void setReferencedOntologies(Set<org.semanticweb.owlapi.model.OWLOntology> referencedOntologies)
public void addReferencedOntology(org.semanticweb.owlapi.model.OWLOntology refOnt) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
refOnt
-
org.semanticweb.owlapi.model.OWLOntologyCreationException
public void mergeIntoReferenceOntology(org.semanticweb.owlapi.model.OWLOntology ont) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.OWLOntologyCreationException
public org.semanticweb.owlapi.model.OWLOntologyManager getManager()
public void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
public OWLGraphWrapper getGraph()
public void setGraph(OWLGraphWrapper graph)
public org.semanticweb.owlapi.model.OWLOntology getOntology()
public void setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
@Deprecated public void addImport(String importedIRIString)
public void mergeOntologies()
public Set<org.semanticweb.owlapi.model.OWLEntity> getExternalReferencedEntities()
getClosureOfExternalReferencedEntities
for closure of references
public Set<org.semanticweb.owlapi.model.OWLObject> getClosureOfExternalReferencedEntities()
getExternalReferencedEntities
and then finds all reflexive ancestors of this set.
to configure the travsersal, see OWLGraphhWrapper
public Set<org.semanticweb.owlapi.model.OWLAxiom> getClosureAxiomsOfExternalReferencedEntities()
getClosureOfExternalReferencedEntities
The second and third steps by getAxiomsForSubset
Example: if the source is cl, and cl references go classes, and go is in the set of referenced
ontologies, then this will return a collection of axioms constituting a sub-ontology of go
such that the graph closure of cl is complete.
public Set<org.semanticweb.owlapi.model.OWLAxiom> getAxiomsForSubset(Set<org.semanticweb.owlapi.model.OWLObject> objs)
objsInSubset
-
public boolean belongsToSource(org.semanticweb.owlapi.model.OWLEntity obj)
public boolean isDangling(org.semanticweb.owlapi.model.OWLOntology ont, org.semanticweb.owlapi.model.OWLEntity obj)
ont
- obj
-
public Set<org.semanticweb.owlapi.model.OWLClass> getDanglingClasses()
public Set<org.semanticweb.owlapi.model.OWLClass> getDanglingClasses(org.semanticweb.owlapi.model.OWLOntology ont)
isDangling
is true
ont
-
public void removeDanglingAxioms(org.semanticweb.owlapi.model.OWLOntology ont)
ont
- public void removeDanglingAxioms()
public Set<org.semanticweb.owlapi.model.OWLAxiom> getDanglingAxioms(org.semanticweb.owlapi.model.OWLOntology ont)
public void removeSubsetComplementClasses(Set<org.semanticweb.owlapi.model.OWLClass> subset, boolean removeDangling)
subset
- removeDangling
- public org.semanticweb.owlapi.model.OWLOntology makeSubsetOntology(Set<org.semanticweb.owlapi.model.OWLClass> subset, org.semanticweb.owlapi.model.IRI subOntIRI) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
subset
- subOntIRI
-
org.semanticweb.owlapi.model.OWLOntologyCreationException
public void removeExternalOntologyClasses(boolean removeDangling)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |