com.armatiek.infofuze.resolver
Class ResultOutputURIResolver

java.lang.Object
  extended by com.armatiek.infofuze.resolver.AbstractResolver
      extended by com.armatiek.infofuze.resolver.ResultOutputURIResolver
All Implemented Interfaces:
net.sf.joost.OutputURIResolver

public class ResultOutputURIResolver
extends AbstractResolver
implements net.sf.joost.OutputURIResolver

This class implements the interface OutputURIResolver that acts as the counterpart to the JAXP URIResolver. It is used to map the URI of a secondary result document (using the stx:result-document instruction in a STX transformation) to a Result object which acts as the destination for the new output.

Author:
Maarten Kroon

Constructor Summary
ResultOutputURIResolver()
           
 
Method Summary
 void close(javax.xml.transform.Result result)
          Signal completion of the result document.
 javax.xml.transform.Result resolve(java.lang.String href, java.lang.String base, java.util.Properties outputProperties, boolean append)
          Resolve an output URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultOutputURIResolver

public ResultOutputURIResolver()
Method Detail

close

public void close(javax.xml.transform.Result result)
           throws javax.xml.transform.TransformerException
Signal completion of the result document. This method is called by the system when the result document has been successfully written. This method commits any transaction and returns the result to the pool.

Specified by:
close in interface net.sf.joost.OutputURIResolver
Parameters:
result - The result object returned by the previous call of resolve()
Throws:
javax.xml.transform.TransformerException

resolve

public javax.xml.transform.Result resolve(java.lang.String href,
                                          java.lang.String base,
                                          java.util.Properties outputProperties,
                                          boolean append)
                                   throws javax.xml.transform.TransformerException
Resolve an output URI.

Specified by:
resolve in interface net.sf.joost.OutputURIResolver
Parameters:
href - The relative URI of the output document. This corresponds to the href attribute of the stx:result-document instruction.
base - The base URI that should be used. This is the base URI of the element that contained the href attribute. It may be null if no systemID was supplied for the stylesheet.
outputProperties - The output properties that are in scope for the output document. These are the properties of the main transformation plus the values of the optional attributes output-encoding and output-method.
append - If set to true then the result should be appended to a possibly already existing document.
Returns:
a Result object representing the destination for the XML document. The method can also return null, in which case the standard output URI resolver will be used to create a Result object.
Throws:
javax.xml.transform.TransformerException