org.apache.axiom.om
Interface OMFactory

All Known Subinterfaces:
SOAPFactory
All Known Implementing Classes:
DOMSOAPFactory, OMDOMFactory, OMLinkedListImplFactory, SOAP11Factory, SOAP11Factory, SOAP12Factory, SOAP12Factory

public interface OMFactory

Class OMFactory


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)
           
 OMSourcedElement createOMElement(OMDataSource source, QName qname)
          Construct element with arbitrary data source.
 OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns)
          Construct element with arbitrary data source.
 OMElement createOMElement(QName qname)
          Create an element with the given QName.
 OMElement createOMElement(QName qname, OMContainer parent)
          Create an OMElement with the given QName under the given parent.
 OMElement createOMElement(String localName, OMNamespace ns)
          Create an element with the given name.
 OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent)
           
 OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder)
           
 OMElement createOMElement(String localName, String namespaceURI, String prefix)
          Create an element with the given name.
 OMNamespace createOMNamespace(String uri, String prefix)
          Create an OMNamespace instance or retrieve an existing one if the factory supports pooling.
 OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData)
          Creates a PI.
 OMText createOMText(Object dataHandler, boolean optimize)
           
 OMText createOMText(OMContainer parent, char[] charArary, int type)
           
 OMText createOMText(OMContainer parent, OMText source)
          Create OMText node that is a copy of the source text node
 OMText createOMText(OMContainer parent, QName text)
           
 OMText createOMText(OMContainer parent, QName text, int type)
           
 OMText createOMText(OMContainer parent, String text)
          Creates a new OMText node with the given value and appends it to the given parent element.
 OMText createOMText(OMContainer parent, String text, int type)
           
 OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize)
           
 OMText createOMText(String s)
           
 OMText createOMText(String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize)
          Create a binary OMText node supporting deferred loading of the content.
 OMText createOMText(String s, int type)
           
 OMText createOMText(String contentID, OMContainer parent, OMXMLParserWrapper builder)
           
 OMText createOMText(String s, String mimeType, boolean optimize)
           
 OMMetaFactory getMetaFactory()
          Get the OMMetaFactory from which this factory was obtained.
 

Method Detail

getMetaFactory

OMMetaFactory getMetaFactory()
Get the OMMetaFactory from which this factory was obtained.

Returns:
the meta factory

createOMDocument

OMDocument createOMDocument()
Creates a new OMDocument.


createOMDocument

OMDocument createOMDocument(OMXMLParserWrapper builder)

createOMElement

OMElement createOMElement(String localName,
                          OMNamespace ns)
Create an element with the given name. If a namespace is given, a namespace declaration will be added automatically to the newly created element.

Parameters:
localName - the local part of the name; must not be null
ns - the namespace, or null if the element has no namespace
Returns:
the newly created element

createOMElement

OMElement createOMElement(String localName,
                          OMNamespace ns,
                          OMContainer parent)
                          throws OMException
Parameters:
localName -
ns -
parent - the parent to which the newly created element will be added; this may be null, in which case the behavior of the method is the same as createOMElement(String, OMNamespace)
Returns:
the newly created element
Throws:
OMException

createOMElement

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

createOMElement

OMSourcedElement createOMElement(OMDataSource source,
                                 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

OMSourcedElement createOMElement(OMDataSource source,
                                 QName qname)
Construct element with arbitrary data source. This is an optional operation which may not be supported by all factories.

Parameters:
source - the data source
qname - the name of the element produced by the data source

createOMElement

OMElement createOMElement(String localName,
                          String namespaceURI,
                          String prefix)
Create an element with the given name. If a namespace is given, a namespace declaration will be added automatically to the newly created element.

Parameters:
localName - the local part of the name; must not be null
namespaceURI - the namespace URI, or the empty string if the element has no namespace; must not be null
prefix - the namespace prefix, or null if a prefix should be generated
Returns:
the newly created OMElement.
Throws:
IllegalArgumentException - if namespaceURI is null

createOMElement

OMElement createOMElement(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 parent to which the newly created element will be added; this may be null, in which case the behavior of the method is the same as createOMElement(QName)
Returns:
Returns the new OMElement
Throws:
OMException - if there's a namespace mapping problem

createOMElement

OMElement createOMElement(QName qname)
                          throws OMException
Create an element with the given QName. If a namespace URI is given but no prefix, the method will automatically generate a prefix for the element. If a namespace URI is given, the method will also add a namespace declaration to the element, binding the auto-generated prefix or the prefix given in the QName to the given namespace URI. If neither a namespace URI nor a prefix is given, no namespace declaration will be added.

Parameters:
qname - the QName defining the name of the element to be created
Returns:
the new element
Throws:
OMException - TODO: when???

createOMNamespace

OMNamespace createOMNamespace(String uri,
                              String prefix)
Create an OMNamespace instance or retrieve an existing one if the factory supports pooling.

Parameters:
uri - the namespace URI; must not be null
prefix - the prefix
Returns:
the OMNamespace instance
Throws:
IllegalArgumentException - if uri is null

createOMText

OMText createOMText(OMContainer parent,
                    String text)
Creates a new OMText node with the given value and appends it to the given parent element.

Parameters:
parent -
text -
Returns:
Returns OMText.

createOMText

OMText createOMText(OMContainer parent,
                    OMText source)
Create OMText node that is a copy of the source text node

Parameters:
parent -
source -
Returns:
TODO

createOMText

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

createOMText

OMText createOMText(OMContainer parent,
                    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

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

createOMText

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

createOMText

OMText createOMText(String s)
Parameters:
s -
Returns:
Returns OMText.

createOMText

OMText createOMText(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

OMText createOMText(String s,
                    String mimeType,
                    boolean optimize)

createOMText

OMText createOMText(Object dataHandler,
                    boolean optimize)

createOMText

OMText createOMText(OMContainer parent,
                    String s,
                    String mimeType,
                    boolean optimize)

createOMText

OMText createOMText(String contentID,
                    DataHandlerProvider dataHandlerProvider,
                    boolean optimize)
Create a binary OMText node supporting deferred loading of the content.

Parameters:
contentID - the content ID identifying the binary content; may be null
dataHandlerProvider - used to load the DataHandler when requested from the returned OMText node
optimize - determines whether the binary content should be optimized
Returns:
TODO

createOMText

OMText createOMText(String contentID,
                    OMContainer parent,
                    OMXMLParserWrapper builder)

createOMAttribute

OMAttribute createOMAttribute(String localName,
                              OMNamespace ns,
                              String value)

createOMDocType

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

Parameters:
parent -
content -
Returns:
Returns doctype.

createOMProcessingInstruction

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

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

createOMComment

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

Parameters:
parent -
content -
Returns:
Returns OMComment.


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.