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

java.lang.Object
  |
  +--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
        |
        +--org.enhydra.apache.xerces.validators.datatype.AbstractNumericFacetValidator
All Implemented Interfaces:
Cloneable, DatatypeValidator
Direct Known Subclasses:
AbstractNumericValidator, DateTimeValidator

public abstract class AbstractNumericFacetValidator
extends AbstractDatatypeValidator

AbstractNumericFacetValidator is a base class for decimal, double, float, and all date/time datatype validators. It implements evaluation of common facets - minInclusive, maxInclusive, minExclusive, maxExclusive according to schema specs.

Version:
$Id: AbstractNumericFacetValidator.java,v 1.2 2005/01/26 08:28:44 jkjome Exp $
Author:
Elena Litani

Field Summary
protected  Object[] fEnumeration
           
protected  Object fMaxExclusive
           
protected  Object fMaxInclusive
           
protected  Object fMinExclusive
           
protected  Object fMinInclusive
           
protected static short INDETERMINATE
           
 
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
AbstractNumericFacetValidator()
           
AbstractNumericFacetValidator(DatatypeValidator base, Hashtable facets, boolean derivedByList)
           
 
Method Summary
protected abstract  void assignAdditionalFacets(String key, Hashtable facets)
           
protected  void checkBaseFacetConstraints()
           
protected  void checkFacetConstraints()
           
protected abstract  int compareValues(Object value1, Object value2)
           
protected abstract  String getMaxExclusive(boolean isBase)
           
protected abstract  String getMaxInclusive(boolean isBase)
           
protected abstract  String getMinExclusive(boolean isBase)
           
protected abstract  String getMinInclusive(boolean isBase)
           
protected  void inheritAdditionalFacets()
           
protected  void initializeValues()
           
protected abstract  void setEnumeration(Vector enumeration)
           
protected abstract  void setMaxExclusive(String value)
           
protected abstract  void setMaxInclusive(String value)
           
protected abstract  void setMinExclusive(String value)
           
protected abstract  void setMinInclusive(String value)
           
 
Methods inherited from class org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
clone, getBaseValidator, getErrorString, getWSFacet, setLocale, validate
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.enhydra.apache.xerces.validators.datatype.DatatypeValidator
compare
 

Field Detail

fEnumeration

protected Object[] fEnumeration

fMaxInclusive

protected Object fMaxInclusive

fMaxExclusive

protected Object fMaxExclusive

fMinInclusive

protected Object fMinInclusive

fMinExclusive

protected Object fMinExclusive

INDETERMINATE

protected static final short INDETERMINATE
Constructor Detail

AbstractNumericFacetValidator

public AbstractNumericFacetValidator()
                              throws InvalidDatatypeFacetException

AbstractNumericFacetValidator

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

compareValues

protected abstract int compareValues(Object value1,
                                     Object value2)

setMaxInclusive

protected abstract void setMaxInclusive(String value)

setMinInclusive

protected abstract void setMinInclusive(String value)

setMaxExclusive

protected abstract void setMaxExclusive(String value)

setMinExclusive

protected abstract void setMinExclusive(String value)

setEnumeration

protected abstract void setEnumeration(Vector enumeration)
                                throws InvalidDatatypeValueException

getMaxInclusive

protected abstract String getMaxInclusive(boolean isBase)

getMinInclusive

protected abstract String getMinInclusive(boolean isBase)

getMaxExclusive

protected abstract String getMaxExclusive(boolean isBase)

getMinExclusive

protected abstract String getMinExclusive(boolean isBase)

initializeValues

protected void initializeValues()

assignAdditionalFacets

protected abstract void assignAdditionalFacets(String key,
                                               Hashtable facets)
                                        throws InvalidDatatypeFacetException

inheritAdditionalFacets

protected void inheritAdditionalFacets()

checkBaseFacetConstraints

protected void checkBaseFacetConstraints()
                                  throws InvalidDatatypeFacetException

checkFacetConstraints

protected void checkFacetConstraints()
                              throws InvalidDatatypeFacetException


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