com.thaiopensource.datatype.xsd
Class RegexDatatype

java.lang.Object
  extended by com.thaiopensource.datatype.xsd.DatatypeBase
      extended by com.thaiopensource.datatype.xsd.TokenDatatype
          extended by com.thaiopensource.datatype.xsd.RegexDatatype
All Implemented Interfaces:
Datatype2, Measure, Datatype
Direct Known Subclasses:
DateTimeDatatype, DurationDatatype

 class RegexDatatype
extends TokenDatatype


Field Summary
private  String pattern
           
private  Regex regex
           
 
Fields inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
WHITE_SPACE_COLLAPSE, WHITE_SPACE_PRESERVE, WHITE_SPACE_REPLACE
 
Fields inherited from interface org.relaxng.datatype.Datatype
ID_TYPE_ID, ID_TYPE_IDREF, ID_TYPE_IDREFS, ID_TYPE_NULL
 
Constructor Summary
RegexDatatype(String pattern)
           
 
Method Summary
 boolean alwaysValid()
           
(package private)  void compile(RegexEngine engine)
           
 boolean lexicallyAllows(String str)
           
 
Methods inherited from class com.thaiopensource.datatype.xsd.TokenDatatype
getLength, getMeasure, getValue
 
Methods inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
allowsValue, checkValid, createStreamingValidator, createValue, getIdType, getOrderRelation, getPrimitive, getWhiteSpace, isContextDependent, isValid, normalizeWhiteSpace, sameValue, valueHashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

private final String pattern

regex

private Regex regex
Constructor Detail

RegexDatatype

RegexDatatype(String pattern)
Method Detail

compile

void compile(RegexEngine engine)
       throws RegexSyntaxException
Throws:
RegexSyntaxException

lexicallyAllows

public boolean lexicallyAllows(String str)
Overrides:
lexicallyAllows in class TokenDatatype

alwaysValid

public boolean alwaysValid()
Specified by:
alwaysValid in interface Datatype2
Overrides:
alwaysValid in class TokenDatatype