public abstract class AbstractResourceIT extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.http.client.HttpClient |
client |
protected static String |
HOSTNAME |
protected org.slf4j.Logger |
logger |
protected static String |
PROTOCOL |
protected static int |
SERVER_PORT |
protected static String |
serverAddress |
| Constructor and Description |
|---|
AbstractResourceIT() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addMixin(String pid,
String mixinUrl) |
protected static org.apache.http.client.HttpClient |
createClient() |
protected org.apache.http.HttpResponse |
createDatastream(String pid,
String dsid,
String content) |
protected org.apache.http.HttpResponse |
createObject(String pid) |
protected org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpUriRequest method) |
protected org.apache.http.HttpResponse |
executeWithBasicAuth(org.apache.http.client.methods.HttpUriRequest request,
String username,
String password) |
protected String |
getContentType(org.apache.http.client.methods.HttpUriRequest method) |
protected com.hp.hpl.jena.update.GraphStore |
getGraphStore(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest method) |
protected com.hp.hpl.jena.update.GraphStore |
getGraphStore(org.apache.http.HttpResponse response) |
protected com.hp.hpl.jena.update.GraphStore |
getGraphStore(org.apache.http.client.methods.HttpUriRequest method) |
protected static String |
getRandomPropertyName()
Gets a random (but valid) property name for use in testing.
|
protected static String |
getRandomPropertyValue()
Gets a random (but valid) property value for use in testing.
|
protected static String |
getRandomUniquePid()
Gets a random (but valid) pid for use in testing.
|
protected int |
getStatus(org.apache.http.client.methods.HttpUriRequest method) |
protected static org.apache.http.client.methods.HttpPost |
postDSMethod(String pid,
String ds,
String content) |
protected static org.apache.http.client.methods.HttpPost |
postObjMethod(String pid) |
protected static org.apache.http.client.methods.HttpPost |
postObjMethod(String pid,
String query) |
protected static org.apache.http.client.methods.HttpPut |
putDSMethod(String pid,
String ds,
String content) |
protected static org.apache.http.client.methods.HttpPut |
putObjMethod(String pid) |
void |
setLogger() |
protected org.apache.http.HttpResponse |
setProperty(String pid,
String propertyUri,
String value) |
protected org.apache.http.HttpResponse |
setProperty(String pid,
String txId,
String propertyUri,
String value) |
protected org.slf4j.Logger logger
protected static final int SERVER_PORT
protected static final String HOSTNAME
protected static final String PROTOCOL
protected static final String serverAddress
protected static org.apache.http.client.HttpClient client
public AbstractResourceIT()
public void setLogger()
protected static org.apache.http.client.HttpClient createClient()
protected static org.apache.http.client.methods.HttpPost postObjMethod(String pid)
protected static org.apache.http.client.methods.HttpPut putObjMethod(String pid)
protected static org.apache.http.client.methods.HttpPost postObjMethod(String pid, String query)
protected static org.apache.http.client.methods.HttpPost postDSMethod(String pid, String ds, String content) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected static org.apache.http.client.methods.HttpPut putDSMethod(String pid, String ds, String content) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest method) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionprotected org.apache.http.HttpResponse executeWithBasicAuth(org.apache.http.client.methods.HttpUriRequest request, String username, String password) throws IOException
IOExceptionprotected int getStatus(org.apache.http.client.methods.HttpUriRequest method) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionprotected String getContentType(org.apache.http.client.methods.HttpUriRequest method) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionprotected com.hp.hpl.jena.update.GraphStore getGraphStore(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest method) throws IOException
IOExceptionprotected com.hp.hpl.jena.update.GraphStore getGraphStore(org.apache.http.HttpResponse response) throws IOException
IOExceptionprotected com.hp.hpl.jena.update.GraphStore getGraphStore(org.apache.http.client.methods.HttpUriRequest method) throws IOException
IOExceptionprotected org.apache.http.HttpResponse createObject(String pid) throws IOException
IOExceptionprotected org.apache.http.HttpResponse createDatastream(String pid, String dsid, String content) throws IOException
IOExceptionprotected org.apache.http.HttpResponse setProperty(String pid, String propertyUri, String value) throws IOException
IOExceptionprotected org.apache.http.HttpResponse setProperty(String pid, String txId, String propertyUri, String value) throws IOException
IOExceptionprotected static void addMixin(String pid, String mixinUrl) throws IOException
IOExceptionprotected static String getRandomUniquePid()
protected static String getRandomPropertyName()
protected static String getRandomPropertyValue()
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.