org.weborganic.ox.tool
Class TidyCommand.TidyResult

java.lang.Object
  extended by org.weborganic.ox.tool.TidyCommand.TidyResult
All Implemented Interfaces:
XMLWritable, org.w3c.tidy.TidyMessageListener, Result
Enclosing class:
TidyCommand

public final class TidyCommand.TidyResult
extends Object
implements org.w3c.tidy.TidyMessageListener, XMLWritable


Constructor Summary
TidyCommand.TidyResult(PackageData data)
           
 
Method Summary
 PackageData data()
           
 void done()
          Invoke this method when the result are ready to compute the time consistently.
 Exception error()
           
 String getXHTML()
           
 void messageReceived(org.w3c.tidy.TidyMessage message)
           
 Model model()
           
 void setError(Exception ex)
           
 void setStatus(ResultStatus status)
           
 void setXHTML(String xhtml)
           
 ResultStatus status()
           
 long time()
           
 void toXML(XMLWriter xml)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TidyCommand.TidyResult

public TidyCommand.TidyResult(PackageData data)
Method Detail

messageReceived

public void messageReceived(org.w3c.tidy.TidyMessage message)
Specified by:
messageReceived in interface org.w3c.tidy.TidyMessageListener

getXHTML

public String getXHTML()
Returns:
the xhtml

setXHTML

public void setXHTML(String xhtml)
Parameters:
xhtml - the xhtml to set

toXML

public void toXML(XMLWriter xml)
           throws IOException
Specified by:
toXML in interface XMLWritable
Throws:
IOException

model

public final Model model()
Specified by:
model in interface Result
Returns:
The model used to generate that result.

data

public final PackageData data()
Specified by:
data in interface Result
Returns:
The ID of the data that has been processed.

time

public final long time()
Specified by:
time in interface Result
Returns:
The time it took to execute the command in milliseconds.

status

public final ResultStatus status()
Specified by:
status in interface Result
Returns:
The status of that result.

error

public Exception error()
Specified by:
error in interface Result
Returns:
Any error that may have occurred and caused the command to fail.

done

public final void done()
Invoke this method when the result are ready to compute the time consistently.


setStatus

public final void setStatus(ResultStatus status)
Parameters:
status - the status to set

setError

public final void setError(Exception ex)
Parameters:
ex - the exception causing the error.