public class OMElementImpl extends OMNodeImpl implements org.apache.axiom.om.impl.common.AxiomElement, org.apache.axiom.om.OMConstants
| Modifier and Type | Field and Description |
|---|---|
protected HashMap |
attributes
Field attributes
|
protected HashMap |
namespaces
Field namespaces
|
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODECOMPLETE, DISCARDED, INCOMPLETEARRAY_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 |
|---|
OMElementImpl(org.apache.axiom.om.OMContainer parent,
String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory,
boolean generateNSDecl) |
OMElementImpl(QName qname,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory)
It is assumed that the QName passed contains, at least, the localName for this element.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.axiom.om.OMAttribute |
addAttribute(org.apache.axiom.om.OMAttribute attr)
Inserts an attribute to this element.
|
org.apache.axiom.om.OMAttribute |
addAttribute(String localName,
String value,
org.apache.axiom.om.OMNamespace ns) |
void |
addNamespaceDeclaration(org.apache.axiom.om.OMNamespace ns) |
org.apache.axiom.om.OMNamespace |
addNamespaceDeclaration(String uri,
String prefix) |
void |
build() |
void |
buildWithAttachments() |
void |
checkChild(org.apache.axiom.om.OMNode child) |
org.apache.axiom.om.OMElement |
cloneOMElement() |
protected org.apache.axiom.om.OMElement |
createClone(org.apache.axiom.om.OMCloneOptions options,
org.apache.axiom.om.OMContainer targetParent) |
org.apache.axiom.om.OMNamespace |
declareDefaultNamespace(String uri) |
org.apache.axiom.om.OMNamespace |
declareNamespace(org.apache.axiom.om.OMNamespace namespace) |
org.apache.axiom.om.OMNamespace |
declareNamespace(String uri,
String prefix) |
org.apache.axiom.om.OMNamespace |
findNamespace(String uri,
String prefix)
Finds a namespace with the given uri and prefix, in the scope of the document.
|
org.apache.axiom.om.OMNamespace |
findNamespaceURI(String prefix) |
Iterator |
getAllAttributes()
Returns a List of OMAttributes.
|
Iterator |
getAllDeclaredNamespaces()
Method getAllDeclaredNamespaces.
|
org.apache.axiom.om.OMAttribute |
getAttribute(QName qname)
Returns a named attribute if present.
|
String |
getAttributeValue(QName qname)
Returns a named attribute's value, if present.
|
org.apache.axiom.om.OMNamespace |
getDefaultNamespace() |
int |
getLineNumber() |
String |
getNamespaceURI() |
void |
internalSerialize(org.apache.axiom.om.impl.common.serializer.push.Serializer serializer,
org.apache.axiom.om.OMOutputFormat format,
boolean cache) |
void |
removeAttribute(org.apache.axiom.om.OMAttribute attr) |
void |
setComplete(boolean complete) |
void |
setLineNumber(int lineNumber) |
void |
setNamespace(org.apache.axiom.om.OMNamespace namespace) |
String |
toString() |
String |
toStringWithConsume() |
void |
undeclarePrefix(String prefix) |
clone, coreSetParentgetOMFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdetachAndDiscardParent, discard, getChildElements, getFirstElement, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, getType, handleNamespace, insertChild, resolveQName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, writeTextToserialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumegetLocalName, getNamespace, getPrefix, getQName, hasName, setLocalNameaddChild, addChild, defaultBuild, discarded, getFirstChildWithName, getFirstOMChild, getFirstOMChildIfAvailable, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, isComplete, prepareNewChild, removeChildren, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumegetBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendantsdetach, getNextOMSibling, getNextOMSiblingIfAvailable, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBeforeclose, getBuilder, serialize, serialize, serializeAndConsumecoreGetNodeFactorygetLocalName, getNamespace, getPrefix, getQName, handleNamespace, hasName, internalGetLocalName, internalSetLocalName, internalSetNamespace, setLocalNamecoreDetach, coreGetNextSibling, coreGetNextSiblingIfAvailable, coreGetParent, coreGetPreviousSibling, coreHasParent, coreInsertSiblingAfter, coreInsertSiblingBefore, coreInsertSiblingsBefore, coreSetNextSibling, coreSetOwnerDocument, coreSetPreviousSibling, internalSetParent, internalUnsetParentprotected HashMap namespaces
protected HashMap attributes
public OMElementImpl(org.apache.axiom.om.OMContainer parent,
String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory,
boolean generateNSDecl)
public OMElementImpl(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory) throws org.apache.axiom.om.OMException
qname - - this should be valid qname according to javax.xml.namespace.QNameorg.apache.axiom.om.OMExceptionpublic void checkChild(org.apache.axiom.om.OMNode child)
checkChild in interface org.apache.axiom.om.impl.common.AxiomContainerpublic org.apache.axiom.om.OMNamespace declareNamespace(String uri, String prefix)
declareNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace declareDefaultNamespace(String uri)
declareDefaultNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace getDefaultNamespace()
getDefaultNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace addNamespaceDeclaration(String uri, String prefix)
addNamespaceDeclaration in interface org.apache.axiom.om.impl.OMElementExpublic void addNamespaceDeclaration(org.apache.axiom.om.OMNamespace ns)
addNamespaceDeclaration in interface org.apache.axiom.om.impl.common.AxiomElementpublic org.apache.axiom.om.OMNamespace declareNamespace(org.apache.axiom.om.OMNamespace namespace)
declareNamespace in interface org.apache.axiom.om.OMElementpublic void undeclarePrefix(String prefix)
undeclarePrefix in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace findNamespace(String uri, String prefix)
findNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace findNamespaceURI(String prefix)
findNamespaceURI in interface org.apache.axiom.om.OMElementpublic Iterator getAllDeclaredNamespaces()
getAllDeclaredNamespaces in interface org.apache.axiom.om.OMElementpublic Iterator getAllAttributes()
getAllAttributes in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMAttribute getAttribute(QName qname)
getAttribute in interface org.apache.axiom.om.OMElementqname - the qualified name to search forpublic String getAttributeValue(QName qname)
getAttributeValue in interface org.apache.axiom.om.OMElementqname - the qualified name to search forpublic org.apache.axiom.om.OMAttribute addAttribute(org.apache.axiom.om.OMAttribute attr)
The 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 org.apache.axiom.om.OMElementOMAttributeImpl.equals(Object)public void removeAttribute(org.apache.axiom.om.OMAttribute attr)
removeAttribute in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMAttribute addAttribute(String localName, String value, org.apache.axiom.om.OMNamespace ns)
addAttribute in interface org.apache.axiom.om.OMElementpublic void build()
throws org.apache.axiom.om.OMException
build in interface org.apache.axiom.core.CoreParentNodebuild in interface org.apache.axiom.om.OMSerializableorg.apache.axiom.om.OMExceptionpublic void setComplete(boolean complete)
setComplete in interface org.apache.axiom.om.impl.common.AxiomSerializablesetComplete in interface org.apache.axiom.om.impl.OMContainerExsetComplete in interface org.apache.axiom.om.impl.OMNodeExpublic void internalSerialize(org.apache.axiom.om.impl.common.serializer.push.Serializer serializer,
org.apache.axiom.om.OMOutputFormat format,
boolean cache)
throws org.apache.axiom.om.impl.common.serializer.push.OutputException
internalSerialize in interface org.apache.axiom.om.impl.common.AxiomSerializableorg.apache.axiom.om.impl.common.serializer.push.OutputExceptionpublic String getNamespaceURI()
getNamespaceURI in interface org.apache.axiom.om.OMNamedInformationItempublic void setNamespace(org.apache.axiom.om.OMNamespace namespace)
setNamespace in interface org.apache.axiom.om.OMElementpublic String toStringWithConsume() throws javax.xml.stream.XMLStreamException
toStringWithConsume in interface org.apache.axiom.om.OMElementjavax.xml.stream.XMLStreamExceptionpublic String toString()
public org.apache.axiom.om.OMElement cloneOMElement()
cloneOMElement in interface org.apache.axiom.om.OMElementprotected org.apache.axiom.om.OMElement createClone(org.apache.axiom.om.OMCloneOptions options,
org.apache.axiom.om.OMContainer targetParent)
public void setLineNumber(int lineNumber)
setLineNumber in interface org.apache.axiom.om.OMElementpublic int getLineNumber()
getLineNumber in interface org.apache.axiom.om.OMElementpublic void buildWithAttachments()
buildWithAttachments in interface org.apache.axiom.om.impl.common.AxiomChildNodebuildWithAttachments in interface org.apache.axiom.om.OMNodeCopyright ? The Apache Software Foundation. All Rights Reserved.