Class RDFConnectionLocal

java.lang.Object
org.apache.jena.rdfconnection.RDFConnectionLocal
All Implemented Interfaces:
AutoCloseable, RDFConnection, RDFDatasetAccessConnection, RDFDatasetConnection, SparqlQueryConnection, SparqlUpdateConnection, org.apache.jena.sparql.core.Transactional

@Deprecated(forRemoval=true) public class RDFConnectionLocal extends Object implements RDFConnection
Deprecated, for removal: This API element is subject to removal in a future version.
Implement of RDFConnection over a Dataset in the same JVM.

Multiple levels of Isolation are provided. The default COPY level makes a local RDFConnection that behaves like a remote connection. This should be the normal use in testing.

  • COPYModels 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.
  • 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
    Constructor
    Description
    RDFConnectionLocal(org.apache.jena.query.Dataset dataset)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    RDFConnectionLocal(org.apache.jena.query.Dataset dataset, Isolation isolation)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    begin(org.apache.jena.query.ReadWrite mode)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    begin(org.apache.jena.query.TxnType txnType)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close this connection.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove all data from the default graph.
    void
    delete(String graph)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Delete a graph from the dataset.
    void
    end()
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.jena.rdf.model.Model
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fetch the default graph.
    org.apache.jena.rdf.model.Model
    fetch(String graph)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fetch a named graph.
    org.apache.jena.query.Dataset
    Deprecated, for removal: This API element is subject to removal in a future version.
    Fetch the contents of the dataset
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Test whether this connection is closed or not
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    load(String file)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Load (add, append) RDF into the default graph of a dataset.
    void
    load(String graph, String file)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Load (add, append) RDF into a named graph in a dataset.
    void
    load(String graphName, org.apache.jena.rdf.model.Model model)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Load (add, append) RDF into a named graph in a dataset.
    void
    load(org.apache.jena.rdf.model.Model model)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Load (add, append) RDF into the default graph of a dataset.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    loadDataset(org.apache.jena.query.Dataset srcDataset)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.jena.query.QueryExecutionBuilder
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return a execution builder initialized with the RDFConnection setup.
    org.apache.jena.update.UpdateExecutionBuilder
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return a UpdateExecutionBuilder that is initially configured for this link setup and type.
    boolean
    promote(org.apache.jena.sparql.core.Transactional.Promote promote)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    put(String file)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the contents of the default graph of a dataset.
    void
    put(String graph, String file)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the contents of a named graph of a dataset.
    void
    put(String graphName, org.apache.jena.rdf.model.Model model)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the contents of a named graph of a dataset.
    void
    put(org.apache.jena.rdf.model.Model model)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the contents of the default graph of a dataset.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    putDataset(org.apache.jena.query.Dataset dataset)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.jena.query.QueryExecution
    query(org.apache.jena.query.Query query)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Setup a SPARQL query execution.
    org.apache.jena.query.ReadWrite
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.jena.query.TxnType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    update(org.apache.jena.update.UpdateRequest update)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a SPARQL Update.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.sparql.core.Transactional

    calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite, promote
  • Constructor Details

    • RDFConnectionLocal

      public RDFConnectionLocal(org.apache.jena.query.Dataset dataset)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • RDFConnectionLocal

      public RDFConnectionLocal(org.apache.jena.query.Dataset dataset, Isolation isolation)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • query

      public org.apache.jena.query.QueryExecution query(org.apache.jena.query.Query query)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Setup a SPARQL query execution. See also RDFConnection.querySelect(Query, Consumer), RDFConnection.queryConstruct(Query), RDFConnection.queryDescribe(Query), RDFConnection.queryAsk(Query) for ways to execute queries for of a specific form.
      Specified by:
      query in interface RDFConnection
      Specified by:
      query in interface SparqlQueryConnection
      Returns:
      QueryExecution
    • newQuery

      public org.apache.jena.query.QueryExecutionBuilder newQuery()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Return a execution builder initialized with the RDFConnection setup.
      Specified by:
      newQuery in interface RDFConnection
      Specified by:
      newQuery in interface SparqlQueryConnection
      Returns:
      QueryExecutionBuilderCommon
    • update

      public void update(org.apache.jena.update.UpdateRequest update)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Execute a SPARQL Update.
      Specified by:
      update in interface RDFConnection
      Specified by:
      update in interface SparqlUpdateConnection
    • newUpdate

      public org.apache.jena.update.UpdateExecutionBuilder newUpdate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Return a UpdateExecutionBuilder that 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:
      newUpdate in interface RDFConnection
      Specified by:
      newUpdate in interface SparqlUpdateConnection
      Returns:
      UpdateExecBuilder
    • load

      public void load(String graph, String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Load (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.
      Specified by:
      load in interface RDFConnection
      Specified by:
      load in interface RDFDatasetConnection
      Parameters:
      graph - Graph name (null or "default" for the default graph)
      file - File of the data.
    • load

      public void load(String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Load (add, append) RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.
      Specified by:
      load in interface RDFConnection
      Specified by:
      load in interface RDFDatasetConnection
      Parameters:
      file - File of the data.
    • load

      public void load(String graphName, org.apache.jena.rdf.model.Model model)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Load (add, append) RDF into a named graph in a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.
      Specified by:
      load in interface RDFConnection
      Specified by:
      load in interface RDFDatasetConnection
      Parameters:
      graphName - Graph name (null or "default" for the default graph)
      model - Data.
    • load

      public void load(org.apache.jena.rdf.model.Model model)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Load (add, append) RDF into the default graph of a dataset. This is SPARQL Graph Store Protocol HTTP POST or equivalent.
      Specified by:
      load in interface RDFConnection
      Specified by:
      load in interface RDFDatasetConnection
      Parameters:
      model - Data.
    • fetch

      public org.apache.jena.rdf.model.Model fetch(String graph)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Fetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.
      Specified by:
      fetch in interface RDFConnection
      Specified by:
      fetch in interface RDFDatasetAccessConnection
      Parameters:
      graph - URI string for the graph name (null or "default" for the default graph)
      Returns:
      Model
    • fetch

      public org.apache.jena.rdf.model.Model fetch()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Fetch the default graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.
      Specified by:
      fetch in interface RDFConnection
      Specified by:
      fetch in interface RDFDatasetAccessConnection
      Returns:
      Model
    • put

      public void put(String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Set 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:
      put in interface RDFConnection
      Specified by:
      put in interface RDFDatasetConnection
      Parameters:
      file - File of the data.
    • put

      public void put(String graph, String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Set 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:
      put in interface RDFConnection
      Specified by:
      put in interface RDFDatasetConnection
      Parameters:
      graph - Graph name (null or "default" for the default graph)
      file - File of the data.
    • put

      public void put(org.apache.jena.rdf.model.Model model)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Set 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:
      put in interface RDFConnection
      Specified by:
      put in interface RDFDatasetConnection
      Parameters:
      model - Data.
    • put

      public void put(String graphName, org.apache.jena.rdf.model.Model model)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Set 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:
      put in interface RDFConnection
      Specified by:
      put in interface RDFDatasetConnection
      Parameters:
      graphName - Graph name (null or "default" for the default graph)
      model - Data.
    • delete

      public void delete(String graph)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Delete a graph from the dataset. Null or "default" means the default graph, which is cleared, not removed.
      Specified by:
      delete in interface RDFConnection
      Specified by:
      delete in interface RDFDatasetConnection
    • delete

      public void delete()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Remove all data from the default graph.
      Specified by:
      delete in interface RDFConnection
      Specified by:
      delete in interface RDFDatasetConnection
    • fetchDataset

      public org.apache.jena.query.Dataset fetchDataset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Fetch the contents of the dataset
      Specified by:
      fetchDataset in interface RDFConnection
      Specified by:
      fetchDataset in interface RDFDatasetAccessConnection
    • loadDataset

      public void loadDataset(String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      loadDataset in interface RDFConnection
      Specified by:
      loadDataset in interface RDFDatasetConnection
    • loadDataset

      public void loadDataset(org.apache.jena.query.Dataset srcDataset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      loadDataset in interface RDFConnection
      Specified by:
      loadDataset in interface RDFDatasetConnection
    • putDataset

      public void putDataset(String file)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      putDataset in interface RDFConnection
      Specified by:
      putDataset in interface RDFDatasetConnection
    • putDataset

      public void putDataset(org.apache.jena.query.Dataset dataset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      putDataset in interface RDFConnection
      Specified by:
      putDataset in interface RDFDatasetConnection
    • close

      public void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Close this connection. Use with try-resource.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface RDFConnection
      Specified by:
      close in interface RDFDatasetAccessConnection
      Specified by:
      close in interface RDFDatasetConnection
      Specified by:
      close in interface SparqlQueryConnection
      Specified by:
      close in interface SparqlUpdateConnection
    • isClosed

      public boolean isClosed()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: RDFConnection
      Test whether this connection is closed or not
      Specified by:
      isClosed in interface RDFConnection
      Specified by:
      isClosed in interface RDFDatasetAccessConnection
      Specified by:
      isClosed in interface RDFDatasetConnection
    • begin

      public void begin()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      begin in interface org.apache.jena.sparql.core.Transactional
    • begin

      public void begin(org.apache.jena.query.TxnType txnType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      begin in interface org.apache.jena.sparql.core.Transactional
    • begin

      public void begin(org.apache.jena.query.ReadWrite mode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      begin in interface org.apache.jena.sparql.core.Transactional
    • promote

      public boolean promote(org.apache.jena.sparql.core.Transactional.Promote promote)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      promote in interface org.apache.jena.sparql.core.Transactional
    • commit

      public void commit()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      commit in interface org.apache.jena.sparql.core.Transactional
    • abort

      public void abort()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      abort in interface org.apache.jena.sparql.core.Transactional
    • isInTransaction

      public boolean isInTransaction()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      isInTransaction in interface org.apache.jena.sparql.core.Transactional
    • end

      public void end()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      end in interface org.apache.jena.sparql.core.Transactional
    • transactionMode

      public org.apache.jena.query.ReadWrite transactionMode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      transactionMode in interface org.apache.jena.sparql.core.Transactional
    • transactionType

      public org.apache.jena.query.TxnType transactionType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      transactionType in interface org.apache.jena.sparql.core.Transactional