org.enhydra.apache.xerces.validators.datatype
Class UnionDatatypeValidator
java.lang.Object
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
|
+--org.enhydra.apache.xerces.validators.datatype.UnionDatatypeValidator
- All Implemented Interfaces:
- Cloneable, DatatypeValidator
- public class UnionDatatypeValidator
- extends AbstractDatatypeValidator
- Author:
- Jeffrey Rodriguez, Elena Litani
UnionValidator validates that XML content is a W3C string type.
Implements the September 22 XML Schema datatype Union Datatype type
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 |
UnionDatatypeValidator
public UnionDatatypeValidator()
throws InvalidDatatypeFacetException
UnionDatatypeValidator
public UnionDatatypeValidator(DatatypeValidator base,
Hashtable facets,
boolean derivedBy)
throws InvalidDatatypeFacetException
UnionDatatypeValidator
public UnionDatatypeValidator(Vector base)
validate
public Object validate(String content,
Object state)
throws InvalidDatatypeValueException
- validate that a string is a W3C string type
- Overrides:
validate
in class AbstractDatatypeValidator
- Parameters:
content
- A string containing the content to be validatedlist
- - Throws:
throws
- InvalidDatatypeException if the content is
not a W3C string typeInvalidDatatypeValueException
-
getFacets
public Hashtable getFacets()
- Returns:
- A Hashtable containing the facets
for this datatype.
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:
-
clone
public Object clone()
throws CloneNotSupportedException
- Returns a copy of this object.
- Overrides:
clone
in class AbstractDatatypeValidator
getBaseValidators
public Vector getBaseValidators()
Copyright © 1999 The Apache Software Foundation. All Rights reserved.