public abstract class CKAN extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiKey |
static String |
AUTH_CKAN_HEADER |
protected static String |
AUTHORIZATION_ERROR |
static String |
CKAN_API_PATH |
protected String |
CREATE |
protected String |
DELETE |
protected static String |
ERROR_KEY |
protected static String |
ERROR_TYPE_KEY |
protected static String |
ID_KEY |
static String |
LIMIT_KEY |
protected String |
LIST |
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
mapper |
protected static String |
MESSAGE_KEY |
protected String |
name |
protected static String |
NAME_KEY |
static String |
NAME_REGEX |
protected String |
nameRegex |
protected static String |
NOT_FOUND_ERROR |
static String |
OFFSET_KEY |
protected static String |
OWNER_ORG_KEY |
protected String |
PATCH |
protected String |
PURGE |
protected String |
READ |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
result |
protected static String |
RESULT_KEY |
protected static String |
SUCCESS_KEY |
protected String |
UPDATE |
protected javax.ws.rs.core.UriInfo |
uriInfo |
protected static String |
VALIDATION_ERROR |
| Modifier | Constructor and Description |
|---|---|
protected |
CKAN() |
| Modifier and Type | Method and Description |
|---|---|
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
checkName(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
checkName(String json) |
String |
create(String json) |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
createJsonNodeWithID(String id) |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
createJsonNodeWithNameAsID() |
protected void |
delete() |
void |
delete(boolean purge) |
String |
getApiKey() |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
getAsJsonNode(String json) |
protected String |
getAsString(org.gcube.com.fasterxml.jackson.databind.JsonNode node) |
protected org.gcube.common.gxhttp.request.GXHTTPStringRequest |
getGXHTTPStringRequest(String path,
boolean post) |
org.gcube.com.fasterxml.jackson.databind.JsonNode |
getJsonNodeResult() |
org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
protected Map<String,String> |
getMapWithID(String id) |
protected Map<String,String> |
getMapWithNameAsID() |
String |
getName() |
protected String |
getResultAndValidate(HttpURLConnection httpURLConnection) |
protected String |
getResultAsString(HttpURLConnection httpURLConnection) |
String |
list(int limit,
int offset) |
String |
patch(String json) |
protected void |
purge() |
String |
read() |
protected String |
sendGetRequest(String path,
Map<String,String> parameters) |
protected String |
sendPostRequest(String path,
org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) |
protected String |
sendPostRequest(String path,
String body) |
void |
setApiKey(String apiKey) |
void |
setName(String name) |
void |
setUriInfo(javax.ws.rs.core.UriInfo uriInfo) |
String |
update(String json) |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
validateCKANResponse(String json)
Validate the CKAN response and return the
|
protected static final String ID_KEY
protected static final String NAME_KEY
protected static final String ERROR_KEY
protected static final String ERROR_TYPE_KEY
protected static final String MESSAGE_KEY
protected static final String OWNER_ORG_KEY
protected static final String RESULT_KEY
protected static final String SUCCESS_KEY
public static final String LIMIT_KEY
public static final String OFFSET_KEY
protected static final String NOT_FOUND_ERROR
protected static final String AUTHORIZATION_ERROR
protected static final String VALIDATION_ERROR
public static final String CKAN_API_PATH
public static final String AUTH_CKAN_HEADER
public static final String NAME_REGEX
protected String LIST
protected String CREATE
protected String READ
protected String UPDATE
protected String PATCH
protected String DELETE
protected String PURGE
protected final org.gcube.com.fasterxml.jackson.databind.ObjectMapper mapper
protected String name
protected String apiKey
protected org.gcube.com.fasterxml.jackson.databind.JsonNode result
protected String nameRegex
protected javax.ws.rs.core.UriInfo uriInfo
public void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
public String getApiKey()
public void setApiKey(String apiKey)
public String getName()
public void setName(String name)
public org.gcube.com.fasterxml.jackson.databind.ObjectMapper getMapper()
public org.gcube.com.fasterxml.jackson.databind.JsonNode getJsonNodeResult()
protected org.gcube.com.fasterxml.jackson.databind.JsonNode getAsJsonNode(String json)
protected org.gcube.com.fasterxml.jackson.databind.JsonNode validateCKANResponse(String json)
json - protected String getAsString(org.gcube.com.fasterxml.jackson.databind.JsonNode node)
protected org.gcube.com.fasterxml.jackson.databind.JsonNode checkName(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
protected org.gcube.com.fasterxml.jackson.databind.JsonNode checkName(String json)
protected org.gcube.com.fasterxml.jackson.databind.JsonNode createJsonNodeWithID(String id)
protected org.gcube.com.fasterxml.jackson.databind.JsonNode createJsonNodeWithNameAsID()
protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest(String path, boolean post) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected String getResultAsString(HttpURLConnection httpURLConnection) throws IOException
IOExceptionprotected String getResultAndValidate(HttpURLConnection httpURLConnection) throws IOException
IOExceptionprotected String sendPostRequest(String path, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
public String list(int limit, int offset)
public String read()
protected void delete()
public void delete(boolean purge)
protected void purge()
Copyright © 2021. All Rights Reserved.