|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protege.model.DefaultFrame
edu.stanford.smi.protege.model.DefaultInstance
edu.stanford.smi.protege.model.DefaultCls
edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass
edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass
edu.stanford.smi.protegex.owl.model.impl.DefaultOWLNamedClass
The default implementation of the OWLNamedClass interface.
Field Summary |
Fields inherited from class edu.stanford.smi.protege.model.DefaultFrame |
|
Constructor Summary | |
DefaultOWLNamedClass()
|
|
DefaultOWLNamedClass(edu.stanford.smi.protege.model.KnowledgeBase kb,
edu.stanford.smi.protege.model.FrameID id)
|
Method Summary | |
void |
accept(OWLModelVisitor visitor)
This method is provided to be used with the OWLModelVisitor ,
which is part of the visitor design pattern. |
void |
addDisjointClass(RDFSClass aClass)
Adds a class to the list of disjoint classes of this. |
void |
addEquivalentClass(RDFSClass aClass)
Adds a given class to the list of equivalent classes of this. |
void |
addInferredSuperclass(RDFSClass superclass)
Adds a computed superclass, as the result of a classification. |
OWLIndividual |
createOWLIndividual(String name)
Creates a new individual of this (assuming this is not a metaclass). |
boolean |
equalsStructurally(RDFSClass cls)
|
RDFResource |
getAllValuesFrom(RDFProperty property)
Gets the allowed class for a given property. |
Set |
getAssociatedProperties()
Gets all properties that have been associated with this class. |
int |
getClassificationStatus()
Gets the classification status (whether this class is marked as inconsistent or not). |
Collection |
getDirectRestrictions()
|
private void |
getDirectRestrictions(Collection results,
Iterator clses)
|
Object |
getHasValue(RDFProperty property)
Gets the value of any owl:hasValue restriction defined on this class. |
Icon |
getIcon()
|
String |
getIconName()
Gets the local name of an icon for this type of resource. |
ImageIcon |
getImageIcon()
Gets an ImageIcon displaying this. |
private ImageIcon |
getImageIconForNonMetaclass()
|
private String |
getImageIconNameForNonMetaclass()
|
Collection |
getInferredEquivalentClasses()
|
Collection |
getInferredSubclasses()
Gets the subclasses that were computed by the most recent call of a classifier. |
Collection |
getInferredSuperclasses()
Gets the superclasses that were computed by the most recent call of a classifier. |
int |
getMaxCardinality(RDFProperty property)
Gets the maximum number of values that are allowed for a given property at this class. |
int |
getMinCardinality(RDFProperty property)
Gets the minimum number of values that are allowed for a given property at this class. |
Collection |
getRestrictions()
Same as getRestrictions(false) . |
Collection |
getRestrictions(boolean includingSuperclassRestrictions)
Gets all Restrictions that are defined on this class or (optionally) its superclasses. |
private static void |
getRestrictions(OWLNamedClass cls,
Set reached,
Collection results)
|
Collection |
getRestrictions(RDFProperty property,
boolean includingSuperclassRestrictions)
Gets all restrictions that are defined on a given property. |
RDFResource |
getSomeValuesFrom(RDFProperty property)
Gets the filler of any defined someValuesFrom restriction for a given property. |
boolean |
getSubclassesDisjoint()
Checks whether all subclasses of this are declared to be disjoint. |
boolean |
hasNamedSuperclass()
Checks whether this has at least one named direct superclass. |
boolean |
hasNamedSuperClass()
|
boolean |
isConsistent()
Determines whether this class has been flagged as being inconsistent or not. |
boolean |
isDefinedClass()
Checks if this is a "defined" class, with necessary and sufficient conditions. |
boolean |
isFunctionalProperty(RDFProperty property)
Checks whether a given property is "functional" at this class. |
private static boolean |
isOverloadedAllValuesFrom(OWLAllValuesFrom restriction,
Collection restrictions)
|
private static boolean |
isOverloadedCardinality(OWLCardinality restriction,
Collection restrictions)
|
private static boolean |
isOverloadedMaxCardinality(OWLMaxCardinality restriction,
Collection restrictions)
|
private static boolean |
isOverloadedMinCardinality(OWLMinCardinality restriction,
Collection restrictions)
|
boolean |
isProbeClass()
Checks if this has been marked as a probe class, using the protege:probeClass annotation property. |
void |
removeDisjointClass(RDFSClass aClass)
Removes a disjoint class of this. |
void |
removeEquivalentClass(RDFSClass equivalentClass)
Removes an equivalent class. |
void |
removeInferredSuperclass(RDFSClass superclass)
Removes a computed superclass, as the result of a classification. |
void |
setClassificationStatus(int value)
Sets the classification status of this. |
void |
setDefinition(RDFSClass definingClass)
Removes all equivalent classes and then adds the given class (as definition). |
void |
setSubclassesDisjoint(boolean value)
Sets the value of the protege:subclassesDisjoint flag at this class. |
Methods inherited from class edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass |
createAnonymousInstance, createClone, createRDFIndividual, equalsStructurally, getDependingClasses, getFirstSuperclass, getNestedBrowserText, getNestedNamedClasses, getUnionRangeClasses, isAnonymous, isDeprecated, isVisibleFromOWLThing, setDeprecated |
Methods inherited from class edu.stanford.smi.protege.model.DefaultCls |
addClsListener, addDirectSuperclass, addDirectTemplateSlot, addTemplateFacetValue, addTemplateSlotValue, createDirectInstance, getBrowserSlot, getBrowserSlotPattern, getConcreteSubclasses, getDirectBrowserSlot, getDirectBrowserSlotPattern, getDirectInstanceCount, getDirectInstances, getDirectlyOverriddenTemplateFacets, getDirectSubclassCount, getDirectSubclasses, getDirectSuperclassCount, getDirectSuperclasses, getDirectTemplateFacetValues, getDirectTemplateSlots, getDirectTemplateSlotValues, getInheritedBrowserSlot, getInheritedBrowserSlotPattern, getInstanceCount, getInstances, getOverriddenTemplateFacets, getSubclasses, getSuperclasses, getTemplateFacets, getTemplateFacetValue, getTemplateFacetValues, getTemplateSlotAllowedClses, getTemplateSlotAllowedParents, getTemplateSlotAllowedValues, getTemplateSlotAllowsMultipleValues, getTemplateSlotDefaultValues, getTemplateSlotDocumentation, getTemplateSlotMaximumCardinality, getTemplateSlotMaximumValue, getTemplateSlotMinimumCardinality, getTemplateSlotMinimumValue, getTemplateSlots, getTemplateSlotValue, getTemplateSlotValues, getTemplateSlotValueType, getVisibleDirectSubclassCount, getVisibleDirectSubclasses, getVisibleTemplateSlots, hasDirectlyOverriddenTemplateFacet, hasDirectlyOverriddenTemplateSlot, hasDirectSuperclass, hasDirectTemplateSlot, hasInheritedTemplateSlot, hasOverriddenTemplateFacet, hasOverriddenTemplateSlot, hasSuperclass, hasTemplateFacet, hasTemplateSlot, isAbstract, isClsMetaCls, isConcrete, isDefaultClsMetaCls, isDefaultFacetMetaCls, isDefaultSlotMetaCls, isFacetMetaCls, isMetaCls, isRoot, isSlotMetaCls, moveDirectSubclass, moveDirectTemplateSlot, removeClsListener, removeDirectSuperclass, removeDirectTemplateSlot, removeTemplateFacetOverrides, setAbstract, setDirectBrowserSlot, setDirectBrowserSlotPattern, setDirectTypeOfSubclasses, setTemplateFacetValue, setTemplateFacetValues, setTemplateSlotAllowedClses, setTemplateSlotAllowedParents, setTemplateSlotAllowedValues, setTemplateSlotAllowsMultipleValues, setTemplateSlotDefaultValues, setTemplateSlotDocumentation, setTemplateSlotDocumentation, setTemplateSlotMaximumCardinality, setTemplateSlotMaximumValue, setTemplateSlotMinimumCardinality, setTemplateSlotMinimumValue, setTemplateSlotValue, setTemplateSlotValues, setTemplateSlotValueType, toString |
Methods inherited from class edu.stanford.smi.protege.model.DefaultInstance |
addDirectType, addInstanceListener, copy, deepCopy, getBrowserText, getDirectType, getDirectTypes, getOwnFacetValue, getOwnFacetValues, getReachableSimpleInstances, hasDirectType, hasType, moveDirectType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes, shallowCopy |
Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame |
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, localize, markDeleted, markDeleting, moveDirectOwnSlotValue, readExternal, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setEditable, setIncluded, setName, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setSystem, setVisible, writeExternal |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.OWLNamedClass |
getDefinition, getDisjointClasses |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFSNamedClass |
createAnonymousInstance, createRDFIndividual, getFirstSuperclass, getUnionRangeClasses, isVisibleFromOWLThing |
Methods inherited from interface edu.stanford.smi.protege.model.Instance |
moveDirectType |
Methods inherited from interface edu.stanford.smi.protege.model.Frame |
delete, getName, isValid, isVisible, moveDirectOwnSlotValue, setName, setVisible |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface edu.stanford.smi.protege.model.Cls |
getBrowserSlot, getDirectBrowserSlot, getInheritedBrowserSlot |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFObject |
equalsStructurally |
Methods inherited from interface edu.stanford.smi.protegex.owl.model.Deprecatable |
isDeprecated, setDeprecated |
Constructor Detail |
public DefaultOWLNamedClass(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.model.FrameID id)
public DefaultOWLNamedClass()
Method Detail |
public void addDisjointClass(RDFSClass aClass)
OWLNamedClass
addDisjointClass
in interface OWLNamedClass
aClass
- the disjoint class to addpublic void addEquivalentClass(RDFSClass aClass)
OWLNamedClass
addEquivalentClass
in interface OWLNamedClass
aClass
- the RDFSClass to add as equivalent classpublic void addInferredSuperclass(RDFSClass superclass)
OWLNamedClass
addInferredSuperclass
in interface OWLNamedClass
superclass
- the computed superclass to addpublic OWLIndividual createOWLIndividual(String name)
OWLNamedClass
createOWLIndividual
in interface OWLNamedClass
name
- the name of the new instance or null for a default value
public boolean equalsStructurally(RDFSClass cls)
public RDFResource getAllValuesFrom(RDFProperty property)
OWLNamedClass
getAllValuesFrom
in interface OWLNamedClass
public Set getAssociatedProperties()
RDFSNamedClass
getAssociatedProperties
in interface RDFSNamedClass
getAssociatedProperties
in class DefaultRDFSNamedClass
public int getClassificationStatus()
OWLNamedClass
getClassificationStatus
in interface OWLNamedClass
public Collection getDirectRestrictions()
getDirectRestrictions
in interface OWLNamedClass
OWLNamedClass.getRestrictions()
public Object getHasValue(RDFProperty property)
OWLNamedClass
getHasValue
in interface OWLNamedClass
property
- the property to look for hasValue restrictions on
public Collection getInferredEquivalentClasses()
getInferredEquivalentClasses
in interface OWLNamedClass
private void getDirectRestrictions(Collection results, Iterator clses)
public Collection getInferredSubclasses()
OWLNamedClass
getInferredSubclasses
in interface OWLNamedClass
public Collection getInferredSuperclasses()
OWLNamedClass
getInferredSuperclasses
in interface OWLNamedClass
public int getMaxCardinality(RDFProperty property)
OWLNamedClass
getMaxCardinality
in interface OWLNamedClass
property
- the property to get the maximum cardinality of
public int getMinCardinality(RDFProperty property)
OWLNamedClass
getMinCardinality
in interface OWLNamedClass
property
- the property to get the minimum cardinality of
public Collection getRestrictions()
OWLNamedClass
getRestrictions(false)
.
getRestrictions
in interface OWLNamedClass
public Icon getIcon()
getIcon
in interface ProtegeInstance
getIcon
in class DefaultRDFSNamedClass
public String getIconName()
RDFResource
getIconLocation()
.
getIconName
in interface RDFResource
getIconName
in class DefaultRDFSNamedClass
public ImageIcon getImageIcon()
RDFSClass
getIcon()
for use when an ImageIcon is required.
getImageIcon
in interface RDFSClass
getImageIcon
in class DefaultRDFSNamedClass
private ImageIcon getImageIconForNonMetaclass()
private String getImageIconNameForNonMetaclass()
public Collection getRestrictions(boolean includingSuperclassRestrictions)
OWLNamedClass
getRestrictions
in interface OWLNamedClass
includingSuperclassRestrictions
- true to also include restrictions from named superclasses
OWLNamedClass.getDirectRestrictions()
public Collection getRestrictions(RDFProperty property, boolean includingSuperclassRestrictions)
OWLNamedClass
getRestrictions(includingSuperclassRestrictions)
but with
only those restrictions that restrict the selected property.
getRestrictions
in interface OWLNamedClass
property
- the property to get the restrictions aboutincludingSuperclassRestrictions
- true to also include restrictions from named superclasses
private static void getRestrictions(OWLNamedClass cls, Set reached, Collection results)
public RDFResource getSomeValuesFrom(RDFProperty property)
OWLNamedClass
getSomeValuesFrom
in interface OWLNamedClass
public boolean isConsistent()
OWLNamedClass
isConsistent
in interface OWLNamedClass
true
if the class is consistent, false
if the class is inconsistent.private static boolean isOverloadedAllValuesFrom(OWLAllValuesFrom restriction, Collection restrictions)
private static boolean isOverloadedCardinality(OWLCardinality restriction, Collection restrictions)
private static boolean isOverloadedMaxCardinality(OWLMaxCardinality restriction, Collection restrictions)
private static boolean isOverloadedMinCardinality(OWLMinCardinality restriction, Collection restrictions)
public boolean getSubclassesDisjoint()
OWLNamedClass
getSubclassesDisjoint
in interface OWLNamedClass
public boolean hasNamedSuperclass()
OWLNamedClass
hasNamedSuperclass
in interface OWLNamedClass
public boolean isDefinedClass()
OWLNamedClass
getDefinition() != null
.
isDefinedClass
in interface OWLNamedClass
public boolean isFunctionalProperty(RDFProperty property)
RDFSNamedClass
isFunctionalProperty
in interface RDFSNamedClass
isFunctionalProperty
in class DefaultRDFSNamedClass
public boolean hasNamedSuperClass()
public boolean isProbeClass()
OWLNamedClass
isProbeClass
in interface OWLNamedClass
public void removeDisjointClass(RDFSClass aClass)
OWLNamedClass
removeDisjointClass
in interface OWLNamedClass
aClass
- the disjoint class to removepublic void removeEquivalentClass(RDFSClass equivalentClass)
OWLNamedClass
removeEquivalentClass
in interface OWLNamedClass
equivalentClass
- public void removeInferredSuperclass(RDFSClass superclass)
OWLNamedClass
removeInferredSuperclass
in interface OWLNamedClass
superclass
- the computed superclass to removepublic void setClassificationStatus(int value)
OWLNamedClass
setClassificationStatus
in interface OWLNamedClass
value
- one of OWLNames.CLASSIFICATION_STATUS_xxxpublic void setDefinition(RDFSClass definingClass)
OWLNamedClass
setDefinition
in interface OWLNamedClass
definingClass
- the new equivalent classpublic void setSubclassesDisjoint(boolean value)
OWLNamedClass
setSubclassesDisjoint
in interface OWLNamedClass
value
- the new valuepublic void accept(OWLModelVisitor visitor)
Visitable
OWLModelVisitor
,
which is part of the visitor design pattern. By implementing this method,
instances of the implementing class are stating that they can accept an
OWLModelVisitor
accept
in interface Visitable
accept
in class DefaultRDFSNamedClass
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |