public abstract class StreamWriterBase extends org.codehaus.stax2.ri.Stax2WriterImpl implements NamespaceContext, org.codehaus.stax2.validation.ValidationContext
XMLStreamReader
implementations.Modifier and Type | Class and Description |
---|---|
protected static class |
StreamWriterBase.State |
Modifier and Type | Field and Description |
---|---|
protected boolean |
_cfgCDataAsText |
protected boolean |
_cfgCheckAttrs |
protected boolean |
_cfgCheckContent |
protected boolean |
_cfgCheckStructure |
protected WriterConfig |
_config |
protected com.fasterxml.aalto.out.OutputElement |
_currElem
We'll use a virtual root element (like a document node of sort),
to simplify other processing, basically such that there is
always a current output element instance, even when in prolog
or epilog.
|
protected String |
_dtdRootElemName
Value passed as the expected root element, when using the multiple
argument
writeDTD(java.lang.String) method. |
protected com.fasterxml.aalto.out.OutputElement |
_outputElemPool |
protected int |
_poolSize |
protected NamespaceContext |
_rootNsContext
Root namespace context defined for this writer, if any.
|
protected StreamWriterBase.State |
_state |
protected boolean |
_stateAnyOutput
Flag that is set to true first time something has been output.
|
protected boolean |
_stateEmptyElement
Flag that indicates that current element is an empty element (one
that is explicitly defined as one, by calling a method -- NOT one
that just happens to be empty).
|
protected boolean |
_stateStartElementOpen
Flag that is set during time that a start element is "open", ie.
|
protected WNameTable |
_symbols |
protected org.codehaus.stax2.validation.XMLValidator |
_validator
Optional validator to use for validating output against
one or more schemas, and/or for safe pretty-printing (indentation).
|
protected org.codehaus.stax2.ri.typed.ValueEncoderFactory |
_valueEncoderFactory
When outputting using Typed Access API, we will need
encoders.
|
protected int |
_vldContent
State value used with validation, to track types of content
that is allowed at this point in output stream.
|
protected org.codehaus.stax2.validation.ValidationProblemHandler |
_vldProblemHandler
Custom validation problem handler, if any.
|
protected XmlWriter |
_xmlWriter
Actual physical writer to output serialized XML content to
|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Modifier | Constructor and Description |
---|---|
protected |
StreamWriterBase(WriterConfig cfg,
XmlWriter writer,
WNameTable symbols) |
Modifier and Type | Method and Description |
---|---|
protected void |
_closeStartElement(boolean emptyElem)
Method called to close an open start element, when another
main-level element (not namespace declaration or attribute)
is being output; except for end element which is handled differently.
|
protected void |
_reportInvalidContent(int evtType) |
protected static void |
_reportNwfAttr(String msg)
This is the method called when an output method call violates
attribute well-formedness checks (trying to output dup attrs)
and name validaty checking
is enabled.
|
protected static void |
_reportNwfAttr(String msg,
Object arg) |
protected static void |
_reportNwfContent(String msg)
This is the method called when an output method call violates
content well-formedness checks
and content validation
is enabled.
|
protected static void |
_reportNwfContent(String msg,
Object arg) |
protected static void |
_reportNwfName(String msg) |
protected static void |
_reportNwfStructure(String msg)
This is the method called when an output method call violates
structural well-formedness checks
and structural checking
is enabled.
|
protected static void |
_reportNwfStructure(String msg,
Object arg) |
void |
_reportValidationProblem(String msg) |
protected abstract String |
_serializeQName(QName name) |
protected abstract void |
_setPrefix(String prefix,
String uri) |
protected void |
_verifyRootElement(String prefix,
String localName) |
protected void |
_verifyStartElement(String prefix,
String localName)
Method that is called to ensure that we can start writing an
element, both from structural point of view, and from syntactic
(close previously open start element, if any).
|
protected void |
_verifyWriteAttr(WName name) |
protected void |
_verifyWriteCData() |
protected void |
_verifyWriteDTD() |
protected void |
_writeAttribute(WName name,
org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) |
protected void |
_writeAttribute(WName name,
String value) |
protected void |
_writeDefaultNamespace(String uri) |
protected void |
_writeNamespace(String prefix,
String uri) |
protected void |
_writeStartDocument(String version,
String encoding,
String standAlone) |
protected void |
_writeStartTag(WName name,
boolean isEmpty) |
protected void |
_writeStartTag(WName name,
boolean isEmpty,
String uri) |
int |
addDefaultAttribute(String localName,
String uri,
String prefix,
String value)
Adding default attribute values does not usually make sense on
output side, so the implementation is a NOP for now.
|
void |
close() |
void |
closeCompletely() |
int |
findAttributeIndex(String nsURI,
String localName) |
void |
flush() |
int |
getAttributeCount() |
String |
getAttributeLocalName(int index) |
String |
getAttributeNamespace(int index) |
String |
getAttributePrefix(int index) |
String |
getAttributeType(int index) |
String |
getAttributeValue(int index) |
String |
getAttributeValue(String nsURI,
String localName) |
String |
getBaseUri()
As of now, there is no way to specify the base URI.
|
QName |
getCurrentElementName() |
String |
getEncoding() |
org.codehaus.stax2.XMLStreamLocation2 |
getLocation() |
NamespaceContext |
getNamespaceContext() |
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String uri) |
Iterator<String> |
getPrefixes(String uri) |
Object |
getProperty(String name) |
Location |
getValidationLocation() |
String |
getXmlVersion() |
protected boolean |
inPrologOrEpilog() |
boolean |
isNotationDeclared(String name) |
boolean |
isPropertySupported(String name) |
boolean |
isUnparsedEntityDeclared(String name) |
protected static void |
reportIllegalArg(String msg) |
protected static void |
reportIllegalMethod(String msg)
Method called when an illegal method (namespace-specific method
on non-ns writer) is called by the application.
|
void |
reportProblem(org.codehaus.stax2.validation.XMLValidationProblem prob) |
abstract void |
setDefaultNamespace(String uri) |
void |
setNamespaceContext(NamespaceContext ctxt) |
void |
setPrefix(String prefix,
String uri) |
boolean |
setProperty(String name,
Object value) |
org.codehaus.stax2.validation.ValidationProblemHandler |
setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h) |
org.codehaus.stax2.validation.XMLValidator |
stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) |
org.codehaus.stax2.validation.XMLValidator |
stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator) |
protected static void |
throwFromIOE(IOException ioe) |
protected static void |
throwOutputError(String msg) |
protected static void |
throwOutputError(String format,
Object arg) |
String |
toString() |
org.codehaus.stax2.validation.XMLValidator |
validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) |
protected org.codehaus.stax2.ri.typed.ValueEncoderFactory |
valueEncoderFactory() |
void |
writeAttribute(String localName,
String value) |
abstract void |
writeAttribute(String nsURI,
String localName,
String value) |
abstract void |
writeAttribute(String prefix,
String nsURI,
String localName,
String value) |
void |
writeBinary(org.codehaus.stax2.typed.Base64Variant v,
byte[] value,
int from,
int length) |
void |
writeBinary(byte[] value,
int from,
int length) |
void |
writeBinaryAttribute(org.codehaus.stax2.typed.Base64Variant v,
String prefix,
String nsURI,
String localName,
byte[] value) |
void |
writeBinaryAttribute(String prefix,
String nsURI,
String localName,
byte[] value) |
void |
writeBoolean(boolean b) |
void |
writeBooleanAttribute(String prefix,
String nsURI,
String localName,
boolean value) |
void |
writeCData(char[] cbuf,
int start,
int len) |
void |
writeCData(String data) |
void |
writeCharacters(char[] text,
int start,
int len) |
void |
writeCharacters(String text) |
void |
writeComment(String data) |
void |
writeDecimal(BigDecimal value) |
void |
writeDecimalAttribute(String prefix,
String nsURI,
String localName,
BigDecimal value) |
abstract void |
writeDefaultNamespace(String nsURI) |
void |
writeDouble(double value) |
void |
writeDoubleArray(double[] value,
int from,
int length) |
void |
writeDoubleArrayAttribute(String prefix,
String nsURI,
String localName,
double[] value) |
void |
writeDoubleAttribute(String prefix,
String nsURI,
String localName,
double value) |
void |
writeDTD(org.codehaus.stax2.DTDInfo info) |
void |
writeDTD(String dtd) |
void |
writeDTD(String rootName,
String systemId,
String publicId,
String internalSubset) |
void |
writeEmptyElement(String localName)
It is assumed here that caller actually wants whatever is the
default namespace (or it is used in "non-namespace" mode, where
no namespaces are bound ever).
|
abstract void |
writeEmptyElement(String nsURI,
String localName) |
abstract void |
writeEmptyElement(String prefix,
String localName,
String nsURI) |
void |
writeEndDocument() |
void |
writeEndElement() |
void |
writeEntityRef(String name) |
void |
writeFloat(float value) |
void |
writeFloatArray(float[] value,
int from,
int length) |
void |
writeFloatArrayAttribute(String prefix,
String nsURI,
String localName,
float[] value) |
void |
writeFloatAttribute(String prefix,
String nsURI,
String localName,
float value) |
void |
writeFullEndElement()
Similar to
writeEndElement() , but never allows implicit
creation of empty elements. |
void |
writeInt(int value) |
void |
writeIntArray(int[] value,
int from,
int length) |
void |
writeIntArrayAttribute(String prefix,
String nsURI,
String localName,
int[] value) |
void |
writeIntAttribute(String prefix,
String nsURI,
String localName,
int value) |
void |
writeInteger(BigInteger value) |
void |
writeIntegerAttribute(String prefix,
String nsURI,
String localName,
BigInteger value) |
void |
writeLong(long value) |
void |
writeLongArray(long[] value,
int from,
int length) |
void |
writeLongArrayAttribute(String prefix,
String nsURI,
String localName,
long[] value) |
void |
writeLongAttribute(String prefix,
String nsURI,
String localName,
long value) |
abstract void |
writeNamespace(String prefix,
String nsURI) |
void |
writeProcessingInstruction(String target) |
void |
writeProcessingInstruction(String target,
String data) |
void |
writeQName(QName value) |
void |
writeQNameAttribute(String prefix,
String nsURI,
String localName,
QName value) |
void |
writeRaw(char[] text,
int offset,
int length) |
void |
writeRaw(String text) |
void |
writeRaw(String text,
int start,
int offset) |
void |
writeSpace(char[] cbuf,
int offset,
int len) |
void |
writeSpace(String text) |
void |
writeStartDocument() |
void |
writeStartDocument(String version) |
void |
writeStartDocument(String encoding,
String version) |
void |
writeStartDocument(String version,
String encoding,
boolean standAlone) |
void |
writeStartElement(String localName)
It is assumed here that caller actually wants whatever is the
default namespace (or it is used in "non-namespace" mode, where
no namespaces are bound ever).
|
abstract void |
writeStartElement(String nsURI,
String localName) |
abstract void |
writeStartElement(String prefix,
String localName,
String nsURI) |
abstract void |
writeTypedAttribute(String prefix,
String nsURI,
String localName,
org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)
Need to leave implementation of this method abstract, because
repairing and non-repairing modes differ in how names are
handled.
|
protected final WriterConfig _config
protected NamespaceContext _rootNsContext
protected boolean _cfgCheckStructure
protected boolean _cfgCheckContent
protected boolean _cfgCheckAttrs
protected final boolean _cfgCDataAsText
protected WNameTable _symbols
protected final XmlWriter _xmlWriter
protected org.codehaus.stax2.ri.typed.ValueEncoderFactory _valueEncoderFactory
protected org.codehaus.stax2.validation.XMLValidator _validator
protected int _vldContent
protected org.codehaus.stax2.validation.ValidationProblemHandler _vldProblemHandler
protected StreamWriterBase.State _state
protected com.fasterxml.aalto.out.OutputElement _currElem
protected boolean _stateAnyOutput
protected boolean _stateStartElementOpen
protected boolean _stateEmptyElement
protected String _dtdRootElemName
writeDTD(java.lang.String)
method. Will be used in structurally
validating mode (and in dtd-validating mode, since that automatically
enables structural validation as well, to pre-filter well-formedness
errors that validators might have trouble dealing with).protected com.fasterxml.aalto.out.OutputElement _outputElemPool
protected int _poolSize
protected StreamWriterBase(WriterConfig cfg, XmlWriter writer, WNameTable symbols)
public void close() throws XMLStreamException
close
in interface XMLStreamWriter
XMLStreamException
public void flush() throws XMLStreamException
flush
in interface XMLStreamWriter
XMLStreamException
public final NamespaceContext getNamespaceContext()
getNamespaceContext
in interface XMLStreamWriter
public Object getProperty(String name)
getProperty
in interface XMLStreamWriter
public abstract void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace
in interface XMLStreamWriter
XMLStreamException
public void setNamespaceContext(NamespaceContext ctxt) throws XMLStreamException
setNamespaceContext
in interface XMLStreamWriter
XMLStreamException
public final void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix
in interface XMLStreamWriter
XMLStreamException
public final void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public abstract void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public abstract void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public void writeCData(String data) throws XMLStreamException
writeCData
in interface XMLStreamWriter
XMLStreamException
public void writeCharacters(char[] text, int start, int len) throws XMLStreamException
writeCharacters
in interface XMLStreamWriter
XMLStreamException
public void writeCharacters(String text) throws XMLStreamException
writeCharacters
in interface XMLStreamWriter
XMLStreamException
public void writeComment(String data) throws XMLStreamException
writeComment
in interface XMLStreamWriter
XMLStreamException
public abstract void writeDefaultNamespace(String nsURI) throws XMLStreamException
writeDefaultNamespace
in interface XMLStreamWriter
XMLStreamException
public final void writeDTD(String dtd) throws XMLStreamException
writeDTD
in interface XMLStreamWriter
XMLStreamException
public void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public abstract void writeEmptyElement(String nsURI, String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public abstract void writeEmptyElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public void writeEndDocument() throws XMLStreamException
writeEndDocument
in interface XMLStreamWriter
XMLStreamException
public void writeEndElement() throws XMLStreamException
writeEndElement
in interface XMLStreamWriter
XMLStreamException
public void writeEntityRef(String name) throws XMLStreamException
writeEntityRef
in interface XMLStreamWriter
XMLStreamException
public abstract void writeNamespace(String prefix, String nsURI) throws XMLStreamException
writeNamespace
in interface XMLStreamWriter
XMLStreamException
public void writeProcessingInstruction(String target) throws XMLStreamException
writeProcessingInstruction
in interface XMLStreamWriter
XMLStreamException
public void writeProcessingInstruction(String target, String data) throws XMLStreamException
writeProcessingInstruction
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument() throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument(String version) throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument(String encoding, String version) throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartElement(String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public abstract void writeStartElement(String nsURI, String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public abstract void writeStartElement(String prefix, String localName, String nsURI) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
getNamespaceURI
in interface org.codehaus.stax2.validation.ValidationContext
public String getPrefix(String uri)
getPrefix
in interface NamespaceContext
getPrefix
in interface XMLStreamWriter
public Iterator<String> getPrefixes(String uri)
getPrefixes
in interface NamespaceContext
public void writeBoolean(boolean b) throws XMLStreamException
writeBoolean
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeInt(int value) throws XMLStreamException
writeInt
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeLong(long value) throws XMLStreamException
writeLong
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeFloat(float value) throws XMLStreamException
writeFloat
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeDouble(double value) throws XMLStreamException
writeDouble
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeInteger(BigInteger value) throws XMLStreamException
writeInteger
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeDecimal(BigDecimal value) throws XMLStreamException
writeDecimal
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeQName(QName value) throws XMLStreamException
writeQName
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeIntArray(int[] value, int from, int length) throws XMLStreamException
writeIntArray
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeLongArray(long[] value, int from, int length) throws XMLStreamException
writeLongArray
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeFloatArray(float[] value, int from, int length) throws XMLStreamException
writeFloatArray
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeDoubleArray(double[] value, int from, int length) throws XMLStreamException
writeDoubleArray
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeBinary(byte[] value, int from, int length) throws XMLStreamException
writeBinary
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeBinary(org.codehaus.stax2.typed.Base64Variant v, byte[] value, int from, int length) throws XMLStreamException
writeBinary
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeBooleanAttribute(String prefix, String nsURI, String localName, boolean value) throws XMLStreamException
writeBooleanAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeIntAttribute(String prefix, String nsURI, String localName, int value) throws XMLStreamException
writeIntAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeLongAttribute(String prefix, String nsURI, String localName, long value) throws XMLStreamException
writeLongAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeFloatAttribute(String prefix, String nsURI, String localName, float value) throws XMLStreamException
writeFloatAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeDoubleAttribute(String prefix, String nsURI, String localName, double value) throws XMLStreamException
writeDoubleAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeIntegerAttribute(String prefix, String nsURI, String localName, BigInteger value) throws XMLStreamException
writeIntegerAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeDecimalAttribute(String prefix, String nsURI, String localName, BigDecimal value) throws XMLStreamException
writeDecimalAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public final void writeQNameAttribute(String prefix, String nsURI, String localName, QName value) throws XMLStreamException
writeQNameAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeIntArrayAttribute(String prefix, String nsURI, String localName, int[] value) throws XMLStreamException
writeIntArrayAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeLongArrayAttribute(String prefix, String nsURI, String localName, long[] value) throws XMLStreamException
writeLongArrayAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeFloatArrayAttribute(String prefix, String nsURI, String localName, float[] value) throws XMLStreamException
writeFloatArrayAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeDoubleArrayAttribute(String prefix, String nsURI, String localName, double[] value) throws XMLStreamException
writeDoubleArrayAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeBinaryAttribute(String prefix, String nsURI, String localName, byte[] value) throws XMLStreamException
writeBinaryAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public void writeBinaryAttribute(org.codehaus.stax2.typed.Base64Variant v, String prefix, String nsURI, String localName, byte[] value) throws XMLStreamException
writeBinaryAttribute
in interface org.codehaus.stax2.typed.TypedXMLStreamWriter
XMLStreamException
public abstract void writeTypedAttribute(String prefix, String nsURI, String localName, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws XMLStreamException
XMLStreamException
protected abstract String _serializeQName(QName name) throws XMLStreamException
XMLStreamException
public void writeSpace(String text) throws XMLStreamException
writeSpace
in interface org.codehaus.stax2.XMLStreamWriter2
writeSpace
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeSpace(char[] cbuf, int offset, int len) throws XMLStreamException
writeSpace
in interface org.codehaus.stax2.XMLStreamWriter2
writeSpace
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void closeCompletely() throws XMLStreamException
closeCompletely
in interface org.codehaus.stax2.XMLStreamWriter2
XMLStreamException
public boolean isPropertySupported(String name)
isPropertySupported
in interface org.codehaus.stax2.XMLStreamWriter2
isPropertySupported
in class org.codehaus.stax2.ri.Stax2WriterImpl
public boolean setProperty(String name, Object value)
setProperty
in interface org.codehaus.stax2.XMLStreamWriter2
setProperty
in class org.codehaus.stax2.ri.Stax2WriterImpl
name
- Name of the property to setvalue
- Value to set property to.public org.codehaus.stax2.validation.XMLValidator validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) throws XMLStreamException
validateAgainst
in interface org.codehaus.stax2.validation.Validatable
validateAgainst
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema) throws XMLStreamException
stopValidatingAgainst
in interface org.codehaus.stax2.validation.Validatable
stopValidatingAgainst
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator) throws XMLStreamException
stopValidatingAgainst
in interface org.codehaus.stax2.validation.Validatable
stopValidatingAgainst
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public org.codehaus.stax2.validation.ValidationProblemHandler setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h)
setValidationProblemHandler
in interface org.codehaus.stax2.validation.Validatable
setValidationProblemHandler
in class org.codehaus.stax2.ri.Stax2WriterImpl
public org.codehaus.stax2.XMLStreamLocation2 getLocation()
getLocation
in interface org.codehaus.stax2.XMLStreamWriter2
getLocation
in class org.codehaus.stax2.ri.Stax2WriterImpl
public String getEncoding()
getEncoding
in interface org.codehaus.stax2.XMLStreamWriter2
getEncoding
in class org.codehaus.stax2.ri.Stax2WriterImpl
public void writeCData(char[] cbuf, int start, int len) throws XMLStreamException
writeCData
in interface org.codehaus.stax2.XMLStreamWriter2
writeCData
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeDTD(org.codehaus.stax2.DTDInfo info) throws XMLStreamException
XMLStreamException
public void writeDTD(String rootName, String systemId, String publicId, String internalSubset) throws XMLStreamException
writeDTD
in interface org.codehaus.stax2.XMLStreamWriter2
writeDTD
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeFullEndElement() throws XMLStreamException
writeEndElement()
, but never allows implicit
creation of empty elements.writeFullEndElement
in interface org.codehaus.stax2.XMLStreamWriter2
writeFullEndElement
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeStartDocument(String version, String encoding, boolean standAlone) throws XMLStreamException
writeStartDocument
in interface org.codehaus.stax2.XMLStreamWriter2
writeStartDocument
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeRaw(String text) throws XMLStreamException
writeRaw
in interface org.codehaus.stax2.XMLStreamWriter2
writeRaw
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeRaw(String text, int start, int offset) throws XMLStreamException
writeRaw
in interface org.codehaus.stax2.XMLStreamWriter2
writeRaw
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public void writeRaw(char[] text, int offset, int length) throws XMLStreamException
writeRaw
in interface org.codehaus.stax2.XMLStreamWriter2
writeRaw
in class org.codehaus.stax2.ri.Stax2WriterImpl
XMLStreamException
public String getXmlVersion()
getXmlVersion
in interface org.codehaus.stax2.validation.ValidationContext
public QName getCurrentElementName()
getCurrentElementName
in interface org.codehaus.stax2.validation.ValidationContext
public String getBaseUri()
getBaseUri
in interface org.codehaus.stax2.validation.ValidationContext
public Location getValidationLocation()
getValidationLocation
in interface org.codehaus.stax2.validation.ValidationContext
public void reportProblem(org.codehaus.stax2.validation.XMLValidationProblem prob) throws XMLStreamException
reportProblem
in interface org.codehaus.stax2.validation.ValidationContext
XMLStreamException
public int addDefaultAttribute(String localName, String uri, String prefix, String value)
addDefaultAttribute
in interface org.codehaus.stax2.validation.ValidationContext
public boolean isNotationDeclared(String name)
isNotationDeclared
in interface org.codehaus.stax2.validation.ValidationContext
public boolean isUnparsedEntityDeclared(String name)
isUnparsedEntityDeclared
in interface org.codehaus.stax2.validation.ValidationContext
public int getAttributeCount()
getAttributeCount
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributeLocalName(int index)
getAttributeLocalName
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributeNamespace(int index)
getAttributeNamespace
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributePrefix(int index)
getAttributePrefix
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributeValue(int index)
getAttributeValue
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributeValue(String nsURI, String localName)
getAttributeValue
in interface org.codehaus.stax2.validation.ValidationContext
public String getAttributeType(int index)
getAttributeType
in interface org.codehaus.stax2.validation.ValidationContext
public int findAttributeIndex(String nsURI, String localName)
findAttributeIndex
in interface org.codehaus.stax2.validation.ValidationContext
protected void _closeStartElement(boolean emptyElem) throws XMLStreamException
XMLStreamException
protected final boolean inPrologOrEpilog()
protected final org.codehaus.stax2.ri.typed.ValueEncoderFactory valueEncoderFactory()
protected final void _writeAttribute(WName name, String value) throws XMLStreamException
XMLStreamException
protected final void _writeAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws XMLStreamException
XMLStreamException
protected final void _writeDefaultNamespace(String uri) throws XMLStreamException
XMLStreamException
protected final void _writeNamespace(String prefix, String uri) throws XMLStreamException
XMLStreamException
protected void _writeStartDocument(String version, String encoding, String standAlone) throws XMLStreamException
XMLStreamException
protected void _writeStartTag(WName name, boolean isEmpty) throws XMLStreamException
XMLStreamException
protected void _writeStartTag(WName name, boolean isEmpty, String uri) throws XMLStreamException
XMLStreamException
protected final void _verifyWriteAttr(WName name)
protected void _verifyStartElement(String prefix, String localName) throws XMLStreamException
XMLStreamException
protected final void _verifyWriteCData() throws XMLStreamException
XMLStreamException
protected final void _verifyWriteDTD() throws XMLStreamException
XMLStreamException
protected void _verifyRootElement(String prefix, String localName) throws org.codehaus.stax2.validation.XMLValidationException
org.codehaus.stax2.validation.XMLValidationException
protected static void throwOutputError(String msg) throws XMLStreamException
XMLStreamException
protected static void throwOutputError(String format, Object arg) throws XMLStreamException
XMLStreamException
protected static void reportIllegalMethod(String msg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfStructure(String msg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfStructure(String msg, Object arg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfContent(String msg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfContent(String msg, Object arg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfAttr(String msg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfAttr(String msg, Object arg) throws XMLStreamException
XMLStreamException
protected static void _reportNwfName(String msg) throws XMLStreamException
XMLStreamException
protected static void throwFromIOE(IOException ioe) throws XMLStreamException
XMLStreamException
protected static void reportIllegalArg(String msg) throws IllegalArgumentException
IllegalArgumentException
protected void _reportInvalidContent(int evtType) throws XMLStreamException
XMLStreamException
public void _reportValidationProblem(String msg) throws XMLStreamException
XMLStreamException
Copyright © 2018 FasterXML. All rights reserved.