|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.clarkparsia.owlapi.OntologyUtils
public class OntologyUtils
Title:
Description:
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
| Constructor Summary | |
|---|---|
OntologyUtils()
|
|
| Method Summary | |
|---|---|
static void |
addAxiom(org.semanticweb.owl.model.OWLAxiom axiom,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies,
org.semanticweb.owl.model.OWLOntologyManager manager)
Add the axiom to all the given ontologies. |
static void |
addAxioms(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms)
|
static void |
addAxioms(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLAxiom... axioms)
|
static boolean |
containsClass(java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> classes,
org.semanticweb.owl.model.OWLClass cls)
|
static boolean |
containsUnreferencedEntity(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription desc)
Determines if a class description contains any unreferenced entities with respect to the ontology that contains the entailments which are being explained. |
static org.semanticweb.owl.model.OWLEntity |
findEntity(java.lang.String name,
org.semanticweb.owl.model.OWLOntology ontology)
Finds an entity (class, individual, object or data property) in the given ontology that has the given local name or URI. |
static org.semanticweb.owl.model.OWLEntity |
findEntity(java.lang.String name,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
Finds an entity (class, individual, object or data property) in the given set of ontologies that has the given local name or URI. |
static org.semanticweb.owl.model.OWLOntology |
getOntologyFromAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms)
|
static org.semanticweb.owl.model.OWLOntology |
getOntologyFromAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms,
java.net.URI uri)
|
static org.semanticweb.owl.model.OWLOntology |
getOntologyFromAxioms(org.semanticweb.owl.model.OWLAxiom... axioms)
|
static org.semanticweb.owl.model.OWLOntologyManager |
getOWLOntologyManager()
|
static java.util.Set<org.semanticweb.owl.model.OWLEntity> |
getSignature(org.semanticweb.owl.model.OWLAxiom axiom)
Given a set of OWL-API axiom, return its signature. |
static org.semanticweb.owl.model.OWLOntology |
loadOntology(java.lang.String uri)
Loads the ontology with given URI. |
static org.semanticweb.owl.model.OWLOntology |
loadOntology(java.lang.String uri,
boolean withAnnotations)
Loads the ontology with given URI and optionally removes all annotations leaving only logical axioms. |
static void |
printAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms)
Prints a set of axioms to console |
static void |
printOntology(org.semanticweb.owl.model.OWLOntology ont)
Prints an ontology to console |
static void |
removeAllAnnotations(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLOntologyManager manager)
Removes all annotations (non-logical axioms) from the ontology causing the ontology to be changed in an unreversible way. |
static java.util.Set<org.semanticweb.owl.model.OWLOntology> |
removeAxiom(org.semanticweb.owl.model.OWLAxiom axiom,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies,
org.semanticweb.owl.model.OWLOntologyManager manager)
Removes an axiom from all the given ontologies that contains the axiom and returns those ontologies. |
static void |
removeAxioms(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms)
|
static void |
removeAxioms(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLAxiom... axioms)
|
static void |
save(org.semanticweb.owl.model.OWLOntology ont,
java.lang.String path)
|
static void |
updateOntology(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms,
boolean add)
Update the ontology by adding or removing the given set of axioms |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OntologyUtils()
| Method Detail |
|---|
public static void addAxioms(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms)
throws org.semanticweb.owl.model.OWLException
org.semanticweb.owl.model.OWLException
public static void addAxioms(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLAxiom... axioms)
throws org.semanticweb.owl.model.OWLException
org.semanticweb.owl.model.OWLException
public static boolean containsClass(java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> classes,
org.semanticweb.owl.model.OWLClass cls)
public static java.util.Set<org.semanticweb.owl.model.OWLEntity> getSignature(org.semanticweb.owl.model.OWLAxiom axiom)
public static org.semanticweb.owl.model.OWLOntology getOntologyFromAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms)
public static org.semanticweb.owl.model.OWLOntology getOntologyFromAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms,
java.net.URI uri)
public static org.semanticweb.owl.model.OWLOntology getOntologyFromAxioms(org.semanticweb.owl.model.OWLAxiom... axioms)
public static org.semanticweb.owl.model.OWLOntologyManager getOWLOntologyManager()
public static org.semanticweb.owl.model.OWLOntology loadOntology(java.lang.String uri)
uri - the ontology uri
public static org.semanticweb.owl.model.OWLOntology loadOntology(java.lang.String uri,
boolean withAnnotations)
uri - the ontology uriwithAnnotations - if false removes all annotation axioms from the
ontology, otherwise leaves the ontology intact
removeAllAnnotations(OWLOntology, OWLOntologyManager)public static void printAxioms(java.util.Collection<org.semanticweb.owl.model.OWLAxiom> axioms)
args - public static void printOntology(org.semanticweb.owl.model.OWLOntology ont)
args -
public static void removeAxioms(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms)
throws org.semanticweb.owl.model.OWLException
org.semanticweb.owl.model.OWLException
public static void removeAxioms(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLAxiom... axioms)
throws org.semanticweb.owl.model.OWLException
org.semanticweb.owl.model.OWLException
public static void save(org.semanticweb.owl.model.OWLOntology ont,
java.lang.String path)
throws org.semanticweb.owl.model.UnknownOWLOntologyException,
org.semanticweb.owl.model.OWLOntologyStorageException
org.semanticweb.owl.model.UnknownOWLOntologyException
org.semanticweb.owl.model.OWLOntologyStorageException
public static void updateOntology(org.semanticweb.owl.model.OWLOntology ontology,
java.util.Collection<? extends org.semanticweb.owl.model.OWLAxiom> axioms,
boolean add)
throws org.semanticweb.owl.model.OWLException
OWLObject - axiom - the axiom to add/removeboolean - add - true - add; false - delete
org.semanticweb.owl.model.OWLException
public static boolean containsUnreferencedEntity(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription desc)
desc - The description to be searched
true if the description references entities that
the ontology that contains entailments which are being explained,
otherwise false
public static java.util.Set<org.semanticweb.owl.model.OWLOntology> removeAxiom(org.semanticweb.owl.model.OWLAxiom axiom,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies,
org.semanticweb.owl.model.OWLOntologyManager manager)
throws org.semanticweb.owl.model.OWLOntologyChangeException
axiom - axiom being removedontologies - ontologies from which axiom is being removedmanager - manager to apply the actual change
org.semanticweb.owl.model.OWLOntologyChangeException
public static void addAxiom(org.semanticweb.owl.model.OWLAxiom axiom,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies,
org.semanticweb.owl.model.OWLOntologyManager manager)
throws org.semanticweb.owl.model.OWLOntologyChangeException
axiom - ontologies - manager -
org.semanticweb.owl.model.OWLOntologyChangeException
public static void removeAllAnnotations(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLOntologyManager manager)
ontology - the ontology being changed
org.semanticweb.owl.model.OWLOntologyChangeException
public static org.semanticweb.owl.model.OWLEntity findEntity(java.lang.String name,
java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
name - URI or local name for an entityontologies - ontologies we are searching
findEntity(String, OWLOntology)
public static org.semanticweb.owl.model.OWLEntity findEntity(java.lang.String name,
org.semanticweb.owl.model.OWLOntology ontology)
name - URI or local name for an entityontology - ontology we are searching
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||