org.enhydra.apache.xerces.validators.datatype
Class AnySimpleType

java.lang.Object
  |
  +--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
        |
        +--org.enhydra.apache.xerces.validators.datatype.AnySimpleType
All Implemented Interfaces:
Cloneable, DatatypeValidator

public class AnySimpleType
extends AbstractDatatypeValidator

AnySimpleType is the base of all simple types.

Version:
$Id: AnySimpleType.java,v 1.1.1.1 2003/03/10 16:34:46 taweili Exp $
Author:
Sandy Gao

Fields inherited from class org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
fBaseValidator, fFacetsDefined, fFlags, fLocale, fMessageProvider, fPattern, fRegex
 
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
 
Constructor Summary
AnySimpleType()
           
AnySimpleType(DatatypeValidator base, Hashtable facets, boolean derivedByList)
           
 
Method Summary
 Object clone()
           
 int compare(String value1, String value2)
          Compares content in the Domain value vs.
 short getWSFacet()
          default value for whiteSpace facet is collapse this function is overwritten in StringDatatypeValidator
 Object validate(String content, Object state)
          Checks that "content" string is valid datatype.
 
Methods inherited from class org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
getBaseValidator, getErrorString, setLocale
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnySimpleType

public AnySimpleType()
              throws InvalidDatatypeFacetException

AnySimpleType

public AnySimpleType(DatatypeValidator base,
                     Hashtable facets,
                     boolean derivedByList)
              throws InvalidDatatypeFacetException
Method Detail

validate

public Object validate(String content,
                       Object state)
                throws InvalidDatatypeValueException
Description copied from class: AbstractDatatypeValidator
Checks that "content" string is valid datatype. If invalid a Datatype validation exception is thrown.
Overrides:
validate in class AbstractDatatypeValidator
Following copied from class: org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
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

compare

public int compare(String value1,
                   String value2)
Description copied from interface: DatatypeValidator
Compares content in the Domain value vs. lexical value. e.g. If type is a float then 1.0 may be equivalent to 1 even tough both are lexically different.
Following copied from interface: org.enhydra.apache.xerces.validators.datatype.DatatypeValidator
Parameters:
value1 -  
valu2 -  
Returns:
 

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class AbstractDatatypeValidator

getWSFacet

public short getWSFacet()
Description copied from class: AbstractDatatypeValidator
default value for whiteSpace facet is collapse this function is overwritten in StringDatatypeValidator
Overrides:
getWSFacet in class AbstractDatatypeValidator


Copyright © 1999 The Apache Software Foundation. All Rights reserved.