com.ctc.wstx.dtd
Class DTDEnumAttr

java.lang.Object
  extended bycom.ctc.wstx.dtd.DTDAttribute
      extended bycom.ctc.wstx.dtd.DTDEnumAttr

public final class DTDEnumAttr
extends DTDAttribute

Specific attribute class for attributes that have enumerated values.


Field Summary
 
Fields inherited from class com.ctc.wstx.dtd.DTDAttribute
DEF_DEFAULT, DEF_FIXED, DEF_IMPLIED, DEF_REQUIRED, mDefValue, mDefValueType, mName, mSpecialIndex, TYPE_CDATA, TYPE_ENTITIES, TYPE_ENTITY, TYPE_ENUMERATED, TYPE_ID, TYPE_IDREF, TYPE_IDREFS, TYPE_NMTOKEN, TYPE_NMTOKENS, TYPE_NOTATION
 
Constructor Summary
DTDEnumAttr(NameKey name, int defValueType, java.lang.String defValue, int specIndex, WordResolver enumValues)
           
 
Method Summary
 DTDAttribute cloneWith(int specIndex)
           
 int getValueType()
          Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)
 void validate(ElementValidator v, boolean normalize, AttributeCollector ac, int index)
          Method called by the ElementValidator to let the attribute do necessary normalization and/or validation for the value.
 void validateDefault(InputProblemReporter rep, boolean normalize)
          Method called by the ElementValidator to ask attribute to verify that the default it has (if any) is valid for such type.
 
Methods inherited from class com.ctc.wstx.dtd.DTDAttribute
checkEntity, findEntityDecl, getDefaultType, getDefaultValue, getName, getSpecialIndex, getValueTypeString, isFixed, isRequired, isSpecial, isSpecial, needsValidation, reportInvalidChar, reportParseError, reportParseError, toString, typeIsId, typeIsNotation, validateDefaultName, validateDefaultNames, validateDefaultNmToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTDEnumAttr

public DTDEnumAttr(NameKey name,
                   int defValueType,
                   java.lang.String defValue,
                   int specIndex,
                   WordResolver enumValues)
Method Detail

cloneWith

public DTDAttribute cloneWith(int specIndex)
Overrides:
cloneWith in class DTDAttribute

getValueType

public int getValueType()
Description copied from class: DTDAttribute
Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)

Note:

Overrides:
getValueType in class DTDAttribute

validate

public void validate(ElementValidator v,
                     boolean normalize,
                     AttributeCollector ac,
                     int index)
              throws WstxException
Method called by the ElementValidator to let the attribute do necessary normalization and/or validation for the value.

Overrides:
validate in class DTDAttribute
Throws:
WstxException

validateDefault

public void validateDefault(InputProblemReporter rep,
                            boolean normalize)
                     throws WstxException
Method called by the ElementValidator to ask attribute to verify that the default it has (if any) is valid for such type.

Overrides:
validateDefault in class DTDAttribute
Throws:
WstxException