Package org.isda.cdm.codelist
Class CodeListTransformer
java.lang.Object
org.isda.cdm.codelist.CodeListTransformer
This class transforms `https://docs.oasis-open.org/codelist/ns/genericode/1.0/` codelist XML files to JSON-serialized CDM format using an XSLT script.
The transformation applies to all XML files in a specified directory.
Results are stored in the specified output directory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidEntry point for manually running the FpML Coding Schemes default transformation.voidtransformDirectory(String inputDirectory, String outputDirectory) Transforms all XML files in the given input directory and saves them as JSON in the output directory.
-
Constructor Details
-
CodeListTransformer
public CodeListTransformer()
-
-
Method Details
-
transformDirectory
public void transformDirectory(String inputDirectory, String outputDirectory) throws TransformerConfigurationException, IOException, URISyntaxException Transforms all XML files in the given input directory and saves them as JSON in the output directory. This method initializes a single Transformer instance to process multiple files.- Parameters:
inputDirectory- Directory containing XML files (resource path).outputDirectory- Directory where JSON files will be saved.- Throws:
TransformerConfigurationException- If an error occurs when parsing the Source or it is not possible to create a Transformer instanceIOException- If an error occurs during transformation resources resolutionURISyntaxException- If the resource URL are not properly formatted
-
main
Entry point for manually running the FpML Coding Schemes default transformation.- Parameters:
args- Command-line arguments (not used).
-