public class RDFConnectionRemote extends Object implements RDFConnection
RDFConnection interface using remote SPARQL operations.Transactional.Promote| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
begin() |
void |
begin(ReadWrite mode) |
void |
begin(TxnType txnType) |
void |
close()
Close this connection.
|
void |
commit() |
static RDFConnectionRemoteBuilder |
create()
Create a
RDFConnectionRemoteBuilder. |
static RDFConnectionRemoteBuilder |
create(RDFConnectionRemote base)
Create a
RDFConnectionRemoteBuilder initialized with the
settings of another RDFConnectionRemote. |
void |
delete()
Remove all data from the default graph.
|
void |
delete(String graph)
Delete a graph from the dataset.
|
void |
end() |
Model |
fetch()
Fetch the default graph.
|
Model |
fetch(String graphName)
Fetch a named graph.
|
Dataset |
fetchDataset()
Fetch the contents of the dataset
|
String |
getDestination()
Return the destination URL for the connection.
|
org.apache.http.client.HttpClient |
getHttpClient()
Return the
HttpClient in-use. |
org.apache.http.protocol.HttpContext |
getHttpContext()
Return the
HttpContext in-use. |
boolean |
isClosed()
Test whether this connection is closed or not
|
boolean |
isInTransaction() |
void |
load(Model model)
Load (add, append) RDF into the default graph of a dataset.
|
void |
load(String file)
Load (add, append) RDF into the default graph of a dataset.
|
void |
load(String graphName,
Model model)
Load (add, append) RDF into a named graph in a dataset.
|
void |
load(String graph,
String file)
Load (add, append) RDF into a named graph in a dataset.
|
void |
loadDataset(Dataset dataset) |
void |
loadDataset(String file) |
boolean |
promote(Transactional.Promote promote) |
void |
put(Model model)
Set the contents of the default graph of a dataset.
|
void |
put(String file)
Set the contents of the default graph of a dataset.
|
void |
put(String graphName,
Model model)
Set the contents of a named graph of a dataset.
|
void |
put(String graph,
String file)
Set the contents of a named graph of a dataset.
|
void |
putDataset(Dataset dataset) |
void |
putDataset(String file) |
QueryExecution |
query(Query query)
Setup a SPARQL query execution.
|
QueryExecution |
query(String queryString)
Setup a SPARQL query execution.
|
boolean |
queryAsk(String queryString)
Execute a ASK query and return a boolean
|
Model |
queryConstruct(String queryString)
Execute a CONSTRUCT query and return as a Model
|
Model |
queryDescribe(String queryString)
Execute a DESCRIBE query and return as a Model
|
void |
queryResultSet(String queryString,
Consumer<ResultSet> resultSetAction)
Execute a SELECT query and process the ResultSet with the handler code.
|
void |
querySelect(String queryString,
Consumer<QuerySolution> rowAction)
Execute a SELECT query and process the rows of the results with the handler code.
|
ReadWrite |
transactionMode() |
TxnType |
transactionType() |
void |
update(String updateString)
Execute a SPARQL Update.
|
void |
update(UpdateRequest update)
Execute a SPARQL Update.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitqueryAsk, queryConstruct, queryDescribe, queryResultSet, querySelect, updatepromotepublic static RDFConnectionRemoteBuilder create()
RDFConnectionRemoteBuilder.public static RDFConnectionRemoteBuilder create(RDFConnectionRemote base)
RDFConnectionRemoteBuilder initialized with the
settings of another RDFConnectionRemote.public org.apache.http.client.HttpClient getHttpClient()
HttpClient in-use.public org.apache.http.protocol.HttpContext getHttpContext()
HttpContext in-use.public String getDestination()
public void queryResultSet(String queryString, Consumer<ResultSet> resultSetAction)
queryResultSet in interface RDFConnectionqueryResultSet in interface SparqlQueryConnectionqueryString - resultSetAction - public void querySelect(String queryString, Consumer<QuerySolution> rowAction)
querySelect in interface RDFConnectionquerySelect in interface SparqlQueryConnectionqueryString - rowAction - public Model queryConstruct(String queryString)
queryConstruct in interface RDFConnectionqueryConstruct in interface SparqlQueryConnectionpublic Model queryDescribe(String queryString)
queryDescribe in interface RDFConnectionqueryDescribe in interface SparqlQueryConnectionpublic boolean queryAsk(String queryString)
queryAsk in interface RDFConnectionqueryAsk in interface SparqlQueryConnectionpublic QueryExecution query(String queryString)
RDFConnectionQueryExecution should be done with try-resource.
Some QueryExecutions, such as ones connecting to a remote server,
need to be properly closed to release system resources.
See also RDFConnection.querySelect(String, Consumer), RDFConnection.queryConstruct(String),
RDFConnection.queryDescribe(String), RDFConnection.queryAsk(String)
for ways to execute queries of a specific form.query in interface RDFConnectionquery in interface SparqlQueryConnectionpublic QueryExecution query(Query query)
RDFConnectionRDFConnection.querySelect(Query, Consumer), RDFConnection.queryConstruct(Query),
RDFConnection.queryDescribe(Query), RDFConnection.queryAsk(Query)
for ways to execute queries for of a specific form.query in interface RDFConnectionquery in interface SparqlQueryConnectionpublic void update(String updateString)
RDFConnectionupdate in interface RDFConnectionupdate in interface SparqlUpdateConnectionpublic void update(UpdateRequest update)
RDFConnectionupdate in interface RDFConnectionupdate in interface SparqlUpdateConnectionpublic Model fetch(String graphName)
RDFDatasetAccessConnectionfetch in interface RDFDatasetAccessConnectiongraphName - URI string for the graph name (null or "default" for the default graph)public Model fetch()
RDFDatasetAccessConnectionfetch in interface RDFDatasetAccessConnectionpublic void load(String graph, String file)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectiongraph - Graph name (null or "default" for the default graph)file - File of the data.public void load(String file)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectionfile - File of the data.public void load(Model model)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectionmodel - Data.public void load(String graphName, Model model)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)model - Data.public void put(String graph, String file)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectiongraph - Graph name (null or "default" for the default graph)file - File of the data.public void put(String file)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectionfile - File of the data.public void put(String graphName, Model model)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)model - Data.public void put(Model model)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectionmodel - Data.public void delete(String graph)
RDFConnectiondelete in interface RDFConnectiondelete in interface RDFDatasetConnectionpublic void delete()
RDFConnectiondelete in interface RDFConnectiondelete in interface RDFDatasetConnectionpublic Dataset fetchDataset()
RDFDatasetAccessConnectionfetchDataset in interface RDFDatasetAccessConnectionpublic void loadDataset(String file)
loadDataset in interface RDFConnectionloadDataset in interface RDFDatasetConnectionpublic void loadDataset(Dataset dataset)
loadDataset in interface RDFConnectionloadDataset in interface RDFDatasetConnectionpublic void putDataset(String file)
putDataset in interface RDFConnectionputDataset in interface RDFDatasetConnectionpublic void putDataset(Dataset dataset)
putDataset in interface RDFConnectionputDataset in interface RDFDatasetConnectionpublic void close()
RDFConnectionclose in interface AutoCloseableclose in interface RDFConnectionclose in interface RDFDatasetAccessConnectionclose in interface RDFDatasetConnectionclose in interface SparqlQueryConnectionclose in interface SparqlUpdateConnectionpublic boolean isClosed()
RDFConnectionisClosed in interface RDFConnectionisClosed in interface RDFDatasetAccessConnectionisClosed in interface RDFDatasetConnectionpublic void begin()
begin in interface Transactionalpublic void begin(TxnType txnType)
begin in interface Transactionalpublic void begin(ReadWrite mode)
begin in interface Transactionalpublic boolean promote(Transactional.Promote promote)
promote in interface Transactionalpublic void commit()
commit in interface Transactionalpublic void abort()
abort in interface Transactionalpublic boolean isInTransaction()
isInTransaction in interface Transactionalpublic void end()
end in interface Transactionalpublic ReadWrite transactionMode()
transactionMode in interface Transactionalpublic TxnType transactionType()
transactionType in interface TransactionalLicenced under the Apache License, Version 2.0