com.hp.hpl.jena.ontology
Interface BooleanClassDescription

All Superinterfaces:
OntClass, OntResource, RDFNode, Resource
All Known Subinterfaces:
ComplementClass, IntersectionClass, UnionClass

public interface BooleanClassDescription
extends OntClass

Encapsulates a class description formed from a boolean combination of other class descriptions (ie union, intersection or complement).

Version:
CVS $Id: BooleanClassDescription.java,v 1.7 2003/07/15 14:44:11 chris-dollin Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 void addOperand(Resource cls)
          Add a class the operands of this boolean expression.
 void addOperands(java.util.Iterator classes)
          Add all of the classes from the given iterator to the operands of this boolean expression.
 RDFList getOperands()
          Answer the list of operands for this Boolean class expression.
 boolean hasOperand(Resource cls)
          Answer true if this Boolean class expression has the given class as an operand.
 ExtendedIterator listOperands()
          Answer an iterator over all of the clases that are the operands of this Boolean class expression.
 Property operator()
          Answer the property that is used to construct this boolean expression, for example Profile.UNION_OF().
 void removeOperand(Resource res)
          Remove the given resource from the operands of this class expression.
 void setOperands(RDFList operands)
          Assert that the operands for this boolean class expression are the classes in the given list.
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntClass
addDisjointWith, addEquivalentClass, addSubClass, addSuperClass, asComplementClass, asEnumeratedClass, asIntersectionClass, asRestriction, asUnionClass, convertToComplementClass, convertToEnumeratedClass, convertToIntersectionClass, convertToRestriction, convertToUnionClass, getDisjointWith, getEquivalentClass, getSubClass, getSuperClass, hasEquivalentClass, hasSubClass, hasSubClass, hasSuperClass, hasSuperClass, isComplementClass, isDisjointWith, isEnumeratedClass, isIntersectionClass, isRestriction, 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
accessor, accessor, addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asIndividual, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isDefinedBy, isDifferentFrom, 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, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeAll, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
as, asNode, canAs, inModel, visitWith
 

Method Detail

setOperands

public void setOperands(RDFList operands)

Assert that the operands for this boolean class expression are the classes in the given list. Any existing statements for the operator will be removed.

Parameters:
operands - The list of operands to this expression.
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

addOperand

public void addOperand(Resource cls)

Add a class the operands of this boolean expression.

Parameters:
cls - A class that will be added to the operands of this Boolean expression
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

addOperands

public void addOperands(java.util.Iterator classes)

Add all of the classes from the given iterator to the operands of this boolean expression.

Parameters:
classes - A iterator over classes that will be added to the operands of this Boolean expression
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

getOperands

public RDFList getOperands()

Answer the list of operands for this Boolean class expression.

Returns:
A list of the operands of this expression.
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

listOperands

public ExtendedIterator listOperands()

Answer an iterator over all of the clases that are the operands of this Boolean class expression. Each element of the iterator will be an OntClass.

Returns:
An iterator over the operands of the expression.
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

hasOperand

public boolean hasOperand(Resource cls)

Answer true if this Boolean class expression has the given class as an operand.

Parameters:
cls - A class to test
Returns:
True if the given class is an operand to this expression.
Throws:
OntProfileException - If the operand property is not supported in the current language profile.

removeOperand

public void removeOperand(Resource res)

Remove the given resource from the operands of this class expression.

Parameters:
res - An resource to be removed from the operands of this class expression

operator

public Property operator()

Answer the property that is used to construct this boolean expression, for example Profile.UNION_OF().

Returns:
The property used to construct this Boolean class expression.


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.