|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.axiom.om.impl.llom.OMNodeImpl
org.apache.axiom.om.impl.llom.OMElementImpl
Class OMElementImpl
| Field Summary | |
protected java.util.HashMap |
attributes
Field attributes |
static org.apache.axiom.om.OMNamespace |
DEFAULT_DEFAULT_NS_OBJECT
|
protected org.apache.axiom.om.OMNode |
firstChild
Field firstChild |
protected org.apache.axiom.om.OMNode |
lastChild
|
protected java.lang.String |
localName
Field localName |
protected java.util.HashMap |
namespaces
Field namespaces |
protected int |
noPrefixNamespaceCounter
Field noPrefixNamespaceCounter |
protected org.apache.axiom.om.OMNamespace |
ns
Field ns |
| Fields inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl |
builder, done, factory, nextSibling, nodeType, parent, previousSibling |
| Fields inherited from interface org.apache.axiom.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.axiom.om.OMConstants |
ARRAY_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, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI |
| Constructor Summary | |
OMElementImpl(javax.xml.namespace.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. |
|
OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory)
This is the basic constructor for OMElement. |
|
OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory)
Constructor OMElementImpl. |
|
OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMFactory factory)
Constructor OMElementImpl. |
|
| Method Summary | |
org.apache.axiom.om.OMAttribute |
addAttribute(org.apache.axiom.om.OMAttribute attr)
Inserts an attribute to this element. |
org.apache.axiom.om.OMAttribute |
addAttribute(java.lang.String attributeName,
java.lang.String value,
org.apache.axiom.om.OMNamespace ns)
Method addAttribute. |
void |
addChild(org.apache.axiom.om.OMNode child)
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. |
org.apache.axiom.om.OMElement |
cloneOMElement()
|
org.apache.axiom.om.OMNamespace |
declareDefaultNamespace(java.lang.String uri)
We use "" to store the default namespace of this element. |
org.apache.axiom.om.OMNamespace |
declareNamespace(org.apache.axiom.om.OMNamespace namespace)
|
org.apache.axiom.om.OMNamespace |
declareNamespace(java.lang.String uri,
java.lang.String prefix)
Creates a namespace in the current element scope. |
org.apache.axiom.om.OMNode |
detach()
Removes this information item and its children, from the model completely. |
void |
discard()
Method discard. |
org.apache.axiom.om.OMNamespace |
findNamespace(java.lang.String uri,
java.lang.String prefix)
Finds a namespace with the given uri and prefix, in the scope of the document. |
org.apache.axiom.om.OMNamespace |
findNamespaceURI(java.lang.String prefix)
|
java.util.Iterator |
getAllAttributes()
Returns a List of OMAttributes. |
java.util.Iterator |
getAllDeclaredNamespaces()
Method getAllDeclaredNamespaces. |
org.apache.axiom.om.OMAttribute |
getAttribute(javax.xml.namespace.QName qname)
Returns a named attribute if present. |
java.lang.String |
getAttributeValue(javax.xml.namespace.QName qname)
Returns a named attribute's value, if present. |
org.apache.axiom.om.OMXMLParserWrapper |
getBuilder()
Method getBuilder. |
java.util.Iterator |
getChildElements()
Returns a filtered list of children - just the elements. |
java.util.Iterator |
getChildren()
Returns a collection of this element. |
java.util.Iterator |
getChildrenWithName(javax.xml.namespace.QName elementQName)
Searches for children with a given QName and returns an iterator to traverse through the OMNodes. |
org.apache.axiom.om.OMNamespace |
getDefaultNamespace()
|
org.apache.axiom.om.OMElement |
getFirstChildWithName(javax.xml.namespace.QName elementQName)
Method getFirstChildWithName. |
org.apache.axiom.om.OMElement |
getFirstElement()
Gets first element. |
org.apache.axiom.om.OMNode |
getFirstOMChild()
Method getFirstOMChild. |
int |
getLineNumber()
|
java.lang.String |
getLocalName()
Method getLocalName. |
org.apache.axiom.om.OMNamespace |
getNamespace()
Method getNamespace. |
org.apache.axiom.om.OMNode |
getNextOMSibling()
Gets the next sibling. |
javax.xml.namespace.QName |
getQName()
Method getQName. |
java.lang.String |
getText()
Selects all the text children and concatinates them to a single string. |
javax.xml.namespace.QName |
getTextAsQName()
|
java.lang.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. |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader()
Method getXMLStreamReader. |
javax.xml.stream.XMLStreamReader |
getXMLStreamReaderWithoutCaching()
Method getXMLStreamReaderWithoutCaching. |
void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer)
Method internalSerialize. |
protected void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
|
void |
internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
This method serializes and consumes without building the object structure in memory. |
boolean |
isComplete()
Method isComplete. |
protected void |
notifyChildComplete()
This method will be called when one of the children becomes complete. |
void |
removeAttribute(org.apache.axiom.om.OMAttribute attr)
Method removeAttribute. |
javax.xml.namespace.QName |
resolveQName(java.lang.String qname)
Converts a prefix:local qname string into a proper QName, evaluating it in the OMElement context. |
void |
setBuilder(org.apache.axiom.om.OMXMLParserWrapper wrapper)
Method setBuilder. |
void |
setFirstChild(org.apache.axiom.om.OMNode firstChild)
Method setFirstChild. |
void |
setLineNumber(int lineNumber)
|
void |
setLocalName(java.lang.String localName)
Method setLocalName. |
void |
setNamespace(org.apache.axiom.om.OMNamespace namespace)
Method setNamespace. |
void |
setNamespaceWithNoFindInCurrentScope(org.apache.axiom.om.OMNamespace namespace)
|
void |
setText(javax.xml.namespace.QName text)
Sets the text, as a QName, of the given element. |
void |
setText(java.lang.String text)
Sets the text of the given element. |
java.lang.String |
toString()
|
java.lang.String |
toStringWithConsume()
|
| Methods inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl |
getOMFactory, getParent, getPreviousOMSibling, importNode, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setParent, setPreviousOMSibling, setType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.axiom.om.OMNode |
getOMFactory, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
| Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx |
setComplete |
| Field Detail |
public static final org.apache.axiom.om.OMNamespace DEFAULT_DEFAULT_NS_OBJECT
protected org.apache.axiom.om.OMNamespace ns
protected java.lang.String localName
protected org.apache.axiom.om.OMNode firstChild
protected java.util.HashMap namespaces
protected java.util.HashMap attributes
protected int noPrefixNamespaceCounter
protected org.apache.axiom.om.OMNode lastChild
| Constructor Detail |
public OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory)
public OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMFactory factory)
public OMElementImpl(java.lang.String localName,
org.apache.axiom.om.OMNamespace ns,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory)
localName - - this MUST always be not nullns - - can be nullparent - - this should be an OMContainerfactory - - factory that created this OMElement
A null namespace indicates that the default namespace in scope is used
public OMElementImpl(javax.xml.namespace.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.QName
org.apache.axiom.om.OMException| Method Detail |
public void addChild(org.apache.axiom.om.OMNode child)
addChild in interface org.apache.axiom.om.OMContainerpublic java.util.Iterator getChildrenWithName(javax.xml.namespace.QName elementQName)
getChildrenWithName in interface org.apache.axiom.om.OMContainerorg.apache.axiom.om.OMException
public org.apache.axiom.om.OMElement getFirstChildWithName(javax.xml.namespace.QName elementQName)
throws org.apache.axiom.om.OMException
getFirstChildWithName in interface org.apache.axiom.om.OMContainerorg.apache.axiom.om.OMException
public org.apache.axiom.om.OMNode getNextOMSibling()
throws org.apache.axiom.om.OMException
getNextOMSibling in interface org.apache.axiom.om.OMNodegetNextOMSibling in class OMNodeImplorg.apache.axiom.om.OMExceptionpublic java.util.Iterator getChildren()
getChildren in interface org.apache.axiom.om.OMContainerpublic java.util.Iterator getChildElements()
getChildElements in interface org.apache.axiom.om.OMElement
public org.apache.axiom.om.OMNamespace declareNamespace(java.lang.String uri,
java.lang.String prefix)
declareNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace declareDefaultNamespace(java.lang.String uri)
declareDefaultNamespace in interface org.apache.axiom.om.OMElementuri - public org.apache.axiom.om.OMNamespace getDefaultNamespace()
getDefaultNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace declareNamespace(org.apache.axiom.om.OMNamespace namespace)
declareNamespace in interface org.apache.axiom.om.OMElement
public org.apache.axiom.om.OMNamespace findNamespace(java.lang.String uri,
java.lang.String prefix)
findNamespace in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMNamespace findNamespaceURI(java.lang.String prefix)
findNamespaceURI in interface org.apache.axiom.om.OMElementpublic java.util.Iterator getAllDeclaredNamespaces()
getAllDeclaredNamespaces in interface org.apache.axiom.om.OMElementpublic java.util.Iterator getAllAttributes()
getAllAttributes in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMAttribute getAttribute(javax.xml.namespace.QName qname)
getAttribute in interface org.apache.axiom.om.OMElementqname - the qualified name to search for
public java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
getAttributeValue in interface org.apache.axiom.om.OMElementqname - the qualified name to search for
public org.apache.axiom.om.OMAttribute addAttribute(org.apache.axiom.om.OMAttribute attr)
addAttribute in interface org.apache.axiom.om.OMElementpublic void removeAttribute(org.apache.axiom.om.OMAttribute attr)
removeAttribute in interface org.apache.axiom.om.OMElement
public org.apache.axiom.om.OMAttribute addAttribute(java.lang.String attributeName,
java.lang.String value,
org.apache.axiom.om.OMNamespace ns)
addAttribute in interface org.apache.axiom.om.OMElementpublic void setBuilder(org.apache.axiom.om.OMXMLParserWrapper wrapper)
setBuilder in interface org.apache.axiom.om.OMElementpublic org.apache.axiom.om.OMXMLParserWrapper getBuilder()
getBuilder in interface org.apache.axiom.om.OMElementpublic void buildNext()
buildNext in interface org.apache.axiom.om.OMContainerpublic org.apache.axiom.om.OMNode getFirstOMChild()
getFirstOMChild in interface org.apache.axiom.om.OMContainerpublic void setFirstChild(org.apache.axiom.om.OMNode firstChild)
setFirstChild in interface org.apache.axiom.om.OMElement
public org.apache.axiom.om.OMNode detach()
throws org.apache.axiom.om.OMException
detach in interface org.apache.axiom.om.OMNodedetach in class OMNodeImplorg.apache.axiom.om.OMExceptionpublic boolean isComplete()
isComplete in interface org.apache.axiom.om.OMNodeisComplete in class OMNodeImplpublic int getType()
getType in interface org.apache.axiom.om.OMNodegetType in class OMNodeImplOMNodeImpl.setType(int)OMNodeImpl.setType(int)
public void build()
throws org.apache.axiom.om.OMException
OMNodeImpl
build in interface org.apache.axiom.om.OMNodebuild in class OMNodeImplorg.apache.axiom.om.OMExceptionpublic javax.xml.stream.XMLStreamReader getXMLStreamReader()
getXMLStreamReader in interface org.apache.axiom.om.OMElementOMElement.getXMLStreamReader()public javax.xml.stream.XMLStreamReader getXMLStreamReaderWithoutCaching()
getXMLStreamReaderWithoutCaching in interface org.apache.axiom.om.OMElementOMElement.getXMLStreamReaderWithoutCaching()public void setText(java.lang.String text)
setText in interface org.apache.axiom.om.OMElementpublic void setText(javax.xml.namespace.QName text)
setText in interface org.apache.axiom.om.OMElementpublic java.lang.String getText()
getText in interface org.apache.axiom.om.OMElementpublic javax.xml.namespace.QName getTextAsQName()
getTextAsQName in interface org.apache.axiom.om.OMElementpublic java.lang.String getTrimmedText()
public void internalSerialize(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
internalSerialize in interface org.apache.axiom.om.impl.OMNodeExinternalSerialize in class OMNodeImplwriter -
javax.xml.stream.XMLStreamException
protected void internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public void internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
internalSerializeAndConsume in interface org.apache.axiom.om.impl.OMNodeExinternalSerializeAndConsume in class OMNodeImplwriter -
javax.xml.stream.XMLStreamExceptionpublic org.apache.axiom.om.OMElement getFirstElement()
getFirstElement in interface org.apache.axiom.om.OMElementpublic java.lang.String getLocalName()
getLocalName in interface org.apache.axiom.om.OMElementpublic void setLocalName(java.lang.String localName)
setLocalName in interface org.apache.axiom.om.OMElement
public org.apache.axiom.om.OMNamespace getNamespace()
throws org.apache.axiom.om.OMException
getNamespace in interface org.apache.axiom.om.OMElementorg.apache.axiom.om.OMExceptionpublic void setNamespace(org.apache.axiom.om.OMNamespace namespace)
setNamespace in interface org.apache.axiom.om.OMElementpublic void setNamespaceWithNoFindInCurrentScope(org.apache.axiom.om.OMNamespace namespace)
setNamespaceWithNoFindInCurrentScope in interface org.apache.axiom.om.OMElementpublic javax.xml.namespace.QName getQName()
getQName in interface org.apache.axiom.om.OMElement
public java.lang.String toStringWithConsume()
throws javax.xml.stream.XMLStreamException
toStringWithConsume in interface org.apache.axiom.om.OMElementjavax.xml.stream.XMLStreamExceptionpublic java.lang.String toString()
toString in interface org.apache.axiom.om.OMElement
public void discard()
throws org.apache.axiom.om.OMException
discard in interface org.apache.axiom.om.OMNodeorg.apache.axiom.om.OMExceptionpublic javax.xml.namespace.QName resolveQName(java.lang.String qname)
resolveQName in interface org.apache.axiom.om.OMElementqname - prefixed qname string to resolve
public org.apache.axiom.om.OMElement cloneOMElement()
cloneOMElement in interface org.apache.axiom.om.OMElementpublic void setLineNumber(int lineNumber)
setLineNumber in interface org.apache.axiom.om.OMElementpublic int getLineNumber()
getLineNumber in interface org.apache.axiom.om.OMElementpublic void buildWithAttachments()
OMNodeImpl
buildWithAttachments in interface org.apache.axiom.om.OMNodebuildWithAttachments in class OMNodeImplprotected void notifyChildComplete()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||