com.fasterxml.aalto.out
Class NonRepairingStreamWriter

java.lang.Object
  extended by org.codehaus.stax2.ri.Stax2WriterImpl
      extended by com.fasterxml.aalto.out.StreamWriterBase
          extended by com.fasterxml.aalto.out.NonRepairingStreamWriter
All Implemented Interfaces:
NamespaceContext, XMLStreamConstants, XMLStreamWriter, org.codehaus.stax2.typed.TypedXMLStreamWriter, org.codehaus.stax2.validation.Validatable, org.codehaus.stax2.validation.ValidationContext, org.codehaus.stax2.XMLStreamWriter2

public final class NonRepairingStreamWriter
extends StreamWriterBase

Concrete implementation of StreamWriterBase, which implements basic namespace-aware, non repairing functionality.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.aalto.out.StreamWriterBase
StreamWriterBase.State
 
Field Summary
 
Fields inherited from class com.fasterxml.aalto.out.StreamWriterBase
_cfgCDataAsText, _cfgCheckAttrs, _cfgCheckContent, _cfgCheckStructure, _config, _currElem, _dtdRootElemName, _outputElemPool, _poolSize, _rootNsContext, _state, _stateAnyOutput, _stateEmptyElement, _stateStartElementOpen, _symbols, _validator, _valueEncoderFactory, _vldContent, _vldProblemHandler, _xmlWriter
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
NonRepairingStreamWriter(WriterConfig cfg, XmlWriter writer, WNameTable symbols)
           
 
Method Summary
protected  String _serializeQName(QName name)
           
 void _setPrefix(String prefix, String uri)
           
 void setDefaultNamespace(String uri)
           
 void writeAttribute(String nsURI, String localName, String value)
           
 void writeAttribute(String prefix, String nsURI, String localName, String value)
           
 void writeDefaultNamespace(String nsURI)
           
 void writeEmptyElement(String nsURI, String localName)
           
 void writeEmptyElement(String prefix, String localName, String nsURI)
           
 void writeNamespace(String prefix, String nsURI)
           
 void writeStartElement(String nsURI, String localName)
           
 void writeStartElement(String prefix, String localName, String nsURI)
           
 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.
 
Methods inherited from class com.fasterxml.aalto.out.StreamWriterBase
_closeStartElement, _reportInvalidContent, _reportNwfAttr, _reportNwfAttr, _reportNwfContent, _reportNwfContent, _reportNwfName, _reportNwfStructure, _reportNwfStructure, _reportValidationProblem, _verifyRootElement, _verifyStartElement, _verifyWriteAttr, _verifyWriteCData, _verifyWriteDTD, _writeAttribute, _writeAttribute, _writeDefaultNamespace, _writeNamespace, _writeStartDocument, _writeStartTag, _writeStartTag, addDefaultAttribute, close, closeCompletely, findAttributeIndex, flush, getAttributeCount, getAttributeLocalName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getBaseUri, getCurrentElementName, getEncoding, getLocation, getNamespaceContext, getNamespaceURI, getPrefix, getPrefixes, getProperty, getValidationLocation, getXmlVersion, inPrologOrEpilog, isNotationDeclared, isPropertySupported, isUnparsedEntityDeclared, reportIllegalArg, reportIllegalMethod, reportProblem, setNamespaceContext, setPrefix, setProperty, setValidationProblemHandler, stopValidatingAgainst, stopValidatingAgainst, throwFromIOE, throwOutputError, throwOutputError, toString, validateAgainst, valueEncoderFactory, writeAttribute, writeBinary, writeBinary, writeBinaryAttribute, writeBinaryAttribute, writeBoolean, writeBooleanAttribute, writeCData, writeCData, writeCharacters, writeCharacters, writeComment, writeDecimal, writeDecimalAttribute, writeDouble, writeDoubleArray, writeDoubleArrayAttribute, writeDoubleAttribute, writeDTD, writeDTD, writeDTD, writeEmptyElement, writeEndDocument, writeEndElement, writeEntityRef, writeFloat, writeFloatArray, writeFloatArrayAttribute, writeFloatAttribute, writeFullEndElement, writeInt, writeIntArray, writeIntArrayAttribute, writeIntAttribute, writeInteger, writeIntegerAttribute, writeLong, writeLongArray, writeLongArrayAttribute, writeLongAttribute, writeProcessingInstruction, writeProcessingInstruction, writeQName, writeQNameAttribute, writeRaw, writeRaw, writeRaw, writeSpace, writeSpace, writeStartDocument, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement
 
Methods inherited from class org.codehaus.stax2.ri.Stax2WriterImpl
copyEventFromReader, copyStartElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonRepairingStreamWriter

public NonRepairingStreamWriter(WriterConfig cfg,
                                XmlWriter writer,
                                WNameTable symbols)
Method Detail

setDefaultNamespace

public void setDefaultNamespace(String uri)
                         throws XMLStreamException
Specified by:
setDefaultNamespace in interface XMLStreamWriter
Specified by:
setDefaultNamespace in class StreamWriterBase
Throws:
XMLStreamException

_setPrefix

public void _setPrefix(String prefix,
                       String uri)
Specified by:
_setPrefix in class StreamWriterBase

writeAttribute

public void writeAttribute(String nsURI,
                           String localName,
                           String value)
                    throws XMLStreamException
Specified by:
writeAttribute in interface XMLStreamWriter
Specified by:
writeAttribute in class StreamWriterBase
Throws:
XMLStreamException

writeAttribute

public void writeAttribute(String prefix,
                           String nsURI,
                           String localName,
                           String value)
                    throws XMLStreamException
Specified by:
writeAttribute in interface XMLStreamWriter
Specified by:
writeAttribute in class StreamWriterBase
Throws:
XMLStreamException

writeDefaultNamespace

public void writeDefaultNamespace(String nsURI)
                           throws XMLStreamException
Specified by:
writeDefaultNamespace in interface XMLStreamWriter
Specified by:
writeDefaultNamespace in class StreamWriterBase
Throws:
XMLStreamException

writeEmptyElement

public void writeEmptyElement(String nsURI,
                              String localName)
                       throws XMLStreamException
Specified by:
writeEmptyElement in interface XMLStreamWriter
Specified by:
writeEmptyElement in class StreamWriterBase
Throws:
XMLStreamException

writeEmptyElement

public void writeEmptyElement(String prefix,
                              String localName,
                              String nsURI)
                       throws XMLStreamException
Specified by:
writeEmptyElement in interface XMLStreamWriter
Specified by:
writeEmptyElement in class StreamWriterBase
Throws:
XMLStreamException

writeNamespace

public void writeNamespace(String prefix,
                           String nsURI)
                    throws XMLStreamException
Specified by:
writeNamespace in interface XMLStreamWriter
Specified by:
writeNamespace in class StreamWriterBase
Throws:
XMLStreamException

writeStartElement

public void writeStartElement(String nsURI,
                              String localName)
                       throws XMLStreamException
Specified by:
writeStartElement in interface XMLStreamWriter
Specified by:
writeStartElement in class StreamWriterBase
Throws:
XMLStreamException

writeStartElement

public void writeStartElement(String prefix,
                              String localName,
                              String nsURI)
                       throws XMLStreamException
Specified by:
writeStartElement in interface XMLStreamWriter
Specified by:
writeStartElement in class StreamWriterBase
Throws:
XMLStreamException

writeTypedAttribute

public void writeTypedAttribute(String prefix,
                                String nsURI,
                                String localName,
                                org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)
                         throws XMLStreamException
Description copied from class: StreamWriterBase
Need to leave implementation of this method abstract, because repairing and non-repairing modes differ in how names are handled.

Specified by:
writeTypedAttribute in class StreamWriterBase
Throws:
XMLStreamException

_serializeQName

protected String _serializeQName(QName name)
Specified by:
_serializeQName in class StreamWriterBase


Copyright © 2012 Fasterxml.com. All Rights Reserved.