public interface OMSourcedElement extends OMElement
OMDataSource (or OMDataSourceExt) interface.
An OMSourcedElement can be in one of two states:
Here are the steps to place an arbitrary java object into the OM tree:
OMDataSourceExt implementation that provides access to your Java
object.OMFactory.createOMElement(OMDataSource, String, OMNamespace) to create
the OMSourcedElement.CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE| Modifier and Type | Method and Description |
|---|---|
OMDataSource |
getDataSource() |
Object |
getObject(Class dataSourceClass)
Get the object that backs the data source set on this element.
|
boolean |
isExpanded() |
OMDataSource |
setDataSource(OMDataSource dataSource)
Deprecated.
This method is deprecated because its semantics are not clearly defined. In
particular it is unspecified whether the name of the element may change as a
result of an invocation of this method.
|
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTobuildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBeforeaddChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeChildrenbuild, close, isComplete, serialize, serialize, serializeAndConsumeclone, getOMFactorygetLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespaceboolean isExpanded()
OMDataSource getDataSource()
OMDataSource setDataSource(OMDataSource dataSource)
Object getObject(Class dataSourceClass)
OMDataSource of the type specified by the
dataSourceClass parameter (in the sense of Class.isInstance(Object)).
OMDataSourceExt.getObject() method returns a non null value on the configured
data source.
isExpanded() returns
false), but the implementation may use additional mechanisms to detect changes
after expansion of the element.
dataSourceClass - the expected data source class; must be assignment compatible with
OMDataSourceExtnull if the conditions specified above are
not satisfiedCopyright © The Apache Software Foundation. All Rights Reserved.