Class DatasetUtils

java.lang.Object
org.apache.jena.sparql.util.DatasetUtils

public class DatasetUtils extends Object
Internal Dataset factory + graph equivalents.
  • Method Details

    • createDataset

      public static Dataset createDataset(String uri, List<String> namedSourceList)
      Create a general purpose, in-memory dataset, and load data into the default graph and also some named graphs.
      Parameters:
      uri - Default graph
      namedSourceList - Named graphs
      Returns:
      Dataset
    • createDataset

      public static Dataset createDataset(String uri, List<String> namedSourceList, String baseURI)
      Create a general purpose, in-memory dataset, and load data into the default graph and also some named graphs.
      Parameters:
      uri - Default graph
      namedSourceList - Named graphs
      baseURI -
      Returns:
      Dataset
    • createDataset

      public static Dataset createDataset(List<String> uriList, List<String> namedSourceList)
      Create a general purpose, in-memory dataset, and load some data
      Parameters:
      uriList - RDF for the default graph
      namedSourceList - Named graphs.
      Returns:
      Dataset
    • createDataset

      public static Dataset createDataset(DatasetDescription datasetDesc)
      Create a general purpose, in-memory dataset, and load data.
      Parameters:
      datasetDesc -
      Returns:
      Dataset
    • createDataset

      public static Dataset createDataset(DatasetDescription datasetDesc, String baseURI)
      Create a general purpose, in-memory dataset, and load data.
      Parameters:
      datasetDesc -
      Returns:
      Dataset
    • createDataset

      public static Dataset createDataset(List<String> uriList, List<String> namedSourceList, String baseURI)
      Create a general purpose, in-memory dataset, and load data.
      Parameters:
      uriList - Default graph
      namedSourceList - Named graphs
      baseURI -
      Returns:
      Dataset
    • addInGraphs

      public static Dataset addInGraphs(Dataset ds, List<String> uriList, List<String> namedSourceList)
      Add graphs into an existing Dataset
    • addInGraphs

      public static Dataset addInGraphs(Dataset ds, List<String> uriList, List<String> namedSourceList, String baseURI)
      Add graphs into a Dataset
      Parameters:
      ds -
      uriList - Default graph
      namedSourceList - Named graphs
      baseURI -
      Returns:
      Dataset, as passed in.
    • createDatasetGraph

      public static DatasetGraph createDatasetGraph(DatasetDescription datasetDesc)
      Create a general purpose, in-memory dataset, and load data.
      Parameters:
      datasetDesc -
      Returns:
      Dataset
    • createDatasetGraph

      public static DatasetGraph createDatasetGraph(DatasetDescription datasetDesc, String baseURI)
      Create a general purpose, in-memory dataset, and load data.
      Parameters:
      datasetDesc -
      baseURI -
      Returns:
      Dataset
    • createDatasetGraph

      public static DatasetGraph createDatasetGraph(String uri, List<String> namedSourceList, String baseURI)
    • createDatasetGraph

      public static DatasetGraph createDatasetGraph(List<String> uriList, List<String> namedSourceList, String baseURI)
    • addInGraphs

      public static void addInGraphs(DatasetGraph dsg, List<String> uriList, List<String> namedSourceList)
      Add graphs into a DatasetGraph
      Parameters:
      dsg -
      uriList - Default graph
      namedSourceList - Named graphs
    • addInGraphs

      public static void addInGraphs(DatasetGraph dsg, List<String> uriList, List<String> namedSourceList, String baseURI)
      Add graphs into a DatasetGraph
      Parameters:
      dsg -
      uriList - Default graph
      namedSourceList - Named graphs
      baseURI -