public interface RDFConnection extends SparqlQueryConnection, SparqlUpdateConnection, RDFDatasetConnection, Transactional, AutoCloseable
SparqlQueryConnection)
SparqlUpdateConnection)
RDFDatasetConnection).
RDFConnection provides transaction boundaries. If not in a
transaction, an implicit transactional wrapper is applied ("autocommit").
Remote SPARQL operations are atomic but without additional capabilities from
the remote server, multiple operations are not combined into a single
transaction.
Not all implementations may implement all operations.
See the implementation notes for details.Transactional.Promote| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this connection.
|
void |
delete()
Remove all data from the default graph.
|
void |
delete(String graphName)
Delete a graph from the dataset.
|
Model |
fetch()
Fetch the default graph.
|
Model |
fetch(String graphName)
Fetch a named graph.
|
Dataset |
fetchDataset()
Fetch the contents of the dataset
|
boolean |
isClosed()
Test whether this connection is closed or not
|
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 graphName,
String file)
Load (add, append) RDF into a named graph in a dataset.
|
void |
loadDataset(Dataset dataset) |
void |
loadDataset(String file) |
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 graphName,
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.
|
default QueryExecution |
query(String queryString)
Setup a SPARQL query execution.
|
default boolean |
queryAsk(Query query)
Execute a ASK query and return a boolean
|
default boolean |
queryAsk(String queryString)
Execute a ASK query and return a boolean
|
default Model |
queryConstruct(Query query)
Execute a CONSTRUCT query and return as a Model
|
default Model |
queryConstruct(String queryString)
Execute a CONSTRUCT query and return as a Model
|
default Model |
queryDescribe(Query query)
Execute a DESCRIBE query and return as a Model
|
default Model |
queryDescribe(String queryString)
Execute a DESCRIBE query and return as a Model
|
default void |
queryResultSet(Query query,
Consumer<ResultSet> resultSetAction)
Execute a SELECT query and process the ResultSet with the handler code.
|
default void |
queryResultSet(String queryString,
Consumer<ResultSet> resultSetAction)
Execute a SELECT query and process the ResultSet with the handler code.
|
default void |
querySelect(Query query,
Consumer<QuerySolution> rowAction)
Execute a SELECT query and process the rows of the results with the handler code.
|
default void |
querySelect(String queryString,
Consumer<QuerySolution> rowAction)
Execute a SELECT query and process the rows of the results with the handler code.
|
default void |
update(String updateString)
Execute a SPARQL Update.
|
default void |
update(Update update)
Execute a SPARQL Update.
|
void |
update(UpdateRequest update)
Execute a SPARQL Update.
|
abort, begin, begin, begin, commit, end, isInTransaction, promote, promote, transactionMode, transactionTypedefault void queryResultSet(String queryString, Consumer<ResultSet> resultSetAction)
queryResultSet in interface SparqlQueryConnectionqueryString - resultSetAction - default void queryResultSet(Query query, Consumer<ResultSet> resultSetAction)
queryResultSet in interface SparqlQueryConnectionquery - resultSetAction - default void querySelect(String queryString, Consumer<QuerySolution> rowAction)
querySelect in interface SparqlQueryConnectionqueryString - rowAction - default void querySelect(Query query, Consumer<QuerySolution> rowAction)
querySelect in interface SparqlQueryConnectionquery - rowAction - default Model queryConstruct(String queryString)
queryConstruct in interface SparqlQueryConnectiondefault Model queryConstruct(Query query)
queryConstruct in interface SparqlQueryConnectiondefault Model queryDescribe(String queryString)
queryDescribe in interface SparqlQueryConnectiondefault Model queryDescribe(Query query)
queryDescribe in interface SparqlQueryConnectiondefault boolean queryAsk(String queryString)
queryAsk in interface SparqlQueryConnectiondefault boolean queryAsk(Query query)
queryAsk in interface SparqlQueryConnectionQueryExecution query(Query query)
querySelect(Query, Consumer), queryConstruct(Query),
queryDescribe(Query), queryAsk(Query)
for ways to execute queries for of a specific form.query in interface SparqlQueryConnectionquery - default QueryExecution query(String queryString)
QueryExecution 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 querySelect(String, Consumer), queryConstruct(String),
queryDescribe(String), queryAsk(String)
for ways to execute queries of a specific form.query in interface SparqlQueryConnectionqueryString - default void update(Update update)
update in interface SparqlUpdateConnectionupdate - void update(UpdateRequest update)
update in interface SparqlUpdateConnectionupdate - default void update(String updateString)
update in interface SparqlUpdateConnectionupdateString - Model fetch(String graphName)
fetch in interface RDFDatasetAccessConnectiongraphName - URI string for the graph name (null or "default" for the default graph)Model fetch()
fetch in interface RDFDatasetAccessConnectionDataset fetchDataset()
fetchDataset in interface RDFDatasetAccessConnectionvoid load(String graphName, String file)
load in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)file - File of the data.void load(String file)
load in interface RDFDatasetConnectionfile - File of the data.void load(String graphName, Model model)
load in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)model - Data.void load(Model model)
load in interface RDFDatasetConnectionmodel - Data.void put(String graphName, String file)
put in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)file - File of the data.void put(String file)
put in interface RDFDatasetConnectionfile - File of the data.void put(String graphName, Model model)
put in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)model - Data.void put(Model model)
put in interface RDFDatasetConnectionmodel - Data.void delete(String graphName)
delete in interface RDFDatasetConnectiongraphName - void delete()
delete in interface RDFDatasetConnectionvoid loadDataset(String file)
loadDataset in interface RDFDatasetConnectionvoid loadDataset(Dataset dataset)
loadDataset in interface RDFDatasetConnectionvoid putDataset(String file)
putDataset in interface RDFDatasetConnectionvoid putDataset(Dataset dataset)
putDataset in interface RDFDatasetConnectionboolean isClosed()
isClosed in interface RDFDatasetAccessConnectionisClosed in interface RDFDatasetConnectionvoid close()
close in interface AutoCloseableclose in interface RDFDatasetAccessConnectionclose in interface RDFDatasetConnectionclose in interface SparqlQueryConnectionclose in interface SparqlUpdateConnectionLicenced under the Apache License, Version 2.0