com.hp.hpl.jena.daml.common
Class DAMLRestrictionImpl

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.ResourceImpl
        |
        +--com.hp.hpl.jena.daml.common.DAMLCommonImpl
              |
              +--com.hp.hpl.jena.daml.common.DAMLClassImpl
                    |
                    +--com.hp.hpl.jena.daml.common.DAMLRestrictionImpl
All Implemented Interfaces:
DAMLClass, DAMLClassExpression, DAMLCommon, DAMLRestriction, RDFNode, Resource, ResourceI

public class DAMLRestrictionImpl
extends DAMLClassImpl
implements DAMLRestriction

Java representation of a DAML Restriction.

Version:
CVS info: $Id: DAMLRestrictionImpl.java,v 1.1 2001/09/24 17:02:43 ijd Exp $
Author:
Ian Dickinson, HP Labs (email)

Constructor Summary
DAMLRestrictionImpl(java.lang.String uri, DAMLModel store, DAMLVocabulary vocabulary)
          Constructor, takes the URI for this restriction, and the underlying model it will be attached to.
DAMLRestrictionImpl(java.lang.String namespace, java.lang.String name, DAMLModel store, DAMLVocabulary vocabulary)
          Constructor, takes the name and namespace for this restriction, and the underlying model it will be attached to.
 
Method Summary
 boolean isComplement()
          Answer true if this class expression is an boolean complement of a list of class expressions.
 boolean isEnumeration()
          Answer true if this class expression is an enumeration (i.e.
 boolean isIntersection()
          Answer true if this class expression is an boolean intersection of a list of class expressions.
 boolean isNamedClass()
          Answer true if this class expression is an named class (i.e.
 boolean isRestriction()
          Answer true if this class expression is an property restriction (i.e.
 boolean isUnion()
          Answer true if this class expression is an boolean union of a list of class expressions.
 IntLiteralAccessor prop_cardinality()
          Property accessor for the 'cardinality' property of a restriction.
 IntLiteralAccessor prop_cardinalityQ()
          Property accessor for the 'cardinalityQ' property of a restriction.
 PropertyAccessor prop_hasClass()
          Property accessor for the 'hasClass' property of a restriction.
 PropertyAccessor prop_hasClassQ()
          Property accessor for the 'hasClassQ' property of a restriction.
 PropertyAccessor prop_hasValue()
          Property accessor for the 'hasValue' property of a restriction.
 IntLiteralAccessor prop_maxCardinality()
          Property accessor for the 'maxCardinality' property of a restriction.
 IntLiteralAccessor prop_maxCardinalityQ()
          Property accessor for the 'maxCardinalityQ' property of a restriction.
 IntLiteralAccessor prop_minCardinality()
          Property accessor for the 'minCardinality' property of a restriction.
 IntLiteralAccessor prop_minCardinalityQ()
          Property accessor for the 'minCardinalityQ' property of a restriction.
 PropertyAccessor prop_onProperty()
          Property accessor for the 'onProperty' property of a restriction.
 PropertyAccessor prop_toClass()
          Property accessor for the 'toClass' property of a restriction.
 
Methods inherited from class com.hp.hpl.jena.daml.common.DAMLClassImpl
getDefinedProperties, getDefinedProperties, getEquivalentValues, getInstances, getSameClasses, getSubClasses, getSubClasses, getSuperClasses, getSuperClasses, hasSubClass, hasSuperClass, isDisjointUnion, prop_complementOf, prop_disjointUnionOf, prop_disjointWith, prop_intersectionOf, prop_oneOf, prop_sameClassAs, prop_subClassOf, prop_unionOf
 
Methods inherited from class com.hp.hpl.jena.daml.common.DAMLCommonImpl
getAll, getDAMLModel, getEquivalenceSet, getNumPropertyValues, getPropertyValue, getPropertyValues, getRDFTypes, getSelfIterator, getVocabulary, hasRDFType, hasRDFType, prop_comment, prop_equivalentTo, prop_label, prop_type, remove, removeAll, removeProperty, replaceProperty, setPropertyValue, setRDFType, setRDFType, toString
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.ResourceImpl
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getEmbeddedResource, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hashCode, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, port, removeProperties
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.daml.DAMLClass
getDefinedProperties, getDefinedProperties, getEquivalentValues, getInstances, getSameClasses, getSubClasses, getSubClasses, getSuperClasses, getSuperClasses, hasSubClass, hasSuperClass, prop_complementOf, prop_disjointUnionOf, prop_disjointWith, prop_intersectionOf, prop_oneOf, prop_sameClassAs, prop_subClassOf, prop_unionOf
 
Methods inherited from interface com.hp.hpl.jena.daml.DAMLCommon
getAll, getDAMLModel, getEquivalenceSet, getNumPropertyValues, getPropertyValue, getPropertyValues, getRDFTypes, getVocabulary, hasRDFType, hasRDFType, prop_comment, prop_equivalentTo, prop_label, prop_type, remove, removeAll, removeProperty, replaceProperty, setPropertyValue, setRDFType, setRDFType
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.daml.DAMLClassExpression
isDisjointUnion
 

Constructor Detail

DAMLRestrictionImpl

public DAMLRestrictionImpl(java.lang.String namespace,
                           java.lang.String name,
                           DAMLModel store,
                           DAMLVocabulary vocabulary)
Constructor, takes the name and namespace for this restriction, and the underlying model it will be attached to.
Parameters:
namespace - The namespace the restriction inhabits, or null
name - The name of the restriction
store - The RDF store that contains the RDF statements defining the properties of the restriction
vocabulary - Reference to the DAML vocabulary used by this restriction.

DAMLRestrictionImpl

public DAMLRestrictionImpl(java.lang.String uri,
                           DAMLModel store,
                           DAMLVocabulary vocabulary)
Constructor, takes the URI for this restriction, and the underlying model it will be attached to.
Parameters:
uri - The URI of the restriction
store - The RDF store that contains the RDF statements defining the properties of the restriction
vocabulary - Reference to the DAML vocabulary used by this restriction.
Method Detail

isEnumeration

public boolean isEnumeration()
Answer true if this class expression is an enumeration (i.e. has a property 'oneOf' with a list of values). This is not an exclusive property, a class expression 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.
Specified by:
isEnumeration in interface DAMLClassExpression
Overrides:
isEnumeration in class DAMLClassImpl
Returns:
necessarily false, since enumerations only appear in DAMLClass expressions.

isNamedClass

public boolean isNamedClass()
Answer true if this class expression is an named class (i.e. is not an anonymous class expression). This is not an exclusive property, a class expression can be named 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:
isNamedClass in interface DAMLClassExpression
Overrides:
isNamedClass in class DAMLClassImpl
Returns:
necessarily false, since restrictions are necessarily constructed expressions. Note: this is not the same as testing whether the restriction itself has a name (so that it can be referenced elsewhere).

isRestriction

public boolean isRestriction()
Answer true if this class expression is an property restriction (i.e. is a Restriction value). 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 DAMLClassExpression
Overrides:
isRestriction in class DAMLClassImpl
Returns:
necessarily true.

isIntersection

public boolean isIntersection()
Answer true if this class expression is an boolean intersection of a list of class expressions. 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.
Specified by:
isIntersection in interface DAMLClassExpression
Overrides:
isIntersection in class DAMLClassImpl
Returns:
necessarily false, since interesections only appear in DAMLClass expressions.

isUnion

public boolean isUnion()
Answer true if this class expression is an boolean union of a list of class expressions. This is not an exclusive property, a class expression can be an union 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:
isUnion in interface DAMLClassExpression
Overrides:
isUnion in class DAMLClassImpl
Returns:
necessarily false, since unions only appear in DAMLClass expressions.

isComplement

public boolean isComplement()
Answer true if this class expression is an boolean complement of a list of class expressions. 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.
Specified by:
isComplement in interface DAMLClassExpression
Overrides:
isComplement in class DAMLClassImpl
Returns:
necessarily false, since complements only appear in DAMLClass expressions, as opposed to compliments, which you only get on your birthday.

prop_onProperty

public PropertyAccessor prop_onProperty()
Property accessor for the 'onProperty' property of a restriction. This denotes the property to which the restriction applies, and there is normally exactly one of them.
Specified by:
prop_onProperty in interface DAMLRestriction
Returns:
Property accessor for 'onProperty'.

prop_toClass

public PropertyAccessor prop_toClass()
Property accessor for the 'toClass' property of a restriction. This denotes the class for which the restricted property always maps to instances that belong to the class given by this property.
Specified by:
prop_toClass in interface DAMLRestriction
Returns:
Property accessor for 'toClass'

prop_hasValue

public PropertyAccessor prop_hasValue()
Property accessor for the 'hasValue' property of a restriction. This denotes the class for which the restricted property sometimes maps to the instance given here.
Specified by:
prop_hasValue in interface DAMLRestriction
Returns:
Property accessor for 'hasValue'

prop_hasClass

public PropertyAccessor prop_hasClass()
Property accessor for the 'hasClass' property of a restriction. This denotes the class for which the restricted property sometimes maps to the instances that belong to the class given here.
Specified by:
prop_hasClass in interface DAMLRestriction
Returns:
Property accessor for 'hasClass'

prop_hasClassQ

public PropertyAccessor prop_hasClassQ()
Property accessor for the 'hasClassQ' property of a restriction. This denotes the class for which the restricted property sometimes maps to the instances that belong to the class given here, and which obey given cardinality constraints.
Specified by:
prop_hasClassQ in interface DAMLRestriction
Returns:
Property accessor for 'hasClassQ'

prop_cardinality

public IntLiteralAccessor prop_cardinality()
Property accessor for the 'cardinality' property of a restriction. This denotes the combination of minCardinality and maxCardinality to the same value.
Specified by:
prop_cardinality in interface DAMLRestriction
Returns:
Property accessor for 'cardinality'

prop_minCardinality

public IntLiteralAccessor prop_minCardinality()
Property accessor for the 'minCardinality' property of a restriction. This denotes the class of instances that have at least N distict values for the property.
Specified by:
prop_minCardinality in interface DAMLRestriction
Returns:
Property accessor for 'minCardinality'

prop_maxCardinality

public IntLiteralAccessor prop_maxCardinality()
Property accessor for the 'maxCardinality' property of a restriction. This denotes the class of instances that have at most N distict values for the property.
Specified by:
prop_maxCardinality in interface DAMLRestriction
Returns:
Property accessor for 'maxCardinality'

prop_cardinalityQ

public IntLiteralAccessor prop_cardinalityQ()
Property accessor for the 'cardinalityQ' property of a restriction. This denotes the combination of minCardinalityQ and maxCardinalityQ to the same value.
Specified by:
prop_cardinalityQ in interface DAMLRestriction
Returns:
Property accessor for 'cardinalityQ'

prop_minCardinalityQ

public IntLiteralAccessor prop_minCardinalityQ()
Property accessor for the 'minCardinalityQ' property of a restriction. This denotes the class of instances that have at least N distict values of the class denoted by 'hasClassQ' for the property.
Specified by:
prop_minCardinalityQ in interface DAMLRestriction
Returns:
Property accessor for 'minCardinalityQ'

prop_maxCardinalityQ

public IntLiteralAccessor prop_maxCardinalityQ()
Property accessor for the 'maxCardinalityQ' property of a restriction. This denotes the class of instances that have at most N distict values of the class denoted by 'hasClassQ' for the property.
Specified by:
prop_maxCardinalityQ in interface DAMLRestriction
Returns:
Property accessor for 'maxCardinalityQ'


Copyright © 2001 Hewlett-Packard. All Rights Reserved.