org.apache.xerces.impl.dv.xs
Class TypeValidator

java.lang.Object
  |
  +--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 java.lang.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.

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

Version:
$Id: TypeValidator.java 1375610 2012-08-21 15:36:30Z mrglavas $
Author:
Neeraj Bajaj, Sun Microsystems, inc., Sandy Gao, IBM

Field Summary
static short EQUAL
           
static short GREATER_THAN
           
static short INDETERMINATE
           
static short LESS_THAN
           
 
Constructor Summary
TypeValidator()
           
 
Method Summary
 void checkExtraRules(java.lang.Object value, ValidationContext context)
           
 int compare(java.lang.Object value1, java.lang.Object value2)
           
abstract  java.lang.Object getActualValue(java.lang.String content, ValidationContext context)
           
abstract  short getAllowedFacets()
           
 int getDataLength(java.lang.Object value)
           
static int getDigit(char ch)
           
 int getFractionDigits(java.lang.Object value)
           
 int getTotalDigits(java.lang.Object value)
           
static boolean isDigit(char ch)
           
 boolean isIdentical(java.lang.Object value1, java.lang.Object value2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LESS_THAN

public static final short LESS_THAN

EQUAL

public static final short EQUAL

GREATER_THAN

public static final short GREATER_THAN

INDETERMINATE

public static final short INDETERMINATE
Constructor Detail

TypeValidator

public TypeValidator()
Method Detail

getAllowedFacets

public abstract short getAllowedFacets()

getActualValue

public abstract java.lang.Object getActualValue(java.lang.String content,
                                                ValidationContext context)
                                         throws InvalidDatatypeValueException

checkExtraRules

public void checkExtraRules(java.lang.Object value,
                            ValidationContext context)
                     throws InvalidDatatypeValueException

isIdentical

public boolean isIdentical(java.lang.Object value1,
                           java.lang.Object value2)

compare

public int compare(java.lang.Object value1,
                   java.lang.Object value2)

getDataLength

public int getDataLength(java.lang.Object value)

getTotalDigits

public int getTotalDigits(java.lang.Object value)

getFractionDigits

public int getFractionDigits(java.lang.Object value)

isDigit

public static final boolean isDigit(char ch)

getDigit

public static final int getDigit(char ch)


Copyright 1999-2018 The Apache Software Foundation. All Rights Reserved.