Fix a "@JsonProperty" annotation inside "Payload.java".

This commit is contained in:
Lampros Smyrnaios 2022-04-01 23:43:43 +03:00
parent 31af0a81eb
commit 4976afa829
2 changed files with 5 additions and 2 deletions

View File

@ -49,8 +49,8 @@ public class Payload {
@JsonProperty("provenance")
private String provenance; // "crawl:<PluginName>"
@JsonProperty("provenance")
private String datasourceId; // "crawl:<PluginName>"
@JsonProperty("datasourceId")
private String datasourceId;
public Payload() {}

View File

@ -223,6 +223,9 @@ public class PublicationsRetrieverPlugin {
String urlId = data.getUrlId();
String datasourceId = urlIdsWithDatasourceIds.get(urlId);
// Each record will have the urlID, the datasourceID and possibly one filename, which may contain a different urlID.
// The Controller will select the correct datasourceID for before adding it inside the S3-ObjectStore filename.
Payload payload = new Payload(urlId, data.getSourceUrl(), docOrDatasetUrl, timestamp, mimeType, size, hash, fileLocation, "crawl:PublicationsRetriever", datasourceId);
// TODO - If support is added for other doc-formats other than "pdf", then make sure the "mime_type" is correctly specified.