org.apache.synapse.util.jaxp
Interface ResultBuilder

All Known Implementing Classes:
AXIOMResultBuilder, DOOMResultBuilder, StreamResultBuilder

public interface ResultBuilder

Interface encapsulating a strategy to transform an XML infoset written to a Result object into an AXIOM tree. Implementations of this interface should be used in the following way:

  1. Create a new instance using the appropriate ResultBuilderFactory.
  2. Call getResult() to get an Result instance.
  3. Use the Result object in the invocation the XSL transformer.
  4. Call #getNode() to retrieve the root element of the AXIOM tree.
  5. Call release() when the AXIOM tree is no longer needed or when it has been fully built.
Note that implementations of this interface are always stateful. Therefore a single instance must never be used concurrently.


Method Summary
 OMElement getNode(Charset charset)
          Get the result written to the Result as an OMElement.
 Result getResult()
          Get a Result implementation that can be used with an XSL transformer.
 void release()
          Release any resources associated with this object.
 

Method Detail

getResult

Result getResult()
Get a Result implementation that can be used with an XSL transformer.

Returns:
the result object

getNode

OMElement getNode(Charset charset)
Get the result written to the Result as an OMElement. Note that the exact behavior of this methos depends on the specified ResultBuilderFactory.Output.

Parameters:
charset - The charset encoding of the data that has been written to the Result object. This information should only be used in conjunction with ResultBuilderFactory.Output.TEXT.
Returns:
the root element of the AXIOM tree

release

void release()
Release any resources associated with this object.



Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.