Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenkroon committed Mar 29, 2022
2 parents 87eadf9 + 8fb1c69 commit db2e33d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/main/java/nl/imvertor/YamlCompiler/YamlCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,21 @@ public boolean generateKING() throws Exception {
// pretty print and store to json folder
if (succeeds) {

// convert the json xml to Json.
// convert the json xml to Json without schema reference.
XmlFile jsonXmlMappingFile = new XmlFile(configurator.getXParm("properties/RESULT_XML4JSONMAPPING_FILE_PATH"));
JsonFile jsonFile = new JsonFile(configurator.getXParm("properties/RESULT_JSON_FROM_XML4JSON_FILE_PATH"));
YamlFile yamlFile2 = new YamlFile(configurator.getXParm("properties/RESULT_YAML_FROM_XML4JSON_FILE_PATH"));

jsonXmlMappingFile.toJson(jsonFile);
jsonFile.toYaml(yamlFile2);

// convert the json xml to Json with schema reference.
XmlFile jsonXmlMappingFile2 = new XmlFile(configurator.getXParm("properties/RESULT_XML4JSONMAPPING_FILE_PATH2"));
JsonFile jsonFile2 = new JsonFile(configurator.getXParm("properties/RESULT_JSON_FROM_XML4JSON_FILE_PATH2"));

jsonXmlMappingFile2.toJson(jsonFile2);

// convert for debug purposes the Json file generated in line 112 to a Json-mapping file.
XmlFile jsonXmlMappingFile3 = new XmlFile(configurator.getXParm("properties/RESULT_XML4JSONMAPPING_FILE_PATH3"));
JsonFile bodyFile = new JsonFile(configurator.getXParm("properties/RESULT_YAMLBODY_FILE_PATH"));
JsonFile bodyFile2 = new JsonFile(configurator.getXParm("properties/RESULT_YAMLBODY_FILE_PATH2"));
Expand Down
9 changes: 7 additions & 2 deletions src/main/resources/cfg/YamlCompiler/parms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@
<RESULT_YAMLHEADER_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.1.yaml-header.yml</RESULT_YAMLHEADER_FILE_PATH>
<RESULT_YAMLBODY_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.2.yaml-body.json</RESULT_YAMLBODY_FILE_PATH>
<RESULT_YAMLBODY_FILE_PATH2>${system/work-imvert-folder-path}/imvertor.80.3.yaml-body.json</RESULT_YAMLBODY_FILE_PATH2>
<RESULT_YAML_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.4.yaml.yml</RESULT_YAML_FILE_PATH>
<RESULT_YAML_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.4.yaml.yml</RESULT_YAML_FILE_PATH>

<RESULT_XML4JSONMAPPING_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.5.xml4jsonmapping.xml</RESULT_XML4JSONMAPPING_FILE_PATH>
<RESULT_XML4JSONMAPPING_FILE_PATH2>${system/work-imvert-folder-path}/imvertor.80.6.xml4jsonmapping.xml</RESULT_XML4JSONMAPPING_FILE_PATH2>
<RESULT_JSON_FROM_XML4JSON_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.7.xml4jsonmapping.json</RESULT_JSON_FROM_XML4JSON_FILE_PATH>
<RESULT_JSON_FROM_XML4JSON_FILE_PATH2>${system/work-imvert-folder-path}/imvertor.80.8.xml4jsonmapping.json</RESULT_JSON_FROM_XML4JSON_FILE_PATH2>
<RESULT_YAML_FROM_XML4JSON_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.9.xml4jsonmapping.json</RESULT_YAML_FROM_XML4JSON_FILE_PATH>
<RESULT_XML4JSONMAPPING_FILE_PATH3>${system/work-imvert-folder-path}/imvertor.80.10.xml4jsonmapping.xml</RESULT_XML4JSONMAPPING_FILE_PATH3>
<RESULT_XML4YAML_HEADER_MAPPING_FILE_PATH>${system/work-imvert-folder-path}/imvertor.80.11.xml4yamlheadermapping.xml</RESULT_XML4YAML_HEADER_MAPPING_FILE_PATH>



<!--RESULT_YAMLHEADER2_FILE_PATH>${system/work-imvert-folder-path}/imvertor.36.1.yaml-header.yml</RESULT_YAMLHEADER2_FILE_PATH>
<RESULT_YAMLBODY2_FILE_PATH>${system/work-imvert-folder-path}/imvertor.36.2.yaml-body.yml</RESULT_YAMLBODY2_FILE_PATH>
Expand All @@ -70,7 +74,8 @@

<IMVERTOR_METAMODEL_KING_YAMLHEADER_XSLPATH>Imvert2Yaml-header.xsl</IMVERTOR_METAMODEL_KING_YAMLHEADER_XSLPATH>
<IMVERTOR_METAMODEL_KING_YAMLBODY_XSLPATH>Imvert2Yaml-body.xsl</IMVERTOR_METAMODEL_KING_YAMLBODY_XSLPATH>
<IMVERTOR_METAMODEL_KING_XML4JSONMAPPING_XSLPATH>Imvert2Xml4JsonMapping-body.xsl</IMVERTOR_METAMODEL_KING_XML4JSONMAPPING_XSLPATH>
<IMVERTOR_METAMODEL_KING_XML4JSONMAPPING_XSLPATH>Imvert2XML-4-JSON-mapping.xsl</IMVERTOR_METAMODEL_KING_XML4JSONMAPPING_XSLPATH>
<IMVERTOR_METAMODEL_KING_XML4YAML_HEADER_MAPPING_XSLPATH>Imvert2XML-4-YAML-header-mapping.xsl</IMVERTOR_METAMODEL_KING_XML4YAML_HEADER_MAPPING_XSLPATH>

<!-- Kadaster -->
<RESULT_METAMODEL_NEN3610_BSM_MIGRATE>${system/work-imvert-folder-path}/imvertor.25.3.1.nen3610-migrate.xml</RESULT_METAMODEL_NEN3610_BSM_MIGRATE>
Expand Down

0 comments on commit db2e33d

Please sign in to comment.