com.hp.hpl.jena.ontology.daml
Interface DAMLClass

All Superinterfaces:
DAMLCommon, FrontsNode, OntClass, OntResource, RDFNode, Resource
All Known Subinterfaces:
DAMLRestriction

public interface DAMLClass
extends DAMLCommon, OntClass

Java representation of a DAML ontology Class. Note that the ontology classes are not the same as Java classes: think of classifications rather than active data structures.

Version:
CVS info: $Id: DAMLClass.java,v 1.11 2005/02/21 12:04:56 andy_seaborne Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 ExtendedIterator getDefinedProperties()
          Answer an iteration of the properties that may be used for instances of this class: i.e. the properties that have this class, or one of its super-classes, as domain.
 ExtendedIterator getDefinedProperties(boolean closed)
          Answer an iteration of the properties that may be used for instances of this class: i.e. the properties that have this class, or optionally one of its super-classes, as domain.
 ExtendedIterator getEquivalentValues()
          Answer an iterator over all of the DAML objects that are equivalent to this class, which will be the union of daml:equivalentTo and daml:sameClassAs.
 ExtendedIterator getInstances()
          Answer an iterator over the instances of this class that currently exist in the model.
 ExtendedIterator getSameClasses()
          Answer an iterator over all of the DAML classes that are equivalent to this value under the daml:sameClassAs relation.
 ExtendedIterator getSubClasses()
          Answer an iterator over the DAML classes that mention this class as one of its super-classes.
 ExtendedIterator getSubClasses(boolean closed)
          Answer an iterator over the DAML classes that mention this class as one of its super-classes.
 ExtendedIterator getSuperClasses()
          Answer an iterator over the DAML classes that are super-classes of this class.
 ExtendedIterator getSuperClasses(boolean closed)
          Answer an iterator over the DAML classes that are super-classes of this class.
 boolean isComplement()
          Answer true if this class expression is an boolean complement of another class.
 boolean isDisjointUnion()
          Answer true if this class is a disjoint union of a list of classes.
 boolean isEnumeration()
          Answer true if this class is an enumeration (i.e. has a property daml:oneOf with a list of values).
 boolean isIntersection()
          Answer true if this class is an intersection of a list of classes.
 boolean isNamedClass()
          Answer true if this class is a named class (i.e. is not an anonymous class expression).
 boolean isRestriction()
          Answer true if this class is an property restriction (i.e. is a daml:Restriction instance).
 boolean isUnion()
          Answer true if this class is a union of a list of classes.
 PropertyAccessor prop_complementOf()
          Property accessor for the property daml:compelementOf, which denotes the class whose members are the individuals not in the given class.
 PropertyAccessor prop_disjointUnionOf()
          Property accessor for the daml:disjointUnionOf property of a class.
 PropertyAccessor prop_disjointWith()
          Property accessor for the daml:disjointWith property of a class.
 PropertyAccessor prop_intersectionOf()
          Property accessor for the property daml:intersectionOf, which denotes an intersection (conjunction) of a list of classes.
 PropertyAccessor prop_oneOf()
          Property accessor for the daml:oneOf property, which defines a class expression denoting that the class is exactly one of the given list of classes.
 PropertyAccessor prop_sameClassAs()
          Property accessor for the daml:sameClassAs property of a DAML class.
 PropertyAccessor prop_subClassOf()
          Property accessor for the daml:subClassOf property of a class.
 PropertyAccessor prop_unionOf()
          Property accessor for the property daml:unionOf, which denotes a class expression consisting of the union (disjunction) of a list of classes.
 
Methods inherited from interface com.hp.hpl.jena.ontology.daml.DAMLCommon
getDAMLModel, getEquivalenceSet, getRDFTypes, getVocabulary, prop_comment, prop_equivalentTo, prop_label, prop_type, setRDFType
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getNode, getProperty, getRequiredProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, removeAll, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
as, canAs, inModel, isAnon, isLiteral, isResource, isURIResource, visitWith
 
Methods inherited from interface com.hp.hpl.jena.graph.FrontsNode
asNode
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntClass
addDisjointWith, addEquivalentClass, addSubClass, addSuperClass, asComplementClass, asEnumeratedClass, asIntersectionClass, asRestriction, asUnionClass, convertToComplementClass, convertToEnumeratedClass, convertToIntersectionClass, convertToRestriction, convertToUnionClass, createIndividual, createIndividual, getDisjointWith, getEquivalentClass, getSubClass, getSuperClass, hasDeclaredProperty, hasEquivalentClass, hasSubClass, hasSubClass, hasSubClass, hasSuperClass, hasSuperClass, hasSuperClass, isComplementClass, isDisjointWith, isEnumeratedClass, isHierarchyRoot, isIntersectionClass, isUnionClass, listDeclaredProperties, listDeclaredProperties, listDisjointWith, listEquivalentClasses, listInstances, listSubClasses, listSubClasses, listSuperClasses, listSuperClasses, removeDisjointWith, removeEquivalentClass, removeSubClass, removeSuperClass, setDisjointWith, setEquivalentClass, setSubClass, setSuperClass
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getNode, getProperty, getRequiredProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, removeAll, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
as, canAs, inModel, isAnon, isLiteral, isResource, isURIResource, visitWith
 
Methods inherited from interface com.hp.hpl.jena.graph.FrontsNode
asNode
 

Method Detail

prop_subClassOf

PropertyAccessor prop_subClassOf()

Property accessor for the daml:subClassOf property of a class. This denotes a class that is a super-class of this class.

Returns:
Property accessor for daml:subClassOf.

prop_disjointWith

PropertyAccessor prop_disjointWith()

Property accessor for the daml:disjointWith property of a class. This denotes a class with which this class has no instances in common.

Returns:
Property accessor for daml:disjointWith.

prop_disjointUnionOf

PropertyAccessor prop_disjointUnionOf()

Property accessor for the daml:disjointUnionOf property of a class. This denotes a list of classes that are each pair-wise disjoint, and whose union describes this class.

Returns:
Property accessor for daml:disjointUnionOf.

prop_sameClassAs

PropertyAccessor prop_sameClassAs()

Property accessor for the daml:sameClassAs property of a DAML class. This denotes a class whose instances are the same those of this class.

Returns:
Property accessor for daml:sameClassAs.

prop_unionOf

PropertyAccessor prop_unionOf()

Property accessor for the property daml:unionOf, which denotes a class expression consisting of the union (disjunction) of a list of classes.

Returns:
Property accessor for daml:unionOf.

prop_intersectionOf

PropertyAccessor prop_intersectionOf()

Property accessor for the property daml:intersectionOf, which denotes an intersection (conjunction) of a list of classes.

Returns:
Property accessor for daml:intersectionOf.

prop_complementOf

PropertyAccessor prop_complementOf()

Property accessor for the property daml:compelementOf, which denotes the class whose members are the individuals not in the given class.

Returns:
Property accessor for daml:compelementOf.

prop_oneOf

PropertyAccessor prop_oneOf()

Property accessor for the daml:oneOf property, which defines a class expression denoting that the class is exactly one of the given list of classes.

Returns:
Property accessor for daml:oneOf.

getSubClasses

ExtendedIterator getSubClasses()

Answer an iterator over the DAML classes that mention this class as one of its super-classes. Will return all available sub-classes (see getSubClasses(boolean) for more details). The elements of the iterator will be DAMLClass objects.

Returns:
An iterator over all available sub-classes of this class

getSubClasses

ExtendedIterator getSubClasses(boolean closed)

Answer an iterator over the DAML classes that mention this class as one of its super-classes. The members of the iterator will be DAMLClass objects

Note: In a change to the Jena 1 DAML API, whether this iterator includes inferred sub-classes is determined not by a flag at the API level, but by the construction of the DAML model itself. See the model factory for details. The boolean parameter closed is now re-interpreted to mean the inverse of direct, see OntClass.listSubClasses(boolean) for more details.

Parameters:
closed - If true, return all available values; otherwise, return only local (direct) sub-classes. See note for details.
Returns:
An iterator over this class's sub-classes.

getSuperClasses

ExtendedIterator getSuperClasses()

Answer an iterator over the DAML classes that are super-classes of this class. Will return all available super-classes (see getSuperClasses(boolean) for more details). The elements of the iterator will be DAMLClass objects.

Returns:
An iterator over all available super-classes of this class

getSuperClasses

ExtendedIterator getSuperClasses(boolean closed)

Answer an iterator over the DAML classes that are super-classes of this class. The members of the iterator will be DAMLClass objects

Note: In a change to the Jena 1 DAML API, whether this iterator includes inferred super-classes is determined not by a flag at the API level, but by the construction of the DAML model itself. See the model factory for details. The boolean parameter closed is now re-interpreted to mean the inverse of direct, see OntClass.listSubClasses(boolean) for more details.

Parameters:
closed - If true, return all available values; otherwise, return only local (direct) super-classes. See note for details.
Returns:
an iterator over this class's super-classes.

getSameClasses

ExtendedIterator getSameClasses()

Answer an iterator over all of the DAML classes that are equivalent to this value under the daml:sameClassAs relation. Note: only considers daml:sameClassAs, for general equivalence, see getEquivalentValues(). Note also that the first member of the iteration is always the DAMLClass on which the method is invoked: trivially, a DAMLClass is a member of the set of DAMLClasses equivalent to itself. If the caller wants the set of classes equivalent to this one, not including itself, simply ignore the first element of the iteration.

Returns:
an iterator ranging over every equivalent DAML classes

getEquivalentValues

ExtendedIterator getEquivalentValues()

Answer an iterator over all of the DAML objects that are equivalent to this class, which will be the union of daml:equivalentTo and daml:sameClassAs.

Specified by:
getEquivalentValues in interface DAMLCommon
Returns:
an iterator ranging over every equivalent DAML class

getInstances

ExtendedIterator getInstances()

Answer an iterator over the instances of this class that currently exist in the model.

Returns:
An iterator over those instances that have this class as one of the classes to which they belong
See Also:
DAMLCommon.getRDFTypes(boolean)

getDefinedProperties

ExtendedIterator getDefinedProperties()

Answer an iteration of the properties that may be used for instances of this class: i.e. the properties that have this class, or one of its super-classes, as domain.

Returns:
An iteration of the properties that have this class in the domain

getDefinedProperties

ExtendedIterator getDefinedProperties(boolean closed)

Answer an iteration of the properties that may be used for instances of this class: i.e. the properties that have this class, or optionally one of its super-classes, as domain.

Note: In a change to the Jena 1 DAML API, whether this iterator includes the defined properties for inferred super-classes is determined not by a flag at the API level, but by the construction of the DAML model itself. See the model factory for details. The boolean parameter closed is now re-interpreted to mean the inverse of direct, see OntClass.listSubClasses(boolean) for more details.

Parameters:
closed - If true, use all available information from the class hierarchy; if false, only use local properties.
Returns:
An iteration of the properties that have this class as domain

isEnumeration

boolean isEnumeration()

Answer true if this class is an enumeration (i.e. has a property daml:oneOf with a list of values). This is not an exclusive property, a class can be an enumeration at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Returns:
True if this class expression is an enumeration.

isNamedClass

boolean isNamedClass()

Answer true if this class is a named class (i.e. is not an anonymous class expression). This is not an exclusive property, a class can be named at the same time as one of the other kinds of class expression.

Returns:
True if this class expression is a named class.

isRestriction

boolean isRestriction()

Answer true if this class is an property restriction (i.e. is a daml:Restriction instance). This is not an exclusive property: a class expression can be a property restriction at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Specified by:
isRestriction in interface OntClass
Returns:
True if this class is a property restriction.

isIntersection

boolean isIntersection()

Answer true if this class is an intersection of a list of classes. This is not an exclusive property: a class expression can be an intersection at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Returns:
True if this class is an intersection class expression.

isUnion

boolean isUnion()

Answer true if this class is a union of a list of classes. This is not an exclusive property, a class expression can be a union at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Returns:
True if this class is a union class expression.

isDisjointUnion

boolean isDisjointUnion()

Answer true if this class is a disjoint union of a list of classes. This is not an exclusive property, a class expression can be a disjoint union at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Returns:
True if this class is a disjoint union expression.

isComplement

boolean isComplement()

Answer true if this class expression is an boolean complement of another class. This is not an exclusive property, a class expression can be an complement at the same time as one of the other kinds of class expression, though the conjunction of these may produce the Nothing class.

Returns:
True if this class is a complement class expression.


Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP