org.apache.xerces.validators.datatype
Class AbstractStringValidator

java.lang.Object
  |
  +--org.apache.xerces.validators.datatype.AbstractDatatypeValidator
        |
        +--org.apache.xerces.validators.datatype.AbstractStringValidator
Direct Known Subclasses:
AnyURIDatatypeValidator, Base64BinaryDatatypeValidator, HexBinaryDatatypeValidator, NOTATIONDatatypeValidator, QNameDatatypeValidator, StringDatatypeValidator

public abstract class AbstractStringValidator
extends AbstractDatatypeValidator

AbstractStringValidator is a base class for anyURI, string, hexBinary, base64Binary, QName and Notation datatypes.

Version:
$Id: AbstractStringValidator.java,v 1.1 2001/05/09 18:29:00 elena Exp $
Author:
Elena Litani

Field Summary
protected  java.util.Vector fEnumeration
           
protected  int fLength
           
protected  int fMaxLength
           
protected  int fMinLength
           
 
Fields inherited from class org.apache.xerces.validators.datatype.AbstractDatatypeValidator
fBaseValidator, fFacetsDefined, fFlags, fLocale, fMessageProvider, fPattern, fRegex
 
Constructor Summary
AbstractStringValidator()
           
AbstractStringValidator(DatatypeValidator base, java.util.Hashtable facets, boolean derivedByList)
           
 
Method Summary
protected abstract  void assignAdditionalFacets(java.lang.String key, java.util.Hashtable facets)
           
protected  void checkBaseFacetConstraints()
           
protected  void checkValueSpace(java.lang.String content)
           
 java.lang.Object clone()
          Returns a copy of this object.
 int compare(java.lang.String content1, java.lang.String content2)
          Compares two anyURIs for equality.
protected  boolean derivationList(boolean derivedByList)
           
protected  int getLength(java.lang.String content)
           
protected  void inheritAdditionalFacets()
           
 java.lang.Object validate(java.lang.String content, java.lang.Object state)
          validate that a string is a W3C string type
 
Methods inherited from class org.apache.xerces.validators.datatype.AbstractDatatypeValidator
getBaseValidator, getErrorString, getWSFacet, setLocale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fLength

protected int fLength

fMaxLength

protected int fMaxLength

fMinLength

protected int fMinLength

fEnumeration

protected java.util.Vector fEnumeration
Constructor Detail

AbstractStringValidator

public AbstractStringValidator()
                        throws InvalidDatatypeFacetException

AbstractStringValidator

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

assignAdditionalFacets

protected abstract void assignAdditionalFacets(java.lang.String key,
                                               java.util.Hashtable facets)
                                        throws InvalidDatatypeFacetException

inheritAdditionalFacets

protected void inheritAdditionalFacets()

checkBaseFacetConstraints

protected void checkBaseFacetConstraints()
                                  throws InvalidDatatypeFacetException

derivationList

protected boolean derivationList(boolean derivedByList)

validate

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

getLength

protected int getLength(java.lang.String content)

checkValueSpace

protected void checkValueSpace(java.lang.String content)
                        throws InvalidDatatypeValueException

compare

public int compare(java.lang.String content1,
                   java.lang.String content2)
Compares two anyURIs for equality. This is not really well defined.
Overrides:
compare in class AbstractDatatypeValidator
Parameters:
content1 -  
content2 -  
Returns:
 

clone

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


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