| com.hp.hpl.jena.ontology.impl.OntResourceImpl com.hp.hpl.jena.ontology.impl.OntClassImpl com.hp.hpl.jena.ontology.impl.RestrictionImpl
All known Subclasses: com.hp.hpl.jena.ontology.impl.MinCardinalityRestrictionImpl, com.hp.hpl.jena.ontology.impl.MaxCardinalityRestrictionImpl, com.hp.hpl.jena.ontology.impl.HasValueRestrictionImpl, com.hp.hpl.jena.ontology.impl.CardinalityRestrictionImpl, com.hp.hpl.jena.ontology.impl.AllValuesFromRestrictionImpl, com.hp.hpl.jena.ontology.impl.SomeValuesFromRestrictionImpl, com.hp.hpl.jena.ontology.impl.QualifiedRestrictionImpl,
RestrictionImpl | public class RestrictionImpl extends OntClassImpl implements Restriction(Code) | |
Implementation of the ontology abstraction representing restrictions.
author: Ian Dickinson, HP Labs author: (email) version: CVS $Id: RestrictionImpl.java,v 1.19 2008/01/02 12:08:03 andy_seaborne Exp $ |
Field Summary | |
public static Implementation | factory A factory for generating Restriction facets from nodes in enhanced graphs. |
Constructor Summary | |
public | RestrictionImpl(Node n, EnhGraph g)
Construct a restriction node represented by the given node in the given graph. |
RestrictionImpl | public RestrictionImpl(Node n, EnhGraph g)(Code) | |
Construct a restriction node represented by the given node in the given graph.
Parameters: n - The node that represents the resource Parameters: g - The enh graph that contains n |
asAllValuesFromRestriction | public AllValuesFromRestriction asAllValuesFromRestriction()(Code) | | Answer a view of this restriction as an all values from expression
This class, but viewed as an AllValuesFromRestriction node exception: ConversionException - if the class cannot be converted to an all values from restrictiongiven the lanuage profile and the current state of the underlying model. |
asCardinalityRestriction | public CardinalityRestriction asCardinalityRestriction()(Code) | | Answer a view of this restriction as a cardinality restriction class expression
This class, but viewed as a CardinalityRestriction node exception: ConversionException - if the class cannot be converted to a cardinality restrictiongiven the lanuage profile and the current state of the underlying model. |
asHasValueRestriction | public HasValueRestriction asHasValueRestriction()(Code) | | Answer a view of this restriction as a has value expression
This class, but viewed as a HasValueRestriction node exception: ConversionException - if the class cannot be converted to a has value restrictiongiven the lanuage profile and the current state of the underlying model. |
asMaxCardinalityRestriction | public MaxCardinalityRestriction asMaxCardinalityRestriction()(Code) | | Answer a view of this restriction as a max cardinality restriction class expression
This class, but viewed as a MaxCardinalityRestriction node exception: ConversionException - if the class cannot be converted to a max cardinality restrictiongiven the lanuage profile and the current state of the underlying model. |
asMinCardinalityRestriction | public MinCardinalityRestriction asMinCardinalityRestriction()(Code) | | Answer a view of this restriction as a min cardinality restriction class expression
This class, but viewed as a MinCardinalityRestriction node exception: ConversionException - if the class cannot be converted to a min cardinality restrictiongiven the lanuage profile and the current state of the underlying model. |
asSomeValuesFromRestriction | public SomeValuesFromRestriction asSomeValuesFromRestriction()(Code) | | Answer a view of this restriction as a some values from expression
This class, but viewed as a SomeValuesFromRestriction node exception: ConversionException - if the class cannot be converted to an all values from restrictiongiven the lanuage profile and the current state of the underlying model. |
convertToAllValuesFromRestriction | public AllValuesFromRestriction convertToAllValuesFromRestriction(Resource cls)(Code) | | Convert this restriction to an all values from class expression.
Parameters: cls - The class to which all values of the restricted property must belong, to be in theextension of this restriction This class, but converted to a AllValuesFromRestriction class expression exception: ProfileException - if Profile.ALL_VALUES_FROM is not supported in the current profile |
convertToCardinalityRestriction | public CardinalityRestriction convertToCardinalityRestriction(int cardinality)(Code) | | Convert this restriction to a cardinality restriction class expression
Parameters: cardinality - The exact cardinality for the restricted property This class, but converted to a CardinalityRestriction node exception: ProfileException - if Profile.CARDINALITY is not supported in the current profile |
convertToHasValueRestriction | public HasValueRestriction convertToHasValueRestriction(RDFNode value)(Code) | | Convert this restriction to a has value class expression
Parameters: value - The value which the restricted property must have, for resource to bein the extension of this restriction This class, but converted to a HasValueRestriction exception: ProfileException - if Profile.HAS_VALUE is not supported in the current profile |
convertToMaxCardinalityRestriction | public MaxCardinalityRestriction convertToMaxCardinalityRestriction(int cardinality)(Code) | | Convert this restriction to a max cardinality restriction class expression
Parameters: cardinality - The maximum cardinality for the restricted property This class, but converted to a MaxCardinalityRestriction node exception: ProfileException - if Profile.MAX_CARDINALITY is not supported in the current profile |
convertToMinCardinalityRestriction | public MinCardinalityRestriction convertToMinCardinalityRestriction(int cardinality)(Code) | | Convert this restriction to a min cardinality restriction class expression
Parameters: cardinality - The minimum cardinality for the restricted property This class, but converted to a MinCardinalityRestriction node exception: ProfileException - if Profile.MIN_CARDINALITY is not supported in the current profile |
convertToSomeValuesFromRestriction | public SomeValuesFromRestriction convertToSomeValuesFromRestriction(Resource cls)(Code) | | Convert this restriction to a some values from class expression
Parameters: cls - The class to which at least one value of the restricted property must belong, to be in theextension of this restriction This class, but converted to a SomeValuesFromRestriction node exception: ProfileException - if Profile.SOME_VALUES_FROM is not supported in the current profile |
getOnProperty | public OntProperty getOnProperty()(Code) | | Answer the property that this property restriction applies to. If there is
more than one such resource, an arbitrary selection is made (though well-defined property restrictions
should not have more than one onProperty statement.
The property that this property restriction applies to exception: OntProfileException - If the Profile.ON_PROPERTY property is not supported in the current language profile. |
isAllValuesFromRestriction | public boolean isAllValuesFromRestriction()(Code) | | Answer true if this restriction is an all values from restriction
True if this is an allValuesFrom property restriction exception: ProfileException - if Profile.ALL_VALUES_FROM is not supported in the current profile |
isCardinalityRestriction | public boolean isCardinalityRestriction()(Code) | | Answer true if this restriction is a cardinality restriction (ie is a property restriction
constructed with an owl:cardinality operator, or similar). This is not a test for
a restriction that tests cardinalities in general.
True if this is a cardinality property restriction exception: ProfileException - if Profile.CARDINALITY is not supported in the current profile |
isHasValueRestriction | public boolean isHasValueRestriction()(Code) | | Answer true if this restriction is a has value restriction
True if this is a hasValue property restriction exception: ProfileException - if Profile.HAS_VALUE is not supported in the current profile |
isMaxCardinalityRestriction | public boolean isMaxCardinalityRestriction()(Code) | | Answer true if this restriction is a max cardinality restriction (ie is a property restriction
constructed with an owl:maxCardinality operator, or similar). This is not a test for
a restriction that tests cardinalities in general.
True if this is a maxCardinality property restriction exception: ProfileException - if Profile.MAX_CARDINALITY is not supported in the current profile |
isMinCardinalityRestriction | public boolean isMinCardinalityRestriction()(Code) | | Answer true if this restriction is a min cardinality restriction (ie is a property restriction
constructed with an owl:minCardinality operator, or similar). This is not a test for
a restriction that tests cardinalities in general.
True if this is a minCardinality property restriction exception: ProfileException - if Profile.MIN_CARDINALITY is not supported in the current profile |
isSomeValuesFromRestriction | public boolean isSomeValuesFromRestriction()(Code) | | Answer true if this restriction is a some values from restriction
True if this is a someValuesFrom property restriction exception: ProfileException - if Profile.SOME_VALUES_FROM is not supported in the current profile |
onProperty | public boolean onProperty(Property prop)(Code) | | Answer true if this restriction is a property restriction on the given property.
Parameters: prop - A property to test against True if this restriction is a restriction on prop exception: OntProfileException - If the Profile.ON_PROPERTY property is not supported in the current language profile. |
removeOnProperty | public void removeOnProperty(Property prop)(Code) | | Remove the given property as the property that this restriction applies to. If this statement
is not true of the current model, nothing happens.
Parameters: prop - The property to be removed as a the property that this restriction applies to |
setOnProperty | public void setOnProperty(Property prop)(Code) | | Assert that the property that this restriction applies to is the given property. Any existing
statements for onProperty will be removed.
Parameters: prop - The property that this restriction applies to exception: OntProfileException - If the Profile.ON_PROPERTY property is not supported in the current language profile. |
Methods inherited from com.hp.hpl.jena.ontology.impl.OntResourceImpl | public void addComment(String comment, String lang)(Code)(Java Doc) public void addComment(Literal comment)(Code)(Java Doc) public void addDifferentFrom(Resource res)(Code)(Java Doc) public void addIsDefinedBy(Resource res)(Code)(Java Doc) public void addLabel(String label, String lang)(Code)(Java Doc) public void addLabel(Literal label)(Code)(Java Doc) protected void addListPropertyValue(Property p, String name, RDFNode value)(Code)(Java Doc) protected void addPropertyValue(Property p, String name, RDFNode value)(Code)(Java Doc) public void addRDFType(Resource cls)(Code)(Java Doc) public void addSameAs(Resource res)(Code)(Java Doc) public void addSeeAlso(Resource res)(Code)(Java Doc) public void addVersionInfo(String info)(Code)(Java Doc) public AllDifferent asAllDifferent()(Code)(Java Doc) public AnnotationProperty asAnnotationProperty()(Code)(Java Doc) public OntClass asClass()(Code)(Java Doc) public DataRange asDataRange()(Code)(Java Doc) public DatatypeProperty asDatatypeProperty()(Code)(Java Doc) public Individual asIndividual()(Code)(Java Doc) public ObjectProperty asObjectProperty()(Code)(Java Doc) public Ontology asOntology()(Code)(Java Doc) public OntProperty asProperty()(Code)(Java Doc) protected void checkProfile(Object term, String name)(Code)(Java Doc) protected RDFNode convertToType(Resource type, String name, Class cls)(Code)(Java Doc) public int getCardinality(Property p)(Code)(Java Doc) public String getComment(String lang)(Code)(Java Doc) public OntResource getDifferentFrom()(Code)(Java Doc) public Resource getIsDefinedBy()(Code)(Java Doc) public String getLabel(String lang)(Code)(Java Doc) public OntModel getOntModel()(Code)(Java Doc) public Profile getProfile()(Code)(Java Doc) public RDFNode getPropertyValue(Property property)(Code)(Java Doc) public Resource getRDFType()(Code)(Java Doc) public Resource getRDFType(boolean direct)(Code)(Java Doc) public OntResource getSameAs()(Code)(Java Doc) public Resource getSeeAlso()(Code)(Java Doc) public String getVersionInfo()(Code)(Java Doc) public boolean hasComment(String comment, String lang)(Code)(Java Doc) public boolean hasComment(Literal comment)(Code)(Java Doc) public boolean hasLabel(String label, String lang)(Code)(Java Doc) public boolean hasLabel(Literal label)(Code)(Java Doc) protected boolean hasPropertyValue(Property p, String name, RDFNode value)(Code)(Java Doc) public boolean hasRDFType(String uri)(Code)(Java Doc) public boolean hasRDFType(Resource ontClass)(Code)(Java Doc) public boolean hasRDFType(Resource ontClass, boolean direct)(Code)(Java Doc) protected boolean hasRDFType(Resource ontClass, String name, boolean direct)(Code)(Java Doc) public boolean hasSeeAlso(Resource res)(Code)(Java Doc) protected static boolean hasType(Node n, EnhGraph g, Resource type)(Code)(Java Doc) public boolean hasVersionInfo(String info)(Code)(Java Doc) public boolean isAllDifferent()(Code)(Java Doc) public boolean isAnnotationProperty()(Code)(Java Doc) public boolean isClass()(Code)(Java Doc) public boolean isDataRange()(Code)(Java Doc) public boolean isDatatypeProperty()(Code)(Java Doc) public boolean isDefinedBy(Resource res)(Code)(Java Doc) public boolean isDifferentFrom(Resource res)(Code)(Java Doc) public boolean isIndividual()(Code)(Java Doc) public boolean isObjectProperty()(Code)(Java Doc) public boolean isOntLanguageTerm()(Code)(Java Doc) public boolean isOntology()(Code)(Java Doc) public boolean isProperty()(Code)(Java Doc) public boolean isSameAs(Resource res)(Code)(Java Doc) protected boolean langTagMatch(String desired, String target)(Code)(Java Doc) protected ExtendedIterator listAs(Property p, String name, Class cls)(Code)(Java Doc) public ExtendedIterator listComments(String lang)(Code)(Java Doc) public ExtendedIterator listDifferentFrom()(Code)(Java Doc) protected ExtendedIterator listDirectPropertyValues(Property p, String name, Class cls, Property orderRel, boolean direct, boolean inverse)(Code)(Java Doc) public ExtendedIterator listIsDefinedBy()(Code)(Java Doc) public ExtendedIterator listLabels(String lang)(Code)(Java Doc) public NodeIterator listPropertyValues(Property property)(Code)(Java Doc) public ExtendedIterator listRDFTypes(boolean direct)(Code)(Java Doc) public ExtendedIterator listSameAs()(Code)(Java Doc) public ExtendedIterator listSeeAlso()(Code)(Java Doc) public ExtendedIterator listVersionInfo()(Code)(Java Doc) protected Object objectAs(Property p, String name, Class asClass)(Code)(Java Doc) protected int objectAsInt(Property p, String name)(Code)(Java Doc) protected OntProperty objectAsProperty(Property p, String name)(Code)(Java Doc) protected OntResource objectAsResource(Property p, String name)(Code)(Java Doc) public void remove()(Code)(Java Doc) public void removeComment(String comment, String lang)(Code)(Java Doc) public void removeComment(Literal comment)(Code)(Java Doc) public void removeDefinedBy(Resource res)(Code)(Java Doc) public void removeDifferentFrom(Resource res)(Code)(Java Doc) public void removeLabel(String label, String lang)(Code)(Java Doc) public void removeLabel(Literal label)(Code)(Java Doc) public void removeProperty(Property property, RDFNode value)(Code)(Java Doc) protected void removePropertyValue(Property prop, String name, RDFNode value)(Code)(Java Doc) public void removeRDFType(Resource cls)(Code)(Java Doc) public void removeSameAs(Resource res)(Code)(Java Doc) public void removeSeeAlso(Resource res)(Code)(Java Doc) public void removeVersionInfo(String info)(Code)(Java Doc) protected String selectLang(StmtIterator stmts, String lang)(Code)(Java Doc) public void setComment(String comment, String lang)(Code)(Java Doc) public void setDifferentFrom(Resource res)(Code)(Java Doc) public void setIsDefinedBy(Resource res)(Code)(Java Doc) public void setLabel(String label, String lang)(Code)(Java Doc) public void setPropertyValue(Property property, RDFNode value)(Code)(Java Doc) protected void setPropertyValue(Property p, String name, RDFNode value)(Code)(Java Doc) public void setRDFType(Resource cls)(Code)(Java Doc) public void setSameAs(Resource res)(Code)(Java Doc) public void setSeeAlso(Resource res)(Code)(Java Doc) public void setVersionInfo(String info)(Code)(Java Doc)
|
|
|