org.apache.axis2.om.impl.dom.factory
Class OMDOMFactory

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.factory.OMDOMFactory
All Implemented Interfaces:
OMFactory
Direct Known Subclasses:
DOMSOAPFactory

public class OMDOMFactory
extends Object
implements OMFactory


Field Summary
protected  DocumentImpl document
           
 
Constructor Summary
OMDOMFactory()
           
OMDOMFactory(DocumentImpl doc)
           
 
Method Summary
 OMAttribute createOMAttribute(String localName, OMNamespace ns, String value)
           
 OMComment createOMComment(OMContainer parent, String content)
          Creates a comment.
 OMDocType createOMDocType(OMContainer parent, String content)
          Creates DocType/DTD.
 OMDocument createOMDocument()
          Creates a new OMDocument.
 OMDocument createOMDocument(OMXMLParserWrapper builder)
           
 OMElement createOMElement(QName qname, OMContainer parent)
          Creates a new OMDOM Element node and adds it to the given parent.
 OMElement createOMElement(String localName, OMNamespace ns)
           
 OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent)
           
 OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder)
          Creates an OMElement with the builder.
 OMElement createOMElement(String localName, String namespaceURI, String namespacePrefix)
          Creates an OMElement.
 OMNamespace createOMNamespace(String uri, String prefix)
          Creates a new OMNamespace.
 OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData)
          Creates a PI.
 OMText createText(Object dataHandler, boolean optimize)
          Creates a new OMDOM Text node with the given datahandler and the given MTOM optimization configuration and returns it.
 OMText createText(OMElement parent, String text)
          Creates a new OMDOM Text node with the given value and appends it to the given parent element.
 OMText createText(OMElement parent, String text, int type)
           
 OMText createText(OMElement parent, String s, String mimeType, boolean optimize)
          Creates an OMDOM Text node, adds it to the give parent element and returns it.
 OMText createText(String s)
          Creates a OMDOM Text node carrying the given value.
 OMText createText(String text, int type)
          Creates a Character node of the given type.
 OMText createText(String contentID, OMElement parent, OMXMLParserWrapper builder)
           
 OMText createText(String text, String mimeType, boolean optimize)
          Creates a new OMDOM Text node with the value of the given text value along with the MTOM optimization parameters and returns it.
 DocumentImpl getDocument()
           
 void setDocument(DocumentImpl document)
          Configure this factory to use the given document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

protected DocumentImpl document
Constructor Detail

OMDOMFactory

public OMDOMFactory()

OMDOMFactory

public OMDOMFactory(DocumentImpl doc)
Method Detail

createOMDocument

public OMDocument createOMDocument()
Description copied from interface: OMFactory
Creates a new OMDocument.

Specified by:
createOMDocument in interface OMFactory

setDocument

public void setDocument(DocumentImpl document)
Configure this factory to use the given document. Use with care.

Parameters:
document -

createOMElement

public OMElement createOMElement(String localName,
                                 OMNamespace ns)
Specified by:
createOMElement in interface OMFactory
Parameters:
localName -
ns -

createOMElement

public OMElement createOMElement(String localName,
                                 OMNamespace ns,
                                 OMContainer parent)
                          throws OMDOMException
Specified by:
createOMElement in interface OMFactory
Throws:
OMDOMException

createOMElement

public OMElement createOMElement(String localName,
                                 OMNamespace ns,
                                 OMContainer parent,
                                 OMXMLParserWrapper builder)
Creates an OMElement with the builder.

Specified by:
createOMElement in interface OMFactory
Parameters:
localName -
ns -
parent -
builder -

createOMElement

public OMElement createOMElement(String localName,
                                 String namespaceURI,
                                 String namespacePrefix)
Creates an OMElement.

Specified by:
createOMElement in interface OMFactory
Parameters:
localName -
namespaceURI -
namespacePrefix -
Returns:
Returns the newly created OMElement.
See Also:
OMFactory.createOMElement(java.lang.String, java.lang.String, java.lang.String)

createOMElement

public OMElement createOMElement(QName qname,
                                 OMContainer parent)
                          throws OMException
Creates a new OMDOM Element node and adds it to the given parent.

Specified by:
createOMElement in interface OMFactory
Parameters:
qname -
parent -
Returns:
Returns the new OMElement.
Throws:
OMException
See Also:
createOMElement(String, OMNamespace, OMContainer), OMFactory.createOMElement( javax.xml.namespace.QName, org.apache.axis2.om.OMContainer)

createOMNamespace

public OMNamespace createOMNamespace(String uri,
                                     String prefix)
Creates a new OMNamespace.

Specified by:
createOMNamespace in interface OMFactory
Parameters:
uri -
prefix -
Returns:
Returns OMNameSpace.
See Also:
OMFactory.createOMNamespace(java.lang.String, java.lang.String)

createText

public OMText createText(OMElement parent,
                         String text)
Creates a new OMDOM Text node with the given value and appends it to the given parent element.

Specified by:
createText in interface OMFactory
Parameters:
parent -
text -
Returns:
Returns OMText.
See Also:
OMFactory.createText( org.apache.axis2.om.OMElement,java.lang.String)

createText

public OMText createText(OMElement parent,
                         String text,
                         int type)
Specified by:
createText in interface OMFactory
Parameters:
parent -
text -
type - - this should be either of XMLStreamConstants.CHARACTERS, XMLStreamConstants.CDATA, XMLStreamConstants.SPACE, XMLStreamConstants.ENTITY_REFERENCE
Returns:
Returns OMText.

createText

public OMText createText(String s)
Creates a OMDOM Text node carrying the given value.

Specified by:
createText in interface OMFactory
Parameters:
s -
Returns:
Returns OMText.
See Also:
OMFactory.createText(java.lang.String)

createText

public OMText createText(String text,
                         int type)
Creates a Character node of the given type.

Specified by:
createText in interface OMFactory
Parameters:
text -
type - - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For Constants, use either XMLStreamConstants or constants found in OMNode.
Returns:
Returns OMText.
See Also:
OMFactory.createText(java.lang.String, int)

createText

public OMText createText(String text,
                         String mimeType,
                         boolean optimize)
Creates a new OMDOM Text node with the value of the given text value along with the MTOM optimization parameters and returns it.

Specified by:
createText in interface OMFactory
See Also:
OMFactory.createText(java.lang.String, java.lang.String, boolean)

createText

public OMText createText(Object dataHandler,
                         boolean optimize)
Creates a new OMDOM Text node with the given datahandler and the given MTOM optimization configuration and returns it.

Specified by:
createText in interface OMFactory
See Also:
OMFactory.createText(java.lang.Object, boolean)

createText

public OMText createText(OMElement parent,
                         String s,
                         String mimeType,
                         boolean optimize)
Creates an OMDOM Text node, adds it to the give parent element and returns it.

Specified by:
createText in interface OMFactory
See Also:
OMFactory.createText(org.apache.axis2.om.OMElement, java.lang.String, java.lang.String, boolean)

createText

public OMText createText(String contentID,
                         OMElement parent,
                         OMXMLParserWrapper builder)
Specified by:
createText in interface OMFactory

createOMAttribute

public OMAttribute createOMAttribute(String localName,
                                     OMNamespace ns,
                                     String value)
Specified by:
createOMAttribute in interface OMFactory

createOMDocType

public OMDocType createOMDocType(OMContainer parent,
                                 String content)
Description copied from interface: OMFactory
Creates DocType/DTD.

Specified by:
createOMDocType in interface OMFactory
Parameters:
parent -
content -
Returns:
Returns doctype.

createOMProcessingInstruction

public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent,
                                                             String piTarget,
                                                             String piData)
Description copied from interface: OMFactory
Creates a PI.

Specified by:
createOMProcessingInstruction in interface OMFactory
Parameters:
parent -
piTarget -
piData -
Returns:
Returns OMProcessingInstruction.

createOMComment

public OMComment createOMComment(OMContainer parent,
                                 String content)
Description copied from interface: OMFactory
Creates a comment.

Specified by:
createOMComment in interface OMFactory
Parameters:
parent -
content -
Returns:
Returns OMComment.

getDocument

public DocumentImpl getDocument()

createOMDocument

public OMDocument createOMDocument(OMXMLParserWrapper builder)
Specified by:
createOMDocument in interface OMFactory