Skip to content

Commit d174dce

Browse files
committed
Rename single-record lobid and hebis transformation files (RPB-225)
1 parent 3e41238 commit d174dce

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

app/controllers/nwbib/Application.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,10 +1013,10 @@ private static Promise<Result> transformAndIndex(String id, JsonNode jsonBody)
10131013

10141014
private static JsonNode transformStrapiToLobid(JsonNode jsonBody)
10151015
throws IOException, FileNotFoundException, RecognitionException {
1016-
File input = new File("conf/output/test-output-strapi.json");
1017-
File output = new File("conf/output/test-output-0.json");
1016+
File input = new File("conf/output/single-strapi-to-lobid-input.json");
1017+
File output = new File("conf/output/single-strapi-to-lobid-output.json");
10181018
Files.write(Paths.get(input.getAbsolutePath()), jsonBody.toString().getBytes(Charset.forName(UTF_8)));
1019-
ETL.main(new String[] {"conf/rpb-test-titel-to-lobid.flux"});
1019+
ETL.main(new String[] {"conf/rpb-titel-single-strapi-to-lobid.flux"});
10201020
String result = Files.readAllLines(Paths.get(output.getAbsolutePath())).stream().collect(Collectors.joining("\n"));
10211021
return Json.parse(result);
10221022
}
@@ -1051,10 +1051,10 @@ private static Promise<JsonNode> addToHebisData(JsonNode transformedJson) {
10511051

10521052
private static JsonNode transformHebisToLobid(String xmlBody)
10531053
throws IOException, FileNotFoundException, RecognitionException {
1054-
File input = new File("conf/output/test-output-hebis.xml");
1055-
File output = new File("conf/output/test-output-0.json");
1054+
File input = new File("conf/output/single-hebis-to-lobid-input.xml");
1055+
File output = new File("conf/output/single-hebis-to-lobid-output.json");
10561056
Files.write(Paths.get(input.getAbsolutePath()), xmlBody.getBytes());
1057-
ETL.main(new String[] {"conf/rpb-test-titel-hebis-to-lobid.flux"});
1057+
ETL.main(new String[] {"conf/rpb-titel-single-hebis-to-lobid.flux"});
10581058
String result = Files.readAllLines(Paths.get(output.getAbsolutePath())).stream().collect(Collectors.joining("\n"));
10591059
return Json.parse(result);
10601060
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FLUX_DIR + "output/test-output-hebis.xml"
1+
FLUX_DIR + "output/single-hebis-to-lobid-input.xml"
22
| open-file
33
| decode-xml
44
| handle-marcxml
55
| fix(FLUX_DIR + "hebisMarc2lobid-transformation/marcToLobid.fix", *)
66
| batch-reset(batchsize="1")
77
| encode-json(prettyPrinting="true")
8-
| write(FLUX_DIR + "output/test-output-${i}.json")
8+
| write(FLUX_DIR + "output/single-hebis-to-lobid-output.json")
99
;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FLUX_DIR + "output/single-strapi-to-lobid-input.json"
2+
| open-file
3+
| as-lines
4+
| decode-json
5+
| fix(FLUX_DIR + "rpb-titel-to-lobid.fix")
6+
| batch-reset(batchsize="1")
7+
| encode-json(prettyPrinting="true")
8+
| write(FLUX_DIR + "output/single-strapi-to-lobid-output.json")
9+
;

0 commit comments

Comments
 (0)