public class OMDOMFactory extends Object implements OMFactoryEx
org.w3c.dom.| Constructor and Description |
|---|
OMDOMFactory() |
OMDOMFactory(OMDOMMetaFactory metaFactory) |
| Modifier and Type | Method and Description |
|---|---|
OMAttribute |
createOMAttribute(String localName,
OMNamespace ns,
String value)
Create an attribute with the given name and value.
|
OMComment |
createOMComment(OMContainer parent,
String content)
Creates a comment.
|
OMComment |
createOMComment(OMContainer parent,
String content,
boolean fromBuilder) |
OMDocType |
createOMDocType(OMContainer parent,
String rootName,
String publicId,
String systemId,
String internalSubset)
Creates DTD (DOCTYPE declaration) node.
|
OMDocType |
createOMDocType(OMContainer parent,
String rootName,
String publicId,
String systemId,
String internalSubset,
boolean fromBuilder) |
OMDocument |
createOMDocument()
Creates a new OMDocument.
|
OMDocument |
createOMDocument(OMXMLParserWrapper builder) |
OMSourcedElement |
createOMElement(OMDataSource source)
Create a sourced element.
|
OMSourcedElement |
createOMElement(OMDataSource source,
QName qname)
Unsupported.
|
OMSourcedElement |
createOMElement(OMDataSource source,
String localName,
OMNamespace ns)
Create a sourced element with a known local name and namespace URI.
|
OMElement |
createOMElement(OMDataSource source,
String localName,
OMNamespace ns,
OMContainer parent) |
OMElement |
createOMElement(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(QName qname,
OMContainer parent)
Creates a new OMDOM Element node and adds it to the given parent.
|
OMElement |
createOMElement(String localName,
OMContainer parent,
OMXMLParserWrapper builder)
Creates an OMElement with the builder.
|
OMElement |
createOMElement(String localName,
OMNamespace ns)
Create an element with the given name.
|
OMElement |
createOMElement(String localName,
OMNamespace ns,
OMContainer parent)
Create an element with the given name and parent.
|
OMElement |
createOMElement(String localName,
String namespaceURI,
String prefix)
Create an element with the given name.
|
OMEntityReference |
createOMEntityReference(OMContainer parent,
String name)
Create an entity reference.
|
OMEntityReference |
createOMEntityReference(OMContainer parent,
String name,
String replacementText,
boolean fromBuilder) |
OMNamespace |
createOMNamespace(String uri,
String prefix)
Creates a new OMNamespace.
|
OMProcessingInstruction |
createOMProcessingInstruction(OMContainer parent,
String piTarget,
String piData)
Creates a PI.
|
OMProcessingInstruction |
createOMProcessingInstruction(OMContainer parent,
String piTarget,
String piData,
boolean fromBuilder) |
OMText |
createOMText(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,
Object dataHandler,
boolean optimize,
boolean fromBuilder) |
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 text,
int type,
boolean fromBuilder) |
OMText |
createOMText(OMContainer parent,
String s,
String mimeType,
boolean optimize)
Creates an OMDOM Text node, adds it to the give parent element and returns it.
|
OMText |
createOMText(String s)
Creates a OMDOM Text node carrying the given value.
|
OMText |
createOMText(String contentID,
DataHandlerProvider dataHandlerProvider,
boolean optimize)
Create a binary
OMText node supporting deferred loading of the content. |
OMText |
createOMText(String text,
int type)
Creates a Character node of the given type.
|
OMText |
createOMText(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.
|
OMMetaFactory |
getMetaFactory()
Get the
OMMetaFactory from which this factory was obtained. |
OMNode |
importNode(OMNode child)
This method is intended only to be used by Axiom intenals when merging Objects from different
Axiom implementations to the DOOM implementation.
|
public OMDOMFactory(OMDOMMetaFactory metaFactory)
public OMDOMFactory()
public OMMetaFactory getMetaFactory()
OMFactoryOMMetaFactory from which this factory was obtained. More precisely, if the
OMFactory instance has been obtained from a OMMetaFactory using
OMMetaFactory.getOMFactory(), OMMetaFactory.getSOAP11Factory() or
OMMetaFactory.getSOAP12Factory(), then the return value is the same as the original
OMMetaFactory. Since OMAbstractFactory creates a single OMMetaFactory
instance per Axiom implementation, this means that this method can be used to check if two
OMFactory instances belong to the same Axiom implementation.getMetaFactory in interface OMFactorypublic OMDocument createOMDocument()
OMFactorycreateOMDocument in interface OMFactorypublic OMElement createOMElement(String localName, OMNamespace ns)
OMFactorycreateOMElement in interface OMFactorylocalName - the local part of the name; must not be nullns - the namespace, or null if the element has no namespacepublic OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) throws OMDOMException
OMFactoryOMNamespace has a
namespace URI but a null prefix, the method will reuse an existing prefix if a
namespace declaration with a matching namespace URI is in scope on the parent or generate a
new prefix if no such namespace declaration exists.
If a new prefix is generated or if the specified prefix and namespace URI are not bound in
the scope of the parent element, the method will add an appropriate namespace declaration to
the new element. Note that this may also occur if null is passed as
OMNamespace parameter. In that case, if there is a default namespace declaration with
a non empty namespace URI in the scope of the parent element, a namespace declaration needs
to be added to the newly created element to override the default namespace.
createOMElement in interface OMFactoryparent - 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
OMFactory.createOMElement(String, OMNamespace)OMDOMExceptionpublic OMElement createOMElement(String localName, OMContainer parent, OMXMLParserWrapper builder)
createOMElement in interface OMFactoryExpublic OMSourcedElement createOMElement(OMDataSource source)
OMFactoryQNameAwareOMDataSource then
the returned OMSourcedElement will use the information provided through this
interface to determine the local name, namespace URI and namespace prefix. For information
that is not available (either because the data source doesn't implement
QNameAwareOMDataSource or because some of the methods defined by that interface
return null) the element will be expanded to determine the missing information.
This is done lazily, i.e. only when the information is really required. E.g. this will not
occur during serialization of the element.
This is an optional operation which may not be supported by all factories.
createOMElement in interface OMFactorysource - the data source; must not be nullpublic OMElement createOMElement(OMDataSource source, String localName, OMNamespace ns, OMContainer parent)
public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns)
OMFactoryOMNamespace
object. The caller may pass an OMNamespace instance with a null prefix.
This indicates that the prefix is unknown and will be determined lazily by expanding the
element.
Note that if the provided data source implements QNameAwareOMDataSource, then the
information returned by QNameAwareOMDataSource.getPrefix() may be used to determine
the prefix. However, this is an unusual use case.
Also note that if the specified namespace URI is empty, then the element can't have a prefix and it is not necessary to expand the element to determine its prefix.
This is an optional operation which may not be supported by all factories.
createOMElement in interface OMFactorysource - the data source; must not be nulllocalName - the local part of the name of the element produced by the data source; must not be
nullns - the namespace of the element produced by the data source, or null if
the element has no namespacepublic OMSourcedElement createOMElement(OMDataSource source, QName qname)
createOMElement in interface OMFactorysource - the data source; must not be nullqname - the name of the element produced by the data source; must not be nullpublic OMElement createOMElement(String localName, String namespaceURI, String prefix)
OMFactorycreateOMElement in interface OMFactorylocalName - the local part of the name; must not be nullnamespaceURI - the namespace URI, or the empty string if the element has no namespace; must not
be nullprefix - the namespace prefix, or null if a prefix should be generatedpublic OMElement createOMElement(QName qname, OMContainer parent) throws OMException
createOMElement in interface OMFactoryqname - the QName defining the name of the element to be createdparent - 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
OMFactory.createOMElement(QName)OMExceptioncreateOMElement(String, OMNamespace, OMContainer),
OMFactory.createOMElement( javax.xml.namespace.QName,
org.apache.axiom.om.OMContainer)public OMElement createOMElement(QName qname) throws OMException
createOMElement in interface OMFactoryqname - OMExceptionpublic OMNamespace createOMNamespace(String uri, String prefix)
createOMNamespace in interface OMFactoryuri - the namespace URI; must not be nullprefix - the prefixOMNamespace instanceOMFactory.createOMNamespace(String, String)public OMText createOMText(OMContainer parent, String text)
OMFactoryOMText node with the given value and appends it to the given parent
element.createOMText in interface OMFactoryparent - the parent to which the newly created text node will be added; this may be
null, in which case the behavior of the method is the same as
OMFactory.createOMText(String)public OMText createOMText(OMContainer parent, QName text)
createOMText in interface OMFactorytext - - This text itself can contain a namespace inside it.public OMText createOMText(OMContainer parent, QName text, int type)
createOMText in interface OMFactorytext - - This text itself can contain a namespace inside it.public OMText createOMText(OMContainer parent, String text, int type)
createOMText in interface OMFactorytype - the node type: OMNode.TEXT_NODE, OMNode.CDATA_SECTION_NODE or
OMNode.SPACE_NODEpublic OMText createOMText(OMContainer parent, String text, int type, boolean fromBuilder)
createOMText in interface OMFactoryExpublic OMText createOMText(OMContainer parent, OMText source)
OMFactorycreateOMText in interface OMFactorypublic OMText createOMText(OMContainer parent, char[] charArary, int type)
createOMText in interface OMFactorypublic OMText createOMText(String s)
createOMText in interface OMFactoryOMFactory.createOMText(String)public OMText createOMText(String text, int type)
createOMText in interface OMFactorytype - the node type: OMNode.TEXT_NODE, OMNode.CDATA_SECTION_NODE or
OMNode.SPACE_NODEOMFactory.createOMText(String, int)public OMText createOMText(String text, String mimeType, boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(String, String, boolean)public OMText createOMText(Object dataHandler, boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(Object, boolean)public OMText createOMText(OMContainer parent, Object dataHandler, boolean optimize, boolean fromBuilder)
createOMText in interface OMFactoryExpublic OMText createOMText(String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize)
OMFactoryOMText node supporting deferred loading of the content.createOMText in interface OMFactorycontentID - the content ID identifying the binary content; may be nulldataHandlerProvider - used to load the DataHandler when requested from the returned
OMText nodeoptimize - determines whether the binary content should be optimizedpublic OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize)
createOMText in interface OMFactoryOMFactory.createOMText(OMContainer, String,
String, boolean)public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value)
OMFactoryOMNamespace object
has a null prefix, then a prefix will be generated, except if the namespace URI
is the empty string, in which case the result is the same as if a null
OMNamespace was given.createOMAttribute in interface OMFactorypublic OMDocType createOMDocType(OMContainer parent, String rootName, String publicId, String systemId, String internalSubset)
OMFactorycreateOMDocType in interface OMFactoryparent - the parent to which the newly created text node will be added; this may be
nullrootName - the root name, i.e. the name immediately following the DOCTYPE keywordpublicId - the public ID of the external subset, or null if there is no external
subset or no public ID has been specified for the external subsetsystemId - the system ID of the external subset, or null if there is no external
subsetinternalSubset - the internal subset, or null if there is noneOMDocType nodepublic OMDocType createOMDocType(OMContainer parent, String rootName, String publicId, String systemId, String internalSubset, boolean fromBuilder)
createOMDocType in interface OMFactoryExpublic OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData)
OMFactorycreateOMProcessingInstruction in interface OMFactorypublic OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData, boolean fromBuilder)
createOMProcessingInstruction in interface OMFactoryExpublic OMComment createOMComment(OMContainer parent, String content)
OMFactorycreateOMComment in interface OMFactorypublic OMComment createOMComment(OMContainer parent, String content, boolean fromBuilder)
createOMComment in interface OMFactoryExpublic OMDocument createOMDocument(OMXMLParserWrapper builder)
createOMDocument in interface OMFactoryExpublic OMEntityReference createOMEntityReference(OMContainer parent, String name)
OMFactorycreateOMEntityReference in interface OMFactoryparent - the parent to which the newly created entity reference node will be added; this
may be nullname - the name of the entityOMEntityReference nodepublic OMEntityReference createOMEntityReference(OMContainer parent, String name, String replacementText, boolean fromBuilder)
createOMEntityReference in interface OMFactoryExpublic OMNode importNode(OMNode child)
importNode in interface OMFactoryExchild - Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.