Class Pipelines
- java.lang.Object
-
- org.ametys.plugins.extraction.execution.pipeline.Pipelines
-
-
Field Summary
Fields Modifier and Type Field Description private static Properties__OUTPUT_FORMAT_PROPERTIESprivate static SAXTransformerFactory__transformerFactory
-
Constructor Summary
Constructors Modifier Constructor Description privatePipelines()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(StreamResult result)Close the given stream resultstatic OutputStreamgetOutputStream(Path outputFile)Gets the output stream of the given file (which will be created if it does not exist).static SAXTransformerFactorygetSaxTransformerFactory()Gets aSAXTransformerFactorystatic StreamResultsetResult(TransformerHandler transformerHandler, OutputStream outputStream)Sets the result of a transformer handler into an output stream.static voidsetStandardOutputProperties(TransformerHandler transformerHandler)Sets standard output properties to the transformer of the given handler, such as encoding and indentation.
-
-
-
Field Detail
-
__OUTPUT_FORMAT_PROPERTIES
private static final Properties __OUTPUT_FORMAT_PROPERTIES
-
__transformerFactory
private static SAXTransformerFactory __transformerFactory
-
-
Constructor Detail
-
Pipelines
private Pipelines()
-
-
Method Detail
-
getSaxTransformerFactory
public static SAXTransformerFactory getSaxTransformerFactory()
Gets aSAXTransformerFactory- Returns:
- a
SAXTransformerFactory
-
setStandardOutputProperties
public static void setStandardOutputProperties(TransformerHandler transformerHandler)
Sets standard output properties to the transformer of the given handler, such as encoding and indentation.- Parameters:
transformerHandler- The transformer handler
-
getOutputStream
public static OutputStream getOutputStream(Path outputFile) throws IOException
Gets the output stream of the given file (which will be created if it does not exist).- Parameters:
outputFile- The output file. Will be created if needed.- Returns:
- the output stream
- Throws:
IOException- if an I/O error occured
-
setResult
public static StreamResult setResult(TransformerHandler transformerHandler, OutputStream outputStream) throws IOException
Sets the result of a transformer handler into an output stream.- Parameters:
transformerHandler- The transformer handleroutputStream- The output stream- Returns:
- the stream result
- Throws:
IOException- if an I/O error occured
-
close
public static void close(StreamResult result)
Close the given stream result- Parameters:
result- the stream result
-
-