public class OMSourcedElementImpl extends OMElementImpl implements OMSourcedElement
Element backed by an arbitrary data source. When necessary, this element will be expanded by creating a parser from the data source.
Whenever methods are added to the base OMElementImpl
class the corresponding methods must be added to this class (there's a unit test to verify that
this has been done, just to make sure nothing gets accidentally broken). If the method only
requires the element name and/or namespace information, the base class method can be called
directly. Otherwise, the element must be expanded into a full OM tree (by calling the forceExpand() method) before the base class method is called. This will typically involve a
heavy overhead penalty, so should be avoided if possible.
attributes, DEFAULT_DEFAULT_NS_OBJECT, firstChild, lastChild, localName, namespaces, noPrefixNamespaceCounter, ns, qNamenextSibling, nodeType, parent, previousSiblingbuilder, done, factoryCDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODEARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI| Constructor and Description |
|---|
OMSourcedElementImpl(QName qName,
OMFactory factory,
OMDataSource source)
Constructor that takes a QName instead of the local name and the namespace seperately
|
OMSourcedElementImpl(String localName,
OMNamespace ns,
OMContainer parent,
OMFactory factory) |
OMSourcedElementImpl(String localName,
OMNamespace ns,
OMContainer parent,
OMXMLParserWrapper builder,
OMFactory factory) |
OMSourcedElementImpl(String localName,
OMNamespace ns,
OMFactory factory) |
OMSourcedElementImpl(String localName,
OMNamespace ns,
OMFactory factory,
OMDataSource source)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
OMAttribute |
addAttribute(OMAttribute attr)
Inserts an attribute to this element.
|
OMAttribute |
addAttribute(String attributeName,
String value,
OMNamespace namespace)
Adds an attribute to this element.
|
void |
addChild(OMNode omNode)
Adds child to the element.
|
void |
build()
Parses this node and builds the object structure in memory.
|
void |
buildNext()
Forces the parser to proceed, if parser has not yet finished with the XML input.
|
void |
buildWithAttachments()
Parses this node and builds the object structure in memory.
|
OMElement |
cloneOMElement()
Clones this element.
|
OMNamespace |
declareDefaultNamespace(String uri)
We use "" to store the default namespace of this element.
|
OMNamespace |
declareNamespace(OMNamespace namespace)
Declares a namespace with the element as its scope.
|
OMNamespace |
declareNamespace(String uri,
String prefix)
Creates a namespace in the current element scope.
|
OMNode |
detach()
Removes this information item and its children, from the model completely.
|
void |
discard()
Method discard.
|
OMNamespace |
findNamespace(String uri,
String prefix)
Finds a namespace with the given uri and prefix, in the scope of the document.
|
OMNamespace |
findNamespaceURI(String prefix)
Checks for a namespace in the context of this element with the given prefix and returns the
relevant namespace object, if available.
|
Iterator |
getAllAttributes()
Returns a List of OMAttributes.
|
Iterator |
getAllDeclaredNamespaces()
Method getAllDeclaredNamespaces.
|
OMAttribute |
getAttribute(QName qname)
Returns a named attribute if present.
|
String |
getAttributeValue(QName qname)
Returns a named attribute's value, if present.
|
OMXMLParserWrapper |
getBuilder()
Method getBuilder.
|
Iterator |
getChildElements()
Returns a filtered list of children - just the elements.
|
Iterator |
getChildren()
Returns a collection of this element.
|
Iterator |
getChildrenWithLocalName(String localName)
Returns an iterator for child nodes matching the local name.
|
Iterator |
getChildrenWithName(QName elementQName)
Searches for children with a given QName and returns an iterator to traverse through the
OMNodes.
|
Iterator |
getChildrenWithNamespaceURI(String uri)
Returns an iterator for child nodes matching the namespace uri.
|
OMDataSource |
getDataSource()
Provide access to the data source encapsulated in OMSourcedElement.
|
OMNamespace |
getDefaultNamespace()
This will retrieve the default namespace of this element, if available. null returned if none
is found.
|
OMElement |
getFirstChildWithName(QName elementQName)
Method getFirstChildWithName.
|
OMElement |
getFirstElement()
Gets first element.
|
OMNode |
getFirstOMChild()
Method getFirstOMChild.
|
OMNode |
getFirstOMChildIfAvailable()
Get the first child if it is available.
|
int |
getLineNumber() |
String |
getLocalName()
Method getLocalName.
|
OMNamespace |
getNamespace()
Get the namespace this element is part of.
|
String |
getNamespaceURI()
Get the namespace URI of the element.
|
OMNode |
getNextOMSibling()
Gets the next sibling.
|
OMNode |
getNextOMSiblingIfAvailable()
Get the next sibling if it is available.
|
QName |
getQName()
Method getQName.
|
String |
getText()
Selects all the text children and concatenates them to a single string.
|
QName |
getTextAsQName()
OMText can contain its information as a QName as well.
|
String |
getTrimmedText()
Returns the concatination string of TRIMMED values of all OMText child nodes of this
element.
|
int |
getType()
Gets the type of node, as this is the super class of all the nodes.
|
XMLStreamReader |
getXMLStreamReader()
Get a pull parser representation of this element with caching enabled.
|
XMLStreamReader |
getXMLStreamReader(boolean cache)
Get a pull parser representation of this element.
|
XMLStreamReader |
getXMLStreamReaderWithoutCaching()
Get a pull parser representation of this element with caching disabled.
|
void |
internalSerialize(XMLStreamWriter writer,
boolean cache)
Serializes the node.
|
boolean |
isComplete()
Indicates whether parser has parsed this information item completely or not.
|
boolean |
isExpanded()
Check if element has been expanded into tree.
|
protected void |
notifyChildComplete()
This method will be called when one of the children becomes complete.
|
void |
removeAttribute(OMAttribute attr)
Method removeAttribute.
|
QName |
resolveQName(String qname)
Resolves a QName literal in the namespace context defined by this element and produces a
corresponding
QName object. |
void |
serialize(OutputStream output)
Serializes the node with caching.
|
void |
serialize(OutputStream output,
OMOutputFormat format)
Serializes the node with caching.
|
void |
serialize(Writer writer)
Serializes the node with caching.
|
void |
serialize(Writer writer,
OMOutputFormat format)
Serializes the node with caching.
|
void |
serialize(XMLStreamWriter xmlWriter)
Serializes the information item with caching.
|
void |
serializeAndConsume(OutputStream output)
Serializes the node without caching.
|
void |
serializeAndConsume(OutputStream output,
OMOutputFormat format)
Serializes the node without caching.
|
void |
serializeAndConsume(Writer writer)
Serializes the node without caching.
|
void |
serializeAndConsume(Writer writer,
OMOutputFormat format)
Serializes the node without caching.
|
void |
serializeAndConsume(XMLStreamWriter xmlWriter)
Serializes the information item without caching.
|
void |
setBuilder(OMXMLParserWrapper wrapper)
Method setBuilder.
|
void |
setComplete(boolean value)
setComplete override The OMSourcedElement has its own isolated builder/reader during the
expansion process.
|
OMDataSource |
setDataSource(OMDataSource dataSource)
setOMDataSource
|
void |
setFirstChild(OMNode node)
Method setFirstChild.
|
void |
setLastChild(OMNode omNode)
forcefully set the last element in this parent element
|
void |
setLineNumber(int lineNumber) |
void |
setLocalName(String localName)
Method setLocalName.
|
void |
setNamespace(OMNamespace namespace)
Method setNamespace.
|
void |
setNamespaceWithNoFindInCurrentScope(OMNamespace namespace)
This will not search the namespace in the scope nor will declare in the current element, as
in setNamespace(OMNamespace).
|
void |
setText(QName text)
Sets the text, as a QName, of the given element. caution - This method will wipe out all the
text elements (and hence any mixed content) before setting the text.
|
void |
setText(String text)
Sets the text of the given element. caution - This method will wipe out all the text elements
(and hence any mixed content) before setting the text.
|
String |
toString()
This is a convenience method only.
|
String |
toStringWithConsume()
This is a convenience method only.
|
getParent, getPreviousOMSibling, importNode, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, setNextOMSibling, setParent, setPreviousOMSibling, setTypeclose, getOMFactory, serializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBeforeclose, getOMFactory, serializepublic OMSourcedElementImpl(String localName, OMNamespace ns, OMFactory factory, OMDataSource source)
localName - ns - factory - source - public OMSourcedElementImpl(QName qName, OMFactory factory, OMDataSource source)
qName - factory - source - public OMSourcedElementImpl(String localName, OMNamespace ns, OMContainer parent, OMFactory factory)
public OMSourcedElementImpl(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory)
public OMSourcedElementImpl(String localName, OMNamespace ns, OMFactory factory)
public boolean isExpanded()
isExpanded in interface OMSourcedElementtrue if expanded, false if notpublic Iterator getChildElements()
OMElementImplgetChildElements in interface OMElementgetChildElements in class OMElementImplOMContainer.getChildren(),
OMContainer.getChildrenWithName(javax.xml.namespace.QName)public OMNamespace declareNamespace(String uri, String prefix)
OMElementImpldeclareNamespace in interface OMElementdeclareNamespace in class OMElementImpluri - The namespace to declare in the current scope. The caller is expected to
ensure that the URI is a valid namespace name.prefix - The prefix to associate with the given namespace. The caller is expected to
ensure that this is a valid XML prefix. If "" is given, first this will check
for an existing namespace with the same uri. If not found, a prefix will be
auto-generated.OMElement.declareNamespace(OMNamespace),
OMElement.findNamespace(String, String),
OMElement.getAllDeclaredNamespaces()public OMNamespace declareDefaultNamespace(String uri)
OMElementImpldeclareDefaultNamespace in interface OMElementdeclareDefaultNamespace in class OMElementImplpublic OMNamespace getDefaultNamespace()
OMElementgetDefaultNamespace in interface OMElementgetDefaultNamespace in class OMElementImplpublic OMNamespace declareNamespace(OMNamespace namespace)
OMElementdeclareNamespace in interface OMElementdeclareNamespace in class OMElementImplnamespace - The namespace to declare.OMElement.declareNamespace(String, String),
OMElement.findNamespace(String, String),
OMElement.getAllDeclaredNamespaces()public OMNamespace findNamespace(String uri, String prefix)
OMElementImplfindNamespace in interface OMElementfindNamespace in class OMElementImpluri - The namespace to look for. If this is specified, prefix should be
null.prefix - The prefix to look for. If this is specified, uri should be null.OMElement.declareNamespace(String, String),
OMElement.declareNamespace(OMNamespace),
OMElement.getAllDeclaredNamespaces()public OMNamespace findNamespaceURI(String prefix)
OMElementfindNamespaceURI in interface OMElementfindNamespaceURI in class OMElementImplpublic Iterator getAllDeclaredNamespaces() throws OMException
OMElementImplgetAllDeclaredNamespaces in interface OMElementgetAllDeclaredNamespaces in class OMElementImplOMExceptionOMElement.findNamespace(String, String),
OMElement.declareNamespace(String, String),
OMElement.declareNamespace(OMNamespace)public Iterator getAllAttributes()
OMElementImplgetAllAttributes in interface OMElementgetAllAttributes in class OMElementImplOMElement.getAttribute(javax.xml.namespace.QName),
OMElement.addAttribute(OMAttribute),
OMElement.addAttribute(String, String, OMNamespace)public OMAttribute getAttribute(QName qname)
OMElementImplgetAttribute in interface OMElementgetAttribute in class OMElementImplqname - the qualified name to search forpublic String getAttributeValue(QName qname)
OMElementImplgetAttributeValue in interface OMElementgetAttributeValue in class OMElementImplqname - the qualified name to search forpublic OMAttribute addAttribute(OMAttribute attr)
OMElementImplThe owner of the attribute is set to be the particular OMElement.
If the attribute already has an owner then the attribute is cloned (i.e. its name,
value and namespace are copied to a new attribute) and the new attribute is added
to the element. It's owner is then set to be the particular OMElement.
addAttribute in interface OMElementaddAttribute in class OMElementImplattr - The attribute to add.OMAttributeImpl.equals(Object)public OMAttribute addAttribute(String attributeName, String value, OMNamespace namespace)
OMElement
If the element already has an attribute with the same local name and namespace URI, then this
existing attribute will be removed from the element, i.e. this method will always create a
new OMAttribute instance and never update an existing one.
addAttribute in interface OMElementaddAttribute in class OMElementImplattributeName - The local name for the attribute.value - The string value of the attribute. This function does not check to make sure that
the given attribute value can be serialized directly as an XML value. The caller
may, for example, pass a string with the character 0x01.namespace - The namespace has to be one of the in scope namespace. i.e. the passed namespace
must be declared in the parent element of this attribute or ancestors of the
parent element of the attribute.public void removeAttribute(OMAttribute attr)
OMElementImplremoveAttribute in interface OMElementremoveAttribute in class OMElementImplpublic void setBuilder(OMXMLParserWrapper wrapper)
OMElementImplsetBuilder in interface OMElementsetBuilder in class OMElementImplpublic OMXMLParserWrapper getBuilder()
OMElementImplgetBuilder in interface OMContainergetBuilder in class OMElementImplpublic void setFirstChild(OMNode node)
OMElementImplsetFirstChild in interface OMContainerExsetFirstChild in interface OMElementsetFirstChild in class OMElementImplpublic void setLastChild(OMNode omNode)
OMContainerExsetLastChild in interface OMContainerExsetLastChild in class OMElementImplpublic OMElement getFirstElement()
OMElementImplgetFirstElement in interface OMElementgetFirstElement in class OMElementImplpublic XMLStreamReader getXMLStreamReader(boolean cache)
OMContainerXMLStreamReader instance that produces a sequence of StAX events for this element and
its content. The sequence of events is independent of the state of this element and the value
of the cache parameter, but the side effects of calling this method and
consuming the reader are different:
| State | cache |
Side effects |
|---|---|---|
| The element is fully built (or was created programmatically). | true |
No side effects. The reader will synthesize StAX events from the object model. |
false |
||
| The element is partially built, i.e. deferred parsing is taking place. | true |
When a StAX event is requested from the reader, it will built the information item (if necessary) and synthesize the StAX event. If the caller completely consumes the reader, the element will be completely built. Otherwise it will be partially built. |
false |
The reader will delegate to the underlying parser starting from the event corresponding to the last information item that has been built. In other words, after synthesizing a number of events, the reader will switch to delegation mode. An attempt to access the object model afterwards will result in an error. |
To free any resources associated with the returned reader, the caller MUST invoke the
XMLStreamReader.close() method.
The returned reader MAY implement the extension defined by
DataHandlerReader and any binary content will
be reported using this extension. More precisely, if the object model contains an
OMText instance with OMText.isBinary() returning true (or
would contain such an instance after it has been fully built), then its data will always be
exposed through this extension.
The caller MUST NOT make any other assumption about the returned reader, in particular about its runtime type.
Note (non normative): For various reasons, existing code based on Axiom versions prior to 1.2.9 makes assumptions on the returned reader that should no longer be considered valid:
OMStAXWrapper. While it is true that Axiom internally uses
this class to synthesize StAX events, it may wrap this instance in another reader
implementation. E.g. depending on the log level, the reader will be wrapped using
OMXMLStreamReaderValidator. This was already the case in
Axiom versions prior to 1.2.9. It should also be noted that instances of
OMSourcedElement (which extends the present interface) may return a reader that is
not implemented using OMStAXWrapper.OMXMLStreamReader interface of the returned reader to switch
off MTOM inlining using OMXMLStreamReader.setInlineMTOM(boolean). This has now been
deprecated and it is recommended to use
XOPEncodingStreamReader instead.OMAttachmentAccessor interface of the returned
reader to fetch attachments using OMAttachmentAccessor.getDataHandler(String). There
is no reason anymore to do so:OMXMLStreamReader.setInlineMTOM(boolean) is used to disable MTOM inlining,
OMAttachmentAccessor.getDataHandler(String) must be used to retrieve the binary
content. The fact that this method is deprecated removes the need for this.OMAttachmentAccessor.getDataHandler(String) to retrieve the binary content. Starting
with 1.2.9 this is no longer be the case: as specified above, the sequence of events is
independent of the state of the object model and the value of the cache
parameter, and all binary content is reported through the
DataHandlerReader extension.OMAttachmentAccessor.getDataHandler(String)
doesn't give access to the attachments in the SwA case (neither in 1.2.9 nor in previous
versions).
Code making any of these assumptions should be fixed, so that only XMLStreamReader
and DataHandlerReader are used (and if
necessary, XOPEncodingStreamReader).
getXMLStreamReader in interface OMContainergetXMLStreamReader in class OMElementImplcache - indicates if caching should be enabledXMLStreamReader representation of this elementpublic XMLStreamReader getXMLStreamReader()
OMContainerOMContainer.getXMLStreamReader(boolean) with cache set to
true.getXMLStreamReader in interface OMContainergetXMLStreamReader in class OMElementImplXMLStreamReader representation of this elementpublic XMLStreamReader getXMLStreamReaderWithoutCaching()
OMContainerOMContainer.getXMLStreamReader(boolean) with cache set to
false.getXMLStreamReaderWithoutCaching in interface OMContainergetXMLStreamReaderWithoutCaching in class OMElementImplXMLStreamReader representation of this elementpublic void setText(String text)
OMElementImplsetText in interface OMElementsetText in class OMElementImplpublic void setText(QName text)
OMElementImplsetText in interface OMElementsetText in class OMElementImpltext - the QName valuepublic String getText()
OMElementImplgetText in interface OMElementgetText in class OMElementImplpublic QName getTextAsQName()
OMElementgetTextAsQName in interface OMElementgetTextAsQName in class OMElementImplpublic String getLocalName()
OMElementImplgetLocalName in interface OMElementgetLocalName in class OMElementImplpublic void setLocalName(String localName)
OMElementImplsetLocalName in interface OMElementsetLocalName in class OMElementImplpublic OMNamespace getNamespace() throws OMException
OMElementgetNamespace in interface OMElementgetNamespace in class OMElementImplnull if the element has no namespaceOMExceptionpublic String getNamespaceURI()
OMElementNode.getNamespaceURI() (when called on an
Element).getNamespaceURI in interface OMElementgetNamespaceURI in class OMElementImplnull if the element has no namespacepublic void setNamespace(OMNamespace namespace)
OMElementImplsetNamespace in interface OMElementsetNamespace in class OMElementImplpublic void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace)
OMElementsetNamespaceWithNoFindInCurrentScope in interface OMElementsetNamespaceWithNoFindInCurrentScope in class OMElementImplpublic QName getQName()
OMElementImplgetQName in interface OMElementgetQName in class OMElementImplpublic String toStringWithConsume() throws XMLStreamException
OMElementtoStringWithConsume in interface OMElementtoStringWithConsume in class OMElementImplXMLStreamExceptionpublic QName resolveQName(String qname)
OMElementQName object. The implementation uses the algorithm defined by the XML
Schema specification. In particular, the namespace for an unprefixed QName is the default
namespace (not the null namespace), i.e. QNames are resolved in the same way as element
names.resolveQName in interface OMElementresolveQName in class OMElementImplqname - the QName literal to resolveQName object, or null if the QName can't be resolved, i.e.
if the prefix is not bound in the namespace context of this elementpublic OMElement cloneOMElement()
OMElementcloneOMElement in interface OMElementcloneOMElement in class OMElementImplpublic void setLineNumber(int lineNumber)
setLineNumber in interface OMElementsetLineNumber in class OMElementImplpublic int getLineNumber()
getLineNumber in interface OMElementgetLineNumber in class OMElementImplpublic void discard()
throws OMException
OMElementImpldiscard in interface OMNodediscard in class OMElementImplOMExceptionpublic int getType()
OMElementImplgetType in interface OMNodegetType in class OMElementImplOMNodeImpl.setType(int)OMNodeImpl.setType(int)public void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
OMSerializableImplinternalSerialize in interface OMNodeExinternalSerialize in class OMElementImplcache - indicates if caching should be enabledXMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
true.serialize in interface OMSerializableserialize in class OMSerializableImplXMLStreamExceptionpublic void serialize(OutputStream output) throws XMLStreamException
OMElementserialize in interface OMContainerserialize in interface OMElementserialize in interface OMNodeserialize in class OMSerializableImplXMLStreamExceptionpublic void serialize(Writer writer) throws XMLStreamException
OMElementserialize in interface OMContainerserialize in interface OMElementserialize in interface OMNodeserialize in class OMSerializableImplXMLStreamExceptionpublic void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
OMElementserialize in interface OMContainerserialize in interface OMElementserialize in interface OMNodeserialize in class OMSerializableImplXMLStreamExceptionpublic void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException
OMElementserialize in interface OMContainerserialize in interface OMElementserialize in interface OMNodeserialize in class OMSerializableImplXMLStreamExceptionpublic void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
false.serializeAndConsume in interface OMSerializableserializeAndConsume in class OMSerializableImplXMLStreamExceptionpublic void serializeAndConsume(OutputStream output) throws XMLStreamException
OMElementserializeAndConsume in interface OMContainerserializeAndConsume in interface OMElementserializeAndConsume in interface OMNodeserializeAndConsume in class OMSerializableImplXMLStreamExceptionpublic void serializeAndConsume(Writer writer) throws XMLStreamException
OMElementserializeAndConsume in interface OMContainerserializeAndConsume in interface OMElementserializeAndConsume in interface OMNodeserializeAndConsume in class OMSerializableImplXMLStreamExceptionpublic void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException
OMElementserializeAndConsume in interface OMContainerserializeAndConsume in interface OMElementserializeAndConsume in interface OMNodeserializeAndConsume in class OMSerializableImplXMLStreamExceptionpublic void serializeAndConsume(Writer writer, OMOutputFormat format) throws XMLStreamException
OMElementserializeAndConsume in interface OMContainerserializeAndConsume in interface OMElementserializeAndConsume in interface OMNodeserializeAndConsume in class OMSerializableImplXMLStreamExceptionpublic void addChild(OMNode omNode)
OMElementImpladdChild in interface OMContaineraddChild in class OMElementImplpublic Iterator getChildrenWithName(QName elementQName)
OMElementImplgetChildrenWithName in interface OMContainergetChildrenWithName in class OMElementImplelementQName - The QName specifying namespace and local name to match.OMElement items that match the given QNamepublic Iterator getChildrenWithLocalName(String localName)
OMContainergetChildrenWithLocalName in interface OMContainergetChildrenWithLocalName in class OMElementImplOMElement items that match the given localNamepublic Iterator getChildrenWithNamespaceURI(String uri)
OMContainergetChildrenWithNamespaceURI in interface OMContainergetChildrenWithNamespaceURI in class OMElementImplOMElement items that match the given uripublic OMElement getFirstChildWithName(QName elementQName) throws OMException
OMElementImplgetFirstChildWithName in interface OMContainergetFirstChildWithName in class OMElementImplelementQName - The QName to use for matching.qname
criteria, or null if none is found.OMException - If an error occurs during deferred parsing.OMContainer.getChildrenWithName(QName)public Iterator getChildren()
OMElementImplgetChildren in interface OMContainergetChildren in class OMElementImplOMContainer.getFirstChildWithName(javax.xml.namespace.QName),
OMContainer.getChildrenWithName(javax.xml.namespace.QName)public OMNode getFirstOMChild()
OMElementImplgetFirstOMChild in interface OMContainergetFirstOMChild in class OMElementImplpublic OMNode getFirstOMChildIfAvailable()
OMContainerExOMSerializable.isComplete() may return false when called on the child.
In contrast to OMContainer.getFirstOMChild(), this method will never modify
the state of the underlying parser.getFirstOMChildIfAvailable in interface OMContainerExgetFirstOMChildIfAvailable in class OMElementImplnull if the container has no children or
the builder has not yet started to build the first childpublic void buildNext()
OMElementImplbuildNext in interface OMContainerbuildNext in class OMElementImplpublic OMNode detach() throws OMException
OMElementImpldetach in interface OMNodedetach in class OMElementImplOMException - If a node is not complete, the detach can trigger further parsing, which may
cause an exception.public OMNode getNextOMSibling() throws OMException
OMElementImplgetNextOMSibling in interface OMNodegetNextOMSibling in class OMElementImplOMExceptionpublic OMNode getNextOMSiblingIfAvailable()
OMNodeExOMSerializable.isComplete() may return false when called on the sibling.
In contrast to OMNode.getNextOMSibling(), this method will never modify
the state of the underlying parser.getNextOMSiblingIfAvailable in interface OMNodeExgetNextOMSiblingIfAvailable in class OMNodeImplnull if the node has no next sibling or
the builder has not yet started to build the next siblingpublic String getTrimmedText()
OMElementImplgetTrimmedText in class OMElementImplpublic boolean isComplete()
OMSerializableisComplete in interface OMSerializableisComplete in class OMSerializableImplpublic String toString()
OMElementtoString in interface OMElementtoString in class OMElementImplpublic void buildWithAttachments()
OMNodeImplbuildWithAttachments in interface OMNodebuildWithAttachments in class OMElementImplpublic void build()
throws OMException
OMSerializableImplbuild in interface OMSerializablebuild in class OMElementImplOMExceptionprotected void notifyChildComplete()
OMElementImplnotifyChildComplete in class OMElementImplpublic OMDataSource getDataSource()
getDataSource in interface OMSourcedElementpublic OMDataSource setDataSource(OMDataSource dataSource)
setDataSource in interface OMSourcedElementdataSource - new OMDataSourcepublic void setComplete(boolean value)
setComplete in interface OMContainerExsetComplete in interface OMNodeExsetComplete in class OMNodeImplCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.