org.apache.axiom.om
Interface OMFactory

All Known Subinterfaces:
SOAPFactory

public interface OMFactory

Class OMFactory


Method Summary
 OMAttribute createOMAttribute(java.lang.String localName, OMNamespace ns, java.lang.String value)
           
 OMComment createOMComment(OMContainer parent, java.lang.String content)
          Creates a comment.
 OMDocType createOMDocType(OMContainer parent, java.lang.String content)
          Creates DocType/DTD.
 OMDocument createOMDocument()
          Creates a new OMDocument.
 OMDocument createOMDocument(OMXMLParserWrapper builder)
           
 OMElement createOMElement(OMDataSource source, java.lang.String localName, OMNamespace ns)
          Construct element with arbitrary data source.
 OMElement createOMElement(javax.xml.namespace.QName qname)
          Create an OMElement with the given QName If the QName contains a prefix, we will ensure that an OMNamespace is created mapping the given namespace to the given prefix.
 OMElement createOMElement(javax.xml.namespace.QName qname, OMContainer parent)
          Create an OMElement with the given QName under the given parent.
 OMElement createOMElement(java.lang.String localName, OMNamespace ns)
           
 OMElement createOMElement(java.lang.String localName, OMNamespace ns, OMContainer parent)
           
 OMElement createOMElement(java.lang.String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder)
           
 OMElement createOMElement(java.lang.String localName, java.lang.String namespaceURI, java.lang.String namespacePrefix)
          This is almost the same as as createOMElement(localName,OMNamespace) method above.
 OMNamespace createOMNamespace(java.lang.String uri, java.lang.String prefix)
           
 OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, java.lang.String piTarget, java.lang.String piData)
          Creates a PI.
 OMText createOMText(java.lang.Object dataHandler, boolean optimize)
           
 OMText createOMText(OMContainer parent, char[] charArary, int type)
           
 OMText createOMText(OMContainer parent, javax.xml.namespace.QName text)
           
 OMText createOMText(OMContainer parent, javax.xml.namespace.QName text, int type)
           
 OMText createOMText(OMContainer parent, java.lang.String text)
           
 OMText createOMText(OMContainer parent, java.lang.String text, int type)
           
 OMText createOMText(OMContainer parent, java.lang.String s, java.lang.String mimeType, boolean optimize)
           
 OMText createOMText(java.lang.String s)
           
 OMText createOMText(java.lang.String s, int type)
           
 OMText createOMText(java.lang.String contentID, OMContainer parent, OMXMLParserWrapper builder)
           
 OMText createOMText(java.lang.String s, java.lang.String mimeType, boolean optimize)
           
 

Method Detail

createOMDocument

public OMDocument createOMDocument()
Creates a new OMDocument.


createOMDocument

public OMDocument createOMDocument(OMXMLParserWrapper builder)

createOMElement

public OMElement createOMElement(java.lang.String localName,
                                 OMNamespace ns)
Parameters:
localName -
ns - - This can be null

createOMElement

public OMElement createOMElement(java.lang.String localName,
                                 OMNamespace ns,
                                 OMContainer parent)
                          throws OMException
Throws:
OMException

createOMElement

public OMElement createOMElement(java.lang.String localName,
                                 OMNamespace ns,
                                 OMContainer parent,
                                 OMXMLParserWrapper builder)
Parameters:
localName -
ns - - this can be null
parent -
builder -

createOMElement

public OMElement createOMElement(OMDataSource source,
                                 java.lang.String localName,
                                 OMNamespace ns)
Construct element with arbitrary data source. This is an optional operation which may not be supported by all factories.

Parameters:
source -
localName -
ns -

createOMElement

public OMElement createOMElement(java.lang.String localName,
                                 java.lang.String namespaceURI,
                                 java.lang.String namespacePrefix)
This is almost the same as as createOMElement(localName,OMNamespace) method above. But some people may, for some reason, need to use the conventional method of putting a namespace. Or in other words people might not want to use the new OMNamespace. Well, this is for those people.

Parameters:
localName -
namespaceURI -
namespacePrefix -
Returns:
Returns the newly created OMElement.

createOMElement

public OMElement createOMElement(javax.xml.namespace.QName qname,
                                 OMContainer parent)
                          throws OMException
Create an OMElement with the given QName under the given parent. If the QName contains a prefix, we will ensure that an OMNamespace is created mapping the given namespace to the given prefix. If no prefix is passed, we'll use whatever's already mapped in the parent, or create a generated one.

Parameters:
qname - the QName of the element to create
parent - the OMContainer in which to place the new element
Returns:
Returns the new OMElement
Throws:
OMException - if there's a namespace mapping problem

createOMElement

public OMElement createOMElement(javax.xml.namespace.QName qname)
                          throws OMException
Create an OMElement with the given QName If the QName contains a prefix, we will ensure that an OMNamespace is created mapping the given namespace to the given prefix. If no prefix is passed, we'll use whatever's already mapped in the parent, or create a generated one.

Parameters:
qname -
Returns:
the new OMElement.
Throws:
OMException

createOMNamespace

public OMNamespace createOMNamespace(java.lang.String uri,
                                     java.lang.String prefix)
Parameters:
uri -
prefix -
Returns:
Returns OMNameSpace.

createOMText

public OMText createOMText(OMContainer parent,
                           java.lang.String text)
Parameters:
parent -
text -
Returns:
Returns OMText.

createOMText

public OMText createOMText(OMContainer parent,
                           javax.xml.namespace.QName text)
Parameters:
parent -
text - - This text itself can contain a namespace inside it.

createOMText

public OMText createOMText(OMContainer parent,
                           java.lang.String text,
                           int type)
Parameters:
parent -
text -
type - - this should be either of XMLStreamConstants.CHARACTERS, XMLStreamConstants.CDATA, XMLStreamConstants.SPACE, XMLStreamConstants.ENTITY_REFERENCE
Returns:
Returns OMText.

createOMText

public OMText createOMText(OMContainer parent,
                           char[] charArary,
                           int type)

createOMText

public OMText createOMText(OMContainer parent,
                           javax.xml.namespace.QName text,
                           int type)
Parameters:
parent -
text - - This text itself can contain a namespace inside it.
type -

createOMText

public OMText createOMText(java.lang.String s)
Parameters:
s -
Returns:
Returns OMText.

createOMText

public OMText createOMText(java.lang.String s,
                           int type)
Parameters:
s -
type - - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For Constants, use either XMLStreamConstants or constants found in OMNode.
Returns:
Returns OMText.

createOMText

public OMText createOMText(java.lang.String s,
                           java.lang.String mimeType,
                           boolean optimize)

createOMText

public OMText createOMText(java.lang.Object dataHandler,
                           boolean optimize)

createOMText

public OMText createOMText(OMContainer parent,
                           java.lang.String s,
                           java.lang.String mimeType,
                           boolean optimize)

createOMText

public OMText createOMText(java.lang.String contentID,
                           OMContainer parent,
                           OMXMLParserWrapper builder)

createOMAttribute

public OMAttribute createOMAttribute(java.lang.String localName,
                                     OMNamespace ns,
                                     java.lang.String value)

createOMDocType

public OMDocType createOMDocType(OMContainer parent,
                                 java.lang.String content)
Creates DocType/DTD.

Parameters:
parent -
content -
Returns:
Returns doctype.

createOMProcessingInstruction

public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent,
                                                             java.lang.String piTarget,
                                                             java.lang.String piData)
Creates a PI.

Parameters:
parent -
piTarget -
piData -
Returns:
Returns OMProcessingInstruction.

createOMComment

public OMComment createOMComment(OMContainer parent,
                                 java.lang.String content)
Creates a comment.

Parameters:
parent -
content -
Returns:
Returns OMComment.


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.