forked from D-Net/dnet-hadoop
purg arg is the actual name of the item in the catalogue, not the OpenAIRE objIdentifier
This commit is contained in:
parent
3600d39f96
commit
d0f9891355
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue