org.apache.lucene.gdata.gom.writer
Class GOMStaxWriter

java.lang.Object
  extended by org.apache.lucene.gdata.gom.writer.GOMStaxWriter
All Implemented Interfaces:
GOMOutputWriter

public class GOMStaxWriter
extends Object
implements GOMOutputWriter

Author:
Simon Willnauer

Constructor Summary
GOMStaxWriter(OutputStream aOutputStream)
          Class constructor
GOMStaxWriter(OutputStream aOutputStream, String encoding)
           
GOMStaxWriter(Writer aWriter)
          Class constructor
 
Method Summary
 void close()
          Closes the GOM Writer
 void flush()
          Flush the GOMWriter
 void writeAttribute(GOMAttribute attribute)
          writes a attribute with the attribute namespace Uri
 void writeContent(String aContent)
           
 void writeContentUnescaped(String aContent)
           
 void writeDefaultNamespace(GOMNamespace aNameSpace)
           
 void writeDefaultNamespace(String aNsUri)
           
 void writeEndDocument()
          Writes a end element tag according to the start element tag
 void writeEndElement()
           
 void writeNamespace(GOMNamespace aNameSpace)
           
 void writeSimpleXMLElement(javax.xml.namespace.QName aName, List<GOMAttribute> aList, String aValue)
          Writes a simple element with full namespace
 void writeSimpleXMLElement(javax.xml.namespace.QName aName, String aValue, GOMAttribute aAttribute)
          Writes a simple element with full namespace
 void writeSimpleXMLElement(String aName, List<GOMAttribute> aList, String aValue)
          Writes a simple element with default namespace
 void writeSimpleXMLElement(String aName, String aValue, GOMAttribute aAttribute)
          Writes a simple element with full namespace
 void writeStartDocument(String aString, String aString2)
           
 void writeStartElement(javax.xml.namespace.QName aName, List<GOMAttribute> aList)
           
 void writeStartElement(String aName)
           
 void writeStartElement(String aName, GOMAttribute aAttribute)
           
 void writeStartElement(String aName, List<GOMAttribute> aList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GOMStaxWriter

public GOMStaxWriter(OutputStream aOutputStream,
                     String encoding)
              throws UnsupportedEncodingException,
                     javax.xml.stream.XMLStreamException,
                     javax.xml.stream.FactoryConfigurationError
Parameters:
aOutputStream -
encoding -
Throws:
UnsupportedEncodingException
javax.xml.stream.XMLStreamException
javax.xml.stream.FactoryConfigurationError

GOMStaxWriter

public GOMStaxWriter(OutputStream aOutputStream)
              throws javax.xml.stream.XMLStreamException,
                     javax.xml.stream.FactoryConfigurationError
Class constructor

Parameters:
aOutputStream - - a output stream to write the xml stream to.
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
javax.xml.stream.FactoryConfigurationError - - if XMLOutputFactory throws an exception

GOMStaxWriter

public GOMStaxWriter(Writer aWriter)
              throws javax.xml.stream.XMLStreamException,
                     javax.xml.stream.FactoryConfigurationError
Class constructor

Parameters:
aWriter - - a writer to write the xml stream to.
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
javax.xml.stream.FactoryConfigurationError - - if XMLOutputFactory throws an exception
Method Detail

writeSimpleXMLElement

public void writeSimpleXMLElement(javax.xml.namespace.QName aName,
                                  List<GOMAttribute> aList,
                                  String aValue)
                           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Writes a simple element with full namespace

Specified by:
writeSimpleXMLElement in interface GOMOutputWriter
Parameters:
aName - - element QName
aList - - attribute list
aValue - - character value
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
See Also:
GOMOutputWriter.writeSimpleXMLElement(javax.xml.namespace.QName, java.util.List, java.lang.String)

writeSimpleXMLElement

public void writeSimpleXMLElement(javax.xml.namespace.QName aName,
                                  String aValue,
                                  GOMAttribute aAttribute)
                           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Writes a simple element with full namespace

Specified by:
writeSimpleXMLElement in interface GOMOutputWriter
Parameters:
aName - - element QName
aValue - - character value
aAttribute - - attribute
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
See Also:
GOMOutputWriter.writeSimpleXMLElement(javax.xml.namespace.QName, java.lang.String, org.apache.lucene.gdata.gom.GOMAttribute)

writeSimpleXMLElement

public void writeSimpleXMLElement(String aName,
                                  String aValue,
                                  GOMAttribute aAttribute)
                           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Writes a simple element with full namespace

Specified by:
writeSimpleXMLElement in interface GOMOutputWriter
Parameters:
aName - - the local name of the element
aValue - - character value
aAttribute - - attribute
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
See Also:
GOMOutputWriter.writeSimpleXMLElement(java.lang.String, java.lang.String, org.apache.lucene.gdata.gom.GOMAttribute)

writeSimpleXMLElement

public void writeSimpleXMLElement(String aName,
                                  List<GOMAttribute> aList,
                                  String aValue)
                           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Writes a simple element with default namespace

Specified by:
writeSimpleXMLElement in interface GOMOutputWriter
Parameters:
aName - - elements name
aList - - attribute list
aValue - - character value
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
See Also:
GOMOutputWriter.writeSimpleXMLElement(java.lang.String, java.util.List, java.lang.String)

writeAttribute

public void writeAttribute(GOMAttribute attribute)
                    throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
writes a attribute with the attribute namespace Uri

Specified by:
writeAttribute in interface GOMOutputWriter
Parameters:
attribute - - the attribute
Throws:
javax.xml.stream.XMLStreamException - - if a write exception occurs
See Also:
GOMOutputWriter.writeAttribute(org.apache.lucene.gdata.gom.GOMAttribute)

writeStartElement

public void writeStartElement(String aName,
                              List<GOMAttribute> aList)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeStartElement(java.lang.String, java.util.List)

writeStartElement

public void writeStartElement(String aName,
                              GOMAttribute aAttribute)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeStartElement(java.lang.String, org.apache.lucene.gdata.gom.GOMAttribute)

writeStartElement

public void writeStartElement(String aName)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeStartElement(java.lang.String)

writeStartElement

public void writeStartElement(javax.xml.namespace.QName aName,
                              List<GOMAttribute> aList)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeStartElement(javax.xml.namespace.QName, java.util.List)

writeEndElement

public void writeEndElement()
                     throws javax.xml.stream.XMLStreamException
Specified by:
writeEndElement in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeEndElement()

writeContent

public void writeContent(String aContent)
                  throws javax.xml.stream.XMLStreamException
Specified by:
writeContent in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeContent(java.lang.String)

writeContentUnescaped

public void writeContentUnescaped(String aContent)
                           throws javax.xml.stream.XMLStreamException
Specified by:
writeContentUnescaped in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeContentUnescaped(java.lang.String)

writeDefaultNamespace

public void writeDefaultNamespace(String aNsUri)
                           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException
See Also:
org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeDefaultNamespace(java.lang.String)

writeDefaultNamespace

public void writeDefaultNamespace(GOMNamespace aNameSpace)
                           throws javax.xml.stream.XMLStreamException
Specified by:
writeDefaultNamespace in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeDefaultNamespace(org.apache.lucene.gdata.gom.GOMNamespace)

writeNamespace

public void writeNamespace(GOMNamespace aNameSpace)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeNamespace in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeNamespace(org.apache.lucene.gdata.gom.GOMNamespace)

writeStartDocument

public void writeStartDocument(String aString,
                               String aString2)
                        throws javax.xml.stream.XMLStreamException
Specified by:
writeStartDocument in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.writeStartDocument(java.lang.String, java.lang.String)

writeEndDocument

public void writeEndDocument()
                      throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Writes a end element tag according to the start element tag

Specified by:
writeEndDocument in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException - - if no start tag has been written or the element stack points to a different element
See Also:
GOMOutputWriter.writeEndDocument()

flush

public void flush()
           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Flush the GOMWriter

Specified by:
flush in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.flush()

close

public void close()
           throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMOutputWriter
Closes the GOM Writer

Specified by:
close in interface GOMOutputWriter
Throws:
javax.xml.stream.XMLStreamException
See Also:
GOMOutputWriter.close()


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.