Package com.ctc.wstx.util
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 PrefixedName
Name of the attribute that contains this id value (often "id", but need not be)private boolean
Flag that indicates whether this Object presents a defined id value (value of an ID attribute) or just a reference to one.private PrefixedName
Name of element for which this id refers.private final String
Actual id valueprivate Location
Location of either definition (ifmDefined
is true; or first reference (otherwise).private ElementId
Pointer 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()
boolean
idMatches
(char[] buf, int start, int len) boolean
boolean
protected void
linkUndefined
(ElementId undefined) void
markDefined
(Location defLoc) protected void
setNextColliding
(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
Location of either definition (ifmDefined
is true; or first reference (otherwise). Used when reporting errors; either a referenced id has not been defined, or there are multiple definitions of same id. -
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