Package org.apache.axiom.om
Interface OMSourcedElement
-
- All Superinterfaces:
OMContainer,OMElement,OMNode,OMSerializable
- All Known Subinterfaces:
SOAPHeaderBlock
public interface OMSourcedElement extends OMElement
Element whose data is backed by an arbitrary Java object. The backing Java object is accessed via theOMDataSource(orOMDataSourceExt) 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:
- Write an
OMDataSourceExtimplementation that provides access to your Java object. - Use
OMFactory.createOMElement(OMDataSource, String, OMNamespace)to create the OMSourcedElement. - Attach the OMSourcedElement to the tree.
-
-
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OMDataSourcegetDataSource()booleanisExpanded()OMDataSourcesetDataSource(OMDataSource dataSource)Replace an existing OMDataSource with a new one.-
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching
-
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, removeAttribute, resolveQName, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
-
Methods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore
-
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
-
-
-
-
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
-
-