Enhydra 5.1 API

org.apache.xerces.validators.datatype
Class DecimalDatatypeValidator

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

public class DecimalDatatypeValidator
extends AbstractNumericValidator

DecimalDatatypeValidator validates that content satisfies the W3C XML Datatype for decimal

Version:
1.4.4 $Id: DecimalDatatypeValidator.java,v 1.1 2003/04/14 12:31:31 sinisa Exp $
Author:
Elena Litani
, Ted Leung , Jeffrey Rodriguez , Mark Swinkles - List Validation refactoring

Field Summary
protected  int fFractionDigits
           
protected  int fTotalDigits
           
 
Fields inherited from class org.apache.xerces.validators.datatype.AbstractNumericFacetValidator
fEnumeration, fMaxExclusive, fMaxInclusive, fMinExclusive, fMinInclusive, INDETERMINATE
 
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
DecimalDatatypeValidator()
           
DecimalDatatypeValidator(DatatypeValidator base, java.util.Hashtable facets, boolean derivedByList)
           
 
Method Summary
protected  void assignAdditionalFacets(java.lang.String key, java.util.Hashtable facets)
           
protected  void checkBaseFacetConstraints()
           
protected  void checkContent(java.lang.String content, java.lang.Object state, java.util.Vector enumeration, boolean asBase)
           
protected  void checkFacetConstraints()
           
 int compare(java.lang.String value1, java.lang.String value2)
          Compares content in the Domain value vs.
protected  int compareValues(java.lang.Object value1, java.lang.Object value2)
           
protected  java.lang.String getMaxExclusive(boolean isBase)
           
protected  java.lang.String getMaxInclusive(boolean isBase)
           
protected  java.lang.String getMinExclusive(boolean isBase)
           
protected  java.lang.String getMinInclusive(boolean isBase)
           
protected  void inheritAdditionalFacets()
           
protected  void setEnumeration(java.util.Vector enumeration)
           
protected  void setMaxExclusive(java.lang.String value)
           
protected  void setMaxInclusive(java.lang.String value)
           
protected  void setMinExclusive(java.lang.String value)
           
protected  void setMinInclusive(java.lang.String value)
           
 
Methods inherited from class org.apache.xerces.validators.datatype.AbstractNumericValidator
boundsCheck, checkContentEnum, clone, validate
 
Methods inherited from class org.apache.xerces.validators.datatype.AbstractNumericFacetValidator
initializeValues
 
Methods inherited from class org.apache.xerces.validators.datatype.AbstractDatatypeValidator
getBaseValidator, getErrorString, getWSFacet, setLocale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fTotalDigits

protected int fTotalDigits

fFractionDigits

protected int fFractionDigits
Constructor Detail

DecimalDatatypeValidator

public DecimalDatatypeValidator()
                         throws InvalidDatatypeFacetException

DecimalDatatypeValidator

public DecimalDatatypeValidator(DatatypeValidator base,
                                java.util.Hashtable facets,
                                boolean derivedByList)
                         throws InvalidDatatypeFacetException
Method Detail

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.

Parameters:
value1 -
Returns:

inheritAdditionalFacets

protected void inheritAdditionalFacets()
Overrides:
inheritAdditionalFacets in class AbstractNumericFacetValidator

checkFacetConstraints

protected void checkFacetConstraints()
                              throws InvalidDatatypeFacetException
Overrides:
checkFacetConstraints in class AbstractNumericFacetValidator
InvalidDatatypeFacetException

checkBaseFacetConstraints

protected void checkBaseFacetConstraints()
                                  throws InvalidDatatypeFacetException
Overrides:
checkBaseFacetConstraints in class AbstractNumericFacetValidator
InvalidDatatypeFacetException

assignAdditionalFacets

protected void assignAdditionalFacets(java.lang.String key,
                                      java.util.Hashtable facets)
                               throws InvalidDatatypeFacetException
Specified by:
assignAdditionalFacets in class AbstractNumericFacetValidator
InvalidDatatypeFacetException

compareValues

protected int compareValues(java.lang.Object value1,
                            java.lang.Object value2)
Specified by:
compareValues in class AbstractNumericFacetValidator

setMaxInclusive

protected void setMaxInclusive(java.lang.String value)
Specified by:
setMaxInclusive in class AbstractNumericFacetValidator

setMinInclusive

protected void setMinInclusive(java.lang.String value)
Specified by:
setMinInclusive in class AbstractNumericFacetValidator

setMaxExclusive

protected void setMaxExclusive(java.lang.String value)
Specified by:
setMaxExclusive in class AbstractNumericFacetValidator

setMinExclusive

protected void setMinExclusive(java.lang.String value)
Specified by:
setMinExclusive in class AbstractNumericFacetValidator

setEnumeration

protected void setEnumeration(java.util.Vector enumeration)
                       throws InvalidDatatypeValueException
Specified by:
setEnumeration in class AbstractNumericFacetValidator
InvalidDatatypeValueException

getMaxInclusive

protected java.lang.String getMaxInclusive(boolean isBase)
Specified by:
getMaxInclusive in class AbstractNumericFacetValidator

getMinInclusive

protected java.lang.String getMinInclusive(boolean isBase)
Specified by:
getMinInclusive in class AbstractNumericFacetValidator

getMaxExclusive

protected java.lang.String getMaxExclusive(boolean isBase)
Specified by:
getMaxExclusive in class AbstractNumericFacetValidator

getMinExclusive

protected java.lang.String getMinExclusive(boolean isBase)
Specified by:
getMinExclusive in class AbstractNumericFacetValidator

checkContent

protected void checkContent(java.lang.String content,
                            java.lang.Object state,
                            java.util.Vector enumeration,
                            boolean asBase)
                     throws InvalidDatatypeValueException
Specified by:
checkContent in class AbstractNumericValidator
InvalidDatatypeValueException

Enhydra 5.1 API