org.apache.xerces.validators.datatype
Class TimeInstantValidator

java.lang.Object
  |
  +--org.apache.xerces.validators.datatype.TimeInstantValidator

public class TimeInstantValidator
extends java.lang.Object
implements org.apache.xerces.validators.datatype.InternalDatatypeValidator

TimeInstantValidator validates that XML content is a W3C timeInstant type.

Version:
 
Author:
Ted Leung, George Joseph

Field Summary
static int CACHE_INITIAL_SIZE
           
static int CACHE_LIMIT
           
 
Fields inherited from interface org.apache.xerces.validators.datatype.DatatypeValidator
ENCODING, ENUMERATION, LENGTH, LEXICAL, LEXICALREPRESENTATION, LITERAL, MAXEXCLUSIVE, MAXINCLUSIVE, MAXLENGTH, MINEXCLUSIVE, MININCLUSIVE, MINLENGTH, PATTERN, PERIOD, PRECISION, SCALE
 
Constructor Summary
TimeInstantValidator()
           
 
Method Summary
static int indexOf(char[] value, int start, char s)
           
static int indexOf(char[] value, int start, char s, int max)
           
static int indexOneOf(char[] value, int start, java.lang.String s)
           
static int indexOneOf(char[] value, int start, java.lang.String s, int max)
           
static java.util.Calendar normalizeInstant(char[] value, int start, int length)
           
static int parseInt(char[] s, int start, int length)
           
 void setBasetype(DatatypeValidator base)
          set the base type for this datatype
 void setFacets(java.util.Hashtable facets)
          set the facets for this datatype setFacets is responsible for ensuring that the supplied facets do not contradict each other
 void setFacets(int[] facets)
          set the facets for this datatype
 void setLocale(java.util.Locale locale)
          set the locate to be used for error messages
 void validate(int contentIndex)
          validate that a string matches a datatype validate returns true or false depending on whether the string content is an instance of the data type represented by this validator.
 void validate(java.lang.String content)
          validate that a string is a W3C timeInstant type validate returns true or false depending on whether the string content is an instance of the W3C string datatype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_LIMIT

public static final int CACHE_LIMIT

CACHE_INITIAL_SIZE

public static final int CACHE_INITIAL_SIZE
Constructor Detail

TimeInstantValidator

public TimeInstantValidator()
Method Detail

validate

public void validate(java.lang.String content)
              throws InvalidDatatypeValueException
validate that a string is a W3C timeInstant type validate returns true or false depending on whether the string content is an instance of the W3C string datatype
Parameters:
content - A string containing the content to be validated
Throws:
throws - InvalidDatatypeException if the content is not a W3C timeInstant type

validate

public void validate(int contentIndex)
              throws InvalidDatatypeValueException
Description copied from interface: org.apache.xerces.validators.datatype.InternalDatatypeValidator
validate that a string matches a datatype validate returns true or false depending on whether the string content is an instance of the data type represented by this validator.
Specified by:
validate in interface org.apache.xerces.validators.datatype.InternalDatatypeValidator
Tags copied from interface: org.apache.xerces.validators.datatype.InternalDatatypeValidator
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

setFacets

public void setFacets(java.util.Hashtable facets)
               throws UnknownFacetException,
                      IllegalFacetException,
                      IllegalFacetValueException
Description copied from interface: DatatypeValidator
set the facets for this datatype setFacets is responsible for ensuring that the supplied facets do not contradict each other
Tags copied from interface: DatatypeValidator
Parameters:
facets - A hashtable where facet names are keys and facet values are stored in the hashtable. Usually facet values are strings, except for the enumeration facet. The value for this facet is a Vector of strings, one per enumeration value
Throws:
throws - UnknownFacetException
throws - IllegalFacetException
throws - IllegalFacetValueException

setBasetype

public void setBasetype(DatatypeValidator base)
Description copied from interface: DatatypeValidator
set the base type for this datatype
Tags copied from interface: DatatypeValidator
Parameters:
base - the validator for this type's base type

setLocale

public void setLocale(java.util.Locale locale)
set the locate to be used for error messages

setFacets

public void setFacets(int[] facets)
               throws UnknownFacetException,
                      IllegalFacetException,
                      IllegalFacetValueException
Description copied from interface: org.apache.xerces.validators.datatype.InternalDatatypeValidator
set the facets for this datatype
Specified by:
setFacets in interface org.apache.xerces.validators.datatype.InternalDatatypeValidator

normalizeInstant

public static java.util.Calendar normalizeInstant(char[] value,
                                                  int start,
                                                  int length)
                                           throws InvalidDatatypeValueException

indexOf

public static final int indexOf(char[] value,
                                int start,
                                char s)

indexOf

public static final int indexOf(char[] value,
                                int start,
                                char s,
                                int max)

indexOneOf

public static final int indexOneOf(char[] value,
                                   int start,
                                   java.lang.String s)

indexOneOf

public static final int indexOneOf(char[] value,
                                   int start,
                                   java.lang.String s,
                                   int max)

parseInt

public static final int parseInt(char[] s,
                                 int start,
                                 int length)
                          throws java.lang.NumberFormatException


Copyright © 1999 Apache XML Project. All Rights Reserved.