com.ctc.wstx.dtd
Class DTDIdAttr

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

public final class DTDIdAttr
extends DTDAttribute

Specific attribute class for attributes that contain (unique) identifiers.


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
DTDIdAttr(NameKey name, int defValueType, int specIndex)
          Main constructor.
 
Method Summary
 DTDAttribute cloneWith(int specIndex)
           
 int getValueType()
          Returns the value type of this attribute as an enumerated int to match type (CDATA, ...)
 boolean typeIsId()
           
 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, typeIsNotation, validateDefaultName, validateDefaultNames, validateDefaultNmToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTDIdAttr

public DTDIdAttr(NameKey name,
                 int defValueType,
                 int specIndex)
Main constructor. Note that id attributes can never have default values.

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

typeIsId

public boolean typeIsId()
Overrides:
typeIsId 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