java.lang.Object
org.apache.jena.rdflink.RDFLinkAdapter
- All Implemented Interfaces:
AutoCloseable,LinkDatasetGraph,LinkDatasetGraphAccess,LinkSparqlQuery,LinkSparqlUpdate,RDFLink,org.apache.jena.sparql.core.Transactional
-
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()static RDFLinkadapt(RDFConnection conn) voidbegin(org.apache.jena.query.ReadWrite readWrite) voidbegin(org.apache.jena.query.TxnType type) voidClear the dataset - remove all named graphs, clear the default graph.voidclose()Close this connection.voidcommit()voiddelete()Remove all data from the default graph.voiddelete(org.apache.jena.graph.Node graphName) Delete a graph from the dataset.voidend()org.apache.jena.graph.Graphget()Fetch the default graph.org.apache.jena.graph.Graphget(org.apache.jena.graph.Node graphName) Fetch a named graph.org.apache.jena.sparql.core.DatasetGraphFetch the contents of the datasetbooleanisClosed()Test whether this connection is closed or notbooleanvoidSend file - this merges the file RDF into the default graph of a dataset.voidload(org.apache.jena.graph.Graph graph) Load (add, append) RDF into the default graph of a dataset.voidLoad (add, append) RDF into a named graph in a dataset.voidload(org.apache.jena.graph.Node graphName, org.apache.jena.graph.Graph graph) Load (add, append) RDF into a named graph in a dataset.voidloadDataset(String file) voidloadDataset(org.apache.jena.sparql.core.DatasetGraph dataset) org.apache.jena.sparql.exec.QueryExecBuildernewQuery()Return aQueryExecBuilderthat is initially configured for this link setup and type.org.apache.jena.sparql.exec.UpdateExecBuilderReturn aUpdateExecBuilderthat 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.voidput(org.apache.jena.graph.Graph graph) Set the contents of the default graph of a dataset.voidSet the contents of a named graph of a dataset.voidput(org.apache.jena.graph.Node graphName, org.apache.jena.graph.Graph graph) Set the contents of a named graph of a dataset.voidputDataset(String file) voidputDataset(org.apache.jena.sparql.core.DatasetGraph dataset) org.apache.jena.sparql.exec.QueryExecSetup a SPARQL query execution.org.apache.jena.sparql.exec.QueryExecquery(org.apache.jena.query.Query query) Setup a SPARQL query execution.org.apache.jena.query.ReadWriteorg.apache.jena.query.TxnTypevoidExecute a SPARQL Update.voidupdate(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.rdflink.RDFLink
get, isRemote, queryAsk, queryAsk, queryConstruct, queryConstruct, queryConstructDataset, queryConstructDataset, queryDescribe, queryDescribe, queryRowSet, queryRowSet, querySelect, querySelect, updateMethods inherited from interface org.apache.jena.sparql.core.Transactional
begin, calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote
-
Constructor Details
-
RDFLinkAdapter
-
-
Method Details
-
adapt
-
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
-
getDataset
public org.apache.jena.sparql.core.DatasetGraph getDataset()Description copied from interface:LinkDatasetGraphAccessFetch the contents of the dataset- Specified by:
getDatasetin interfaceLinkDatasetGraphAccess
-
query
public org.apache.jena.sparql.exec.QueryExec query(org.apache.jena.query.Query query) Description copied from interface:RDFLinkSetup a SPARQL query execution. See alsoRDFLink.querySelect(Query, Consumer),RDFLink.queryConstruct(Query),RDFLink.queryDescribe(Query),RDFLink.queryAsk(Query)for ways to execute queries for of a specific form.- Specified by:
queryin interfaceLinkSparqlQuery- Specified by:
queryin interfaceRDFLink- Returns:
- QueryExecution
-
query
Description copied from interface:RDFLinkSetup a SPARQL query execution.This is a low-level operation. Handling the
QueryExecutionshould be done with try-resource. SomeQueryExecutions, such as ones connecting to a remote server, need to be properly closed to release system resources.See also
RDFLink.querySelect(String, Consumer),RDFLink.queryConstruct(String),RDFLink.queryDescribe(String),RDFLink.queryAsk(String)for ways to execute queries of a specific form.- Specified by:
queryin interfaceLinkSparqlQuery- Specified by:
queryin interfaceRDFLink- Returns:
- QueryExecution
-
newQuery
public org.apache.jena.sparql.exec.QueryExecBuilder newQuery()Description copied from interface:RDFLinkReturn aQueryExecBuilderthat is initially configured for this link setup and type. The query built will be set to go to the same dataset/remote endpoint as the other RDFLink operations.- Specified by:
newQueryin interfaceLinkSparqlQuery- Specified by:
newQueryin interfaceRDFLink- Returns:
- QueryExecBuilder
-
newUpdate
public org.apache.jena.sparql.exec.UpdateExecBuilder newUpdate()Description copied from interface:RDFLinkReturn aUpdateExecBuilderthat 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 interfaceLinkSparqlUpdate- Specified by:
newUpdatein interfaceRDFLink- Returns:
- UpdateExecBuilder
-
update
public void update(org.apache.jena.update.UpdateRequest update) Description copied from interface:RDFLinkExecute a SPARQL Update.- Specified by:
updatein interfaceLinkSparqlUpdate- Specified by:
updatein interfaceRDFLink
-
update
Description copied from interface:RDFLinkExecute a SPARQL Update.- Specified by:
updatein interfaceLinkSparqlUpdate- Specified by:
updatein interfaceRDFLink
-
get
public org.apache.jena.graph.Graph get()Description copied from interface:RDFLinkFetch the default graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.- Specified by:
getin interfaceLinkDatasetGraphAccess- Specified by:
getin interfaceRDFLink- Returns:
- Graph
-
get
public org.apache.jena.graph.Graph get(org.apache.jena.graph.Node graphName) Description copied from interface:RDFLinkFetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.- Specified by:
getin interfaceLinkDatasetGraphAccess- Specified by:
getin interfaceRDFLink- Parameters:
graphName- URI string for the graph name (null orQuad.defaultGraphIRIfor the default graph)- Returns:
- Graph
-
load
Description copied from interface:RDFLinkSend file - this merges the file RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.If this is a remote connection:
- The file is sent as-is and not parsed in the RDFLink
- The Content-Type is determined by the filename
- Specified by:
loadin interfaceLinkDatasetGraph- Specified by:
loadin interfaceRDFLink- Parameters:
file- File of the data.
-
load
Description copied from interface:RDFLinkLoad (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.If this is a remote connection:
- The file is sent as-is and not parsed in the RDFLink
- The Content-Type is determined by the filename
- Specified by:
loadin interfaceLinkDatasetGraph- Specified by:
loadin interfaceRDFLink- Parameters:
graphName- Graph name (null orQuad.defaultGraphIRIfor the default graph)file- File of the data.
-
load
public void load(org.apache.jena.graph.Graph graph) Description copied from interface:RDFLinkLoad (add, append) RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceLinkDatasetGraph- Specified by:
loadin interfaceRDFLink- Parameters:
graph- Data.
-
load
public void load(org.apache.jena.graph.Node graphName, org.apache.jena.graph.Graph graph) Description copied from interface:RDFLinkLoad (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.- Specified by:
loadin interfaceLinkDatasetGraph- Specified by:
loadin interfaceRDFLink- Parameters:
graphName- Graph name (null orQuad.defaultGraphIRIfor the default graph)graph- Data.
-
put
Description copied from interface:RDFLinkSet the contents of the default graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.If this is a remote connection:
- The file is sent as-is and not parsed in the RDFLink
- The Content-Type is determined by the filename
- Specified by:
putin interfaceLinkDatasetGraph- Specified by:
putin interfaceRDFLink- Parameters:
file- File of the data.
-
put
Description copied from interface:RDFLinkSet 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 interfaceLinkDatasetGraph- Specified by:
putin interfaceRDFLink- Parameters:
graphName- Graph name (null orQuad.defaultGraphIRIfor the default graph)file- File of the data.
-
put
public void put(org.apache.jena.graph.Graph graph) Description copied from interface:RDFLinkSet the contents of the default graph of a dataset. Any existing data is lost. This is SPARQL Graph Store Protocol HTTP PUT or equivalent.If this is a remote connection:
- The file is sent as-is and not parsed in the RDFLink
- The Content-Type is determined by the filename
- Specified by:
putin interfaceLinkDatasetGraph- Specified by:
putin interfaceRDFLink- Parameters:
graph- Data.
-
put
public void put(org.apache.jena.graph.Node graphName, org.apache.jena.graph.Graph graph) Description copied from interface:RDFLinkSet 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 interfaceLinkDatasetGraph- Specified by:
putin interfaceRDFLink- Parameters:
graphName- Graph name (null orQuad.defaultGraphIRIfor the default graph)graph- Data.
-
delete
public void delete(org.apache.jena.graph.Node graphName) Description copied from interface:RDFLinkDelete a graph from the dataset. Null orQuad.defaultGraphIRImeans the default graph, which is cleared, not removed.- Specified by:
deletein interfaceLinkDatasetGraph- Specified by:
deletein interfaceRDFLink
-
delete
public void delete()Description copied from interface:RDFLinkRemove all data from the default graph.- Specified by:
deletein interfaceLinkDatasetGraph- Specified by:
deletein interfaceRDFLink
-
loadDataset
- Specified by:
loadDatasetin interfaceLinkDatasetGraph- Specified by:
loadDatasetin interfaceRDFLink
-
loadDataset
public void loadDataset(org.apache.jena.sparql.core.DatasetGraph dataset) - Specified by:
loadDatasetin interfaceLinkDatasetGraph- Specified by:
loadDatasetin interfaceRDFLink
-
putDataset
- Specified by:
putDatasetin interfaceLinkDatasetGraph- Specified by:
putDatasetin interfaceRDFLink
-
putDataset
public void putDataset(org.apache.jena.sparql.core.DatasetGraph dataset) - Specified by:
putDatasetin interfaceLinkDatasetGraph- Specified by:
putDatasetin interfaceRDFLink
-
clearDataset
public void clearDataset()Description copied from interface:RDFLinkClear the dataset - remove all named graphs, clear the default graph.- Specified by:
clearDatasetin interfaceLinkDatasetGraph- Specified by:
clearDatasetin interfaceRDFLink
-
isClosed
public boolean isClosed()Description copied from interface:RDFLinkTest whether this connection is closed or not- Specified by:
isClosedin interfaceLinkDatasetGraph- Specified by:
isClosedin interfaceLinkDatasetGraphAccess- Specified by:
isClosedin interfaceRDFLink
-
close
public void close()Description copied from interface:RDFLinkClose this connection. Use with try-resource.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceLinkDatasetGraph- Specified by:
closein interfaceLinkDatasetGraphAccess- Specified by:
closein interfaceLinkSparqlQuery- Specified by:
closein interfaceLinkSparqlUpdate- Specified by:
closein interfaceRDFLink
-