Skip to content

Commit

Permalink
FIX: Quads creator
Browse files Browse the repository at this point in the history
- Create directories if necessary
  • Loading branch information
JPugetGil committed Sep 17, 2024
1 parent 054bb6a commit 80b6d60
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions quads-creator/src/main/java/fr/vcity/QuadsCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ public static void main(String[] args) {
String annotationType = args[3]; // 4th argument: annotation type
String annotation = args[4]; // 5th argument: annotation type

File outputF = new File(outputFolder);

// Create the directory if it does not exist
if (outputF.mkdirs()) {
log.info("The folder ({}) was created successfully", outputF.getAbsolutePath());
}

if (inputFile.equals("*")) {
File folder = new File(inputFolder);

// Create the directory if it does not exist
if (folder.mkdirs()) {
log.info("The folder was created successfully");
}

if (folder.exists() && folder.isDirectory()) {
// Get the list of all files and directories in the folder
File[] filesList = folder.listFiles();
Expand All @@ -43,13 +45,13 @@ public static void main(String[] args) {
}
}
} else {
log.info("The specified folder does not exist or is not a directory.");
log.info("The specified folder ({}) does not exist or is not a directory.", folder.getAbsolutePath());
}
} else {
new RDFConverter(annotationType, annotation, inputFolder, inputFile, outputFolder)
.convert();
}

log.info("Quads saved to {}", outputFolder);
log.info("Quads saved to {}", outputF.getAbsolutePath());
}
}

0 comments on commit 80b6d60

Please sign in to comment.