purg arg is the actual name of the item in the catalogue, not the OpenAIRE objIdentifier

This commit is contained in:
Alessia Bardi 2020-07-02 16:04:48 +02:00
parent 3600d39f96
commit d0f9891355
1 changed files with 1 additions and 6 deletions

View File

@ -118,8 +118,7 @@ public class GCatAPIClient {
}
}
public boolean purge(final String objidentifier) throws IOException, URISyntaxException {
String resCatName = getCatalogueNameFrom(objidentifier);
public boolean purge(final String resCatName) throws IOException, URISyntaxException {
try (CloseableHttpClient client = HttpClients.createDefault()) {
URIBuilder builder = new URIBuilder(getGcatBaseURL() + itemPath + "/" + resCatName)
.addParameter("purge", "true");
@ -158,10 +157,6 @@ public class GCatAPIClient {
return deleted;
}
protected String getCatalogueNameFrom(final String objIdentifier) {
return objIdentifier.replaceAll(":", "-");
}
public String getGcatBaseURL() {
return gcatBaseURL;
}