org.enhydra.apache.xerces.validators.datatype
Class AbstractNumericValidator
java.lang.Object
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractNumericFacetValidator
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractNumericValidator
- All Implemented Interfaces:
- 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.2 2005/01/26 08:28:44 jkjome Exp $
- Author:
- Elena Litani
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 |
Methods inherited from class org.enhydra.apache.xerces.validators.datatype.AbstractNumericFacetValidator |
assignAdditionalFacets, checkBaseFacetConstraints, checkFacetConstraints, compareValues, getMaxExclusive, getMaxInclusive, getMinExclusive, getMinInclusive, inheritAdditionalFacets, initializeValues, setEnumeration, setMaxExclusive, setMaxInclusive, setMinExclusive, setMinInclusive |
Methods inherited from class java.lang.Object |
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractNumericValidator
public AbstractNumericValidator()
throws InvalidDatatypeFacetException
AbstractNumericValidator
public AbstractNumericValidator(DatatypeValidator base,
Hashtable facets,
boolean derivedByList)
throws InvalidDatatypeFacetException
validate
public Object validate(String content,
Object state)
throws InvalidDatatypeValueException
- Validate string against lexical space of datatype
- Overrides:
validate
in class AbstractDatatypeValidator
- Parameters:
content
- A string containing the content to be validatedstate
- - Returns:
-
- Throws:
throws
- InvalidDatatypeException if the content is
is not a W3C decimal typeInvalidDatatypeValueException
-
clone
public Object clone()
throws CloneNotSupportedException
- Overrides:
clone
in class AbstractDatatypeValidator
checkContentEnum
protected void checkContentEnum(String content,
Object state,
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 validatedenumeration
- 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(String content,
Object State,
Vector enumer,
boolean asBase)
throws InvalidDatatypeValueException
boundsCheck
protected void boundsCheck(Object d)
throws InvalidDatatypeValueException
Copyright © 1999 The Apache Software Foundation. All Rights reserved.