public class OWLOntology extends uk.ac.manchester.cs.owl.owlapi.OWLOntologyImpl implements Ontology
Ontology
interface. Note that the interface entails several minor changes:
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FILE_EXTENSION |
(package private) static boolean |
isaStrict
Setting this constant to true means isa's arguments are (type, type);
setting to false means isa's arguments are ([type|individual], type).
|
private static org.semanticweb.owlapi.model.OWLOntologyManager |
manager |
private org.semanticweb.HermiT.Reasoner |
reasoner |
private static long |
serialVersionUID |
ONT__ASSERT, ONT__DESCRIBE, ONT__GET, ONT__GET_RESIDENT, ONT__IMPORT, ONT__INDIVIDUAL, ONT__IS_INDIVIDUAL, ONT__IS_OBJECT, ONT__IS_TYPE, ONT__RELATED_TO, ONT__RELATION, ONT__SET_DEFAULT, ONT__TYPE, ONTOLOGY
Constructor and Description |
---|
OWLOntology(org.semanticweb.owlapi.model.OWLOntologyManager mgr,
org.semanticweb.owlapi.model.OWLOntologyID id)
Normally, one would not call this constructor; instead, you should use
#open(String) or
#open(String, String) to create an ontology. |
Modifier and Type | Method and Description |
---|---|
int |
add(String description)
OWLOntolgy does not implement this method, and throws an
IncompatableTypeHierarchiesException . |
void |
addAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
Adds an axiom to this ontology and flushes the reasoner so it takes account
of the new addition.
|
void |
addIndividual(String name,
org.semanticweb.owlapi.model.OWLClass parent)
Adds a new Individual to this ontology with the specified parent.
|
void |
addIndividual(String name,
String... parents) |
void |
addIndividual(String name,
String parent) |
void |
addRelation(org.semanticweb.owlapi.model.OWLDataProperty prop,
String dom,
String ran) |
private void |
addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop,
org.semanticweb.owlapi.model.OWLClass dom,
String ran) |
private void |
addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop,
org.semanticweb.owlapi.model.OWLNamedIndividual dom,
org.semanticweb.owlapi.model.OWLNamedIndividual ran) |
private void |
addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop,
org.semanticweb.owlapi.model.OWLNamedIndividual dom,
String ran) |
void |
addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop,
String dom,
String ran) |
void |
addRelation(String name,
String dom,
String ran) |
void |
addSuperOntologies(Ontology... superOntologies) |
void |
addSuperOntologies(String... superOntologyNames) |
void |
addType(String name,
org.semanticweb.owlapi.model.OWLClass parent)
Adds a new Class to this ontology with the specified parent.
|
void |
addType(String name,
String... parents)
Adds a new Class to this ontology with the specified parents.
|
void |
addType(String name,
String parent)
Equivalent to
add(name,new String[]{parent}) . |
void |
commitOntToLisp() |
void |
declMaplet(String relationName,
String domainName,
String rangeName) |
void |
declRelation(String name,
String basedOn,
Set<Relation.Property> properties,
Constraint domConstraint,
Constraint ranConstraint,
Object... otherParams) |
String |
describe(String name)
Print to the return String the complete path (in persistent form) from the
root node to the node named name.
|
String |
describe(String name,
org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat) |
String |
describeIndividual(String ind) |
String |
describeRelation(String relation) |
String |
describeType(String type) |
Status |
extendWith(String spec)
Add the persistent Ontology data in spec to this
Ontology.
|
org.semanticweb.owlapi.model.OWLClass |
findClassBySimpleName(String name) |
org.semanticweb.owlapi.model.OWLClass |
findClassInClosureBySimpleName(String name) |
org.semanticweb.owlapi.model.OWLEntity |
findEntity(String name) |
<T extends org.semanticweb.owlapi.model.OWLNamedObject> |
findEntity(String name,
Class<T> cls) |
org.semanticweb.owlapi.model.OWLNamedIndividual |
findIndividualInClosureBySimpleName(String name) |
org.semanticweb.owlapi.model.IRI |
findIRI(String name) |
OWLOntology |
findOntologyOfSimpleName(String name) |
void |
flushReasoner() |
String |
getClassHierarchyString(org.semanticweb.owlapi.model.OWLClassExpression cls) |
private static String |
getClassHierarchyString(org.semanticweb.owlapi.model.OWLClassExpression cls,
Set<org.semanticweb.owlapi.model.OWLOntology> onts,
String prefix,
Vector<String> map) |
String |
getDefaultFileExtension() |
String |
getName() |
static Ontology |
getOntology(String name)
Find (get) or read (load) in a CASAOntology in the following manner:
if name doesn't end in ".owl", then append ".owl" to the name.
|
static org.semanticweb.owlapi.model.OWLOntologyManager |
getOntologyManager() |
org.semanticweb.HermiT.Reasoner |
getReasoner() |
static String[] |
getResident() |
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
instanceOf(org.semanticweb.owlapi.model.OWLNamedIndividual child) |
boolean |
instanceOf(org.semanticweb.owlapi.model.OWLNamedIndividual child,
org.semanticweb.owlapi.model.OWLClass parent) |
Set<String> |
instanceOf(String child) |
boolean |
instanceOf(String child,
String parent) |
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isa(org.semanticweb.owlapi.model.OWLClass child) |
private org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isa(org.semanticweb.owlapi.model.OWLClass child,
boolean direct) |
boolean |
isa(org.semanticweb.owlapi.model.OWLClass child,
org.semanticweb.owlapi.model.OWLClass parent) |
Set<String> |
isa(String child)
Finals all ancestors of child.
|
private Set<String> |
isa(String child,
boolean direct) |
boolean |
isa(String child,
String parent)
Determines if parent is an ancestor of child.
|
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isAncestor(org.semanticweb.owlapi.model.OWLClass child) |
Set<String> |
isAncestor(String child) |
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isChild(org.semanticweb.owlapi.model.OWLClass parent) |
Set<String> |
isChild(String parent) |
boolean |
isCompatable(Ontology other)
Determines if other is a compatible description (see
#describe(TypeNode) )
to this TypeHierarchy. |
void |
isCompatableThrow(Ontology other)
Determines if other is a compatible description (see
#describe(TypeNode) )
to this TypeHierarchy. |
boolean |
isConsistent()
Defers to the reasoner.
|
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isDescendant(org.semanticweb.owlapi.model.OWLClass parent) |
Set<String> |
isDescendant(String parent) |
boolean |
isIndividual(String name)
Returns true if the agent "knows" about the token string in the parameter and it's an individual.
|
boolean |
isObject(String name)
Returns true if the agent "knows" about the token string in the parameter: it's either a type or an individual.
|
org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isParent(org.semanticweb.owlapi.model.OWLClass child) |
Set<String> |
isParent(String child)
Finals all parents (direct ancestors) of child.
|
boolean |
isRelation(String name)
Returns true if the agent "knows" about the token string in the parameter and it's an relation.
|
private org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> |
isSubClass(org.semanticweb.owlapi.model.OWLClass parent,
boolean direct) |
private Set<String> |
isSubClass(String parent,
boolean direct) |
boolean |
isType(String name)
Returns true if the agent "knows" about the token string in the parameter and it's a type.
|
org.semanticweb.owlapi.model.IRI |
makeIRIFromSimpleName(String name)
Builds a new full IRI for this ontology.
|
static Ontology |
makeOntology(String name,
Ontology... superOntologies) |
Set<String> |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLClass domain) |
boolean |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLClass domain,
org.semanticweb.owlapi.model.OWLClass range) |
boolean |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLClass domain,
org.semanticweb.owlapi.model.OWLNamedIndividual range) |
Set<String> |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLNamedIndividual domain) |
boolean |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLNamedIndividual domain,
org.semanticweb.owlapi.model.OWLClass range) |
boolean |
relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation,
org.semanticweb.owlapi.model.OWLNamedIndividual domain,
org.semanticweb.owlapi.model.OWLNamedIndividual range) |
Set<String> |
relatedTo(String relation,
String domain) |
boolean |
relatedTo(String relation,
String domain,
String range)
Determines if an element is related to another element by the relation.
|
<T extends org.semanticweb.owlapi.model.OWLEntity> |
removeEntity(String name,
Class<T> cls)
Removes an entity of class cls from this ontology.
|
void |
removeIndividual(String name)
Removes an Individual from this ontology.
|
void |
removeType(String name)
Removes a Class fromt his ontology.
|
private void |
setRelation(String name) |
private void |
setSymbol(String name)
Set the name as a string symbol in the Lisp environment.
|
String |
toString()
Create a string containing the persistent representation of this object.
|
String |
toString(org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat) |
static String |
toString(org.semanticweb.owlapi.model.OWLOntology ont,
org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat) |
static String |
toStringPlusImports(org.semanticweb.owlapi.model.OWLOntology ont,
org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat) |
accept, accept, accept, applyChange, applyChanges, compareObjectOfSameType, containsAnnotationPropertyInSignature, containsAnnotationPropertyInSignature, containsAxiom, containsAxiom, containsAxiomIgnoreAnnotations, containsAxiomIgnoreAnnotations, containsClassInSignature, containsClassInSignature, containsDataPropertyInSignature, containsDataPropertyInSignature, containsDatatypeInSignature, containsDatatypeInSignature, containsEntityInSignature, containsEntityInSignature, containsEntityInSignature, containsEntityInSignature, containsIndividualInSignature, containsIndividualInSignature, containsObjectPropertyInSignature, containsObjectPropertyInSignature, containsReference, containsReference, containsReference, containsReference, containsReference, containsReference, equals, getABoxAxioms, getAnnotationAssertionAxioms, getAnnotationPropertiesInSignature, getAnnotationPropertyDomainAxioms, getAnnotationPropertyRangeAxioms, getAnnotations, getAnonymousIndividuals, getAsymmetricObjectPropertyAxioms, getAxiomCount, getAxiomCount, getAxiomCount, getAxioms, getAxioms, getAxioms, getAxioms, getAxioms, getAxioms, getAxioms, getAxioms, getAxioms, getAxiomsIgnoreAnnotations, getAxiomsIgnoreAnnotations, getClassAssertionAxioms, getClassAssertionAxioms, getClassesInSignature, getClassesInSignature, getDataPropertiesInSignature, getDataPropertiesInSignature, getDataPropertyAssertionAxioms, getDataPropertyDomainAxioms, getDataPropertyRangeAxioms, getDataSubPropertyAxiomsForSubProperty, getDataSubPropertyAxiomsForSuperProperty, getDatatypeDefinitions, getDatatypesInSignature, getDatatypesInSignature, getDeclarationAxioms, getDifferentIndividualAxioms, getDirectImports, getDirectImportsDocuments, getDisjointClassesAxioms, getDisjointDataPropertiesAxioms, getDisjointObjectPropertiesAxioms, getDisjointUnionAxioms, getEntitiesInSignature, getEntitiesInSignature, getEquivalentClassesAxioms, getEquivalentDataPropertiesAxioms, getEquivalentObjectPropertiesAxioms, getFunctionalDataPropertyAxioms, getFunctionalObjectPropertyAxioms, getGeneralClassAxioms, getHasKeyAxioms, getImports, getImportsClosure, getImportsDeclarations, getIndividualsInSignature, getIndividualsInSignature, getInverseFunctionalObjectPropertyAxioms, getInverseObjectPropertyAxioms, getIrreflexiveObjectPropertyAxioms, getLogicalAxiomCount, getLogicalAxioms, getNegativeDataPropertyAssertionAxioms, getNegativeObjectPropertyAssertionAxioms, getObjectPropertiesInSignature, getObjectPropertiesInSignature, getObjectPropertyAssertionAxioms, getObjectPropertyDomainAxioms, getObjectPropertyRangeAxioms, getObjectSubPropertyAxiomsForSubProperty, getObjectSubPropertyAxiomsForSuperProperty, getOntologyID, getOWLOntologyManager, getRBoxAxioms, getReferencedAnnotationProperties, getReferencedAnonymousIndividuals, getReferencedObjects, getReferencingAxioms, getReferencingAxioms, getReferencingAxioms, getReflexiveObjectPropertyAxioms, getSameIndividualAxioms, getSignature, getSignature, getSubAnnotationPropertyOfAxioms, getSubClassAxiomsForSubClass, getSubClassAxiomsForSuperClass, getSymmetricObjectPropertyAxioms, getTBoxAxioms, getTransitiveObjectPropertyAxioms, hashCode, isAnonymous, isDeclared, isDeclared, isEmpty
compareLists, compareSets, compareTo, getNestedClassExpressions, getOWLDataFactory, isBottomEntity, isTopEntity, setOWLDataFactory
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNestedClassExpressions, isBottomEntity, isTopEntity
compareTo
private static final long serialVersionUID
public static final String DEFAULT_FILE_EXTENSION
private static org.semanticweb.owlapi.model.OWLOntologyManager manager
private org.semanticweb.HermiT.Reasoner reasoner
static final boolean isaStrict
public OWLOntology(org.semanticweb.owlapi.model.OWLOntologyManager mgr, org.semanticweb.owlapi.model.OWLOntologyID id)
#open(String)
or
#open(String, String)
to create an ontology.mgr
- id
- public org.semanticweb.HermiT.Reasoner getReasoner()
public static org.semanticweb.owlapi.model.OWLOntologyManager getOntologyManager()
public boolean isConsistent()
public void addType(String name, String... parents) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
addType(String, String)
.addType
in interface Ontology
name
- parent
- ParentNodeNotFoundException
DuplicateNodeException
IllegalOperationException
public void addType(String name, String parent) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
Ontology
add(name,new String[]{parent})
. Use for types
that only have a single super-type.addType
in interface Ontology
name
- the name of new typeparent
- the super-type of name.ParentNodeNotFoundException
- if parent
isn't in the hierarchy.IllegalOperationException
DuplicateNodeException
public void addType(String name, org.semanticweb.owlapi.model.OWLClass parent) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
name
- parent
- ParentNodeNotFoundException
DuplicateNodeException
IllegalOperationException
public void addAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
axiom
- public void flushReasoner()
public void addIndividual(String name, String... parents) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
addIndividual
in interface Ontology
ParentNodeNotFoundException
DuplicateNodeException
IllegalOperationException
public void addIndividual(String name, String parent) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
addIndividual
in interface Ontology
ParentNodeNotFoundException
DuplicateNodeException
IllegalOperationException
public void addIndividual(String name, org.semanticweb.owlapi.model.OWLClass parent) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
name
- parent
- ParentNodeNotFoundException
DuplicateNodeException
IllegalOperationException
public void removeIndividual(String name) throws IllegalOperationException
name
- IllegalOperationException
public void removeType(String name) throws IllegalOperationException
name
- IllegalOperationException
public <T extends org.semanticweb.owlapi.model.OWLEntity> void removeEntity(String name, Class<T> cls) throws IllegalOperationException
name
- cls
- IllegalOperationException
public org.semanticweb.owlapi.model.IRI makeIRIFromSimpleName(String name)
name
- public int add(String description) throws DuplicateNodeException, IncompatableTypeHierarchiesException, ParentNodeNotFoundException, ParseException
IncompatableTypeHierarchiesException
.
Instead execute the lisp commands (declOntology ...) or (with-ontology ...).add
in interface Ontology
IncompatableTypeHierarchiesException
ParentNodeNotFoundException
ParseException
DuplicateNodeException
Ontology.add(java.lang.String)
public Set<String> relatedTo(String relation, String domain) throws UnsupportedOperationException, IllegalOperationException
relatedTo
in interface Ontology
UnsupportedOperationException
IllegalOperationException
public String describeRelation(String relation) throws IllegalOperationException
describeRelation
in interface Ontology
IllegalOperationException
public String describeType(String type) throws IllegalOperationException
describeType
in interface Ontology
IllegalOperationException
public String describeIndividual(String ind) throws IllegalOperationException
describeIndividual
in interface Ontology
IllegalOperationException
public Set<String> relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLNamedIndividual domain) throws UnsupportedOperationException, IllegalOperationException
public Set<String> relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLClass domain) throws UnsupportedOperationException, IllegalOperationException
public boolean relatedTo(String relation, String domain, String range) throws UnsupportedOperationException, IllegalOperationException
Ontology
domain
has a role of
type range
.relatedTo
in interface Ontology
domain
- the thing that is a the "source" of the relationrange
- the thing that is the "destination" of the relationdomain
is related to range
UnsupportedOperationException
IllegalOperationException
public boolean relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLNamedIndividual domain, org.semanticweb.owlapi.model.OWLNamedIndividual range) throws UnsupportedOperationException, IllegalOperationException
relation
- domain
- range
- UnsupportedOperationException
IllegalOperationException
public boolean relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLClass domain, org.semanticweb.owlapi.model.OWLNamedIndividual range) throws UnsupportedOperationException, IllegalOperationException
relation
- domain
- range
- UnsupportedOperationException
IllegalOperationException
public boolean relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLNamedIndividual domain, org.semanticweb.owlapi.model.OWLClass range) throws UnsupportedOperationException, IllegalOperationException
relation
- domain
- range
- UnsupportedOperationException
IllegalOperationException
public boolean relatedTo(org.semanticweb.owlapi.model.OWLObjectProperty relation, org.semanticweb.owlapi.model.OWLClass domain, org.semanticweb.owlapi.model.OWLClass range) throws UnsupportedOperationException, IllegalOperationException
relation
- domain
- range
- UnsupportedOperationException
IllegalOperationException
public boolean isa(String child, String parent) throws IllegalOperationException
Ontology
isa
in interface Ontology
child
- the name if a node in the TypeHierarchyparent
- the name of a node in the TypeHierarchyIllegalOperationException
public Set<String> isa(String child) throws IllegalOperationException
Ontology
isa
in interface Ontology
child
- IllegalOperationException
public Set<String> isParent(String child) throws IllegalOperationException
Ontology
isParent
in interface Ontology
child
- IllegalOperationException
public Set<String> isAncestor(String child) throws IllegalOperationException
isAncestor
in interface Ontology
child
- IllegalOperationException
public Set<String> isChild(String parent) throws IllegalOperationException
isChild
in interface Ontology
parent
- IllegalOperationException
public Set<String> isDescendant(String parent) throws IllegalOperationException
isDescendant
in interface Ontology
parent
- IllegalOperationException
private Set<String> isa(String child, boolean direct) throws IllegalOperationException
child
- direct
- If true, return only direct ancestors (parents), otherwise return all ancestors.IllegalOperationException
private Set<String> isSubClass(String parent, boolean direct) throws IllegalOperationException
parent
- direct
- If true, return only direct descendants (children), otherwise return all descendants.IllegalOperationException
private org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isa(org.semanticweb.owlapi.model.OWLClass child, boolean direct) throws IllegalOperationException
IllegalOperationException
private org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isSubClass(org.semanticweb.owlapi.model.OWLClass parent, boolean direct) throws IllegalOperationException
IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isa(org.semanticweb.owlapi.model.OWLClass child) throws IllegalOperationException
child
- IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isParent(org.semanticweb.owlapi.model.OWLClass child) throws IllegalOperationException
child
- IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isAncestor(org.semanticweb.owlapi.model.OWLClass child) throws IllegalOperationException
child
- IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isChild(org.semanticweb.owlapi.model.OWLClass parent) throws IllegalOperationException
parent
- IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> isDescendant(org.semanticweb.owlapi.model.OWLClass parent) throws IllegalOperationException
parent
- IllegalOperationException
public boolean isa(org.semanticweb.owlapi.model.OWLClass child, org.semanticweb.owlapi.model.OWLClass parent) throws IllegalOperationException
child
- parent
- IllegalOperationException
public boolean instanceOf(String child, String parent) throws IllegalOperationException
instanceOf
in interface Ontology
IllegalOperationException
public boolean instanceOf(org.semanticweb.owlapi.model.OWLNamedIndividual child, org.semanticweb.owlapi.model.OWLClass parent) throws IllegalOperationException
child
- parent
- IllegalOperationException
public Set<String> instanceOf(String child) throws IllegalOperationException
child
- IllegalOperationException
public org.semanticweb.owlapi.reasoner.NodeSet<org.semanticweb.owlapi.model.OWLClass> instanceOf(org.semanticweb.owlapi.model.OWLNamedIndividual child) throws IllegalOperationException
child
- IllegalOperationException
public boolean isObject(String name) throws IllegalOperationException
Ontology
isObject
in interface Ontology
name
- the name of a node in the TypeHiearchyIllegalOperationException
- if the qualified syntax explicitly specifies a dictionary that is not the owner.public boolean isType(String name) throws IllegalOperationException
Ontology
isType
in interface Ontology
name
- the name of a node in the TypeHiearchyIllegalOperationException
- if the qualified syntax explicitly specifies a dictionary that is not the owner.public boolean isIndividual(String name) throws IllegalOperationException
Ontology
isIndividual
in interface Ontology
name
- the name of a node in the TypeHiearchyIllegalOperationException
- if the qualified syntax explicitly specifies a dictionary that is not the owner.public boolean isRelation(String name) throws IllegalOperationException
Ontology
isRelation
in interface Ontology
name
- the name of the relationIllegalOperationException
- if the qualified syntax explicitly specifies a dictionary that is not the owner.public String describe(String name, org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat) throws IllegalOperationException
IllegalOperationException
public String describe(String name) throws IllegalOperationException
Ontology
describe
in interface Ontology
name
- the name of a node in the TypeHiearchyIllegalOperationException
- TODOpublic String getClassHierarchyString(org.semanticweb.owlapi.model.OWLClassExpression cls)
public org.semanticweb.owlapi.model.OWLClass findClassBySimpleName(String name) throws IllegalOperationException
name
- IllegalOperationException
public OWLOntology findOntologyOfSimpleName(String name) throws IllegalOperationException
name
- IllegalOperationException
public org.semanticweb.owlapi.model.IRI findIRI(String name) throws IllegalOperationException
name
- IllegalOperationException
public org.semanticweb.owlapi.model.OWLEntity findEntity(String name) throws IllegalOperationException
name
- IllegalOperationException
public <T extends org.semanticweb.owlapi.model.OWLNamedObject> T findEntity(String name, Class<T> cls) throws IllegalOperationException
name
- cls
- IllegalOperationException
public org.semanticweb.owlapi.model.OWLClass findClassInClosureBySimpleName(String name) throws IllegalOperationException
name
- IllegalOperationException
public org.semanticweb.owlapi.model.OWLNamedIndividual findIndividualInClosureBySimpleName(String name) throws IllegalOperationException
name
- IllegalOperationException
private static String getClassHierarchyString(org.semanticweb.owlapi.model.OWLClassExpression cls, Set<org.semanticweb.owlapi.model.OWLOntology> onts, String prefix, Vector<String> map)
public boolean isCompatable(Ontology other)
Ontology
#describe(TypeNode)
)
to this TypeHierarchy.
Node A is compatible with node B iff all nodes in A that have matched names
in B are exactly the same as the corresponding node in B (that is, they have
the same name, and each of the parents [recursively] are exactly the same).
forall i:Node | i member B . exists j:Node | j member A . i.name = j.nameisCompatable
in interface Ontology
other
- the TypeHierarchy ot compare to this one for compatabilitypublic void isCompatableThrow(Ontology other) throws IncompatableTypeHierarchiesException
Ontology
#describe(TypeNode)
)
to this TypeHierarchy.
Node A is compatible with node B iff all nodes in A that have matched names
in B are exactly the same as the corresponding node in B (that is, they have
the same name, and each of the parents [recursively] are exactly the same).
forall i:Node | i member B . exists j:Node | j member A . i.name = j.nameisCompatableThrow
in interface Ontology
other
- the TypeHierarchy ot compare to this one for compatabilityIncompatableTypeHierarchiesException
- iff other is incompatablepublic Status extendWith(String spec)
Ontology
extendWith
in interface Ontology
spec
- A String containing the persistent for of an
Ontologypublic void addRelation(String name, String dom, String ran) throws IllegalOperationException
IllegalOperationException
public void addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop, String dom, String ran) throws IllegalOperationException
IllegalOperationException
private void addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop, org.semanticweb.owlapi.model.OWLClass dom, String ran) throws IllegalOperationException
IllegalOperationException
private void addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop, org.semanticweb.owlapi.model.OWLNamedIndividual dom, String ran) throws ParentNodeNotFoundException, DuplicateNodeException, IllegalOperationException
private void addRelation(org.semanticweb.owlapi.model.OWLObjectProperty prop, org.semanticweb.owlapi.model.OWLNamedIndividual dom, org.semanticweb.owlapi.model.OWLNamedIndividual ran) throws IllegalOperationException
IllegalOperationException
public void addRelation(org.semanticweb.owlapi.model.OWLDataProperty prop, String dom, String ran) throws IllegalOperationException
IllegalOperationException
public static Ontology getOntology(String name) throws IllegalArgumentException
OWLOntologyManager.getOntology(IRI)
.
OWLOntologyManager.loadOntology(IRI)
.
OWLOntologyManager.loadOntology(IRI)
.
theName
- the name of the ontology as either a raw name or as a existing file path.IllegalArgumentException
public void addSuperOntologies(Ontology... superOntologies) throws IllegalOperationException
addSuperOntologies
in interface Ontology
IllegalOperationException
public void addSuperOntologies(String... superOntologyNames) throws IllegalOperationException
addSuperOntologies
in interface Ontology
IllegalOperationException
public static Ontology makeOntology(String name, Ontology... superOntologies) throws IllegalOperationException
IllegalOperationException
private void setSymbol(String name) throws IllegalOperationException
name
- the symbol to be defined.IllegalOperationException
- if the name was illegal.private void setRelation(String name) throws IllegalOperationException
IllegalOperationException
public void commitOntToLisp()
public String toString()
Ontology
public String toString(org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat)
public static String toStringPlusImports(org.semanticweb.owlapi.model.OWLOntology ont, org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat)
public void declMaplet(String relationName, String domainName, String rangeName) throws IllegalOperationException
declMaplet
in interface Ontology
IllegalOperationException
public void declRelation(String name, String basedOn, Set<Relation.Property> properties, Constraint domConstraint, Constraint ranConstraint, Object... otherParams) throws IllegalOperationException
declRelation
in interface Ontology
IllegalOperationException
public static String toString(org.semanticweb.owlapi.model.OWLOntology ont, org.semanticweb.owlapi.model.OWLOntologyFormat outputFormat)
ont
- The ontology to return as a string.outputFormat
- The format in which to return the string. May be null, in which case it will be the manager's format, or (if the manager doesn't have a format) Manchester syntax.public static String[] getResident()
public String getDefaultFileExtension()
getDefaultFileExtension
in interface Ontology