Package com.ctc.wstx.sw
Class AbstractAttributeCollector
java.lang.Object
org.codehaus.stax2.validation.XMLValidator
com.ctc.wstx.sw.AbstractAttributeCollector
- Direct Known Subclasses:
NonNsStreamWriter.AttrCollector,SimpleOutputElement.AttributeCollector
abstract class AbstractAttributeCollector
extends org.codehaus.stax2.validation.XMLValidator
Base class for attribute-collecting stubs that masquerade as an
XMLValidator so they can be passed to
XmlWriter.writeTypedAttribute(java.lang.String, org.codehaus.stax2.ri.typed.AsciiValueEncoder) and
AttributeCollector.writeAttribute(int, com.ctc.wstx.sw.XmlWriter).
Only the two validateAttribute overloads are meaningful;
every other XMLValidator method throws
UnsupportedOperationException because it should never be
called on a collector.
Concrete subclasses are inner classes of SimpleOutputElement
(namespace-aware) and NonNsStreamWriter (non-namespace-aware).
- Since:
- 7.2
-
Field Summary
Fields inherited from class org.codehaus.stax2.validation.XMLValidator
CONTENT_ALLOW_ANY_TEXT, CONTENT_ALLOW_NONE, CONTENT_ALLOW_UNDEFINED, CONTENT_ALLOW_VALIDATABLE_TEXT, CONTENT_ALLOW_WS, CONTENT_ALLOW_WS_NONSTRICT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeType(int index) intintorg.codehaus.stax2.validation.XMLValidationSchemaintintvalidateElementEnd(String localName, String uri, String prefix) voidvalidateElementStart(String localName, String uri, String prefix) voidvalidateText(char[] cbuf, int textStart, int textEnd, boolean lastTextSegment) voidvalidateText(String text, boolean lastTextSegment) voidvalidationCompleted(boolean eod) Methods inherited from class org.codehaus.stax2.validation.XMLValidator
getSchemaType, validateAttribute, validateAttribute
-
Constructor Details
-
AbstractAttributeCollector
protected AbstractAttributeCollector()
-
-
Method Details
-
getSchema
public org.codehaus.stax2.validation.XMLValidationSchema getSchema()- Specified by:
getSchemain classorg.codehaus.stax2.validation.XMLValidator
-
validateElementStart
public void validateElementStart(String localName, String uri, String prefix) throws XMLStreamException - Specified by:
validateElementStartin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
validateElementAndAttributes
- Specified by:
validateElementAndAttributesin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
validateElementEnd
public int validateElementEnd(String localName, String uri, String prefix) throws XMLStreamException - Specified by:
validateElementEndin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
validateText
- Specified by:
validateTextin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
validateText
public void validateText(char[] cbuf, int textStart, int textEnd, boolean lastTextSegment) throws XMLStreamException - Specified by:
validateTextin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
validationCompleted
- Specified by:
validationCompletedin classorg.codehaus.stax2.validation.XMLValidator- Throws:
XMLStreamException
-
getAttributeType
- Specified by:
getAttributeTypein classorg.codehaus.stax2.validation.XMLValidator
-
getIdAttrIndex
public int getIdAttrIndex()- Specified by:
getIdAttrIndexin classorg.codehaus.stax2.validation.XMLValidator
-
getNotationAttrIndex
public int getNotationAttrIndex()- Specified by:
getNotationAttrIndexin classorg.codehaus.stax2.validation.XMLValidator
-