com.xml_project.morganaxproc
Class XProcOutput

java.lang.Object
  extended by com.xml_project.morganaxproc.XProcOutput

public class XProcOutput
extends java.lang.Object

This class holds the outputs of an execution of an XProc pipeline.


Method Summary
 long getDuration()
           Returns the duration of the pipeline execution (in time millis).
 javax.xml.namespace.QName getErrorCode()
           Returns the error code of the raised error or null if no error occurred.
 nu.xom.Document getErrorDocument()
           Returns the error document produced on the execution of the pipeline or null, if no error occurred.
 java.lang.String getErrorDocumentSerialized()
           Return a serialized version of the error document produced on the execution of the pipeline or an empty string, if no error occurred.
 long getMemoryUsed()
           Returns the heap memory used for pipeline execution in Bytes.
 java.lang.String[] getPortNames()
           Returns a string array with all names of the executed XProc pipeline's output ports.
 XProcResult getResults(java.lang.String portName)
           Returns the result from the output port with the given name, or an empty array, if no output port with the given name was found.
 javax.xml.namespace.QName getUnderylingError()
           Return the XQuery or XSLT error that caused this error in case of XD0030
 boolean hasPortNamed(java.lang.String portName)
           Returns true, if there is a (possible empty) port with the given name
 boolean wasSuccessful()
           Can be used to check, whether the execution was successful.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

wasSuccessful

public boolean wasSuccessful()

Can be used to check, whether the execution was successful.

Returns:
true, if the execution was successful or false, if an error was found.

getPortNames

public java.lang.String[] getPortNames()

Returns a string array with all names of the executed XProc pipeline's output ports. If an error occurred during executing, the list is empty.

Returns:
the output ports of the executed pipeline.

hasPortNamed

public boolean hasPortNamed(java.lang.String portName)

Returns true, if there is a (possible empty) port with the given name

Parameters:
portName - the name of the output to look for
Returns:
true, if there is a port with the given name.

getResults

public XProcResult getResults(java.lang.String portName)

Returns the result from the output port with the given name, or an empty array, if no output port with the given name was found.

Parameters:
portName - the name of the output port for which the documents should be returned.
Returns:
a document array with the documents found on the output port with the given name or null array, if no output port with this name was found.

getDuration

public long getDuration()

Returns the duration of the pipeline execution (in time millis).

Returns:
the duration of the pipeline execution.

getMemoryUsed

public long getMemoryUsed()

Returns the heap memory used for pipeline execution in Bytes.

Returns:
the heap memory used for pipeline execution.

getErrorCode

public javax.xml.namespace.QName getErrorCode()

Returns the error code of the raised error or null if no error occurred.

Returns:
the error code or null, if no error occurred.

getUnderylingError

public javax.xml.namespace.QName getUnderylingError()

Return the XQuery or XSLT error that caused this error in case of XD0030

Returns:
the underlying error code or null, if no error occurred.

getErrorDocument

public nu.xom.Document getErrorDocument()

Returns the error document produced on the execution of the pipeline or null, if no error occurred.

Returns:
the error document for the execution of the pipeline or null, if no error occurred.

getErrorDocumentSerialized

public java.lang.String getErrorDocumentSerialized()

Return a serialized version of the error document produced on the execution of the pipeline or an empty string, if no error occurred.

Returns:
a serialized version of the error document or an empty string, if no error occurred.