Interface RDFDataSource

All Known Subinterfaces:
RDFDataSourceWrapper<T>
All Known Implementing Classes:
DecoratedRDFDataSource, RDFDataSourceAdapter, RdfDataSourceMulti, RDFDataSourceOverDataset, RDFDataSources.RDFDataSourceOverSparqlQueryConnection, RdfDataSourceWithBnodeRewrite, RdfDataSourceWithLocalCache, RdfDataSourceWithLocalCacheRework, RdfDataSourceWithLocalLateral, RdfDataSourceWithSimpleCache, RDFDataSourceWrapperBase, RdfDataSourceWrapperWithRewrite
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RDFDataSource
A factory/supplier of RDFConnection instances. Similar to a JDBC DataSource. This interface does not provide resource management, i.e. a close() method. It should only be used as follows: (a) As a lambda in conjunction with RDFDataEngines#of(RDFDataSource, AutoCloseable) (b) in consuming code that does not need resource management Prefer RDFEngine whenever resources may need to be closed.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Deprecated.
    org.apache.jena.rdfconnection.RDFConnection
     
    default org.apache.jena.query.Dataset
     
    default org.apache.jena.query.QueryExecutionBuilder
    Obtain a QueryExecutionBuilder that will execute the built query on a fresh connection.
    default org.apache.jena.update.UpdateExecutionBuilder
     
    default org.apache.jena.query.QueryExecution
    query(String queryString)
     
    default org.apache.jena.query.QueryExecution
    query(org.apache.jena.query.Query query)
     
    default void
    update(String updateRequestString)
     
    default void
    update(org.apache.jena.update.Update update)
     
    default void
    update(org.apache.jena.update.UpdateRequest updateRequest)
     
  • Method Details

    • getConnection

      org.apache.jena.rdfconnection.RDFConnection getConnection()
    • getDataset

      default org.apache.jena.query.Dataset getDataset()
    • asLinkSource

      default RDFLinkSource asLinkSource()
    • newQuery

      default org.apache.jena.query.QueryExecutionBuilder newQuery()
      Obtain a QueryExecutionBuilder that will execute the built query on a fresh connection. The connection will be acquired only before execution and will be immediately closed afterwards.
      Since:
      5.3.0-1
    • newUpdate

      default org.apache.jena.update.UpdateExecutionBuilder newUpdate()
    • query

      default org.apache.jena.query.QueryExecution query(String queryString)
    • query

      default org.apache.jena.query.QueryExecution query(org.apache.jena.query.Query query)
    • update

      default void update(String updateRequestString)
    • update

      default void update(org.apache.jena.update.UpdateRequest updateRequest)
    • update

      default void update(org.apache.jena.update.Update update)
    • asQef

      Deprecated.
      Return a connection-less QueryExecutionFactory view of this data source. Every QueryExecution created with the returned factory will obtain a fresh connection using getConnection() upon execution. The connection is closed when closing the QueryExecution. Consequently, the use of connection pooling is recommended in cases where calling getConnection() is expensive. The behavior of AutoCloseable.close() is implementation dependent. By default it is a no-op but it may close the data source.