public final class Repositories extends Object
Repository and RepositoryConnection objects.| Modifier and Type | Method and Description | 
|---|---|
| static void | consume(Repository repository,
       java.util.function.Consumer<RepositoryConnection> processFunction)Opens a  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenConsumer, 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  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenConsumer, 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  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenConsumer. | 
| static void | consumeNoTransaction(Repository repository,
                    java.util.function.Consumer<RepositoryConnection> processFunction,
                    java.util.function.Consumer<RepositoryException> exceptionHandler)Opens a  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenConsumer. | 
| static void | consumeSilent(Repository repository,
             java.util.function.Consumer<RepositoryConnection> processFunction)Opens a  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenConsumer, 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  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenConsumer. | 
| static <T> T | get(Repository repository,
   java.util.function.Function<RepositoryConnection,T> processFunction)Opens a  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenFunction, 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  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenFunction, 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  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenFunction. | 
| static <T> T | getNoTransaction(Repository repository,
                java.util.function.Function<RepositoryConnection,T> processFunction,
                java.util.function.Consumer<RepositoryException> exceptionHandler)Opens a  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenFunction. | 
| static <T> T | getSilent(Repository repository,
         java.util.function.Function<RepositoryConnection,T> processFunction)Opens a  RepositoryConnectionto the given Repository within a transaction, sends the connection to the
 givenFunction, 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  RepositoryConnectionto the given Repository without opening a transaction, sends the connection
 to the givenFunction. | 
| static <T> T | graphQuery(Repository repository,
          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  Functionwith the result from the function returned by the method. | 
| static void | graphQuery(Repository repository,
          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,
                       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  Functionwith the result from the function returned by the method. | 
| static void | graphQueryNoTransaction(Repository repository,
                       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(String message)Creates a  SupplierofRepositoryExceptionobjects that be passed toOptional.orElseThrow(Supplier)to generate exceptions as necessary. | 
| static <T> T | tupleQuery(Repository repository,
          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
  Functionwith the result from the function returned by the method. | 
| static void | tupleQuery(Repository repository,
          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,
                       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  Functionwith the result from the function returned by the method. | 
| static void | tupleQueryNoTransaction(Repository repository,
                       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. | 
public static void consume(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction) throws RepositoryException, UnknownTransactionStateException
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.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static void consumeNoTransaction(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction) throws RepositoryException, UnknownTransactionStateException
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Consumer.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static void consume(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler) throws RepositoryException, UnknownTransactionStateException
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.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.exceptionHandler - A Consumer that handles an exception if one was generated.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static void consumeNoTransaction(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler) throws RepositoryException, UnknownTransactionStateException
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Consumer.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.exceptionHandler - A Consumer that handles an exception if one was generated.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static void consumeSilent(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
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.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.public static void consumeSilentNoTransaction(Repository repository, java.util.function.Consumer<RepositoryConnection> processFunction)
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Consumer.repository - The Repository to open a connection to.processFunction - A Consumer that performs an action on the connection.public static <T> T get(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction) throws RepositoryException, UnknownTransactionStateException
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.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static <T> T getNoTransaction(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction) throws RepositoryException, UnknownTransactionStateException
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Function.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static <T> T get(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler) throws RepositoryException, UnknownTransactionStateException
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.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.exceptionHandler - A Consumer that handles an exception if one was generated.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static <T> T getNoTransaction(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction, java.util.function.Consumer<RepositoryException> exceptionHandler) throws RepositoryException, UnknownTransactionStateException
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Function.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.exceptionHandler - A Consumer that handles an exception if one was generated.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)public static <T> T getSilent(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction)
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.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.public static <T> T getSilentNoTransaction(Repository repository, java.util.function.Function<RepositoryConnection,T> processFunction)
RepositoryConnection to the given Repository without opening a transaction, sends the connection
 to the given Function.T - The type of the return value.repository - The Repository to open a connection to.processFunction - A Function that performs an action on the connection and returns a result.public static <T> T tupleQuery(Repository repository, String query, java.util.function.Function<TupleQueryResult,T> processFunction) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
Function with the result from the function returned by the method.T - The type of the return value.repository - The Repository to open a connection to.query - The SPARQL Select query to execute.processFunction - A Function that performs an action on the results of the query and returns a
                        result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static <T> T tupleQueryNoTransaction(Repository repository, String query, java.util.function.Function<TupleQueryResult,T> processFunction) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
Function with the result from the function returned by the method.T - The type of the return value.repository - The Repository to open a connection to.query - The SPARQL Select query to execute.processFunction - A Function that performs an action on the results of the query and returns a
                        result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static void tupleQuery(Repository repository, String query, TupleQueryResultHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
TupleQueryResultHandler.repository - The Repository to open a connection to.query - The SPARQL Select query to execute.handler - A TupleQueryResultHandler that consumes the results.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static void tupleQueryNoTransaction(Repository repository, String query, TupleQueryResultHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
TupleQueryResultHandler.repository - The Repository to open a connection to.query - The SPARQL Select query to execute.handler - A TupleQueryResultHandler that consumes the results.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static <T> T graphQuery(Repository repository, String query, java.util.function.Function<GraphQueryResult,T> processFunction) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
Function with the result from the function returned by the method.T - The type of the return value.repository - The Repository to open a connection to.query - The SPARQL Construct or Describe query to execute.processFunction - A Function that performs an action on the results of the query and returns a
                        result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static <T> T graphQueryNoTransaction(Repository repository, String query, java.util.function.Function<GraphQueryResult,T> processFunction) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
Function with the result from the function returned by the method.T - The type of the return value.repository - The Repository to open a connection to.query - The SPARQL Construct or Describe query to execute.processFunction - A Function that performs an action on the results of the query and returns a
                        result.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static void graphQuery(Repository repository, String query, RDFHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
RDFHandler.repository - The Repository to open a connection to.query - The SPARQL Construct or Describe query to execute.handler - An RDFHandler that consumes the results.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static void graphQueryNoTransaction(Repository repository, String query, RDFHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException
RDFHandler.repository - The Repository to open a connection to.query - The SPARQL Construct or Describe query to execute.handler - An RDFHandler that consumes the results.RepositoryException - If there was an exception dealing with the Repository.UnknownTransactionStateException - If the transaction state was not properly recognised. (Optional specific
                                          exception)MalformedQueryException - If the supplied query is malformedQueryEvaluationException - If there was an error evaluating the querypublic static java.util.function.Supplier<RepositoryException> repositoryException(String message)
Supplier of RepositoryException objects that be passed to
 Optional.orElseThrow(Supplier) to generate exceptions as necessary.message - The message to be used for the exceptionSupplier that will create RepositoryException objects with the given message.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.