Skip to content

Commit

Permalink
Merge #1914 from branch '1878-sortContextJsonld' of https://github.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Sep 29, 2023
2 parents 03720ef + 5a8f955 commit 7c2be26
Show file tree
Hide file tree
Showing 2 changed files with 361 additions and 359 deletions.
6 changes: 4 additions & 2 deletions src/main/java/de/hbz/lobid/helper/EtikettMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,15 @@ private void initContext() {
}

/**
* Generates context.json based on labels.json. Stores into filesystem.
* Generates context.json based on labels.json.
* Stores into filesystem, alphabetically sorted.
*/
public void writeContext() {
logger.info("Writing context file ...");
try {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.enable(SerializationFeature.INDENT_OUTPUT)
objectMapper.enable(SerializationFeature.INDENT_OUTPUT) //
.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS) //
.writeValue(new File(getContextLocation()), context);
logger.info(
"... done writing context file to " + getContextLocation() + ".");
Expand Down
Loading

0 comments on commit 7c2be26

Please sign in to comment.