com.hp.hpl.jena.query
Class DatasetFactory

java.lang.Object
  extended by com.hp.hpl.jena.query.DatasetFactory

public class DatasetFactory
extends Object

Make Datasets and DataSources in various ways


Constructor Summary
DatasetFactory()
           
 
Method Summary
static Dataset assemble(com.hp.hpl.jena.rdf.model.Model model)
          Assembler a dataset from the model
static Dataset assemble(com.hp.hpl.jena.rdf.model.Resource resource)
          Assembler a dataset from a resource
static Dataset assemble(String filename)
          Assembler a dataset from the model in a file
static DataSource create()
          Deprecated. Use createMem
static DataSource create(Dataset dataset)
          Create a dataset
static DataSource create(DatasetGraph dataset)
          Wrap a datasetgraph to make a mutable dataset
static Dataset create(List<String> uriList)
          Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.
static Dataset create(List<String> uriList, com.hp.hpl.jena.util.FileManager fileManager)
          Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.
static Dataset create(List<String> uriList, List<String> namedSourceList)
          Create a dataset based on two list of URIs.
static Dataset create(List<String> uriList, List<String> namedSourceList, com.hp.hpl.jena.util.FileManager fileManager, String baseURI)
          Create a named graph container based on two list of URIs.
static DataSource create(com.hp.hpl.jena.rdf.model.Model model)
          Create a dataset with the given model as the default graph
static Dataset create(String uri)
          Create a dataset with a default graph and no named graphs
static Dataset create(String uri, com.hp.hpl.jena.util.FileManager fileManager)
          Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.
static Dataset create(String uri, List<String> namedSourceList)
          Create a dataset container based on two list of URIs.
static Dataset create(String uri, List<String> namedSourceList, com.hp.hpl.jena.util.FileManager fileManager, String baseURI)
          Create a named graph container based on two list of URIs.
static Dataset createMem()
          Create an in-memory, modifiable Dataset
static Dataset createMemFixed()
          Create an in-memory, modifiable Dataset.
static Dataset createNamed(List<String> namedSourceList, com.hp.hpl.jena.util.FileManager fileManager)
          Create a named graph container of graphs based on a list of URIs.
static Dataset make(Dataset ds, com.hp.hpl.jena.rdf.model.Model defaultModel)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatasetFactory

public DatasetFactory()
Method Detail

createMem

public static Dataset createMem()
Create an in-memory, modifiable Dataset


createMemFixed

public static Dataset createMemFixed()
Create an in-memory, modifiable Dataset. New graphs must be explicitly added using .addGraph.


create

@Deprecated
public static DataSource create()
Deprecated. Use createMem

Create an in-memory, modifable Dataset


create

public static DataSource create(com.hp.hpl.jena.rdf.model.Model model)
Create a dataset with the given model as the default graph

Parameters:
model -
Returns:
Dataset

create

public static DataSource create(Dataset dataset)
Create a dataset

Parameters:
dataset -
Returns:
Dataset

create

public static DataSource create(DatasetGraph dataset)
Wrap a datasetgraph to make a mutable dataset

Parameters:
dataset - DatasetGraph
Returns:
Dataset

create

public static Dataset create(List<String> uriList)
Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.

Parameters:
uriList - URIs merged to form the default dataset
Returns:
Dataset

create

public static Dataset create(String uri)
Create a dataset with a default graph and no named graphs

Parameters:
uri - URIs merged to form the default dataset
Returns:
Dataset

create

public static Dataset create(List<String> uriList,
                             com.hp.hpl.jena.util.FileManager fileManager)
Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.

Parameters:
uriList - URIs merged to form the default dataset
fileManager -
Returns:
Dataset

create

public static Dataset create(String uri,
                             com.hp.hpl.jena.util.FileManager fileManager)
Create a dataset based on a list of URIs : these are merged into the default graph of the dataset.

Parameters:
uri - graph to be loaded into the unnamed, default graph
fileManager -
Returns:
Dataset

createNamed

public static Dataset createNamed(List<String> namedSourceList,
                                  com.hp.hpl.jena.util.FileManager fileManager)
Create a named graph container of graphs based on a list of URIs.

Parameters:
namedSourceList -
fileManager -
Returns:
Dataset

create

public static Dataset create(List<String> uriList,
                             List<String> namedSourceList)
Create a dataset based on two list of URIs. The first lists is used to create the background (unnamed graph) by merging, the second is used to create the collection of named graphs. (Jena calls graphs "Models" and triples "Statements")

Parameters:
uriList - graphs to be loaded into the unnamed, default graph
namedSourceList - graphs to be atatched as named graphs
Returns:
Dataset

create

public static Dataset create(String uri,
                             List<String> namedSourceList)
Create a dataset container based on two list of URIs. The first is used to create the background (unnamed graph), the second is used to create the collection of named graphs. (Jena calls graphs "Models" and triples "Statements")

Parameters:
uri - graph to be loaded into the unnamed, default graph
namedSourceList - graphs to be attached as named graphs
Returns:
Dataset

create

public static Dataset create(String uri,
                             List<String> namedSourceList,
                             com.hp.hpl.jena.util.FileManager fileManager,
                             String baseURI)
Create a named graph container based on two list of URIs. The first is used to create the background (unnamed graph), the second is used to create the collection of named graphs. (Jena calls graphs "Models" and triples "Statements")

Parameters:
uri - graph to be loaded into the unnamed, default graph
namedSourceList - graphs to be atatched as named graphs
fileManager -
baseURI - baseURI for relative URI expansion
Returns:
Dataset

create

public static Dataset create(List<String> uriList,
                             List<String> namedSourceList,
                             com.hp.hpl.jena.util.FileManager fileManager,
                             String baseURI)
Create a named graph container based on two list of URIs. The first is used to create the background (unnamed graph), the second is used to create the collection of named graphs. (Jena calls graphs "Models" and triples "Statements")

Parameters:
uriList - graphs to be loaded into the unnamed, default graph
namedSourceList - graphs to be atatched as named graphs
fileManager -
baseURI - baseURI for relative URI expansion
Returns:
Dataset

make

public static Dataset make(Dataset ds,
                           com.hp.hpl.jena.rdf.model.Model defaultModel)

assemble

public static Dataset assemble(String filename)
Assembler a dataset from the model in a file

Parameters:
filename - The filename
Returns:
Dataset

assemble

public static Dataset assemble(com.hp.hpl.jena.rdf.model.Model model)
Assembler a dataset from the model

Parameters:
model -
Returns:
Dataset

assemble

public static Dataset assemble(com.hp.hpl.jena.rdf.model.Resource resource)
Assembler a dataset from a resource

Parameters:
resource - The resource for the dataset
Returns:
Dataset


Licenced under the Apache License, Version 2.0