Class ElementId
java.lang.Object
com.ctc.wstx.util.ElementId
Simple container Object used to store information about id attribute
values, and references to such (as of yet undefined) values.
Instances can be in one of 2 modes: either in fully defined mode, in which case information refers to location where value was defined (ie. we had id as a value of ID type attribute); or in undefined mode, in which case information refers to the first reference.
Note: this class is designed to be used with ElementIdMap,
and as a result has some information specifically needed by the
map implementation (such as collision links).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PrefixedNameName of the attribute that contains this id value (often "id", but need not be)private booleanFlag that indicates whether this Object presents a defined id value (value of an ID attribute) or just a reference to one.private PrefixedNameName of element for which this id refers.private final StringActual id valueprivate LocationLocation of either definition (ifmDefinedis true; or first reference (otherwise).private ElementIdPointer to the next element within collision chain.private ElementId -
Constructor Summary
ConstructorsConstructorDescriptionElementId(String id, Location loc, boolean defined, PrefixedName elemName, PrefixedName attrName) -
Method Summary
Modifier and TypeMethodDescriptiongetId()booleanidMatches(char[] buf, int start, int len) booleanbooleanprotected voidlinkUndefined(ElementId undefined) voidmarkDefined(Location defLoc) protected voidsetNextColliding(ElementId nextColl) toString()
-
Field Details
-
mDefined
private boolean mDefinedFlag that indicates whether this Object presents a defined id value (value of an ID attribute) or just a reference to one. -
mIdValue
Actual id value -
mLocation
-
mElemName
Name of element for which this id refers. -
mAttrName
Name of the attribute that contains this id value (often "id", but need not be) -
mNextUndefined
-
mNextColl
Pointer to the next element within collision chain.
-
-
Constructor Details
-
ElementId
ElementId(String id, Location loc, boolean defined, PrefixedName elemName, PrefixedName attrName)
-
-
Method Details
-
linkUndefined
-
setNextColliding
-
getId
-
getLocation
-
getElemName
-
getAttrName
-
isDefined
public boolean isDefined() -
idMatches
public boolean idMatches(char[] buf, int start, int len) -
idMatches
-
nextUndefined
-
nextColliding
-
markDefined
-
toString
-