org.weborganic.ox.tool
Class TidyCommand.TidyResult
java.lang.Object
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
TidyCommand.TidyResult
public TidyCommand.TidyResult(PackageData data)
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.