|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.utils.GraphUtils
public class GraphUtils
Set of utility methods for graph operations, mainly dealing with reading and writing data.
| Constructor Summary | |
|---|---|
GraphUtils()
|
|
| Method Summary | |
|---|---|
static void |
addGraph(INamedGraph dest,
INamedGraph src)
Add all statements from src graph to destination graph |
static java.lang.Iterable<org.openrdf.model.Statement> |
getCollectionMembers(org.openrdf.model.Resource list,
IDataset dataset)
Get an Iterable for the members of the RDFList construct provided |
static java.lang.Iterable<org.openrdf.model.Value> |
getCollectionMembers(org.openrdf.model.Resource list,
INamedGraph graph)
Get an Iterable for the members of the RDFList construct provided |
static java.lang.Iterable<org.openrdf.model.Statement> |
getContainerMembers(org.openrdf.model.Resource container,
IDataset dataset)
Get an Iterable for the members of the RDFContainer construct provided |
static java.lang.Iterable<org.openrdf.model.Value> |
getContainerMembers(org.openrdf.model.Resource container,
INamedGraph graph)
Get an Iterable for the members of the RDFContainer construct provided |
static java.lang.String |
graphToString(INamedGraph graph)
Write the contents of the graph to a string in RDFXML format |
static void |
loadDataset(IDataset dataset,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
Load the contents of an input stream into the given dataset. |
static void |
loadGraph(INamedGraph graph,
java.io.File file)
Load data from given file into a graph. |
static void |
loadGraph(INamedGraph graph,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI)
Load the contents of an input stream into given graph, using parser for given format |
static void |
loadGraph(INamedGraph graph,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
Load the contents of an input stream into given graph, using parser for given format,batching additions into chunks of given size |
static void |
loadGraph(INamedGraph graph,
java.lang.String rdf,
org.openrdf.rio.RDFFormat format)
Load the contents of string into given graph, using parser for given format |
static void |
loadGraphInDataset(IDataset dataset,
org.openrdf.model.URI namedGraphURI,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI)
Load the contents of an input stream into a graph with the given URI which is a member of the given dataset. |
static void |
loadGraphInDataset(IDataset dataset,
org.openrdf.model.URI namedGraphURI,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
Load the contents of an input stream into a graph with the given URI which is a member of the given dataset. |
static void |
writeDataset(IDataset dataset,
java.io.OutputStream out)
Write the contents of the given Dataset's NamedGraphs to the given OutputStream, using TriG Note:Default graph data is not written |
static void |
writeGraph(INamedGraph graph,
java.io.OutputStream out)
Write the contents of the given named graph to the given OutputStream, using RDFXML |
static void |
writeGraph(INamedGraph graph,
java.io.Writer writer)
Write the contents of the given named graph to the given writer, using RDFXML |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphUtils()
| Method Detail |
|---|
public static void writeGraph(INamedGraph graph,
java.io.Writer writer)
throws org.openrdf.rio.RDFHandlerException
graph - Graph to writewriter - Writer to which data is written
org.openrdf.rio.RDFHandlerException - if there are exceptions writing the data
public static void writeGraph(INamedGraph graph,
java.io.OutputStream out)
throws org.openrdf.rio.RDFHandlerException
graph - Graph to writeout - OutputStream to which data is written
org.openrdf.rio.RDFHandlerException - if there are exceptions writing the data
public static void writeDataset(IDataset dataset,
java.io.OutputStream out)
throws org.openrdf.rio.RDFHandlerException
dataset - Graph to writeout - OutputStream to which data is written
org.openrdf.rio.RDFHandlerException - if there are exceptions writing the data
public static java.lang.String graphToString(INamedGraph graph)
throws java.lang.Exception
graph - Graph to write
java.lang.Exception
public static void loadGraph(INamedGraph graph,
java.io.File file)
throws java.lang.Exception
graph - Graph to which data is loadedfile - File containing graph data.
java.lang.Exception - if there is an error parsing data
public static void loadGraph(INamedGraph graph,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI)
throws java.lang.Exception
graph - Graph to which data is loadedrdf - InputStream containing dataformat - Format which data is storedbaseURI - BaseURI of data within stream
java.lang.Exception - if there is an error parsing data
public static void loadGraph(INamedGraph graph,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
throws java.lang.Exception
graph - Graph to which data is loadedrdf - InputStream containing dataformat - Format which data is storedbaseURI - BaseURI of data within streambatchSize - Size of chunks used during data loading
java.lang.Exception - if there is an error parsing data
public static void loadGraph(INamedGraph graph,
java.lang.String rdf,
org.openrdf.rio.RDFFormat format)
throws java.lang.Exception
graph - Graph to which data is loadedrdf - String containing dataformat - Format which data is stored
java.lang.Exception - if there is an error parsing data
public static void loadGraphInDataset(IDataset dataset,
org.openrdf.model.URI namedGraphURI,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI)
throws java.lang.Exception
dataset - Dataset which contains given NamedGraphnamedGraphURI - URI of graph to which data is loadedrdf - InputStream containing dataformat - Format which data is storedbaseURI - BaseURI of data within stream
java.lang.Exception - if there is an error parsing data
public static void loadGraphInDataset(IDataset dataset,
org.openrdf.model.URI namedGraphURI,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
throws java.lang.Exception
dataset - Dataset which contains given NamedGraphnamedGraphURI - URI of graph to which data is loadedrdf - InputStream containing dataformat - Format which data is storedbaseURI - BaseURI of data within streambatchSize - Size of chunks used during data loading
java.lang.Exception - if there is an error parsing data
public static void loadDataset(IDataset dataset,
java.io.InputStream rdf,
org.openrdf.rio.RDFFormat format,
java.lang.String baseURI,
int batchSize)
throws java.lang.Exception
dataset - Dataset to which data is loadedrdf - InputStream containing dataformat - Format which data is storedbaseURI - BaseURI of data within streambatchSize - Size of chunks used during data loading
java.lang.Exception - if there is an error parsing data
public static void addGraph(INamedGraph dest,
INamedGraph src)
dest - Graph to which statements are addedsrc - Graph from which statements are added
public static java.lang.Iterable<org.openrdf.model.Value> getContainerMembers(org.openrdf.model.Resource container,
INamedGraph graph)
container - Resource of RDFContainer objectgraph - Graph containing data
public static java.lang.Iterable<org.openrdf.model.Statement> getContainerMembers(org.openrdf.model.Resource container,
IDataset dataset)
container - Resource of RDFContainer objectdataset - Dataset containing data
public static java.lang.Iterable<org.openrdf.model.Value> getCollectionMembers(org.openrdf.model.Resource list,
INamedGraph graph)
list - Resource of RDFList objectgraph - Graph containing data
public static java.lang.Iterable<org.openrdf.model.Statement> getCollectionMembers(org.openrdf.model.Resource list,
IDataset dataset)
list - Resource of RDFList objectdataset - Dataset containing data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||