Interface RDFConnection

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void close()
      Close this connection.
      void delete()
      Remove all data from the default graph.
      void delete​(java.lang.String graphName)
      Delete a graph from the dataset.
      Model fetch()
      Fetch the default graph.
      Model fetch​(java.lang.String graphName)
      Fetch a named graph.
      Dataset fetchDataset()
      Fetch the contents of the dataset
      boolean isClosed()
      Test whether this connection is closed or not
      void load​(java.lang.String file)
      Load (add, append) RDF into the default graph of a dataset.
      void load​(java.lang.String graphName, java.lang.String file)
      Load (add, append) RDF into a named graph in a dataset.
      void load​(java.lang.String graphName, Model model)
      Load (add, append) RDF into a named graph in a dataset.
      void load​(Model model)
      Load (add, append) RDF into the default graph of a dataset.
      void loadDataset​(java.lang.String file)  
      void loadDataset​(Dataset dataset)  
      void put​(java.lang.String file)
      Set the contents of the default graph of a dataset.
      void put​(java.lang.String graphName, java.lang.String file)
      Set the contents of a named graph of a dataset.
      void put​(java.lang.String graphName, Model model)
      Set the contents of a named graph of a dataset.
      void put​(Model model)
      Set the contents of the default graph of a dataset.
      void putDataset​(java.lang.String file)  
      void putDataset​(Dataset dataset)  
      default QueryExecution query​(java.lang.String queryString)
      Setup a SPARQL query execution.
      QueryExecution query​(Query query)
      Setup a SPARQL query execution.
      default boolean queryAsk​(java.lang.String queryString)
      Execute a ASK query and return a boolean
      default boolean queryAsk​(Query query)
      Execute a ASK query and return a boolean
      default Model queryConstruct​(java.lang.String queryString)
      Execute a CONSTRUCT query and return as a Model
      default Model queryConstruct​(Query query)
      Execute a CONSTRUCT query and return as a Model
      default Model queryDescribe​(java.lang.String queryString)
      Execute a DESCRIBE query and return as a Model
      default Model queryDescribe​(Query query)
      Execute a DESCRIBE query and return as a Model
      default void queryResultSet​(java.lang.String queryString, java.util.function.Consumer<ResultSet> resultSetAction)
      Execute a SELECT query and process the ResultSet with the handler code.
      default void queryResultSet​(Query query, java.util.function.Consumer<ResultSet> resultSetAction)
      Execute a SELECT query and process the ResultSet with the handler code.
      default void querySelect​(java.lang.String queryString, java.util.function.Consumer<QuerySolution> rowAction)
      Execute a SELECT query and process the rows of the results with the handler code.
      default void querySelect​(Query query, java.util.function.Consumer<QuerySolution> rowAction)
      Execute a SELECT query and process the rows of the results with the handler code.
      default void update​(java.lang.String updateString)
      Execute a SPARQL Update.
      default void update​(Update update)
      Execute a SPARQL Update.
      void update​(UpdateRequest update)
      Execute a SPARQL Update.
    • Method Detail

      • queryResultSet

        default void queryResultSet​(java.lang.String queryString,
                                    java.util.function.Consumer<ResultSet> resultSetAction)
        Execute a SELECT query and process the ResultSet with the handler code.
        Specified by:
        queryResultSet in interface SparqlQueryConnection
        Parameters:
        queryString -
        resultSetAction -
      • queryResultSet

        default void queryResultSet​(Query query,
                                    java.util.function.Consumer<ResultSet> resultSetAction)
        Execute a SELECT query and process the ResultSet with the handler code.
        Specified by:
        queryResultSet in interface SparqlQueryConnection
        Parameters:
        query -
        resultSetAction -
      • querySelect

        default void querySelect​(java.lang.String queryString,
                                 java.util.function.Consumer<QuerySolution> rowAction)
        Execute a SELECT query and process the rows of the results with the handler code.
        Specified by:
        querySelect in interface SparqlQueryConnection
        Parameters:
        queryString -
        rowAction -
      • querySelect

        default void querySelect​(Query query,
                                 java.util.function.Consumer<QuerySolution> rowAction)
        Execute a SELECT query and process the rows of the results with the handler code.
        Specified by:
        querySelect in interface SparqlQueryConnection
        Parameters:
        query -
        rowAction -
      • queryAsk

        default boolean queryAsk​(java.lang.String queryString)
        Execute a ASK query and return a boolean
        Specified by:
        queryAsk in interface SparqlQueryConnection
      • update

        default void update​(java.lang.String updateString)
        Execute a SPARQL Update.
        Specified by:
        update in interface SparqlUpdateConnection
        Parameters:
        updateString -
      • fetch

        Model fetch​(java.lang.String graphName)
        Fetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.
        Specified by:
        fetch in interface RDFDatasetAccessConnection
        Parameters:
        graphName - URI string for the graph name (null or "default" for the default graph)
        Returns:
        Model
      • fetch

        Model fetch()
        Fetch the default graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent.
        Specified by:
        fetch in interface RDFDatasetAccessConnection
        Returns:
        Model
      • load

        void load​(java.lang.String graphName,
                  java.lang.String file)
        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 RDFDatasetConnection
        Parameters:
        graphName - Graph name (null or "default" for the default graph)
        file - File of the data.
      • load

        void load​(java.lang.String file)
        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 RDFDatasetConnection
        Parameters:
        file - File of the data.
      • load

        void load​(java.lang.String graphName,
                  Model model)
        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 RDFDatasetConnection
        Parameters:
        graphName - Graph name (null or "default" for the default graph)
        model - Data.
      • load

        void load​(Model model)
        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 RDFDatasetConnection
        Parameters:
        model - Data.
      • put

        void put​(java.lang.String graphName,
                 java.lang.String file)
        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 RDFDatasetConnection
        Parameters:
        graphName - Graph name (null or "default" for the default graph)
        file - File of the data.
      • put

        void put​(java.lang.String file)
        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 RDFDatasetConnection
        Parameters:
        file - File of the data.
      • put

        void put​(java.lang.String graphName,
                 Model model)
        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 RDFDatasetConnection
        Parameters:
        graphName - Graph name (null or "default" for the default graph)
        model - Data.
      • put

        void put​(Model model)
        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 RDFDatasetConnection
        Parameters:
        model - Data.
      • delete

        void delete​(java.lang.String graphName)
        Delete a graph from the dataset. Null or "default" means the default graph, which is cleared, not removed.
        Specified by:
        delete in interface RDFDatasetConnection
        Parameters:
        graphName -