Revision 57636
Added by Sandro La Bruzzo over 4 years ago
DataciteOfflineResolver.java | ||
---|---|---|
46 | 46 |
@Override |
47 | 47 |
public DLIResolvedObject resolve(final String pid, final String pidType) { |
48 | 48 |
final String result = requestURL(esUrl + pid.replaceAll("/","%2F")); |
49 |
return parseResponse(result); |
|
49 |
return parseResponse(result,pid.equals("10.15468/dl.cdvqih"));
|
|
50 | 50 |
} |
51 | 51 |
|
52 |
private DLIResolvedObject parseResponse(String result) { |
|
52 |
private DLIResolvedObject parseResponse(String result, final boolean skipAbstract) {
|
|
53 | 53 |
if (result == null) { |
54 | 54 |
return null; |
55 | 55 |
} |
... | ... | |
62 | 62 |
|
63 | 63 |
root = root.getAsJsonObject("_source").getAsJsonObject("attributes"); |
64 | 64 |
|
65 |
if (root.has("descriptions") && root.get("descriptions").isJsonArray()) { |
|
65 |
if (skipAbstract==false && root.has("descriptions") && root.get("descriptions").isJsonArray()) {
|
|
66 | 66 |
final JsonArray descriptions = root.get("descriptions").getAsJsonArray(); |
67 | 67 |
for (JsonElement description: descriptions) { |
68 | 68 |
if (!description.isJsonNull() && description.isJsonObject()) { |
Also available in: Unified diff
Added failedCallback to mdstore plugin invocation