org.enhydra.apache.xerces.validators.datatype
Interface DatatypeValidator
- All Known Implementing Classes:
- AbstractDatatypeValidator
- public interface DatatypeValidator
DataTypeValidator defines the interface that data type validators must obey.
These validators can be supplied by the application writer and may be useful as
standalone code as well as plugins to the validator architecture.
Note: there is no support for facets in this API, since we are trying to convince
W3C to remove facets from the data type spec.
- Version:
- $Id: DatatypeValidator.java,v 1.2 2003/03/08 19:25:07 davidli Exp $
- Author:
- Jeffrey Rodriguez-
Method Summary |
int |
compare(java.lang.String value1,
java.lang.String value2)
Compares content in the Domain value vs. |
DatatypeValidator |
getBaseValidator()
|
short |
getWSFacet()
|
java.lang.Object |
validate(java.lang.String content,
java.lang.Object state)
Checks that "content" string is valid
datatype. |
FACET_LENGTH
public static final short FACET_LENGTH
- See Also:
- Constant Field Values
FACET_MINLENGTH
public static final short FACET_MINLENGTH
- See Also:
- Constant Field Values
FACET_MAXLENGTH
public static final short FACET_MAXLENGTH
- See Also:
- Constant Field Values
FACET_PATTERN
public static final short FACET_PATTERN
- See Also:
- Constant Field Values
FACET_ENUMERATION
public static final short FACET_ENUMERATION
- See Also:
- Constant Field Values
FACET_MAXINCLUSIVE
public static final short FACET_MAXINCLUSIVE
- See Also:
- Constant Field Values
FACET_MAXEXCLUSIVE
public static final short FACET_MAXEXCLUSIVE
- See Also:
- Constant Field Values
FACET_MININCLUSIVE
public static final short FACET_MININCLUSIVE
- See Also:
- Constant Field Values
FACET_MINEXCLUSIVE
public static final short FACET_MINEXCLUSIVE
- See Also:
- Constant Field Values
FACET_TOTALDIGITS
public static final short FACET_TOTALDIGITS
- See Also:
- Constant Field Values
FACET_FRACTIONDIGITS
public static final short FACET_FRACTIONDIGITS
- See Also:
- Constant Field Values
FACET_ENCODING
public static final short FACET_ENCODING
- See Also:
- Constant Field Values
FACET_DURATION
public static final short FACET_DURATION
- See Also:
- Constant Field Values
FACET_PERIOD
public static final short FACET_PERIOD
- See Also:
- Constant Field Values
FACET_WHITESPACE
public static final short FACET_WHITESPACE
- See Also:
- Constant Field Values
FACET_FIXED
public static final java.lang.String FACET_FIXED
- See Also:
- Constant Field Values
PRESERVE
public static final short PRESERVE
- See Also:
- Constant Field Values
REPLACE
public static final short REPLACE
- See Also:
- Constant Field Values
COLLAPSE
public static final short COLLAPSE
- See Also:
- Constant Field Values
validate
public java.lang.Object validate(java.lang.String content,
java.lang.Object state)
throws InvalidDatatypeValueException
- Checks that "content" string is valid
datatype.
If invalid a Datatype validation exception is thrown.
- Parameters:
content
- A string containing the content to be validated
- Throws:
throws
- InvalidDatatypeException if the content is
invalid according to the rules for the validators
InvalidDatatypeValueException
- See Also:
InvalidDatatypeValueException
getWSFacet
public short getWSFacet()
getBaseValidator
public DatatypeValidator getBaseValidator()
compare
public int compare(java.lang.String value1,
java.lang.String value2)
- 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.
- Parameters:
value1
-
- Returns:
Copyright © 1999 The Apache Software Foundation. All Rights reserved.