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

java.lang.Object
  |
  +--org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
        |
        +--org.apache.xerces.impl.dv.xs.AbstractStringValidator
              |
              +--org.apache.xerces.impl.dv.xs.StringDatatypeValidator
                    |
                    +--org.apache.xerces.impl.dv.xs.EntityDatatypeValidator
All Implemented Interfaces:
java.lang.Cloneable, DatatypeValidator

public class EntityDatatypeValidator
extends StringDatatypeValidator

[Definition:] ENTITY represents the ENTITY attribute type from [XML 1.0 (Second Edition)]. The value space of ENTITY is the set of all strings that match the NCName production in [Namespaces in XML] and have been declared as an unparsed entity in a document type definition. The lexical space of ENTITY is the set of all strings that match the NCName production in [Namespaces in XML]. The base type of ENTITY is NCName.

Author:
Elena Litani, IBM

Fields inherited from class org.apache.xerces.impl.dv.xs.AbstractStringValidator
FACET_SPECIAL_TOKEN, fEnumeration, fLength, fMaxLength, fMinLength, fTokenType, SPECIAL_TOKEN_ENTITY, SPECIAL_TOKEN_IDNAME, SPECIAL_TOKEN_IDNCNAME, SPECIAL_TOKEN_IDREFNAME, SPECIAL_TOKEN_IDREFNCNAME, SPECIAL_TOKEN_NAME, SPECIAL_TOKEN_NCNAME, SPECIAL_TOKEN_NMTOKEN, SPECIAL_TOKEN_NONE
 
Fields inherited from class org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
fBaseValidator, fErrorReporter, fFacetsDefined, fFinalSet, fFlags, fLocale, fLocalName, fMessageProvider, fPattern, fRegex
 
Fields inherited from interface org.apache.xerces.impl.dv.xs.DatatypeValidator
COLLAPSE, FACET_DURATION, FACET_ENCODING, FACET_ENUMERATION, FACET_FIXED, FACET_FRACTIONDIGITS, FACET_LENGTH, FACET_MAXEXCLUSIVE, FACET_MAXINCLUSIVE, FACET_MAXLENGTH, FACET_MINEXCLUSIVE, FACET_MININCLUSIVE, FACET_MINLENGTH, FACET_PATTERN, FACET_PERIOD, FACET_TOTALDIGITS, FACET_WHITESPACE, PRESERVE, REPLACE
 
Constructor Summary
EntityDatatypeValidator()
           
EntityDatatypeValidator(DatatypeValidator base, java.util.Hashtable facets, boolean derivedByList, XMLErrorReporter reporter)
           
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 int compare(java.lang.String content1, java.lang.String content2)
          Compares content in the Domain value vs.
 short getWSFacet()
          return value of whiteSpace facet
 java.lang.Object validate(java.lang.String content, ValidationContext state)
          The following constrain is checked: ENTITY values must match an unparsed entity name that is declared in the schema.
 
Methods inherited from class org.apache.xerces.impl.dv.xs.StringDatatypeValidator
assignAdditionalFacets, checkBaseFacetConstraints, inheritAdditionalFacets
 
Methods inherited from class org.apache.xerces.impl.dv.xs.AbstractStringValidator
checkContent, checkValueSpace, derivationList, getLength, hasEnumeration, setTokenType, validateToken
 
Methods inherited from class org.apache.xerces.impl.dv.xs.AbstractDatatypeValidator
getBaseValidator, getErrorString, getFinalSet, getXSType, getXSTypeName, setFinalSet, setLocale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityDatatypeValidator

public EntityDatatypeValidator()

EntityDatatypeValidator

public EntityDatatypeValidator(DatatypeValidator base,
                               java.util.Hashtable facets,
                               boolean derivedByList,
                               XMLErrorReporter reporter)
Method Detail

getWSFacet

public short getWSFacet()
Description copied from class: StringDatatypeValidator
return value of whiteSpace facet
Overrides:
getWSFacet in class StringDatatypeValidator

validate

public java.lang.Object validate(java.lang.String content,
                                 ValidationContext state)
                          throws InvalidDatatypeValueException

The following constrain is checked: ENTITY values must match an unparsed entity name that is declared in the schema.

Overrides:
validate in class AbstractStringValidator
Parameters:
content - a string containing the content to be validated
state - EntityState that provides query methods
Returns:
Entity name
Throws:
throws - InvalidDatatypeException if the content is invalid according to the rules for the validators
InvalidDatatypeValueException -  

compare

public int compare(java.lang.String content1,
                   java.lang.String content2)
Description copied from interface: DatatypeValidator
Compares content in the Domain value vs. lexical value. e.g. If type is a float then 1.0 may be equivalent to 1 even tough both are lexically different.
Overrides:
compare in class StringDatatypeValidator
Following copied from interface: org.apache.xerces.impl.dv.xs.DatatypeValidator
Parameters:
value1 -  
valu2 -  
Returns:
 

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: StringDatatypeValidator
Returns a copy of this object.
Overrides:
clone in class StringDatatypeValidator
Following copied from class: org.apache.xerces.impl.dv.xs.AbstractStringValidator
Returns:
 
Throws:
java.lang.CloneNotSupportedException -  


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