org.apache.xerces.impl.dv.dtd
Class ListDatatypeValidator

java.lang.Object
  |
  +--org.apache.xerces.impl.dv.dtd.AbstractDatatypeValidator
        |
        +--org.apache.xerces.impl.dv.dtd.ListDatatypeValidator
All Implemented Interfaces:
DatatypeValidator, StatefullDatatypeValidator

public class ListDatatypeValidator
extends AbstractDatatypeValidator
implements StatefullDatatypeValidator

StringValidator validates that XML content is a W3C string type.


Fields inherited from class org.apache.xerces.impl.dv.dtd.AbstractDatatypeValidator
fFacets
 
Fields inherited from interface org.apache.xerces.impl.dv.dtd.DatatypeValidator
FACET_DURATION, FACET_ENCODING, FACET_ENUMERATION, FACET_LENGTH, FACET_MAXEXCLUSIVE, FACET_MAXINCLUSIVE, FACET_MAXLENGTH, FACET_MINEXCLUSIVE, FACET_MININCLUSIVE, FACET_MINLENGTH, FACET_PATTERN, FACET_PERIOD, FACET_PRECISSION, FACET_SCALE, FACET_WHITESPACE, WHITESPACE_COLLAPSE, WHITESPACE_NONE, WHITESPACE_PRESERVE, WHITESPACE_REPLACE
 
Constructor Summary
ListDatatypeValidator()
           
ListDatatypeValidator(DatatypeValidator base, java.util.Hashtable facets, boolean derivedByList)
           
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 int compare(java.lang.String content, java.lang.String facetValue)
          compare
 java.util.Hashtable getFacets()
          getFacets
 java.lang.Object getInternalStateInformation()
          This method returns some internal state of a statefull validator
 void initialize(java.lang.Object documentInstanceState)
          Initializes the internal datattype state with documentInstance state information
 void setLocale(java.util.Locale locale)
          set the locate to be used for error messages
 void validate()
          Initializes the internal datatype state
 void validate(java.lang.String content, java.lang.Object state)
          validate that a string is a W3C string type
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListDatatypeValidator

public ListDatatypeValidator()
                      throws InvalidDatatypeFacetException

ListDatatypeValidator

public ListDatatypeValidator(DatatypeValidator base,
                             java.util.Hashtable facets,
                             boolean derivedByList)
                      throws InvalidDatatypeFacetException
Method Detail

validate

public void validate(java.lang.String content,
                     java.lang.Object state)
              throws InvalidDatatypeValueException
validate that a string is a W3C string type
Overrides:
validate in class AbstractDatatypeValidator
Parameters:
content - A string containing the content to be validated
list -  
Throws:
throws - InvalidDatatypeException if the content is not a W3C string type
InvalidDatatypeValueException -  

setLocale

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

getFacets

public java.util.Hashtable getFacets()
Description copied from class: AbstractDatatypeValidator
getFacets
Overrides:
getFacets in class AbstractDatatypeValidator
Returns:
A Hashtable containing the facets for this datatype.

compare

public int compare(java.lang.String content,
                   java.lang.String facetValue)
Description copied from class: AbstractDatatypeValidator
compare
Overrides:
compare in class AbstractDatatypeValidator
Following copied from class: org.apache.xerces.impl.dv.dtd.AbstractDatatypeValidator
Parameters:
value1 -  
value2 -  
Returns:
0 if value1 and value2 are equal, a value less than 0 if value1 is less than value2, a value greater than 0 if value1 is greater than value2

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a copy of this object.
Overrides:
clone in class java.lang.Object

initialize

public void initialize(java.lang.Object documentInstanceState)

Initializes the internal datattype state with documentInstance state information

This method should be called before calling the validate method

Specified by:
initialize in interface StatefullDatatypeValidator
Parameters:
documentInstanceState -  

validate

public void validate()
              throws InvalidDatatypeValueException

Initializes the internal datatype state

Specified by:
validate in interface StatefullDatatypeValidator

getInternalStateInformation

public java.lang.Object getInternalStateInformation()

This method returns some internal state of a statefull validator

It returns a reference to the internal state
Specified by:
getInternalStateInformation in interface StatefullDatatypeValidator
Returns:
Object


Copyright © 1999-2002 Apache XML Project. All Rights Reserved.