public class OwlClass extends java.lang.Object implements Validating
Modifier and Type | Method and Description |
---|---|
void |
addToDisjoint(OwlClass cls)
Add an OwlClass to the set of disjoint classes for this class.
|
void |
addToIntersection(Validating valid)
Add a validating object to the intersection for this class
|
void |
addToUnion(Validating valid)
Add a validating object to the union for this class
|
boolean |
checkEquivalence(OwlThing thing)
Check whether a particular OwlThing matches any equivalence relations
for this class.
|
static void |
clearDefined()
Remove all defined OwlClasses from the internal tables
|
static OwlClass |
createFromElement(org.w3c.dom.Element element)
Creates an OwlClass from an element which includes its definition.
|
OwlClass |
findCommonDescendant(OwlClass other)
Find the OwlClass that includes both this OwlClass and the other
OwlClass.
|
static OwlClass |
findOwlClass(java.lang.String name)
Find an OwlClass with the given name.
|
java.util.Set<OwlRestriction> |
findRestrictions(java.lang.String propName)
Find all restrictions for a specified property.
|
static java.util.SortedSet<java.lang.String> |
getClassNames()
Gets the set of all available class names
|
java.lang.String |
getComment()
Get the comment for this OwlClass, if any.
|
java.util.Set<OwlClass> |
getDescendants()
Return the set of classes which descend or derive from this class.
|
java.util.Set<OwlClass> |
getDisjoint()
Return the classes this OwlClass is disjoint with.
|
java.util.Set<OwlClass> |
getImpliedClasses()
Gets the set of implied classes.
|
java.util.HashSet<Validating> |
getIntersection()
Gets the set of Validating objects which compose the intersection for
this class, or null if this class is not composed of an intersection
|
java.lang.String |
getName()
Gets the name of this OwlClass.
|
static OwlClass |
getOwlClass(java.lang.String name)
Gets the named OwlClass, creating a skeleton if it has not been defined.
|
static OwlClass |
getOwlClass(java.lang.String name,
OwlClass parentClass)
Gets the named OwlClass, creating a skeleton if it has not been defined.
|
java.util.Set<OwlThing> |
getOwlThings()
Return the set of OwlThings that are members of this class.
|
OwlClass |
getParent()
Gets the parent of this OwlClass, if any.
|
OwlClass |
getRefinedClass(java.util.Map<java.lang.String,OwlThing> assignMap)
Gets the refined class for a particular set of assignments.
|
java.util.Set<OwlRestriction> |
getRestrictions()
Get all restrictions explicitly defined for this class
|
java.util.Set<Validating> |
getUnion()
Gets the set of Validating objects which compose the union for this
class, or null if this class does not include a union
|
java.util.Set<OwlProperty> |
getValidProperties(boolean parentProps)
Get the set of properties which are valid for this OwlClass.
|
boolean |
isDefined()
Checks if this OwlClass is defined.
|
boolean |
isMatch(OwlThing thing)
Return whether the specified thing could be a member of this OwlClass.
|
boolean |
isMember(OwlThing owlThing)
Checks if the provided OwlThing is a member of this OwlClass.
|
boolean |
isModified()
Indicate whether this class has been modified.
|
boolean |
isValid(OwlThing owlThing)
Determine whether the specified OwlThing is a valid member of this
OwlClass
|
boolean |
isValidAssignment(java.util.Map<java.lang.String,OwlThing> assignMap)
Checks if the set of assignments are valid for this OwlClass.
|
boolean |
isValidProperty(java.lang.String propertyName,
OwlThing owlThing)
Determines whether the given OwlThing may be assigned to the property in
a valid way.
|
protected void |
parseSubClassElement(org.w3c.dom.Element element)
Parses the rdfs:subClassOf element, and initializes the relevant
definitions in this class.
|
void |
setDefinedValues(OwlThing owlThing)
Sets the values which are defined by this class for the specified
OwlThing.
|
java.lang.String |
toString()
Return a string representation of this OwlClass.
|
public void addToDisjoint(OwlClass cls)
cls
- the disjoint classpublic void addToIntersection(Validating valid)
valid
- a validating object, typically another OwlClasspublic void addToUnion(Validating valid)
valid
- a validating object, typically another OwlClasspublic boolean checkEquivalence(OwlThing thing)
thing
- the OwlThing to checkpublic OwlClass findCommonDescendant(OwlClass other)
other
- the other OwlClasspublic java.util.Set<OwlRestriction> findRestrictions(java.lang.String propName)
propName
- the name of the property for the classpublic java.lang.String getComment()
public java.util.Set<OwlClass> getDescendants()
public java.util.Set<OwlClass> getDisjoint()
public java.util.Set<OwlClass> getImpliedClasses()
public java.util.HashSet<Validating> getIntersection()
public java.lang.String getName()
public java.util.Set<OwlThing> getOwlThings()
public OwlClass getParent()
public OwlClass getRefinedClass(java.util.Map<java.lang.String,OwlThing> assignMap)
assignMap
- the assignment mappublic java.util.Set<OwlRestriction> getRestrictions()
public java.util.Set<Validating> getUnion()
public java.util.Set<OwlProperty> getValidProperties(boolean parentProps)
parentProps
- the parent properties flagpublic boolean isDefined()
public boolean isMatch(OwlThing thing)
thing
- the OwlThing to checkpublic boolean isMember(OwlThing owlThing)
owlThing
- the thing to check.public boolean isModified()
public boolean isValid(OwlThing owlThing)
isValid
in interface Validating
owlThing
- the OwlThing to checkpublic boolean isValidAssignment(java.util.Map<java.lang.String,OwlThing> assignMap)
assignMap
- the assignment mappublic boolean isValidProperty(java.lang.String propertyName, OwlThing owlThing)
isValidProperty
in interface Validating
propertyName
- the name of the propertyowlThing
- the OwlThing to test for assignment to the propertyprotected void parseSubClassElement(org.w3c.dom.Element element)
element
- the Subclass elementpublic void setDefinedValues(OwlThing owlThing)
owlThing
- the OwlThing to set the values on.public java.lang.String toString()
toString
in class java.lang.Object
public static void clearDefined()
public static OwlClass createFromElement(org.w3c.dom.Element element)
element
- the element containing the class definition.public static OwlClass findOwlClass(java.lang.String name)
name
- the name of the OwlClasspublic static java.util.SortedSet<java.lang.String> getClassNames()
public static OwlClass getOwlClass(java.lang.String name)
name
- the name of the class