org.apache.lucene.gdata.gom.core
Class GOMDocumentImpl<T extends GOMElement>

java.lang.Object
  extended by org.apache.lucene.gdata.gom.core.GOMDocumentImpl<T>
Type Parameters:
T -
All Implemented Interfaces:
GOMDocument<T>

public class GOMDocumentImpl<T extends GOMElement>
extends Object
implements GOMDocument<T>

Author:
Simon Willnauer

Constructor Summary
GOMDocumentImpl()
           
 
Method Summary
 String getCharacterEncoding()
          Gets the xml charset encoding
 T getRootElement()
          Getter for the root element of the xml e.g GOMDocument
 String getVersion()
          Gets the xml version
 void setCharacterEncoding(String aEncoding)
          Sets the xml charset encoding
 void setRootElement(T aRootElement)
          setter for the root element of the xml e.g GOMDocument
 void setVersion(String aVersion)
          Sets the xml version
 void writeAtomOutput(GOMOutputWriter aStreamWriter)
          Generates a complete xml document starting with the header followed by the output of the specified root element in the ATOM 1.0 formate.
 void writeRssOutput(GOMOutputWriter aStreamWriter)
          Generates a complete xml document starting with the header followed by the output of the specified root element in the RSS 2.0 formate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GOMDocumentImpl

public GOMDocumentImpl()
Method Detail

setRootElement

public void setRootElement(T aRootElement)
Description copied from interface: GOMDocument
setter for the root element of the xml e.g GOMDocument

Specified by:
setRootElement in interface GOMDocument<T extends GOMElement>
Parameters:
aRootElement - - the root element to set
See Also:
GOMDocument.setRootElement(org.apache.lucene.gdata.gom.GOMElement)

getRootElement

public T getRootElement()
Description copied from interface: GOMDocument
Getter for the root element of the xml e.g GOMDocument

Specified by:
getRootElement in interface GOMDocument<T extends GOMElement>
Returns:
- the root elmenent
See Also:
GOMDocument.getRootElement()

setVersion

public void setVersion(String aVersion)
Description copied from interface: GOMDocument
Sets the xml version

Specified by:
setVersion in interface GOMDocument<T extends GOMElement>
Parameters:
aVersion - - the version string
See Also:
GOMDocument.setVersion(java.lang.String)

getVersion

public String getVersion()
Description copied from interface: GOMDocument
Gets the xml version

Specified by:
getVersion in interface GOMDocument<T extends GOMElement>
Returns:
the version

getCharacterEncoding

public String getCharacterEncoding()
Description copied from interface: GOMDocument
Gets the xml charset encoding

Specified by:
getCharacterEncoding in interface GOMDocument<T extends GOMElement>
Returns:
- the specified char encoding
See Also:
GOMDocument.getCharacterEncoding()

setCharacterEncoding

public void setCharacterEncoding(String aEncoding)
Description copied from interface: GOMDocument
Sets the xml charset encoding

Specified by:
setCharacterEncoding in interface GOMDocument<T extends GOMElement>
Parameters:
aEncoding - - the charset encoding to set
See Also:
GOMDocument.setCharacterEncoding(java.lang.String)

writeAtomOutput

public void writeAtomOutput(GOMOutputWriter aStreamWriter)
                     throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMDocument
Generates a complete xml document starting with the header followed by the output of the specified root element in the ATOM 1.0 formate.

Specified by:
writeAtomOutput in interface GOMDocument<T extends GOMElement>
Parameters:
aStreamWriter - - the GOMOutputWriter implementation to write the output
Throws:
javax.xml.stream.XMLStreamException - - if the GOMOutputWriter throws an exception
See Also:
org.apache.lucene.gdata.gom.GOMDocument#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)

writeRssOutput

public void writeRssOutput(GOMOutputWriter aStreamWriter)
                    throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMDocument
Generates a complete xml document starting with the header followed by the output of the specified root element in the RSS 2.0 formate.

Specified by:
writeRssOutput in interface GOMDocument<T extends GOMElement>
Parameters:
aStreamWriter - - the GOMOutputWriter implementation to write the output
Throws:
javax.xml.stream.XMLStreamException - - if the GOMOutputWriter throws an exception
See Also:
org.apache.lucene.gdata.gom.GOMDocument#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)


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