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 TypeMethodDescriptionSend request for the default graph (that is,?default)voidDELETE()Delete a graph.org.apache.jena.graph.GraphGET()Get a graphSend request for a named graph (that is,?graph=)graphName(org.apache.jena.graph.Node graphName) 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(org.apache.jena.graph.Graph graph) POST a graph.voidPUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.voidPUT(org.apache.jena.graph.Graph graph) PUT a graph.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) -
GET
public org.apache.jena.graph.Graph 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.
If the data may have quads (named graphs), use
DSP.POST(String). -
POST
public void POST(org.apache.jena.graph.Graph graph) 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
DSP.PUT(String). -
PUT
public void PUT(org.apache.jena.graph.Graph graph) PUT a graph. -
DELETE
public void DELETE()Delete a graph.
-