Class TypeValidator
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.dv.xs.TypeValidator
-
- Direct Known Subclasses:
AbstractDateTimeDV
,AnySimpleDV
,AnyURIDV
,Base64BinaryDV
,BooleanDV
,DecimalDV
,DoubleDV
,EntityDV
,FloatDV
,HexBinaryDV
,IDDV
,IDREFDV
,ListDV
,QNameDV
,StringDV
,UnionDV
public abstract class TypeValidator extends Object
All primitive types plus ID/IDREF/ENTITY/INTEGER are derived from this abstract class. It provides extra information XSSimpleTypeDecl requires from each type: allowed facets, converting String to actual value, check equality, comparison, etc.- Version:
- $Id$
- Author:
- Neeraj Bajaj, Sun Microsystems, inc., Sandy Gao, IBM
-
-
Field Summary
Fields Modifier and Type Field Description static short
EQUAL
static short
GREATER_THAN
static short
INDETERMINATE
static short
LESS_THAN
-
Constructor Summary
Constructors Constructor Description TypeValidator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkExtraRules(Object value, ValidationContext context)
int
compare(Object value1, Object value2)
abstract Object
getActualValue(String content, ValidationContext context)
abstract short
getAllowedFacets()
int
getDataLength(Object value)
static int
getDigit(char ch)
int
getFractionDigits(Object value)
int
getTotalDigits(Object value)
static boolean
isDigit(char ch)
boolean
isIdentical(Object value1, Object value2)
-
-
-
Field Detail
-
LESS_THAN
public static final short LESS_THAN
- See Also:
- Constant Field Values
-
EQUAL
public static final short EQUAL
- See Also:
- Constant Field Values
-
GREATER_THAN
public static final short GREATER_THAN
- See Also:
- Constant Field Values
-
INDETERMINATE
public static final short INDETERMINATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllowedFacets
public abstract short getAllowedFacets()
-
getActualValue
public abstract Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException
- Throws:
InvalidDatatypeValueException
-
checkExtraRules
public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException
- Throws:
InvalidDatatypeValueException
-
getDataLength
public int getDataLength(Object value)
-
getTotalDigits
public int getTotalDigits(Object value)
-
getFractionDigits
public int getFractionDigits(Object value)
-
isDigit
public static final boolean isDigit(char ch)
-
getDigit
public static final int getDigit(char ch)
-
-