Class WorkflowXsltTransformer
java.lang.Object
com.scivicslab.pojoactor.workflow.WorkflowXsltTransformer
Utility class for transforming XML workflow definitions into HTML using XSLT.
This class provides methods to convert XML workflow files into human-readable HTML visualizations. Two visualization styles are supported:
- Table View: Displays workflow transitions in a structured table format
- Graph View: Displays workflow as a visual state transition graph
Example Usage:
// Transform to table view
File xmlFile = new File("workflow.xml");
File htmlFile = new File("workflow-table.html");
WorkflowXsltTransformer.transformToTable(xmlFile, htmlFile);
// Transform to graph view
File graphFile = new File("workflow-graph.html");
WorkflowXsltTransformer.transformToGraph(xmlFile, graphFile);
// Transform to string
String htmlContent = WorkflowXsltTransformer.transformToTableString(xmlFile);
- Since:
- 2.5.0
- Author:
- devteam@scivics-lab.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidtransformToGraph(File xmlFile, File outputFile) Transforms an XML workflow file to HTML graph view.static voidtransformToGraph(InputStream xmlInput, OutputStream output) Transforms an XML workflow input stream to HTML graph view.static StringtransformToGraphString(File xmlFile) Transforms an XML workflow file to HTML graph view and returns as String.static StringtransformToGraphString(InputStream xmlInput) Transforms an XML workflow input stream to HTML graph view and returns as String.static voidtransformToTable(File xmlFile, File outputFile) Transforms an XML workflow file to HTML table view.static voidtransformToTable(InputStream xmlInput, OutputStream output) Transforms an XML workflow input stream to HTML table view.static StringtransformToTableString(File xmlFile) Transforms an XML workflow file to HTML table view and returns as String.static StringtransformToTableString(InputStream xmlInput) Transforms an XML workflow input stream to HTML table view and returns as String.
-
Constructor Details
-
WorkflowXsltTransformer
public WorkflowXsltTransformer()
-
-
Method Details
-
transformToTable
Transforms an XML workflow file to HTML table view.- Parameters:
xmlFile- the input XML workflow fileoutputFile- the output HTML file- Throws:
TransformerException- if an error occurs during transformation
-
transformToGraph
Transforms an XML workflow file to HTML graph view.- Parameters:
xmlFile- the input XML workflow fileoutputFile- the output HTML file- Throws:
TransformerException- if an error occurs during transformation
-
transformToTable
public static void transformToTable(InputStream xmlInput, OutputStream output) throws TransformerException Transforms an XML workflow input stream to HTML table view.- Parameters:
xmlInput- the input XML workflow streamoutput- the output stream for HTML- Throws:
TransformerException- if an error occurs during transformation
-
transformToGraph
public static void transformToGraph(InputStream xmlInput, OutputStream output) throws TransformerException Transforms an XML workflow input stream to HTML graph view.- Parameters:
xmlInput- the input XML workflow streamoutput- the output stream for HTML- Throws:
TransformerException- if an error occurs during transformation
-
transformToTableString
Transforms an XML workflow file to HTML table view and returns as String.- Parameters:
xmlFile- the input XML workflow file- Returns:
- the HTML content as a String
- Throws:
TransformerException- if an error occurs during transformation
-
transformToGraphString
Transforms an XML workflow file to HTML graph view and returns as String.- Parameters:
xmlFile- the input XML workflow file- Returns:
- the HTML content as a String
- Throws:
TransformerException- if an error occurs during transformation
-
transformToTableString
Transforms an XML workflow input stream to HTML table view and returns as String.- Parameters:
xmlInput- the input XML workflow stream- Returns:
- the HTML content as a String
- Throws:
TransformerException- if an error occurs during transformation
-
transformToGraphString
Transforms an XML workflow input stream to HTML graph view and returns as String.- Parameters:
xmlInput- the input XML workflow stream- Returns:
- the HTML content as a String
- Throws:
TransformerException- if an error occurs during transformation
-