Package org.apache.axiom.om.impl.llom
Class OMNodeImpl
java.lang.Object
org.apache.axiom.om.impl.llom.OMSerializableImpl
org.apache.axiom.om.impl.llom.OMNodeImpl
- All Implemented Interfaces:
org.apache.axiom.om.impl.OMNodeEx,org.apache.axiom.om.OMNode,org.apache.axiom.om.OMSerializable
- Direct Known Subclasses:
OMCommentImpl,OMDocTypeImpl,OMElementImpl,OMProcessingInstructionImpl,OMTextImpl
public abstract class OMNodeImpl
extends OMSerializableImpl
implements org.apache.axiom.om.OMNode, org.apache.axiom.om.impl.OMNodeEx
Class OMNodeImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OMNodeImplField nextSiblingprotected intField nodeTypeprotected org.apache.axiom.om.impl.OMContainerExField parentprotected OMNodeImplField previousSiblingFields inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl
builder, done, factoryFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionOMNodeImpl(org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, boolean done) For a node to exist there must be a parent.OMNodeImpl(org.apache.axiom.om.OMFactory factory) Constructor OMNodeImpl -
Method Summary
Modifier and TypeMethodDescriptionvoidParses this node and builds the object structure in memory.org.apache.axiom.om.OMNodedetach()Removes this information item and its children, from the model completely.org.apache.axiom.om.OMNodeReturns the next sibling.org.apache.axiom.om.OMNodeorg.apache.axiom.om.OMContainerReturns the immediate parent of the node.org.apache.axiom.om.OMNodeGets the previous sibling.intgetType()Gets the type of node, as this is the super class of all the nodes.protected org.apache.axiom.om.OMNodeimportNode(org.apache.axiom.om.OMNode child) This method is intended only to be used by Axiom intenals when merging Objects from different Axiom implementations to the LLOM implementation.voidinsertSiblingAfter(org.apache.axiom.om.OMNode sibling) Inserts a sibling just after the current information item.voidinsertSiblingBefore(org.apache.axiom.om.OMNode sibling) Inserts a sibling just before the current information item.voidinternalSerialize(XMLStreamWriter writer) voidvoidsetComplete(boolean state) Method setComplete.voidsetNextOMSibling(org.apache.axiom.om.OMNode node) Method setNextOMSibling.voidsetParent(org.apache.axiom.om.OMContainer element) Method setParent.voidsetPreviousOMSibling(org.apache.axiom.om.OMNode previousSibling) Method setPreviousOMSibling.voidsetType(int nodeType) Method setType.Methods inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl
build, close, getOMFactory, internalSerialize, isComplete, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.axiom.om.OMNode
discard, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumeMethods inherited from interface org.apache.axiom.om.impl.OMNodeEx
internalSerializeMethods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
-
Field Details
-
parent
protected org.apache.axiom.om.impl.OMContainerEx parentField parent -
nextSibling
Field nextSibling -
previousSibling
Field previousSibling -
nodeType
protected int nodeTypeField nodeType
-
-
Constructor Details
-
OMNodeImpl
public OMNodeImpl(org.apache.axiom.om.OMFactory factory) Constructor OMNodeImpl- Parameters:
factory- TheOMFactorythat created this
-
OMNodeImpl
public OMNodeImpl(org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, boolean done) For a node to exist there must be a parent.- Parameters:
parent- ParentOMContainerof this nodefactory- TheOMFactorythat created this
-
-
Method Details
-
getParent
public org.apache.axiom.om.OMContainer getParent()Returns the immediate parent of the node. Parent is always an Element.- Specified by:
getParentin interfaceorg.apache.axiom.om.OMNode- Returns:
- Returns OMContainer.
- Throws:
org.apache.axiom.om.OMException
-
setParent
public void setParent(org.apache.axiom.om.OMContainer element) Method setParent.- Specified by:
setParentin interfaceorg.apache.axiom.om.impl.OMNodeEx- Parameters:
element-
-
getNextOMSibling
public org.apache.axiom.om.OMNode getNextOMSibling() throws org.apache.axiom.om.OMExceptionReturns the next sibling. This can be an OMAttribute or OMText or OMElement for others.- Specified by:
getNextOMSiblingin interfaceorg.apache.axiom.om.OMNode- Returns:
- Returns OMNode.
- Throws:
org.apache.axiom.om.OMException
-
getNextOMSiblingIfAvailable
public org.apache.axiom.om.OMNode getNextOMSiblingIfAvailable()- Specified by:
getNextOMSiblingIfAvailablein interfaceorg.apache.axiom.om.impl.OMNodeEx
-
setNextOMSibling
public void setNextOMSibling(org.apache.axiom.om.OMNode node) Method setNextOMSibling.- Specified by:
setNextOMSiblingin interfaceorg.apache.axiom.om.impl.OMNodeEx- Parameters:
node-
-
setComplete
public void setComplete(boolean state) Method setComplete.- Specified by:
setCompletein interfaceorg.apache.axiom.om.impl.OMNodeEx- Specified by:
setCompletein classOMSerializableImpl- Parameters:
state-
-
detach
public org.apache.axiom.om.OMNode detach() throws org.apache.axiom.om.OMExceptionRemoves this information item and its children, from the model completely.- Specified by:
detachin interfaceorg.apache.axiom.om.OMNode- Throws:
org.apache.axiom.om.OMException
-
insertSiblingAfter
public void insertSiblingAfter(org.apache.axiom.om.OMNode sibling) throws org.apache.axiom.om.OMException Inserts a sibling just after the current information item.- Specified by:
insertSiblingAfterin interfaceorg.apache.axiom.om.OMNode- Parameters:
sibling-- Throws:
org.apache.axiom.om.OMException
-
insertSiblingBefore
public void insertSiblingBefore(org.apache.axiom.om.OMNode sibling) throws org.apache.axiom.om.OMException Inserts a sibling just before the current information item.- Specified by:
insertSiblingBeforein interfaceorg.apache.axiom.om.OMNode- Parameters:
sibling-- Throws:
org.apache.axiom.om.OMException
-
getType
public int getType()Gets the type of node, as this is the super class of all the nodes.- Specified by:
getTypein interfaceorg.apache.axiom.om.OMNode- Returns:
- Returns the type of node as indicated by
setType(int) - See Also:
-
setType
public void setType(int nodeType) throws org.apache.axiom.om.OMException Method setType.- Specified by:
setTypein interfaceorg.apache.axiom.om.impl.OMNodeEx- Parameters:
nodeType-- Throws:
org.apache.axiom.om.OMException
-
getPreviousOMSibling
public org.apache.axiom.om.OMNode getPreviousOMSibling()Gets the previous sibling.- Specified by:
getPreviousOMSiblingin interfaceorg.apache.axiom.om.OMNode- Returns:
- boolean
-
setPreviousOMSibling
public void setPreviousOMSibling(org.apache.axiom.om.OMNode previousSibling) Method setPreviousOMSibling.- Specified by:
setPreviousOMSiblingin interfaceorg.apache.axiom.om.impl.OMNodeEx- Parameters:
previousSibling-
-
buildWithAttachments
public void buildWithAttachments()Parses this node and builds the object structure in memory. AXIOM supports two levels of deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered building of attachments. AXIOM reads in the attachements from the stream only when user asks by calling getDataHandler(). build() method builds the OM without the attachments. buildAll() builds the OM together with attachement data. This becomes handy when user wants to free the input stream.- Specified by:
buildWithAttachmentsin interfaceorg.apache.axiom.om.OMNode
-
importNode
protected org.apache.axiom.om.OMNode importNode(org.apache.axiom.om.OMNode child) This method is intended only to be used by Axiom intenals when merging Objects from different Axiom implementations to the LLOM implementation.- Parameters:
child-
-
internalSerialize
- Specified by:
internalSerializein interfaceorg.apache.axiom.om.impl.OMNodeEx- Throws:
XMLStreamException
-
internalSerializeAndConsume
- Specified by:
internalSerializeAndConsumein interfaceorg.apache.axiom.om.impl.OMNodeEx- Throws:
XMLStreamException
-