Client for the
SPARQL 1.1 Graph Store Protocol.
This is extended to include operations GET, POST and PUT on datasets.
Examples:
// Get the default graph.
Graph graph = GSP.service("http://example/dataset").defaultGraph().GET();
// Get a named graph.
Graph graph = GSP.service("http://example/dataset").namedGraph("http://my/graph").GET();
// POST (add) to a named graph.
Graph myData = ...;
GSP.service("http://example/dataset").namedGraph("http://my/graph").POST(myData);
See DSP for operations on datasets.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.dataset()Deprecated.UseDSP.Send request for the default graph (that is,?default)voidDELETE()Delete a graph.GET()Get a graphDeprecated.UseDSP.GET()Send request for a named graph (that is,?graph=)Send request for a named graph (that is,?graph=)voidPOST the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.voidPOST a graph.voidpostDataset(String file) Deprecated.UseDSP.POST(String)voidpostDataset(DatasetGraph dataset) Deprecated.voidPUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.voidPUT a graph.voidputDataset(String file) Deprecated.UseDSP.PUT(String)voidputDataset(DatasetGraph dataset) Deprecated.static GSPrequest()Create a request to the remote service (without GSP naming).static GSPCreate a request to the remote serviceURL (without a URL query string).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 serviceURL (without a URL query string). CalldefaultGraph()orgraphName(String)to select the target graph. SeeDSPfor dataset operations.- Parameters:
service-
-
request
Create a request to the remote service (without GSP naming). CallStoreProtocol.endpoint(java.lang.String)to set the target. CalldefaultGraph()orgraphName(String)to select the target graph. SeeDSPfor dataset operations. -
graphName
Send request for a named graph (that is,?graph=) -
graphName
Send request for a named graph (that is,?graph=) -
defaultGraph
Send request for the default graph (that is,?default) -
dataset
Deprecated.UseDSP.Send request for the dataset. This is "no GSP naming". -
GET
Get a graph -
POST
POST the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.This operation does not parse the file.
-
POST
POST a graph. -
PUT
PUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.This operation does not parse the file.
If the data may have quads (named graphs), use
putDataset(String). -
PUT
PUT a graph. -
DELETE
public void DELETE()Delete a graph. -
getDataset
Deprecated.UseDSP.GET() -
postDataset
Deprecated.UseDSP.POST(String) -
postDataset
Deprecated. -
putDataset
Deprecated.UseDSP.PUT(String) -
putDataset
Deprecated. -
clearDataset
Deprecated.UseDSP.clear()
-
DSP.clear()