Skip to content

Commit

Permalink
Fix: #37. Support asset/ folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnespolino committed Nov 3, 2023
1 parent 25a0abd commit 4f86826
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
implementation 'io.swagger:swagger-annotations:1.5.20'
implementation 'org.mapstruct:mapstruct:1.4.2.Final'

runtimeOnly 'mysql:mysql-connector-java:8.0.33'
runtimeOnly 'com.mysql:mysql-connector-j:8.2.0'

compileOnly 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
Expand Down
3 changes: 3 additions & 0 deletions config/dependency-check/dependency-check-known-issues.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
<suppress>
<cve>CVE-2023-4759</cve>
</suppress>
<suppress>
<cve>CVE-2023-45960</cve>
</suppress>
</suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ private <P extends SemanticAssetPath> List<P> findPaths(Path clonedRepo, Semanti
Path assetRootPath = Path.of(clonedRepo.toString(), type.getFolderName());
if (!fileUtils.folderExists(assetRootPath)) {
log.warn("No {} folder found in {}", type.getDescription(), clonedRepo);
return List.of();

assetRootPath = Path.of(clonedRepo.toString(), type.getLegacyFolderName());
if (!fileUtils.folderExists(assetRootPath)) {
return List.of();
}
}

return createSemanticAssetPaths(assetRootPath, scanner, type.isIgnoringObsoleteVersions());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,32 @@
@Getter
public enum SemanticAssetType {
ONTOLOGY("ontology",
"assets/ontologies",
"Ontologie",
"http://www.w3.org/2002/07/owl#Ontology",
true),
CONTROLLED_VOCABULARY("controlled vocabulary",
"assets/vocabularies",
"VocabolariControllati",
"http://dati.gov.it/onto/dcatapit#Dataset",
false),
SCHEMA("schema",
"assets/schemas",
"Schema",
"http://dati.gov.it/onto/dcatapit#Dataset",
false);

private final String description;
private final String folderName;
private final String legacyFolderName;
private final String typeIri;
private final boolean isIgnoringObsoleteVersions;

SemanticAssetType(String description, String folderName, String typeIri,
boolean isIgnoringObsoleteVersions) {
SemanticAssetType(String description, String folderName, String legacyFolderName,
String typeIri, boolean isIgnoringObsoleteVersions) {
this.description = description;
this.folderName = folderName;
this.legacyFolderName = legacyFolderName;
this.typeIri = typeIri;
this.isIgnoringObsoleteVersions = isIgnoringObsoleteVersions;
}
Expand Down

0 comments on commit 4f86826

Please sign in to comment.