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 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 implementation that provides access to your Java object.
  2. Use OMFactory.createOMElement(OMDataSource, String, OMNamespace) to create the OMSourcedElement.
  3. Attach the OMSourcedElement to the tree.
  • Method Details

    • 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