org.apache.xerces.validators.datatype
Class AbstractDatatypeValidator

java.lang.Object
  |
  +--org.apache.xerces.validators.datatype.AbstractDatatypeValidator
All Implemented Interfaces:
java.lang.Cloneable, DatatypeValidator
Direct Known Subclasses:
AbstractNumericFacetValidator, AbstractStringValidator, AnySimpleType, BooleanDatatypeValidator, ListDatatypeValidator, UnionDatatypeValidator

public abstract class AbstractDatatypeValidator
extends java.lang.Object
implements DatatypeValidator, java.lang.Cloneable


Field Summary
protected  DatatypeValidator fBaseValidator
           
protected  short fFacetsDefined
           
protected  short fFlags
           
protected  java.util.Locale fLocale
           
protected  DatatypeMessageProvider fMessageProvider
           
protected  java.lang.String fPattern
           
protected  RegularExpression fRegex
           
 
Fields inherited from interface org.apache.xerces.validators.datatype.DatatypeValidator
COLLAPSE, FACET_DURATION, FACET_ENCODING, FACET_ENUMERATION, FACET_FIXED, FACET_FRACTIONDIGITS, FACET_LENGTH, FACET_MAXEXCLUSIVE, FACET_MAXINCLUSIVE, FACET_MAXLENGTH, FACET_MINEXCLUSIVE, FACET_MININCLUSIVE, FACET_MINLENGTH, FACET_PATTERN, FACET_PERIOD, FACET_TOTALDIGITS, FACET_WHITESPACE, PRESERVE, REPLACE
 
Constructor Summary
AbstractDatatypeValidator()
           
 
Method Summary
abstract  java.lang.Object clone()
           
 DatatypeValidator getBaseValidator()
           
protected  java.lang.String getErrorString(int major, int minor, java.lang.Object[] args)
           
 short getWSFacet()
          default value for whiteSpace facet is collapse this function is overwritten in StringDatatypeValidator
 void setLocale(java.util.Locale locale)
          set the locate to be used for error messages
abstract  java.lang.Object validate(java.lang.String content, java.lang.Object state)
          Checks that "content" string is valid datatype.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xerces.validators.datatype.DatatypeValidator
compare
 

Field Detail

fBaseValidator

protected DatatypeValidator fBaseValidator

fPattern

protected java.lang.String fPattern

fRegex

protected RegularExpression fRegex

fFacetsDefined

protected short fFacetsDefined

fMessageProvider

protected DatatypeMessageProvider fMessageProvider

fLocale

protected java.util.Locale fLocale

fFlags

protected short fFlags
Constructor Detail

AbstractDatatypeValidator

public AbstractDatatypeValidator()
Method Detail

validate

public abstract java.lang.Object validate(java.lang.String content,
                                          java.lang.Object state)
                                   throws InvalidDatatypeValueException
Checks that "content" string is valid datatype. If invalid a Datatype validation exception is thrown.
Specified by:
validate in interface DatatypeValidator
Parameters:
content - A string containing the content to be validated
derivedBylist - Flag which is true when type is derived by list otherwise it it is derived by extension.
Throws:
throws - InvalidDatatypeException if the content is invalid according to the rules for the validators
InvalidDatatypeValueException -  
See Also:
InvalidDatatypeValueException

clone

public abstract java.lang.Object clone()
                                throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object

getWSFacet

public short getWSFacet()
default value for whiteSpace facet is collapse this function is overwritten in StringDatatypeValidator
Specified by:
getWSFacet in interface DatatypeValidator

getBaseValidator

public DatatypeValidator getBaseValidator()
Specified by:
getBaseValidator in interface DatatypeValidator

getErrorString

protected java.lang.String getErrorString(int major,
                                          int minor,
                                          java.lang.Object[] args)

setLocale

public void setLocale(java.util.Locale locale)
set the locate to be used for error messages


Copyright 1999-2001 Apache XML Project. All Rights Reserved.