org.enhydra.apache.xerces.validators.datatype
Class AbstractDatatypeValidator
java.lang.Object
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
- All Implemented Interfaces:
- Cloneable, DatatypeValidator
- Direct Known Subclasses:
- AbstractNumericFacetValidator, AbstractStringValidator, AnySimpleType, BooleanDatatypeValidator, ListDatatypeValidator, UnionDatatypeValidator
- public abstract class AbstractDatatypeValidator
- extends Object
- implements DatatypeValidator, Cloneable
Fields inherited from interface org.enhydra.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 |
Methods inherited from class java.lang.Object |
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fBaseValidator
protected DatatypeValidator fBaseValidator
fPattern
protected String fPattern
fRegex
protected RegularExpression fRegex
fFacetsDefined
protected short fFacetsDefined
fMessageProvider
protected DatatypeMessageProvider fMessageProvider
fLocale
protected Locale fLocale
fFlags
protected short fFlags
AbstractDatatypeValidator
public AbstractDatatypeValidator()
validate
public abstract Object validate(String content,
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 validatedderivedBylist
- 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 validatorsInvalidDatatypeValueException
- - See Also:
InvalidDatatypeValueException
clone
public abstract Object clone()
throws CloneNotSupportedException
- Overrides:
clone
in class 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 String getErrorString(int major,
int minor,
Object[] args)
setLocale
public void setLocale(Locale locale)
- set the locate to be used for error messages
Copyright © 1999 The Apache Software Foundation. All Rights reserved.