Package org.apache.jena.rdfconnection
Class RDFConnectionWrapper
java.lang.Object
org.apache.jena.rdfconnection.RDFConnectionWrapper
- All Implemented Interfaces:
AutoCloseable,RDFConnection,RDFDatasetAccessConnection,RDFDatasetConnection,SparqlQueryConnection,SparqlUpdateConnection,org.apache.jena.sparql.core.Transactional
Wrapper for an
RDFConnection.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
org.apache.jena.sparql.core.Transactional.Promote -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidbegin(org.apache.jena.query.ReadWrite readWrite) voidbegin(org.apache.jena.query.TxnType type) voidclose()Close this connection.voidcommit()voiddelete()Remove all data from the default graph.voidDelete a graph from the dataset.voidend()org.apache.jena.rdf.model.Modelfetch()Fetch the default graph.org.apache.jena.rdf.model.ModelFetch a named graph.org.apache.jena.query.DatasetFetch the contents of the datasetbooleanisClosed()Test whether this connection is closed or notbooleanvoidLoad (add, append) RDF into the default graph of a dataset.voidLoad (add, append) RDF into a named graph in a dataset.voidLoad (add, append) RDF into a named graph in a dataset.voidload(org.apache.jena.rdf.model.Model model) Load (add, append) RDF into the default graph of a dataset.voidloadDataset(String file) voidloadDataset(org.apache.jena.query.Dataset dataset) org.apache.jena.query.QueryExecutionBuildernewQuery()Return a execution builder initialized with the RDFConnection setup.org.apache.jena.update.UpdateExecutionBuilderReturn aUpdateExecutionBuilderthat is initially configured for this link setup and type.booleanpromote(org.apache.jena.sparql.core.Transactional.Promote mode) voidSet the contents of the default graph of a dataset.voidSet the contents of a named graph of a dataset.voidSet the contents of a named graph of a dataset.voidput(org.apache.jena.rdf.model.Model model) Set the contents of the default graph of a dataset.voidputDataset(String file) voidputDataset(org.apache.jena.query.Dataset dataset) org.apache.jena.query.QueryExecutionSetup a SPARQL query execution.org.apache.jena.query.QueryExecutionquery(org.apache.jena.query.Query query) Setup a SPARQL query execution.org.apache.jena.query.ReadWriteorg.apache.jena.query.TxnTypevoidupdate(org.apache.jena.update.UpdateRequest update) Execute a SPARQL Update.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.rdfconnection.RDFConnection
queryAsk, queryAsk, queryConstruct, queryConstruct, queryDescribe, queryDescribe, queryResultSet, queryResultSet, querySelect, querySelect, update, updateMethods inherited from interface org.apache.jena.sparql.core.Transactional
begin, calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote
-
Constructor Details
-
RDFConnectionWrapper
-
-
Method Details
-
fetch
public org.apache.jena.rdf.model.Model fetch()Description copied from interface:RDFConnectionFetch the default graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.- Specified by:
fetchin interfaceRDFConnection- Specified by:
fetchin interfaceRDFDatasetAccessConnection- Returns:
- Model
-
fetch
Description copied from interface:RDFConnectionFetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.- Specified by:
fetchin interfaceRDFConnection- Specified by:
fetchin interfaceRDFDatasetAccessConnection- Parameters:
graphName- URI string for the graph name (null or "default" for the default graph)- Returns:
- Model
-
fetchDataset
public org.apache.jena.query.Dataset fetchDataset()Description copied from interface:RDFConnectionFetch the contents of the dataset- Specified by:
fetchDatasetin interfaceRDFConnection- Specified by:
fetchDatasetin interfaceRDFDatasetAccessConnection
-
query
public org.apache.jena.query.QueryExecution query(org.apache.jena.query.Query query) Description copied from interface:RDFConnectionSetup a SPARQL query execution. See alsoRDFConnection.querySelect(Query, Consumer),RDFConnection.queryConstruct(Query),RDFConnection.queryDescribe(Query),RDFConnection.queryAsk(Query)for ways to execute queries for of a specific form.- Specified by:
queryin interfaceRDFConnection- Specified by:
queryin interfaceSparqlQueryConnection- Returns:
- QueryExecution
-
query
Description copied from interface:RDFConnectionSetup a SPARQL query execution. This is a low-level operation. Handling theQueryExecutionshould be done with try-resource. SomeQueryExecutions, such as ones connecting to a remote server, need to be properly closed to release system resources. See alsoRDFConnection.querySelect(String, Consumer),RDFConnection.queryConstruct(String),RDFConnection.queryDescribe(String),RDFConnection.queryAsk(String)for ways to execute queries of a specific form.- Specified by:
queryin interfaceRDFConnection- Specified by:
queryin interfaceSparqlQueryConnection- Returns:
- QueryExecution
-
newQuery
public org.apache.jena.query.QueryExecutionBuilder newQuery()Description copied from interface:RDFConnectionReturn a execution builder initialized with the RDFConnection setup.- Specified by:
newQueryin interfaceRDFConnection- Specified by:
newQueryin interfaceSparqlQueryConnection- Returns:
- QueryExecutionBuilderCommon
-
newUpdate
public org.apache.jena.update.UpdateExecutionBuilder newUpdate()Description copied from interface:RDFConnectionReturn aUpdateExecutionBuilderthat is initially configured for this link setup and type. The update built will be set to go to the same dataset/remote endpoint as the other RDFLink operations.- Specified by:
newUpdatein interfaceRDFConnection- Specified by:
newUpdatein interfaceSparqlUpdateConnection- Returns:
- UpdateExecBuilder
-
update
public void update(org.apache.jena.update.UpdateRequest update) Description copied from interface:RDFConnectionExecute a SPARQL Update.- Specified by:
updatein interfaceRDFConnection- Specified by:
updatein interfaceSparqlUpdateConnection
-
load
Description copied from interface:RDFConnectionLoad (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceRDFConnection- Specified by:
loadin interfaceRDFDatasetConnection- Parameters:
graphName- Graph name (null or "default" for the default graph)file- File of the data.
-
load
Description copied from interface:RDFConnectionLoad (add, append) RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceRDFConnection- Specified by:
loadin interfaceRDFDatasetConnection- Parameters:
file- File of the data.
-
load
Description copied from interface:RDFConnectionLoad (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceRDFConnection- Specified by:
loadin interfaceRDFDatasetConnection- Parameters:
graphName- Graph name (null or "default" for the default graph)model- Data.
-
load
public void load(org.apache.jena.rdf.model.Model model) Description copied from interface:RDFConnectionLoad (add, append) RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceRDFConnection- Specified by:
loadin interfaceRDFDatasetConnection- Parameters:
model- Data.
-
put
Description copied from interface:RDFConnectionSet the contents of a named graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.- Specified by:
putin interfaceRDFConnection- Specified by:
putin interfaceRDFDatasetConnection- Parameters:
graphName- Graph name (null or "default" for the default graph)file- File of the data.
-
put
Description copied from interface:RDFConnectionSet the contents of the default graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.- Specified by:
putin interfaceRDFConnection- Specified by:
putin interfaceRDFDatasetConnection- Parameters:
file- File of the data.
-
put
Description copied from interface:RDFConnectionSet the contents of a named graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.- Specified by:
putin interfaceRDFConnection- Specified by:
putin interfaceRDFDatasetConnection- Parameters:
graphName- Graph name (null or "default" for the default graph)model- Data.
-
put
public void put(org.apache.jena.rdf.model.Model model) Description copied from interface:RDFConnectionSet the contents of the default graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.- Specified by:
putin interfaceRDFConnection- Specified by:
putin interfaceRDFDatasetConnection- Parameters:
model- Data.
-
delete
Description copied from interface:RDFConnectionDelete a graph from the dataset. Null or "default" means the default graph, which is cleared, not removed.- Specified by:
deletein interfaceRDFConnection- Specified by:
deletein interfaceRDFDatasetConnection
-
delete
public void delete()Description copied from interface:RDFConnectionRemove all data from the default graph.- Specified by:
deletein interfaceRDFConnection- Specified by:
deletein interfaceRDFDatasetConnection
-
loadDataset
- Specified by:
loadDatasetin interfaceRDFConnection- Specified by:
loadDatasetin interfaceRDFDatasetConnection
-
loadDataset
public void loadDataset(org.apache.jena.query.Dataset dataset) - Specified by:
loadDatasetin interfaceRDFConnection- Specified by:
loadDatasetin interfaceRDFDatasetConnection
-
putDataset
- Specified by:
putDatasetin interfaceRDFConnection- Specified by:
putDatasetin interfaceRDFDatasetConnection
-
putDataset
public void putDataset(org.apache.jena.query.Dataset dataset) - Specified by:
putDatasetin interfaceRDFConnection- Specified by:
putDatasetin interfaceRDFDatasetConnection
-
isClosed
public boolean isClosed()Description copied from interface:RDFConnectionTest whether this connection is closed or not- Specified by:
isClosedin interfaceRDFConnection- Specified by:
isClosedin interfaceRDFDatasetAccessConnection- Specified by:
isClosedin interfaceRDFDatasetConnection
-
close
public void close()Description copied from interface:RDFConnectionClose this connection. Use with try-resource.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRDFConnection- Specified by:
closein interfaceRDFDatasetAccessConnection- Specified by:
closein interfaceRDFDatasetConnection- Specified by:
closein interfaceSparqlQueryConnection- Specified by:
closein interfaceSparqlUpdateConnection
-
begin
public void begin(org.apache.jena.query.TxnType type) - Specified by:
beginin interfaceorg.apache.jena.sparql.core.Transactional
-
begin
public void begin(org.apache.jena.query.ReadWrite readWrite) - Specified by:
beginin interfaceorg.apache.jena.sparql.core.Transactional
-
promote
public boolean promote(org.apache.jena.sparql.core.Transactional.Promote mode) - Specified by:
promotein interfaceorg.apache.jena.sparql.core.Transactional
-
commit
public void commit()- Specified by:
commitin interfaceorg.apache.jena.sparql.core.Transactional
-
abort
public void abort()- Specified by:
abortin interfaceorg.apache.jena.sparql.core.Transactional
-
end
public void end()- Specified by:
endin interfaceorg.apache.jena.sparql.core.Transactional
-
transactionMode
public org.apache.jena.query.ReadWrite transactionMode()- Specified by:
transactionModein interfaceorg.apache.jena.sparql.core.Transactional
-
transactionType
public org.apache.jena.query.TxnType transactionType()- Specified by:
transactionTypein interfaceorg.apache.jena.sparql.core.Transactional
-
isInTransaction
public boolean isInTransaction()- Specified by:
isInTransactionin interfaceorg.apache.jena.sparql.core.Transactional
-