org.enhydra.apache.xerces.validators.datatype
Class FloatDatatypeValidator
java.lang.Object
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractNumericFacetValidator
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractNumericValidator
|
+--org.enhydra.apache.xerces.validators.datatype.FloatDatatypeValidator
- All Implemented Interfaces:
- Cloneable, DatatypeValidator
- public class FloatDatatypeValidator
- extends AbstractNumericValidator
- Version:
- $Id: FloatDatatypeValidator.java,v 1.2 2005/01/26 08:28:44 jkjome Exp $
- Author:
- Elena Litani, Ted Leung, Jeffrey Rodriguez, Mark Swinkles - List Validation refactoring
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 java.lang.Object |
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FloatDatatypeValidator
public FloatDatatypeValidator()
throws InvalidDatatypeFacetException
FloatDatatypeValidator
public FloatDatatypeValidator(DatatypeValidator base,
Hashtable facets,
boolean derivedByList)
throws InvalidDatatypeFacetException
compare
public int compare(String value1,
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.enhydra.apache.xerces.validators.datatype.DatatypeValidator
- Parameters:
value1
- valu2
- - Returns:
-
assignAdditionalFacets
protected void assignAdditionalFacets(String key,
Hashtable facets)
throws InvalidDatatypeFacetException
- Overrides:
assignAdditionalFacets
in class AbstractNumericFacetValidator
compareValues
protected int compareValues(Object value1,
Object value2)
- Overrides:
compareValues
in class AbstractNumericFacetValidator
setMaxInclusive
protected void setMaxInclusive(String value)
- Overrides:
setMaxInclusive
in class AbstractNumericFacetValidator
setMinInclusive
protected void setMinInclusive(String value)
- Overrides:
setMinInclusive
in class AbstractNumericFacetValidator
setMaxExclusive
protected void setMaxExclusive(String value)
- Overrides:
setMaxExclusive
in class AbstractNumericFacetValidator
setMinExclusive
protected void setMinExclusive(String value)
- Overrides:
setMinExclusive
in class AbstractNumericFacetValidator
setEnumeration
protected void setEnumeration(Vector enumeration)
throws InvalidDatatypeValueException
- Overrides:
setEnumeration
in class AbstractNumericFacetValidator
getMaxInclusive
protected String getMaxInclusive(boolean isBase)
- Overrides:
getMaxInclusive
in class AbstractNumericFacetValidator
getMinInclusive
protected String getMinInclusive(boolean isBase)
- Overrides:
getMinInclusive
in class AbstractNumericFacetValidator
getMaxExclusive
protected String getMaxExclusive(boolean isBase)
- Overrides:
getMaxExclusive
in class AbstractNumericFacetValidator
getMinExclusive
protected String getMinExclusive(boolean isBase)
- Overrides:
getMinExclusive
in class AbstractNumericFacetValidator
checkContent
protected void checkContent(String content,
Object state,
Vector enumeration,
boolean asBase)
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
- Overrides:
checkContent
in class AbstractNumericValidator
- 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 float type;throws
- InvalidDatatypeFacetException if enumeration is not float
getInvalidFacetMsg
protected int getInvalidFacetMsg()
Copyright © 1999 The Apache Software Foundation. All Rights reserved.