Skip to content

Commit

Permalink
feat: generate mapping.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Aug 26, 2024
1 parent bdf75d2 commit fb92083
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jsonld-utility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.unece.uncefact</groupId>
<artifactId>vocab-jsonld-utility</artifactId>
<version>1.6.3</version>
<version>1.6.4</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ public static void generate(String workingDir, Set<String> inputFileNames, final
if (context == null) {
context = vocabulary.getJsonObject("@context");
}

JsonObjectBuilder mappingJsonObject = Json.createObjectBuilder();

for (String key:context.keySet()){
JsonString value = context.getJsonString(key);
mappingJsonObject.add(key, value);
}
new FileGenerator().generateFile(mappingJsonObject.build(), true, workingDir.concat("_data/").concat("mapping.json"));


JsonArray graph = vocabulary.getJsonArray("@graph");

Iterator<JsonValue> iterator = graph.iterator();
Expand Down

0 comments on commit fb92083

Please sign in to comment.