Package jade.content.schema.facets
Class PermittedValuesFacet
- java.lang.Object
-
- jade.content.schema.facets.PermittedValuesFacet
-
- All Implemented Interfaces:
Facet,Serializable,Serializable
public class PermittedValuesFacet extends Object implements Facet
This facet forces an AbsPrimitive to contain a specific set of values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PermittedValuesFacet(Object[] permittedValues)Construct aPermittedValuesFacetthat forces an AbsPrimitive to contain a specific set of values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getPermittedValues()Get the permitted values associated to this facetStringgetPermittedValuesAsString()Get the permitted values as string associated to this facetvoidvalidate(AbsObject value, Ontology onto)Check whether a given value for the slot this Facet applies to is valid.
-
-
-
Constructor Detail
-
PermittedValuesFacet
public PermittedValuesFacet(Object[] permittedValues)
Construct aPermittedValuesFacetthat forces an AbsPrimitive to contain a specific set of values
-
-
Method Detail
-
getPermittedValues
public Object[] getPermittedValues()
Get the permitted values associated to this facet
-
getPermittedValuesAsString
public String getPermittedValuesAsString()
Get the permitted values as string associated to this facet
-
validate
public void validate(AbsObject value, Ontology onto) throws OntologyException
Check whether a given value for the slot this Facet applies to is valid.- Specified by:
validatein interfaceFacet- Parameters:
value- The value to be checked- Throws:
OntologyException- If the value is not valid
-
-