org.apache.xerces.impl.dv.xs
Class AbstractNumericValidator

java.lang.Object
  |
  +--org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
        |
        +--org.apache.xerces.impl.dv.xs.AbstractNumericFacetValidator
              |
              +--org.apache.xerces.impl.dv.xs.AbstractNumericValidator
All Implemented Interfaces:
java.lang.Cloneable, DatatypeValidator
Direct Known Subclasses:
DecimalDatatypeValidator, DoubleDatatypeValidator, FloatDatatypeValidator

public abstract class AbstractNumericValidator
extends AbstractNumericFacetValidator

AbstractNumericValidator is a base class of decimal, double, and float schema datatypes

Version:
$Id: AbstractNumericValidator.java,v 1.1 2001/10/25 20:35:58 elena Exp $
Author:
Elena Litani

Fields inherited from class org.apache.xerces.impl.dv.xs.AbstractNumericFacetValidator
fEnumeration, fMaxExclusive, fMaxInclusive, fMinExclusive, fMinInclusive, INDETERMINATE
 
Fields inherited from class org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
fBaseValidator, fErrorReporter, fFacetsDefined, fFinalSet, fFlags, fLocale, fLocalName, fMessageProvider, fPattern, fRegex
 
Fields inherited from interface org.apache.xerces.impl.dv.xs.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
AbstractNumericValidator()
           
AbstractNumericValidator(DatatypeValidator base, java.util.Hashtable facets, boolean derivedByList, XMLErrorReporter reporter)
           
 
Method Summary
protected  void boundsCheck(java.lang.Object d)
           
protected abstract  void checkContent(java.lang.String content, ValidationContext State, java.util.Vector enum, boolean asBase)
           
protected  void checkContentEnum(java.lang.String content, ValidationContext state, java.util.Vector enumeration)
          validate if the content is valid against base datatype and facets (if any) this function might be called directly from UnionDatatype or ListDatatype
 java.lang.Object clone()
           
 java.lang.Object validate(java.lang.String content, ValidationContext state)
          Validate string against lexical space of datatype
 
Methods inherited from class org.apache.xerces.impl.dv.xs.AbstractNumericFacetValidator
assignAdditionalFacets, checkBaseFacetConstraints, checkFacetConstraints, compareValues, getMaxExclusive, getMaxInclusive, getMinExclusive, getMinInclusive, hasEnumeration, inheritAdditionalFacets, initializeValues, setEnumeration, setMaxExclusive, setMaxInclusive, setMinExclusive, setMinInclusive
 
Methods inherited from class org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
getBaseValidator, getErrorString, getFinalSet, getWSFacet, getXSType, getXSTypeName, setFinalSet, setLocale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xerces.impl.dv.xs.DatatypeValidator
compare
 

Constructor Detail

AbstractNumericValidator

public AbstractNumericValidator()

AbstractNumericValidator

public AbstractNumericValidator(DatatypeValidator base,
                                java.util.Hashtable facets,
                                boolean derivedByList,
                                XMLErrorReporter reporter)
Method Detail

validate

public java.lang.Object validate(java.lang.String content,
                                 ValidationContext state)
                          throws InvalidDatatypeValueException
Validate string against lexical space of datatype
Overrides:
validate in class AbstractDatatypeValidator
Parameters:
content - A string containing the content to be validated
state -  
Returns:
 
Throws:
throws - InvalidDatatypeException if the content is is not a W3C decimal type
InvalidDatatypeValueException -  

clone

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

checkContentEnum

protected void checkContentEnum(java.lang.String content,
                                ValidationContext state,
                                java.util.Vector enumeration)
                         throws InvalidDatatypeValueException
validate if the content is valid against base datatype and facets (if any) this function might be called directly from UnionDatatype or ListDatatype
Parameters:
content - A string containing the content to be validated
enumeration - A vector with enumeration strings
Throws:
throws - InvalidDatatypeException if the content is is not a W3C decimal type;
throws - InvalidDatatypeFacetException if enumeration is not BigDecimal

checkContent

protected abstract void checkContent(java.lang.String content,
                                     ValidationContext State,
                                     java.util.Vector enum,
                                     boolean asBase)
                              throws InvalidDatatypeValueException

boundsCheck

protected void boundsCheck(java.lang.Object d)
                    throws InvalidDatatypeValueException


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