|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ctc.wstx.sr.AttributeCollector
com.ctc.wstx.sr.NonNsAttributeCollector
public final class NonNsAttributeCollector
Attribute collector class used in non-namespace parsing mode; much simpler than the one that has to handle namespaces.
Note: only public for testing purposes
| Field Summary | |
|---|---|
protected static java.lang.String |
DEFAULT_NS_URI
Default URI that is returned in non-namespace mode for all elements and attributes |
protected static java.lang.String |
DEFAULT_PREFIX
|
| Fields inherited from class com.ctc.wstx.sr.AttributeCollector |
|---|
EXP_ATTR_COUNT, LONG_ATTR_LIST_LEN, mAttrCount, mAttrHashSize, mAttrMap, mAttrNames, mAttrSpillEnd, mAttrValues, mNonDefCount, mValueBuffer, mXmlIdAttrIndex, XMLID_IX_DISABLED, XMLID_IX_NONE |
| Constructor Summary | |
|---|---|
NonNsAttributeCollector(ReaderConfig cfg)
|
|
| Method Summary | |
|---|---|
int |
addDefaultAttribute(java.lang.String localName,
java.lang.String value)
Method called by validator to insert an attribute that has a default value and wasn't yet included in collector's attribute set. |
ElemAttrs |
buildAttrOb()
Method needed by event creating code, to build a non-transient attribute container, to use with XMLEvent objects (specifically implementation of StartElement event). |
int |
findIndex(java.lang.String localName)
|
TextBuilder |
getAttrBuilder(java.lang.String attrPrefix,
java.lang.String attrLocalName)
|
TextBuilder |
getDefaultNsBuilder()
|
java.lang.String |
getLocalName(int index)
|
TextBuilder |
getNsBuilder(java.lang.String localName)
|
int |
getNsCount()
|
java.lang.String |
getNsPrefix(int index)
|
java.lang.String |
getNsURI(int index)
|
TextBuilder |
getNsURIs()
|
java.lang.String |
getPrefix(int index)
|
javax.xml.namespace.QName |
getQName(int index)
|
java.lang.String |
getURI(int index)
|
java.lang.String |
getValue(java.lang.String nsURI,
java.lang.String localName)
|
void |
reset()
Method called to allow reusing of collector, usually right before starting collecting attributes for a new start tag. |
int |
resolveValues(InputProblemReporter rep)
Method called to by the input element stack when all attributes for the element have been parsed. |
void |
writeAttribute(int index,
XmlWriter xw)
Method that basically serializes the specified (read-in) attribute using Writers provided |
| Methods inherited from class com.ctc.wstx.sr.AttributeCollector |
|---|
allocBuffers, getAttrBuilder, getCount, getNameList, getSpecifiedCount, getValue, getXmlIdAttrIndex, isSpecified, resize, setNormalizedValue, throwDupAttr, throwIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String DEFAULT_NS_URI
protected static final java.lang.String DEFAULT_PREFIX
| Constructor Detail |
|---|
public NonNsAttributeCollector(ReaderConfig cfg)
| Method Detail |
|---|
public void reset()
reset in class AttributeCollector
public int resolveValues(InputProblemReporter rep)
throws WstxException
WstxExceptionpublic int getNsCount()
getNsCount in class AttributeCollectorpublic java.lang.String getNsPrefix(int index)
getNsPrefix in class AttributeCollectorpublic java.lang.String getNsURI(int index)
getNsURI in class AttributeCollectorpublic java.lang.String getPrefix(int index)
getPrefix in class AttributeCollectorpublic java.lang.String getLocalName(int index)
getLocalName in class AttributeCollectorpublic java.lang.String getURI(int index)
getURI in class AttributeCollectorpublic javax.xml.namespace.QName getQName(int index)
getQName in class AttributeCollector
public java.lang.String getValue(java.lang.String nsURI,
java.lang.String localName)
getValue in class AttributeCollectorpublic int findIndex(java.lang.String localName)
public TextBuilder getDefaultNsBuilder()
getDefaultNsBuilder in class AttributeCollectorpublic TextBuilder getNsBuilder(java.lang.String localName)
getNsBuilder in class AttributeCollector
public TextBuilder getAttrBuilder(java.lang.String attrPrefix,
java.lang.String attrLocalName)
getAttrBuilder in class AttributeCollectorpublic TextBuilder getNsURIs()
public ElemAttrs buildAttrOb()
buildAttrOb in class AttributeCollector
public int addDefaultAttribute(java.lang.String localName,
java.lang.String value)
public void writeAttribute(int index,
XmlWriter xw)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
writeAttribute in class AttributeCollectorjava.io.IOException
javax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||