public class PermittedValuesFacet extends Object implements Facet
Modifier and Type | Field and Description |
---|---|
private Object[] |
permittedValues |
Constructor and Description |
---|
PermittedValuesFacet(Object[] permittedValues)
Construct a
PermittedValuesFacet that
forces an AbsPrimitive to contain a specific set of values |
Modifier and Type | Method and Description |
---|---|
Object[] |
getPermittedValues()
Get the permitted values associated to this facet
|
String |
getPermittedValuesAsString()
Get the permitted values as string associated to this facet
|
void |
validate(AbsObject value,
Ontology onto)
Check whether a given value for the slot this Facet applies
to is valid.
|
private Object[] permittedValues
public PermittedValuesFacet(Object[] permittedValues)
PermittedValuesFacet
that
forces an AbsPrimitive to contain a specific set of valuespublic Object[] getPermittedValues()
public String getPermittedValuesAsString()
public void validate(AbsObject value, Ontology onto) throws OntologyException
validate
in interface Facet
value
- The value to be checkedOntologyException
- If the value is not valid