org.weborganic.ox.tool
Class TidyCommand

java.lang.Object
  extended by org.weborganic.ox.tool.TidyCommand
All Implemented Interfaces:
Command<TidyCommand.TidyResult>

public class TidyCommand
extends Object
implements Command<TidyCommand.TidyResult>

Version:
8 November 2013
Author:
Christophe Lauret

Nested Class Summary
 class TidyCommand.TidyResult
           
 
Constructor Summary
TidyCommand(Model model)
          Create a new tidy command.
 
Method Summary
 Model getModel()
          Return the model this command uses.
static org.w3c.tidy.Tidy newTidy(Model model)
          Return a new tidy configuration for the model
 TidyCommand.TidyResult process(PackageData data)
          Tidy on the HTML so that it can be converted to PSML with XSLT.
 void setDownload(File download)
           
 void setHtmlPath(String htmlPath)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TidyCommand

public TidyCommand(Model model)
Create a new tidy command.

Parameters:
model - The model to use
Method Detail

setHtmlPath

public void setHtmlPath(String htmlPath)
Parameters:
htmlPath - the htmlPath to set

setDownload

public void setDownload(File download)
Parameters:
download - The public download folder.

process

public TidyCommand.TidyResult process(PackageData data)
Tidy on the HTML so that it can be converted to PSML with XSLT.

Implementation notes:

Specified by:
process in interface Command<TidyCommand.TidyResult>
Parameters:
html - The HTML
Returns:
The tidied content

newTidy

public static org.w3c.tidy.Tidy newTidy(Model model)
Return a new tidy configuration for the model

Parameters:
model -
Returns:

getModel

public Model getModel()
Description copied from interface: Command
Return the model this command uses.

Specified by:
getModel in interface Command<TidyCommand.TidyResult>
Returns:
the model this command uses.