Package jade.content.schema.facets
Class RegexFacet
- java.lang.Object
-
- jade.content.schema.facets.RegexFacet
-
- All Implemented Interfaces:
Facet,Serializable,Serializable
public class RegexFacet extends Object implements Facet
This facet forces an AbsPrimitive to contain a specific set of values expressed as a regular expression.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RegexFacet(String regex)Construct aPermittedValuesFacetthat forces an AbsPrimitive to contain a specific set of values expressed as a regular expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRegex()Get the regex associated to this facetvoidvalidate(AbsObject value, Ontology onto)Check whether a given value for the slot this Facet applies to is valid.
-
-
-
Constructor Detail
-
RegexFacet
public RegexFacet(String regex)
Construct aPermittedValuesFacetthat forces an AbsPrimitive to contain a specific set of values expressed as a regular expression
-
-
Method Detail
-
getRegex
public String getRegex()
Get the regex 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
-
-