Class Repositories

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Repositories()
      Private constructor to prevent instantiation, this is a static helper class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void consume​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Consumer, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static void consume​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Consumer, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static void consumeNoTransaction​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Consumer.
      static void consumeNoTransaction​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Consumer.
      static void consumeSilent​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Consumer, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static void consumeSilentNoTransaction​(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Consumer.
      static <T> T get​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Function, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static <T> T get​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Function, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static <T> T getNoTransaction​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Function.
      static <T> T getNoTransaction​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Function.
      static <T> T getSilent​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction)
      Opens a RepositoryConnection to the given Repository within a transaction, sends the connection to the given Function, before either rolling back the transaction if it failed, or committing the transaction if it was successful.
      static <T> T getSilentNoTransaction​(Repository repository, java.util.function.Function<RepositoryConnection,​T> processFunction)
      Opens a RepositoryConnection to the given Repository without opening a transaction, sends the connection to the given Function.
      static <T> T graphQuery​(Repository repository, java.lang.String query, java.util.function.Function<GraphQueryResult,​T> processFunction)
      Performs a SPARQL Construct or Describe query on the given Repository within a transaction and passes the results to the given Function with the result from the function returned by the method.
      static void graphQuery​(Repository repository, java.lang.String query, RDFHandler handler)
      Performs a SPARQL Construct or Describe query on the given Repository within a transaction and passes the results to the given RDFHandler.
      static <T> T graphQueryNoTransaction​(Repository repository, java.lang.String query, java.util.function.Function<GraphQueryResult,​T> processFunction)
      Performs a SPARQL Construct or Describe query on the given Repository without opening a transaction and passes the results to the given Function with the result from the function returned by the method.
      static void graphQueryNoTransaction​(Repository repository, java.lang.String query, RDFHandler handler)
      Performs a SPARQL Construct or Describe query on the given Repository without opening a transaction and passes the results to the given RDFHandler.
      static java.util.function.Supplier<RepositoryException> repositoryException​(java.lang.String message)
      Creates a Supplier of RepositoryException objects that be passed to Optional.orElseThrow(Supplier) to generate exceptions as necessary.
      static <T> T tupleQuery​(Repository repository, java.lang.String query, java.util.function.Function<TupleQueryResult,​T> processFunction)
      Performs a SPARQL Select query on the given Repository within a transaction and passes the results to the given Function with the result from the function returned by the method.
      static void tupleQuery​(Repository repository, java.lang.String query, TupleQueryResultHandler handler)
      Performs a SPARQL Select query on the given Repository within a transaction and passes the results to the given TupleQueryResultHandler.
      static <T> T tupleQueryNoTransaction​(Repository repository, java.lang.String query, java.util.function.Function<TupleQueryResult,​T> processFunction)
      Performs a SPARQL Select query on the given Repository without opening a transaction and passes the results to the given Function with the result from the function returned by the method.
      static void tupleQueryNoTransaction​(Repository repository, java.lang.String query, TupleQueryResultHandler handler)
      Performs a SPARQL Select query on the given Repository without opening a transaction and passes the results to the given TupleQueryResultHandler.
      • Methods inherited from class java.lang.Object

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