jade.content.schema.facets
Class RegexFacet

java.lang.Object
  extended by jade.content.schema.facets.RegexFacet
All Implemented Interfaces:
Facet, java.io.Serializable

public class RegexFacet
extends java.lang.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
RegexFacet(java.lang.String regex)
          Construct a PermittedValuesFacet that forces an AbsPrimitive to contain a specific set of values expressed as a regular expression
 
Method Summary
 java.lang.String getRegex()
          Get the regex associated to this facet
 void validate(AbsObject value, Ontology onto)
          Check whether a given value for the slot this Facet applies to is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexFacet

public RegexFacet(java.lang.String regex)
Construct a PermittedValuesFacet that forces an AbsPrimitive to contain a specific set of values expressed as a regular expression

Method Detail

getRegex

public java.lang.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:
validate in interface Facet
Parameters:
value - The value to be checked
Throws:
OntologyException - If the value is not valid


These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions