Skip to content

Commit

Permalink
Remove hardcoded column handling
Browse files Browse the repository at this point in the history
  • Loading branch information
skodapetr committed Feb 8, 2024
1 parent afe6a78 commit 434fa49
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/main/java/cz/gov/data/ms/action/DownloadSharepointList.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package cz.gov.data.ms.action;

import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.microsoft.graph.requests.GraphServiceClient;
import cz.gov.data.ms.sharepoint.SharePointListToRdf;
import cz.gov.data.ms.AzureAuthentication;
Expand Down Expand Up @@ -54,7 +52,6 @@ protected void downloadList(
.downloadList(siteIdentifier, listIdentifier);

var customHandlers = new HashMap<String, SharePointListToRdf.Handler>();
customHandlers.put("Obr_x00e1_zek", createImageHandler());

var statements = SharePointListToRdf
.toRdf(sharepointList, baseUrl, customHandlers);
Expand All @@ -65,18 +62,6 @@ protected void downloadList(
}
}

protected SharePointListToRdf.Handler createImageHandler() {
return (valueFactory, value, target) -> {
if (value == null) {
target.set();
return;
}
JsonElement root = JsonParser.parseString(value.getAsString());
String file = root.getAsJsonObject().get("fileName").getAsString();
target.set(valueFactory.createLiteral(file));
};
}

protected void write(
List<Statement> statements,
Path outputPath) throws IOException {
Expand Down

0 comments on commit 434fa49

Please sign in to comment.