FileDocCategorySizeDatePackage
TypeValidator.javaAPI DocJava SE 5 API5804Fri Aug 26 14:55:48 BST 2005com.sun.org.apache.xerces.internal.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.
author
Neeraj Bajaj, Sun Microsystems, inc.
author
Sandy Gao, IBM
version
$Id: TypeValidator.java,v 1.5 2002/11/18 23:10:10 sandygao Exp $

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, com.sun.org.apache.xerces.internal.impl.dv.ValidationContext context)

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


    // check the order relation between the two values
    // the parameters are in compiled form (from getActualValue)
          
        return -1;
    
public abstract java.lang.ObjectgetActualValue(java.lang.String content, com.sun.org.apache.xerces.internal.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";