org.apache.xerces.validators.datatype
Class AnySimpleType

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

public class AnySimpleType
extends AbstractDatatypeValidator

AnySimpleType is the base of all simple types.

Version:
$Id: AnySimpleType.java 317377 2001-07-19 22:37:46Z sandygao $
Author:
Sandy Gao

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

validate

public java.lang.Object validate(java.lang.String content,
                                 java.lang.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.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(java.lang.String value1,
                   java.lang.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.apache.xerces.validators.datatype.DatatypeValidator
Parameters:
value1 -  
valu2 -  
Returns:
 

clone

public java.lang.Object clone()
                       throws java.lang.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-2001 Apache XML Project. All Rights Reserved.