Package org.apache.axiom.om.ds.custombuilder

# Interface CustomBuilder

All Known Implementing Classes:
  `BlobOMDataSourceCustomBuilder`

public interface CustomBuilder
A Custom Builder is registered on the `OMXMLParserWrapper` for a particular set of elements. When a matching element is encountered, the CustomBuilder will build an `OMDataSource` for the builder.

See Also:
  - `CustomBuilderSupport.registerCustomBuilder(CustomBuilder.Selector, CustomBuilder)`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `CustomBuilder.Selector`
  Selects the elements to which a custom builder is applied.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OMDataSource`
  `create(OMElement element)`
  Create an `OMDataSource` from the given `OMElement`.

- ## Method Details

  - ### create

    OMDataSource create(OMElement element) throws OMException
    Create an `OMDataSource` from the given `OMElement`. The builder will use the returned `OMDataSource` to create an `OMSourcedElement` replacing the original `OMElement`.
    Parameters:
      `element` - The element to convert into an `OMDataSource`. The implementation is expected to consume the element using methods such as `OMContainer.getXMLStreamReader(boolean)`, `OMContainer.getSAXSource(boolean)` or `OMSerializable.serialize(XMLStreamWriter, boolean)` with `preserve=true`.
    Returns:
      an `OMDataSource` with content that is equivalent to the original element
    Throws:
      `OMException`