Added get Item Url

This commit is contained in:
Fabio Sinibaldi 2019-12-02 17:18:14 +01:00
parent 165db95d79
commit c56d2d53a2
1 changed files with 8 additions and 1 deletions

View File

@ -28,7 +28,7 @@ public class CkanItemDescriptor {
private static final String METADATA_MODIFIED="$.metadata_modified";
private static final String AUTHOR="$.author";
private static final String MAINTAINER="$.maintainer";
private static final String ITEM_URL="$.extras[?(@.key=='Item URL')].value";
@NonNull
@Getter
@ -49,6 +49,7 @@ public class CkanItemDescriptor {
public String getProfile() {
List<String> values=getDocument().read(PROFILE);
if(values==null) return null;
return values.get(0);
}
@ -103,4 +104,10 @@ public class CkanItemDescriptor {
public String getMaintainer() {
return getDocument().read(MAINTAINER);
}
public String getItemUrl() {
List<String> values=getDocument().read(ITEM_URL);
if(values==null) return null;
return values.get(0);
}
}