Class CodeListTransformer

java.lang.Object
org.isda.cdm.codelist.CodeListTransformer

public class CodeListTransformer extends Object
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 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 instance
      IOException - If an error occurs during transformation resources resolution
      URISyntaxException - If the resource URL are not properly formatted
    • main

      public static void main(String[] args)
      Entry point for manually running the FpML Coding Schemes default transformation.
      Parameters:
      args - Command-line arguments (not used).