|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.om.impl.dom.factory.OMDOMFactory
public class OMDOMFactory
OM factory implementation for DOOM. It creates nodes that implement
DOM as defined by the interfaces in org.w3c.dom.
Since DOM requires every node to have an owner document even if it has not yet
been added to a tree, this factory internally maintains a reference to a
DocumentImpl instance. The document can be set explicitly using the
OMDOMFactory(DocumentImpl) constructor or the setDocument(DocumentImpl)
method. If none is set, it will be implicitly created when the first node is created.
All nodes created by this factory will have this DocumentImpl instance as owner
document.
This has several important consequences:
setDocument(DocumentImpl) is used
to reset the DocumentImpl instance before processing the next document.OMAbstractFactory. In particular,
the om.factory system property must not be set to this class.
| Field Summary | |
|---|---|
protected DocumentImpl |
document
|
| Constructor Summary | |
|---|---|
OMDOMFactory()
|
|
OMDOMFactory(DocumentImpl doc)
|
|
| 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)
|
OMSourcedElement |
createOMElement(OMDataSource source,
java.lang.String localName,
OMNamespace ns)
Construct element with arbitrary data source. |
OMElement |
createOMElement(OMDataSource source,
java.lang.String localName,
OMNamespace ns,
OMContainer parent)
|
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)
Creates a new OMDOM Element node and adds it to 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)
Creates an OMElement with the builder. |
OMElement |
createOMElement(java.lang.String localName,
java.lang.String namespaceURI,
java.lang.String namespacePrefix)
Creates an OMElement. |
OMNamespace |
createOMNamespace(java.lang.String uri,
java.lang.String prefix)
Creates a new OMNamespace. |
OMProcessingInstruction |
createOMProcessingInstruction(OMContainer parent,
java.lang.String piTarget,
java.lang.String piData)
Creates a PI. |
OMText |
createOMText(java.lang.Object dataHandler,
boolean optimize)
Creates a new OMDOM Text node with the given datahandler and the given MTOM optimization configuration and returns it. |
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,
javax.xml.namespace.QName text)
|
OMText |
createOMText(OMContainer parent,
javax.xml.namespace.QName text,
int type)
|
OMText |
createOMText(OMContainer parent,
java.lang.String text)
Creates a new OMDOM Text node with the given value and appends it to the given parent element. |
OMText |
createOMText(OMContainer parent,
java.lang.String text,
int type)
|
OMText |
createOMText(OMContainer parent,
java.lang.String s,
java.lang.String mimeType,
boolean optimize)
Creates an OMDOM Text node, adds it to the give parent element and returns it. |
OMText |
createOMText(java.lang.String s)
Creates a OMDOM Text node carrying the given value. |
OMText |
createOMText(java.lang.String text,
int type)
Creates a Character node of the given type. |
OMText |
createOMText(java.lang.String contentID,
OMContainer parent,
OMXMLParserWrapper builder)
|
OMText |
createOMText(java.lang.String text,
java.lang.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 |
|---|
protected DocumentImpl document
| Constructor Detail |
|---|
public OMDOMFactory()
public OMDOMFactory(DocumentImpl doc)
| Method Detail |
|---|
public OMDocument createOMDocument()
OMFactory
createOMDocument in interface OMFactorypublic void setDocument(DocumentImpl document)
document -
public OMElement createOMElement(java.lang.String localName,
OMNamespace ns)
createOMElement in interface OMFactoryns - - This can be null
public OMElement createOMElement(java.lang.String localName,
OMNamespace ns,
OMContainer parent)
throws OMDOMException
createOMElement in interface OMFactoryOMDOMException
public OMElement createOMElement(java.lang.String localName,
OMNamespace ns,
OMContainer parent,
OMXMLParserWrapper builder)
createOMElement in interface OMFactoryns - - this can be null
public OMElement createOMElement(OMDataSource source,
java.lang.String localName,
OMNamespace ns,
OMContainer parent)
public OMSourcedElement createOMElement(OMDataSource source,
java.lang.String localName,
OMNamespace ns)
OMFactory
createOMElement in interface OMFactory
public OMElement createOMElement(java.lang.String localName,
java.lang.String namespaceURI,
java.lang.String namespacePrefix)
createOMElement in interface OMFactoryOMFactory.createOMElement(String, String,
String)
public OMElement createOMElement(javax.xml.namespace.QName qname,
OMContainer parent)
throws OMException
createOMElement in interface OMFactoryqname - the QName of the element to createparent - the OMContainer in which to place the new element
OMException - if there's a namespace mapping problemcreateOMElement(String, OMNamespace, OMContainer),
OMFactory.createOMElement( javax.xml.namespace.QName,
org.apache.axiom.om.OMContainer)
public OMElement createOMElement(javax.xml.namespace.QName qname)
throws OMException
createOMElement in interface OMFactoryqname -
OMException
public OMNamespace createOMNamespace(java.lang.String uri,
java.lang.String prefix)
createOMNamespace in interface OMFactoryOMFactory.createOMNamespace(String, String)
public OMText createOMText(OMContainer parent,
java.lang.String text)
createOMText in interface OMFactoryorg.apache.axiom.om.OMFactory#createOMText( org.apache.axiom.om.OMElement,String)
public OMText createOMText(OMContainer parent,
javax.xml.namespace.QName text)
createOMText in interface OMFactorytext - - This text itself can contain a namespace inside it.
public OMText createOMText(OMContainer parent,
javax.xml.namespace.QName text,
int type)
createOMText in interface OMFactorytext - - This text itself can contain a namespace inside it.
public OMText createOMText(OMContainer parent,
java.lang.String text,
int type)
createOMText in interface OMFactorytype - - this should be either of XMLStreamConstants.CHARACTERS,
XMLStreamConstants.CDATA, XMLStreamConstants.SPACE, XMLStreamConstants.ENTITY_REFERENCE
public OMText createOMText(OMContainer parent,
OMText source)
createOMText in interface OMFactoryparent - source -
public OMText createOMText(OMContainer parent,
char[] charArary,
int type)
createOMText in interface OMFactorypublic OMText createOMText(java.lang.String s)
createOMText in interface OMFactoryOMFactory.createOMText(String)
public OMText createOMText(java.lang.String text,
int type)
createOMText in interface OMFactorytype - - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For
Constants, use either XMLStreamConstants or constants found in OMNode.
OMFactory.createOMText(String, int)
public OMText createOMText(java.lang.String text,
java.lang.String mimeType,
boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(String, String, boolean)
public OMText createOMText(java.lang.Object dataHandler,
boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(Object, boolean)
public OMText createOMText(OMContainer parent,
java.lang.String s,
java.lang.String mimeType,
boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(OMContainer, String,
String, boolean)
public OMText createOMText(java.lang.String contentID,
OMContainer parent,
OMXMLParserWrapper builder)
createOMText in interface OMFactory
public OMAttribute createOMAttribute(java.lang.String localName,
OMNamespace ns,
java.lang.String value)
createOMAttribute in interface OMFactory
public OMDocType createOMDocType(OMContainer parent,
java.lang.String content)
OMFactory
createOMDocType in interface OMFactory
public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent,
java.lang.String piTarget,
java.lang.String piData)
OMFactory
createOMProcessingInstruction in interface OMFactory
public OMComment createOMComment(OMContainer parent,
java.lang.String content)
OMFactory
createOMComment in interface OMFactorypublic DocumentImpl getDocument()
public OMDocument createOMDocument(OMXMLParserWrapper builder)
createOMDocument in interface OMFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||