public class RDFConnectionLocal extends Object implements RDFConnection
RDFConnection over a Dataset in the same JVM.
Multiple levels of Isolation are provided, The default COPY level makes a local
RDFConnection behave like a remote connection. This should be the normal use in
testing.
COPY – Models and Datasets are copied.
This is most like a remote connection.
READONLY – Read-only wrappers are added but changes to
the underlying model or dataset will be seen.
NONE (default) – Changes to the returned Models or Datasets act on the original object.
Transactional.Promote| Constructor and Description |
|---|
RDFConnectionLocal(Dataset dataset) |
RDFConnectionLocal(Dataset dataset,
Isolation isolation) |
| 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() |
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 graph)
Fetch a named graph.
|
Dataset |
fetchDataset()
Fetch the contents of the dataset
|
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.
|
ReadWrite |
transactionMode() |
TxnType |
transactionType() |
void |
update(UpdateRequest update)
Execute a SPARQL Update.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquery, queryAsk, queryAsk, queryConstruct, queryConstruct, queryDescribe, queryDescribe, queryResultSet, queryResultSet, querySelect, querySelect, update, updatepromotepublic RDFConnectionLocal(Dataset dataset)
public 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(UpdateRequest update)
RDFConnectionupdate in interface RDFConnectionupdate in interface SparqlUpdateConnectionpublic 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(String graphName, Model model)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectiongraphName - Graph name (null or "default" for the default graph)model - Data.public void load(Model model)
RDFConnectionload in interface RDFConnectionload in interface RDFDatasetConnectionmodel - Data.public Model fetch(String graph)
RDFDatasetAccessConnectionfetch in interface RDFDatasetAccessConnectiongraph - URI string for the graph name (null or "default" for the default graph)public Model fetch()
RDFDatasetAccessConnectionfetch in interface RDFDatasetAccessConnectionpublic void put(String file)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectionfile - File of the 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(Model model)
RDFConnectionput in interface RDFConnectionput in interface RDFDatasetConnectionmodel - 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 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