FileDocCategorySizeDatePackage
TypeValidator.javaAPI DocApache Xerces 3.0.14311Fri Sep 14 20:33:54 BST 2007org.apache.xerces.impl.dv.xs

TypeValidator

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.
xerces.internal
author
Neeraj Bajaj, Sun Microsystems, inc.
author
Sandy Gao, IBM
version
$Id: TypeValidator.java 446745 2006-09-15 21:43:58Z mrglavas $

Fields Summary
public static final short
LESS_THAN
public static final short
EQUAL
public static final short
GREATER_THAN
public static final short
INDETERMINATE
Constructors Summary
Methods Summary
public voidcheckExtraRules(java.lang.Object value, org.apache.xerces.impl.dv.ValidationContext context)

    
public intcompare(java.lang.Object value1, java.lang.Object value2)

        return -1;
    
public abstract java.lang.ObjectgetActualValue(java.lang.String content, org.apache.xerces.impl.dv.ValidationContext context)

public abstract shortgetAllowedFacets()

public intgetDataLength(java.lang.Object value)

        return (value instanceof String) ? ((String)value).length() : -1;
    
public static final intgetDigit(char ch)

        return isDigit(ch) ? ch - '0" : -1;
    
public intgetFractionDigits(java.lang.Object value)

        return -1;
    
public intgetTotalDigits(java.lang.Object value)

        return -1;
    
public static final booleanisDigit(char ch)

        return ch >= '0" && ch <= '9";
    
public booleanisIdentical(java.lang.Object value1, java.lang.Object value2)

    
    // where there is distinction between identity and equality, this method
    // will be overwritten
    // checks whether the two values are identical; for ex, this distinguishes 
    // -0.0 from 0.0 
           
        return value1.equals(value2);