Client for dataset operations over HTTP.
for graph operations, see GSP which is the client-side of
SPARQL 1.1 Graph Store Protocol.
This class provided GET, POST, PUT and clear() on datasets. DELETE is not supported. HTTP DELETE means "remove resource", not "clear resource".
Examples:
// Get the dataset.
DatasetGraph graph = DSP.service("http://example/dataset").GET();
// POST (add) to a dataset
DatasetGraph myData = ...;
GSP.service("http://example/dataset").POST(myData);
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear - delete named graphs, empty the default graph - similar to SPARQL "CLEAR ALL"GET()GET dataset.voidPOST the contents of a file using the filename extension to determine the Content-Type to use if not already set.voidPOST(DatasetGraph dataset) POST a datasetvoidPUT the contents of a file using the filename extension to determine the Content-Type to use if not already set.voidPUT(DatasetGraph dataset) PUT a datasetstatic DSPrequest()Create a request to the remote service (without GSP naming).static DSPCreate a request to the remote service.Methods inherited from class org.apache.jena.sparql.exec.http.StoreProtocol
accept, acceptHeader, contentType, contentTypeHeader, copySetup, endpoint, httpClient, httpHeader
-
Method Details
-
service
Create a request to the remote service. -
request
Create a request to the remote service (without GSP naming). CallStoreProtocol.endpoint(java.lang.String)to set the target. -
GET
GET dataset.If the remote end is a graph, the result is a dataset with that graph data in the default graph of the dataset.
-
POST
POST the contents of a file using the filename extension to determine the Content-Type to use if not already set.This operation does not parse the file.
-
POST
POST a dataset -
PUT
PUT the contents of a file using the filename extension to determine the Content-Type to use if not already set.This operation does not parse the file.
-
PUT
PUT a dataset -
clear
public void clear()Clear - delete named graphs, empty the default graph - similar to SPARQL "CLEAR ALL"
-