Package gov.nasa.pds.tools.label
Class SchematronTransformer
- java.lang.Object
-
- gov.nasa.pds.tools.label.SchematronTransformer
-
public class SchematronTransformer extends Object
A class that transforms Schematron files based on the isoSchematron stylesheet.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description SchematronTransformer()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringfetch(URL schematron)Transform the given schematron.Stringfetch(URL schematron, ProblemHandler handler)Transform the given schematron.Transformertransform(String source)Transformertransform(String source, ProblemHandler handler)Transformertransform(Source source)Transform the given schematron source.Transformertransform(Source source, ProblemHandler handler)Transform the given schematron source.
-
-
-
Constructor Detail
-
SchematronTransformer
public SchematronTransformer() throws TransformerConfigurationExceptionConstructor.- Throws:
TransformerConfigurationException- A transformer configuration error occurred.
-
-
Method Detail
-
transform
public Transformer transform(Source source) throws TransformerException
Transform the given schematron source.- Parameters:
source- The schematron source.- Returns:
- A transformed schematron.
- Throws:
TransformerException- If an error occurred during the transform process.
-
transform
public Transformer transform(Source source, ProblemHandler handler) throws TransformerException
Transform the given schematron source.- Parameters:
source- The schematron source.handler- Container to hold problems that occurred during the transform process.- Returns:
- A transformed schematron.
- Throws:
TransformerException- If an error occurred during the transform process.
-
transform
public Transformer transform(String source) throws TransformerException
- Throws:
TransformerException
-
transform
public Transformer transform(String source, ProblemHandler handler) throws TransformerException
- Throws:
TransformerException
-
fetch
public String fetch(URL schematron) throws TransformerException
Transform the given schematron.- Parameters:
schematron- The URL to the schematron.- Returns:
- A transformed schematron.
- Throws:
TransformerException- If an error occurred during the transform process.
-
fetch
public String fetch(URL schematron, ProblemHandler handler) throws TransformerException
Transform the given schematron.- Parameters:
schematron- the URL to the schematron.handler- an problem handler to capture problems.- Returns:
- a transformed schematron.
- Throws:
TransformerException- if an error occurred during the transform process.
-
-