Protégé-OWL 3.4.8

edu.stanford.smi.protegex.owl.model
Interface RDFSClass

All Superinterfaces:
edu.stanford.smi.protege.model.Cls, Comparable<edu.stanford.smi.protege.model.Frame>, edu.stanford.smi.protege.model.Frame, edu.stanford.smi.protege.model.Instance, ProtegeCls, ProtegeInstance, RDFObject, RDFResource, Visitable
All Known Subinterfaces:
OWLAllValuesFrom, OWLAnonymousClass, OWLCardinality, OWLCardinalityBase, OWLClass, OWLComplementClass, OWLEnumeratedClass, OWLExistentialRestriction, OWLHasValue, OWLIntersectionClass, OWLLogicalClass, OWLMaxCardinality, OWLMinCardinality, OWLNamedClass, OWLNAryLogicalClass, OWLQuantifierRestriction, OWLRestriction, OWLSomeValuesFrom, OWLUnionClass, RDFSNamedClass
All Known Implementing Classes:
AbstractOWLAnonymousClass, AbstractOWLCardinalityBase, AbstractOWLLogicalClass, AbstractOWLNAryLogicalClass, AbstractOWLQuantifierRestriction, AbstractOWLRestriction, AbstractRDFSClass, DefaultOWLAllValuesFrom, DefaultOWLCardinality, DefaultOWLComplementClass, DefaultOWLEnumeratedClass, DefaultOWLHasValue, DefaultOWLIntersectionClass, DefaultOWLMaxCardinality, DefaultOWLMinCardinality, DefaultOWLNamedClass, DefaultOWLSomeValuesFrom, DefaultOWLUnionClass, DefaultRDFSNamedClass

public interface RDFSClass
extends ProtegeCls, RDFResource

The base interface of the RDFS/OWL classes used by the OWL Plugin. All user-defined classes will be some instance of this interface.

Author:
Holger Knublauch

Method Summary
 void addClassListener(ClassListener listener)
          Adds a ClassListener to receive events about this RDFSClass.
 void addSuperclass(RDFSClass superclass)
          Adds a class to the rdfs:subClassOfs of this.
 RDFSClass createClone()
          Creates a copy of anonymous classes which contain a completely new expression tree.
 RDFResource createInstance(String name)
          Creates a new instance of this class.
 Collection getDependingClasses()
          Gets all OWLAnonymousClasses the life cycle of which depends on this.
 Collection getEquivalentClasses()
          Gets a Collection of all directly equivalent Clses of this.
 ImageIcon getImageIcon()
          Gets an ImageIcon displaying this.
 int getInferredInstanceCount()
          Gets the number of direct inferred instances of this class.
 Collection getInferredInstances(boolean includingSubclasses)
          Gets all resources that have this as their inferred type.
 int getInstanceCount(boolean includingSubclasses)
          Gets the number of instances of this, possibly including the instances of all subclasses.
 Collection getInstances(boolean includingSubclasses)
          Gets the instances of this, possibly including the instances of all subclasses.
 Collection getNamedSubclasses()
          Gets a Collection of all direct subclasses that are not anonymous.
 Collection getNamedSubclasses(boolean transitive)
          Gets the named subclasses of this class.
 Collection getNamedSuperclasses()
          Gets a Collection of all direct superclasses that are not anonymous.
 Collection getNamedSuperclasses(boolean transitive)
          Gets the superclasses of this class.
 String getNestedBrowserText()
          Gets the browser text when this is embedded into a complex expression.
 void getNestedNamedClasses(Set set)
          Gets all RDFSClses that are somewhere used in the expression below this.
 String getParsableExpression()
          Deprecated. not needed anymore
 Collection getPureSuperclasses()
          Gets the subset of those direct superclasses which are not at the same time equivalent classes (or operands of equivalent intersection classes).
 int getSubclassCount()
          Gets the number of (direct) subclasses of this.
 Collection getSubclasses(boolean transitive)
          Gets the subclasses of this, including the subclasses of the subclasses etc.
 int getSuperclassCount()
          Gets the number of (direct) superclasses of this.
 Collection getSuperclasses(boolean transitive)
          Gets the superclasses of this, optionally including the superclasses of the superclasses etc.
 Collection getUnionDomainProperties()
          Equivalent to getUnionDomainProperties(false).
 Collection getUnionDomainProperties(boolean transitive)
          Gets those properties that have this in their domain, with union semantics.
 boolean hasEquivalentClass(RDFSClass other)
          Checks whether this is a (direct) equivalent class of a given other Cls.
 boolean hasPropertyValueWithBrowserText(RDFProperty property, String browserText)
          For an object-valued property, checks whether one of the property values has a given browser text.
 boolean isAnonymous()
          Checks whether this is an anonymous class.
 boolean isMetaclass()
          Checks whether this is a metaclass, i.e.
 boolean isSubclassOf(RDFSClass superclass)
          Checks whether this is a (direct) subclass of a given class.
 void removeClassListener(ClassListener listener)
          Removes a ClassListener to receive events about this RDFSClass.
 void removeSuperclass(RDFSClass superclass)
          Removes a given class from the superclasses of this.
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeCls
addClsListener, addDirectSuperclass, addDirectTemplateSlot, addTemplateFacetValue, addTemplateSlotValue, createDirectInstance, getBrowserSlotPattern, getConcreteSubclasses, getDirectBrowserSlotPattern, getDirectInstanceCount, getDirectInstances, getDirectlyOverriddenTemplateFacets, getDirectSubclassCount, getDirectSubclasses, getDirectSuperclassCount, getDirectSuperclasses, getDirectTemplateFacetValues, getDirectTemplateSlots, getDirectTemplateSlotValues, 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
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeInstance
addDirectType, addFrameListener, addInstanceListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectType, getDirectTypes, getDocumentation, getIcon, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getReferences, hasDirectType, hasOwnSlot, hasType, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValidOwnSlotValue, markDeleted, markDeleting, removeDirectType, removeFrameListener, removeInstanceListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDirectType, setDirectTypes, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, shallowCopy
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, getFrameID, isValid, moveDirectOwnSlotValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protege.model.Cls
getBrowserSlot, getDirectBrowserSlot, getInheritedBrowserSlot, rename
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, getFrameID, isValid, moveDirectOwnSlotValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFResource
addComment, addDifferentFrom, addIsDefinedBy, addLabel, addPropertyValue, addPropertyValueListener, addProtegeType, addRDFType, addResourceListener, addSameAs, addVersionInfo, as, canAs, delete, getAllValuesFromOnTypes, getBrowserText, getComments, getDifferentFrom, getHasValuesOnTypes, getIconLocation, getIconName, getInferredTypes, getIsDefinedBy, getLabels, getLocalName, getName, getNamespace, getNamespacePrefix, getOWLModel, getPossibleRDFProperties, getPrefixedName, getPropertyValue, getPropertyValue, getPropertyValueAs, getPropertyValueCount, getPropertyValueLiteral, getPropertyValueLiterals, getPropertyValues, getPropertyValues, getPropertyValuesAs, getProtegeType, getProtegeTypes, getRDFProperties, getRDFType, getRDFTypes, getReferringAnonymousClasses, getSameAs, getURI, getVersionInfo, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasPropertyValue, hasProtegeType, hasProtegeType, hasRDFType, hasRDFType, isValidPropertyValue, isVisible, listPropertyValues, listPropertyValues, listPropertyValuesAs, listRDFTypes, removeComment, removeDifferentFrom, removeIsDefinedBy, removeLabel, removePropertyValue, removePropertyValueListener, removeProtegeType, removeRDFType, removeResourceListener, removeSameAs, removeVersionInfo, setComment, setComments, setInferredTypes, setPropertyValue, setPropertyValues, setProtegeType, setProtegeTypes, setRDFType, setRDFTypes, setVisible
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.ProtegeInstance
addDirectType, addFrameListener, addInstanceListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectType, getDirectTypes, getDocumentation, getIcon, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getReferences, hasDirectType, hasOwnSlot, hasType, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValidOwnSlotValue, markDeleted, markDeleting, removeDirectType, removeFrameListener, removeInstanceListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDirectType, setDirectTypes, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, shallowCopy
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
moveDirectType
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
assertFrameName, getFrameID, isValid, moveDirectOwnSlotValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.RDFObject
equalsStructurally
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.visitor.Visitable
accept
 

Method Detail

addClassListener

void addClassListener(ClassListener listener)
Adds a ClassListener to receive events about this RDFSClass.

Parameters:
listener - the ClassListener to add

addSuperclass

void addSuperclass(RDFSClass superclass)
Adds a class to the rdfs:subClassOfs of this.

Parameters:
superclass -

createClone

RDFSClass createClone()
Creates a copy of anonymous classes which contain a completely new expression tree. Named classes are NOT copied.

Returns:
a clone of this or the object itself for named classes

createInstance

RDFResource createInstance(String name)
Creates a new instance of this class.

Parameters:
name - the name of the new instance or null for a default name
Returns:
a new instance of this

getDependingClasses

Collection getDependingClasses()
Gets all OWLAnonymousClasses the life cycle of which depends on this. These are deleted when this is deleted.

From existing usage, it appears that only the direct anonymous classes are required to be returned - these are then iterated over

Returns:
a Collection of OWLAnonymousClass instances

getEquivalentClasses

Collection getEquivalentClasses()
Gets a Collection of all directly equivalent Clses of this. These are those direct superclasses that also have this as direct superclass.

Returns:
a Collection of Cls objects

getImageIcon

ImageIcon getImageIcon()
Gets an ImageIcon displaying this. This is a harder version of getIcon() for use when an ImageIcon is required.

Returns:
the ImageIcon

getInferredInstanceCount

int getInferredInstanceCount()
Gets the number of direct inferred instances of this class. This is equivalent to getInferredInstances(false).size() but could be optimized internally for better performance.

Returns:
the number of inferred instances
See Also:
getInferredInstances(boolean)

getInferredInstances

Collection getInferredInstances(boolean includingSubclasses)
Gets all resources that have this as their inferred type. Optionally, it is possible to include subclasses of this into the search.

Parameters:
includingSubclasses - true to include instances of subclasses of this
Returns:
the inferred instances of this

getInstanceCount

int getInstanceCount(boolean includingSubclasses)
Gets the number of instances of this, possibly including the instances of all subclasses.

Parameters:
includingSubclasses - true to also include the instances of the subclasses
Returns:
the number of instances of this

getInstances

Collection getInstances(boolean includingSubclasses)
Gets the instances of this, possibly including the instances of all subclasses.

Parameters:
includingSubclasses - true to also get the instances of the subclasses
Returns:
the instances of this

getNamedSubclasses

Collection getNamedSubclasses()
Gets a Collection of all direct subclasses that are not anonymous. (This is a convenience method for getNamedSubclasses(false))

Returns:
a Collection of Cls objects

getNamedSubclasses

Collection getNamedSubclasses(boolean transitive)
Gets the named subclasses of this class.

Parameters:
transitive - true to include the descendent classes or false to only include the direct named subclasses
Returns:
a Collection of RDFSNamedClass objects.

getNamedSuperclasses

Collection getNamedSuperclasses()
Gets a Collection of all direct superclasses that are not anonymous. (This is a convenience method for getNamedSuperclasses(false))

Returns:
a Collection of Cls objects

getNamedSuperclasses

Collection getNamedSuperclasses(boolean transitive)
Gets the superclasses of this class.

Parameters:
transitive - true to include the ancestor classes or false to only include the direct named superclasses
Returns:
A Collection of RDFSNamedClass objects.

getNestedBrowserText

String getNestedBrowserText()
Gets the browser text when this is embedded into a complex expression. This usually returns the browser key enclosed with round brackets.

Returns:
the nested browser text

getNestedNamedClasses

void getNestedNamedClasses(Set set)
Gets all RDFSClses that are somewhere used in the expression below this. If this is an anonymous class, this traverses the expression tree to collect them. If this is already an RDFSNamedClass, it will return itself.

Parameters:
set - an (initially empty) Set that will contain the nested named classes

getParsableExpression

String getParsableExpression()
Deprecated. not needed anymore


getPureSuperclasses

Collection getPureSuperclasses()
Gets the subset of those direct superclasses which are not at the same time equivalent classes (or operands of equivalent intersection classes). Note that equivalent classes are superclasses of each other, so that in many cases you may want to use this method instead of getSuperclasses(false).

Returns:
the direct superclasses

getSubclassCount

int getSubclassCount()
Gets the number of (direct) subclasses of this.

Returns:
the number of classes with this as a rdfs:subClassOf value

getSubclasses

Collection getSubclasses(boolean transitive)
Gets the subclasses of this, including the subclasses of the subclasses etc.

Returns:
the subclass values

getSuperclassCount

int getSuperclassCount()
Gets the number of (direct) superclasses of this.

Returns:
the number of rdfs:subClassOf values

getSuperclasses

Collection getSuperclasses(boolean transitive)
Gets the superclasses of this, optionally including the superclasses of the superclasses etc.

Returns:
the rdfs:subClassOf values

getUnionDomainProperties

Collection getUnionDomainProperties()
Equivalent to getUnionDomainProperties(false).

Returns:
the properties that have this in their (direct) domain

getUnionDomainProperties

Collection getUnionDomainProperties(boolean transitive)
Gets those properties that have this in their domain, with union semantics. If the argument is true, then this will also consider those properties that have superclasses of this in their domain.

Parameters:
transitive - true to include superclasses
Returns:
a Collection of RDFProperty objects

hasEquivalentClass

boolean hasEquivalentClass(RDFSClass other)
Checks whether this is a (direct) equivalent class of a given other Cls.

Parameters:
other - the Cls to compare with
Returns:
true if other is among the direct equivalent classes

hasPropertyValueWithBrowserText

boolean hasPropertyValueWithBrowserText(RDFProperty property,
                                        String browserText)
For an object-valued property, checks whether one of the property values has a given browser text.

Parameters:
property - the property (must not have datatype literals as values)
browserText - the browser text to compare to
Returns:
true if one of the values of the property matches

isAnonymous

boolean isAnonymous()
Checks whether this is an anonymous class. All classes except for instances of OWLNamedClass are anonymous.

Specified by:
isAnonymous in interface RDFResource
Returns:
true if this is anonymous
See Also:
OWLModel.isAnonymousResourceName(java.lang.String)

isMetaclass

boolean isMetaclass()
Checks whether this is a metaclass, i.e. whether it is a subclass of rdfs:Class.

Returns:
true if this is a metaclass

isSubclassOf

boolean isSubclassOf(RDFSClass superclass)
Checks whether this is a (direct) subclass of a given class.

Parameters:
superclass - the superclass in question
Returns:
true if this has superclass among its rdfs:subClassOf values

removeClassListener

void removeClassListener(ClassListener listener)
Removes a ClassListener to receive events about this RDFSClass.

Parameters:
listener - the ClassListener to remove

removeSuperclass

void removeSuperclass(RDFSClass superclass)
Removes a given class from the superclasses of this.

Parameters:
superclass - the superclass to remove

Protégé-OWL 3.4.8

Submit a bug report or feature request
Copyright (c) 1998-2012 Stanford University.