Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #37. Support asset/ folders. #78

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading