org.apache.chemistry.opencmis.server.impl.atompub
Class XMLDocumentBase

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase
Direct Known Subclasses:
AtomDocumentBase

public abstract class XMLDocumentBase
extends java.lang.Object

Base class for XML documents.


Field Summary
static java.lang.String PREFIX_APP
           
static java.lang.String PREFIX_ATOM
           
static java.lang.String PREFIX_CMIS
           
static java.lang.String PREFIX_RESTATOM
           
static java.lang.String PREFIX_XSI
           
 
Constructor Summary
XMLDocumentBase()
           
 
Method Summary
 void endDocument()
          Finishes the document.
 javax.xml.stream.XMLStreamWriter getWriter()
          Returns the writer object.
 void setNamespaces()
          Sets the namespaces for the document.
protected  void setWriter(javax.xml.stream.XMLStreamWriter writer)
          Sets the writer object.
 void startDocument(java.io.OutputStream out)
          Starts the document and sets the namespaces.
 void writeNamespace(java.lang.String namespaceUri)
          Writes the namespace declaration of the given URI to the current tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX_ATOM

public static final java.lang.String PREFIX_ATOM
See Also:
Constant Field Values

PREFIX_CMIS

public static final java.lang.String PREFIX_CMIS
See Also:
Constant Field Values

PREFIX_RESTATOM

public static final java.lang.String PREFIX_RESTATOM
See Also:
Constant Field Values

PREFIX_APP

public static final java.lang.String PREFIX_APP
See Also:
Constant Field Values

PREFIX_XSI

public static final java.lang.String PREFIX_XSI
See Also:
Constant Field Values
Constructor Detail

XMLDocumentBase

public XMLDocumentBase()
Method Detail

setNamespaces

public void setNamespaces()
                   throws javax.xml.stream.XMLStreamException
Sets the namespaces for the document.

Throws:
javax.xml.stream.XMLStreamException

writeNamespace

public void writeNamespace(java.lang.String namespaceUri)
                    throws javax.xml.stream.XMLStreamException
Writes the namespace declaration of the given URI to the current tag.

Throws:
javax.xml.stream.XMLStreamException

startDocument

public void startDocument(java.io.OutputStream out)
                   throws javax.xml.stream.XMLStreamException
Starts the document and sets the namespaces.

Throws:
javax.xml.stream.XMLStreamException

endDocument

public void endDocument()
                 throws javax.xml.stream.XMLStreamException
Finishes the document.

Throws:
javax.xml.stream.XMLStreamException

getWriter

public javax.xml.stream.XMLStreamWriter getWriter()
Returns the writer object.


setWriter

protected void setWriter(javax.xml.stream.XMLStreamWriter writer)
Sets the writer object.



Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.