org.enhydra.apache.xerces.validators.datatype
Class ListDatatypeValidator
java.lang.Object
|
+--org.enhydra.apache.xerces.validators.datatype.AbstractDatatypeValidator
|
+--org.enhydra.apache.xerces.validators.datatype.ListDatatypeValidator
- All Implemented Interfaces:
- Cloneable, DatatypeValidator
- public class ListDatatypeValidator
- extends AbstractDatatypeValidator
StringValidator validates that XML content is a W3C string type.
- Version:
- $Id: ListDatatypeValidator.java,v 1.2 2005/01/26 08:28:44 jkjome Exp $
- Author:
- Elena Litani, 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 |
ListDatatypeValidator
public ListDatatypeValidator()
throws InvalidDatatypeFacetException
ListDatatypeValidator
public ListDatatypeValidator(DatatypeValidator base,
Hashtable facets,
boolean derivedByList)
throws InvalidDatatypeFacetException
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
checkContentEnum
protected void checkContentEnum(String content,
Object state,
Vector enumeration)
throws InvalidDatatypeValueException
- validate that a content is valid against base datatype and facets (if any)
- Parameters:
content
- A string containing the content to be validatedstate
- used with IDREF(s) datatypesenumeration
- enumeration facet- Throws:
throws
- InvalidDatatypeException if the content is not validInvalidDatatypeValueException
-
Copyright © 1999 The Apache Software Foundation. All Rights reserved.