|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.om.impl.dom.NodeImpl
org.apache.axis2.om.impl.dom.ChildNode
org.apache.axis2.om.impl.dom.ParentNode
org.apache.axis2.om.impl.dom.ElementImpl
Implementation of the org.w3c.dom.Element and org.apache.ws.commons.om.Element interfaces.
Field Summary | |
protected String |
localName
|
protected org.apache.ws.commons.om.OMNamespace |
namespace
|
Fields inherited from class org.apache.axis2.om.impl.dom.ParentNode |
firstChild, lastChild |
Fields inherited from class org.apache.axis2.om.impl.dom.ChildNode |
nextSibling, parentNode, previousSibling |
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl |
builder, done, factory, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface org.apache.ws.commons.om.OMNode |
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE |
Fields inherited from interface org.apache.ws.commons.om.OMConstants |
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DEFAULT_CHAR_SET_ENCODING, DEFAULT_XML_VERSION, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI |
Constructor Summary | |
ElementImpl(DocumentImpl ownerDocument,
String tagName,
NamespaceImpl ns,
org.apache.ws.commons.om.OMFactory factory)
Creates a new element with the namespace. |
|
ElementImpl(DocumentImpl ownerDocument,
String tagName,
NamespaceImpl ns,
org.apache.ws.commons.om.OMXMLParserWrapper builder,
org.apache.ws.commons.om.OMFactory factory)
|
|
ElementImpl(DocumentImpl ownerDocument,
String tagName,
org.apache.ws.commons.om.OMFactory factory)
|
|
ElementImpl(org.apache.ws.commons.om.OMFactory factory)
|
|
ElementImpl(ParentNode parentNode,
String tagName,
NamespaceImpl ns,
org.apache.ws.commons.om.OMFactory factory)
|
|
ElementImpl(ParentNode parentNode,
String tagName,
NamespaceImpl ns,
org.apache.ws.commons.om.OMXMLParserWrapper builder,
org.apache.ws.commons.om.OMFactory factory)
|
|
ElementImpl(String tagName,
NamespaceImpl ns,
org.apache.ws.commons.om.OMXMLParserWrapper builder,
org.apache.ws.commons.om.OMFactory factory)
|
Method Summary | |
org.apache.ws.commons.om.OMAttribute |
addAttribute(org.apache.ws.commons.om.OMAttribute attr)
|
org.apache.ws.commons.om.OMAttribute |
addAttribute(String attributeName,
String value,
org.apache.ws.commons.om.OMNamespace ns)
The behaviour of this is the same as org.w3c.dom.Element#setAttributeNS |
Node |
cloneNode(boolean deep)
|
org.apache.ws.commons.om.OMElement |
cloneOMElement()
Creates a clone which belongs to a new document. |
org.apache.ws.commons.om.OMNamespace |
declareNamespace(org.apache.ws.commons.om.OMNamespace namespace)
Allows overriding an existing declaration if the same prefix was used. |
org.apache.ws.commons.om.OMNamespace |
declareNamespace(String uri,
String prefix)
Allows overriding an existing declaration if the same prefix was used. |
void |
discard()
|
org.apache.ws.commons.om.OMNamespace |
findNamespace(String uri,
String prefix)
|
org.apache.ws.commons.om.OMNamespace |
findNamespaceURI(String prefix)
|
Iterator |
getAllAttributes()
|
Iterator |
getAllDeclaredNamespaces()
|
org.apache.ws.commons.om.OMAttribute |
getAttribute(QName qname)
Returns a named attribute if present. |
String |
getAttribute(String name)
Looks in the local list of attributes and returns if found. |
Attr |
getAttributeNode(String name)
Retrieves an attribute node by name. |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
Retrieves an attribute node by local name and namespace URI. |
String |
getAttributeNS(String namespaceURI,
String localName)
Retrieves an attribute value by local name and namespace URI. |
NamedNodeMap |
getAttributes()
Returns the set of attributes of this node and the namespace declarations available. |
String |
getAttributeValue(QName qname)
Returns a named attribute's value, if present. |
org.apache.ws.commons.om.OMXMLParserWrapper |
getBuilder()
|
Iterator |
getChildElements()
|
NodeList |
getElementsByTagName(String name)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
org.apache.ws.commons.om.OMElement |
getFirstElement()
Returns the first Element node. |
int |
getLineNumber()
|
String |
getLocalName()
Returns the local name of this element node |
org.apache.ws.commons.om.OMNamespace |
getNamespace()
Returns the namespace of this element. |
String |
getNamespaceURI()
Returns the value of the namespace URI. |
String |
getNamespaceURI(String prefix)
Returns the namespace uri, given the prefix. |
org.apache.ws.commons.om.OMNode |
getNextOMSibling()
Default behavior returns null, overriden in ChildNode. |
String |
getNodeName()
|
short |
getNodeType()
|
String |
getPrefix()
Returns the namespace prefix of this element node |
QName |
getQName()
Returns the QName of this element. |
TypeInfo |
getSchemaTypeInfo()
|
String |
getTagName()
|
String |
getText()
Gets all the text children and concatinates them to a single string. |
int |
getType()
|
XMLStreamReader |
getXMLStreamReader()
|
XMLStreamReader |
getXMLStreamReaderWithoutCaching()
|
boolean |
hasAttribute(String name)
|
boolean |
hasAttributeNS(String namespaceURI,
String localName)
Returns whether the given attribute is available or not. |
boolean |
hasAttributes()
Returns whether this element contains any attribute or not. |
void |
removeAttribute(org.apache.ws.commons.om.OMAttribute attr)
Removes an attribute from the element. |
void |
removeAttribute(String name)
Removes an attribute by name. |
Attr |
removeAttributeNode(Attr oldAttr)
Removes the specified attribute node. |
void |
removeAttributeNS(String namespaceURI,
String localName)
|
boolean |
removeNamespace(String prefix)
Removes a declared namespace given its prefix. |
QName |
resolveQName(String qname)
Turn a prefix:local qname string into a proper QName, evaluating it in the OMElement context unprefixed qnames resolve to the local namespace |
void |
serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
|
protected void |
serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput,
boolean cache)
|
void |
serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
|
void |
setAttribute(String name,
String value)
|
Attr |
setAttributeNode(Attr attr)
Adds a new attribute node. |
Attr |
setAttributeNodeNS(Attr attr)
|
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
Adds a new attribute. |
void |
setBuilder(org.apache.ws.commons.om.OMXMLParserWrapper wrapper)
Sets the OM builder. |
void |
setIdAttribute(String arg0,
boolean arg1)
|
void |
setIdAttributeNode(Attr arg0,
boolean arg1)
|
void |
setIdAttributeNS(String arg0,
String arg1,
boolean arg2)
|
void |
setLineNumber(int lineNumber)
|
void |
setLocalName(String localName)
Sets the local name. |
void |
setNamespace(org.apache.ws.commons.om.OMNamespace namespace)
Sets the namespace. |
protected void |
setOwnerDocument(DocumentImpl document)
Sets the owner document. |
void |
setText(String text)
Creates a text node with the given value and adds it to the element. |
void |
setType(int nodeType)
|
String |
toString()
Overridden toString() for ease of debugging. |
String |
toStringWithConsume()
|
Methods inherited from class org.apache.axis2.om.impl.dom.ParentNode |
addChild, buildNext, getChildNodes, getChildren, getChildrenWithName, getFirstChild, getFirstChildWithName, getFirstOMChild, getLastChild, hasChildNodes, insertBefore, removeChild, replaceChild, setFirstChild |
Methods inherited from class org.apache.axis2.om.impl.dom.ChildNode |
detach, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling |
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl |
appendChild, build, compareDocumentPosition, getBaseURI, getFeature, getLength, getNodeValue, getOMFactory, getOwnerDocument, getTextContent, getUserData, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNodeValue, setPrefix, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Methods inherited from interface org.apache.ws.commons.om.OMElement |
setFirstChild |
Methods inherited from interface org.apache.ws.commons.om.OMNode |
build, detach, getOMFactory, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from interface org.apache.ws.commons.om.OMContainer |
addChild, buildNext, getChildren, getChildrenWithName, getFirstChildWithName, getFirstOMChild, isComplete |
Methods inherited from interface org.apache.ws.commons.om.impl.OMContainerEx |
setComplete |
Field Detail |
protected org.apache.ws.commons.om.OMNamespace namespace
protected String localName
Constructor Detail |
public ElementImpl(DocumentImpl ownerDocument, String tagName, org.apache.ws.commons.om.OMFactory factory)
ownerDocument
- public ElementImpl(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, org.apache.ws.commons.om.OMFactory factory)
ownerDocument
- tagName
- ns
- public ElementImpl(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, org.apache.ws.commons.om.OMXMLParserWrapper builder, org.apache.ws.commons.om.OMFactory factory)
public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, org.apache.ws.commons.om.OMFactory factory)
public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, org.apache.ws.commons.om.OMXMLParserWrapper builder, org.apache.ws.commons.om.OMFactory factory)
public ElementImpl(String tagName, NamespaceImpl ns, org.apache.ws.commons.om.OMXMLParserWrapper builder, org.apache.ws.commons.om.OMFactory factory)
public ElementImpl(org.apache.ws.commons.om.OMFactory factory)
Method Detail |
public short getNodeType()
getNodeType
in interface Node
public String getNodeName()
getNodeName
in interface Node
public String getNamespaceURI()
getNamespaceURI
in interface Node
getNamespaceURI
in class NodeImpl
public int getType() throws org.apache.ws.commons.om.OMException
getType
in interface org.apache.ws.commons.om.OMNode
org.apache.ws.commons.om.OMException
public void setType(int nodeType) throws org.apache.ws.commons.om.OMException
setType
in interface org.apache.ws.commons.om.impl.OMNodeEx
org.apache.ws.commons.om.OMException
public String getTagName()
getTagName
in interface Element
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
name
- The name of the attribute to remove
DOMException
Element.removeAttribute(java.lang.String)
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS
in interface Element
DOMException
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode
in interface Element
DOMException
Element.removeAttributeNode(org.w3c.dom.Attr)
public boolean hasAttribute(String name)
hasAttribute
in interface Element
public boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS
in interface Element
Element.hasAttributeNS(java.lang.String,
java.lang.String)
public String getAttribute(String name)
getAttribute
in interface Element
Element.getAttribute(java.lang.String)
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
Element.getAttributeNode(java.lang.String)
public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface Element
Element.getAttributeNS(java.lang.String,
java.lang.String)
public Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface Element
Element.getAttributeNodeNS(java.lang.String,
java.lang.String)
public Attr setAttributeNode(Attr attr) throws DOMException
setAttributeNode
in interface Element
DOMException
Element.setAttributeNode(org.w3c.dom.Attr)
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr attr) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS
in interface Element
DOMException
Element.setAttributeNS(java.lang.String,
java.lang.String, java.lang.String)
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class NodeImpl
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Element
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Element
public org.apache.ws.commons.om.OMAttribute addAttribute(org.apache.ws.commons.om.OMAttribute attr)
addAttribute
in interface org.apache.ws.commons.om.OMElement
(org.apache.ws.commons.om.OMAttribute)
public org.apache.ws.commons.om.OMAttribute addAttribute(String attributeName, String value, org.apache.ws.commons.om.OMNamespace ns)
addAttribute
in interface org.apache.ws.commons.om.OMElement
OMElement.addAttribute(java.lang.String,
java.lang.String, org.apache.ws.commons.om.OMNamespace)
public org.apache.ws.commons.om.OMNamespace declareNamespace(org.apache.ws.commons.om.OMNamespace namespace)
declareNamespace
in interface org.apache.ws.commons.om.OMElement
(org.apache.ws.commons.om.OMNamespace)
public org.apache.ws.commons.om.OMNamespace declareNamespace(String uri, String prefix)
declareNamespace
in interface org.apache.ws.commons.om.OMElement
OMElement.declareNamespace(java.lang.String,
java.lang.String)
public org.apache.ws.commons.om.OMNamespace findNamespace(String uri, String prefix)
findNamespace
in interface org.apache.ws.commons.om.OMElement
OMElement.findNamespace(java.lang.String,
java.lang.String)
public org.apache.ws.commons.om.OMNamespace findNamespaceURI(String prefix)
findNamespaceURI
in interface org.apache.ws.commons.om.OMElement
public org.apache.ws.commons.om.OMAttribute getAttribute(QName qname)
getAttribute
in interface org.apache.ws.commons.om.OMElement
(javax.xml.namespace.QName)
public String getAttributeValue(QName qname)
getAttributeValue
in interface org.apache.ws.commons.om.OMElement
qname
- the qualified name to search for
public org.apache.ws.commons.om.OMXMLParserWrapper getBuilder()
getBuilder
in interface org.apache.ws.commons.om.OMElement
public org.apache.ws.commons.om.OMElement getFirstElement()
getFirstElement
in interface org.apache.ws.commons.om.OMElement
OMElement.getFirstElement()
public org.apache.ws.commons.om.OMNamespace getNamespace() throws org.apache.ws.commons.om.OMException
getNamespace
in interface org.apache.ws.commons.om.OMElement
org.apache.ws.commons.om.OMException
OMElement.getNamespace()
public QName getQName()
getQName
in interface org.apache.ws.commons.om.OMElement
OMElement.getQName()
public String getText()
getText
in interface org.apache.ws.commons.om.OMElement
OMElement.getText()
public void removeAttribute(org.apache.ws.commons.om.OMAttribute attr)
removeAttribute
in interface org.apache.ws.commons.om.OMElement
(org.apache.ws.commons.om.OMAttribute)
public void setBuilder(org.apache.ws.commons.om.OMXMLParserWrapper wrapper)
setBuilder
in interface org.apache.ws.commons.om.OMElement
(org.apache.ws.commons.om.OMXMLParserWrapper)
public void setLocalName(String localName)
setLocalName
in interface org.apache.ws.commons.om.OMElement
OMElement.setLocalName(java.lang.String)
public void setNamespace(org.apache.ws.commons.om.OMNamespace namespace)
setNamespace
in interface org.apache.ws.commons.om.OMElement
(org.apache.ws.commons.om.OMNamespace)
public void setText(String text)
setText
in interface org.apache.ws.commons.om.OMElement
OMElement.setText(java.lang.String)
public void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput) throws XMLStreamException
serialize
in interface org.apache.ws.commons.om.impl.OMNodeEx
XMLStreamException
public void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput) throws XMLStreamException
serializeAndConsume
in interface org.apache.ws.commons.om.impl.OMNodeEx
XMLStreamException
protected void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException
XMLStreamException
public XMLStreamReader getXMLStreamReaderWithoutCaching()
getXMLStreamReaderWithoutCaching
in interface org.apache.ws.commons.om.OMElement
public XMLStreamReader getXMLStreamReader()
getXMLStreamReader
in interface org.apache.ws.commons.om.OMElement
public String toStringWithConsume() throws XMLStreamException
toStringWithConsume
in interface org.apache.ws.commons.om.OMElement
XMLStreamException
public String toString()
toString
in interface org.apache.ws.commons.om.OMElement
Object.toString()
public Iterator getChildElements()
getChildElements
in interface org.apache.ws.commons.om.OMElement
public Iterator getAllDeclaredNamespaces() throws org.apache.ws.commons.om.OMException
getAllDeclaredNamespaces
in interface org.apache.ws.commons.om.OMElement
org.apache.ws.commons.om.OMException
OMElement.getAllDeclaredNamespaces()
public Iterator getAllAttributes()
getAllAttributes
in interface org.apache.ws.commons.om.OMElement
OMElement.getAllAttributes()
public String getLocalName()
getLocalName
in interface Node
getLocalName
in class NodeImpl
Node.getLocalName()
public String getPrefix()
getPrefix
in interface Node
getPrefix
in class NodeImpl
Node.getPrefix()
protected void setOwnerDocument(DocumentImpl document)
NodeImpl
setOwnerDocument
in class NodeImpl
document
- (org.apache.axis2.om.impl.dom.DocumentImpl)
public QName resolveQName(String qname)
resolveQName
in interface org.apache.ws.commons.om.OMElement
qname
- prefixed qname string to resolve
public org.apache.ws.commons.om.OMElement cloneOMElement()
cloneOMElement
in interface org.apache.ws.commons.om.OMElement
OMElement.cloneOMElement()
public void setLineNumber(int lineNumber)
setLineNumber
in interface org.apache.ws.commons.om.OMElement
public int getLineNumber()
getLineNumber
in interface org.apache.ws.commons.om.OMElement
public Node cloneNode(boolean deep)
cloneNode
in interface Node
cloneNode
in class ParentNode
public NamedNodeMap getAttributes()
getAttributes
in interface Node
getAttributes
in class NodeImpl
ElementImpl
public String getNamespaceURI(String prefix)
prefix
-
public boolean removeNamespace(String prefix)
prefix
-
public org.apache.ws.commons.om.OMNode getNextOMSibling() throws org.apache.ws.commons.om.OMException
NodeImpl
getNextOMSibling
in interface org.apache.ws.commons.om.OMNode
getNextOMSibling
in class ChildNode
org.apache.ws.commons.om.OMException
public void discard() throws org.apache.ws.commons.om.OMException
discard
in interface org.apache.ws.commons.om.OMNode
discard
in class ChildNode
org.apache.ws.commons.om.OMException
public TypeInfo getSchemaTypeInfo()
public void setIdAttribute(String arg0, boolean arg1) throws DOMException
DOMException
public void setIdAttributeNode(Attr arg0, boolean arg1) throws DOMException
DOMException
public void setIdAttributeNS(String arg0, String arg1, boolean arg2) throws DOMException
DOMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |