|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A property restriction that requires the named property to have have exactly the given number of values for a given instance to be a member of the class defined by the restriction.
Method Summary | |
int |
getCardinality()
Answer the cardinality of the restricted property. |
boolean |
hasCardinality(int cardinality)
Answer true if this property restriction has the given cardinality. |
void |
removeCardinality(int cardinality)
Remove the statement that this restriction has the given cardinality for the restricted property. |
void |
setCardinality(int cardinality)
Assert that this restriction restricts the property to have the given cardinality. |
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 |
public void setCardinality(int cardinality)
Assert that this restriction restricts the property to have the given
cardinality. Any existing statements for cardinality
will be removed.
cardinality
- The cardinality of the restricted property
OntProfileException
- If the Profile.CARDINALITY()
property is not supported in the current language profile.public int getCardinality()
Answer the cardinality of the restricted property.
OntProfileException
- If the Profile.CARDINALITY()
property is not supported in the current language profile.public boolean hasCardinality(int cardinality)
Answer true if this property restriction has the given cardinality.
cardinality
- The cardinality to test against
OntProfileException
- If the Profile.CARDINALITY()
property is not supported in the current language profile.public void removeCardinality(int cardinality)
Remove the statement that this restriction has the given cardinality for the restricted property. If this statement is not true of the current model, nothing happens.
cardinality
- A cardinality value to be removed from this restriction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |