org.apache.axiom.om
Interface OMSourcedElement

All Superinterfaces:
OMContainer, OMElement, OMNode
All Known Subinterfaces:
SOAPHeaderBlock
All Known Implementing Classes:
OMSourcedElementImpl, SOAP11HeaderBlockImpl, SOAP11HeaderBlockImpl, SOAP12HeaderBlockImpl, SOAP12HeaderBlockImpl, SOAPHeaderBlockImpl, SOAPHeaderBlockImpl

public interface OMSourcedElement
extends OMElement

An OMSourcedElement is an OMElement whose data is backed by an arbitrary java object. The backing java object is accessed via the OMDataSource (or OMDataSourceExt) interface. An OMSourcedElement can be in one of two states. Not Expanded: In this state the backing object is used to read and write the xml Expanded: In this state, the OMSourcedElement is backed by a normal OM tree. Here are the steps to place an arbitrary java object into the OM tree. 1) Write an OMDataSourceExt class that provides access to your java object. 2) Use OMFactory.createOMElement(OMDataSource, String, OMNamespace) to create the OMSourcedElement. 3) Attach the OMSourcedElement to your OMTree.


Field Summary
 
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
 
Method Summary
 OMDataSource getDataSource()
           
 boolean isExpanded()
           
 OMDataSource setDataSource(OMDataSource dataSource)
          Replace an existing OMDataSource with a new one.
 
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from interface org.apache.axiom.om.OMNode
build, buildWithAttachments, close, detach, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, isComplete
 

Method Detail

isExpanded

boolean isExpanded()
Returns:
true if tree is expanded or being expanded.

getDataSource

OMDataSource getDataSource()
Returns:
OMDataSource

setDataSource

OMDataSource setDataSource(OMDataSource dataSource)
Replace an existing OMDataSource with a new one.

Parameters:
dataSource - new OMDataSource
Returns:
null or old OMDataSource


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.