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
)void
DELETE()
Delete a graph.org.apache.jena.graph.Graph
GET()
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=
)void
POST the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.void
POST
(org.apache.jena.graph.Graph graph) POST a graph.void
PUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.void
PUT
(org.apache.jena.graph.Graph graph) PUT a graph.static GSP
request()
Create a request to the remote service (without GSP naming).static GSP
Create 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. SeeDSP
for 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. SeeDSP
for 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.
-