com.hp.hpl.jena.sparql.core
Interface DatasetGraph

All Superinterfaces:
Closeable
All Known Subinterfaces:
GraphStore
All Known Implementing Classes:
DatasetGraphBase, DatasetGraphBaseFind, DatasetGraphCaching, DatasetGraphCollection, DatasetGraphMaker, DatasetGraphMap, DatasetGraphOne, DatasetGraphQuad, DatasetGraphTriplesQuads, DatasetGraphWrapper, GraphStoreBasic

public interface DatasetGraph
extends Closeable

DatasetGraph: The graph representation of an RDF Dataset. See Dataset for the Model level, read-only view (fixed set of models - the models themselves are still mutable) of an RDF dataset.

Whether a dataset contains a graph if there are no triples is not defined; see the specifc implementation. Some datasets are "open" - they have all graphs even if no triples, Some datasets are "closed" - fixed set of graphs


Method Summary
 void add(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Add a quad
 void add(Quad quad)
          Add a quad
 void addGraph(com.hp.hpl.jena.graph.Node graphName, com.hp.hpl.jena.graph.Graph graph)
          Add the given graph to the dataset.
 void close()
          Close the dataset
 boolean contains(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Test whether the dataset (including default graph) contains a quad - may include wildcards, Node.ANY or null
 boolean contains(Quad quad)
          Test whether the dataset contains a quad (including default graph)- may include wildcards, Node.ANY or null
 boolean containsGraph(com.hp.hpl.jena.graph.Node graphNode)
           
 void delete(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Delete a quad
 void delete(Quad quad)
          Delete a quad
 void deleteAny(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Delete any quads matching the pattern
 Iterator<Quad> find()
          Iterate over all quads in the dataset graph
 Iterator<Quad> find(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or null
 Iterator<Quad> find(Quad quad)
          Find matching quads in the dataset - may include wildcards, Node.ANY or null
 Iterator<Quad> findNG(com.hp.hpl.jena.graph.Node g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
          Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or null
 Context getContext()
          Get the context associated with this object - may be null
 com.hp.hpl.jena.graph.Graph getDefaultGraph()
          Get the default graph as a Jena Graph
 com.hp.hpl.jena.graph.Graph getGraph(com.hp.hpl.jena.graph.Node graphNode)
          Get the graph named by graphNode : returns null on no graph NB Whether a dataset contains a graph if there are no triples is not defined - see the specifc implementation.
 com.hp.hpl.jena.shared.Lock getLock()
          Return a lock for the dataset to help with concurrency control
 boolean isEmpty()
          Test whether the dataset is empty
 Iterator<com.hp.hpl.jena.graph.Node> listGraphNodes()
          Iterate over all names of named graphs
 void removeGraph(com.hp.hpl.jena.graph.Node graphName)
          Remove all data associated with the named graph
 void setDefaultGraph(com.hp.hpl.jena.graph.Graph g)
          Set the default graph.
 long size()
          Get the size (number of named graphs) - may be -1 for unknown
 

Method Detail

getDefaultGraph

com.hp.hpl.jena.graph.Graph getDefaultGraph()
Get the default graph as a Jena Graph


getGraph

com.hp.hpl.jena.graph.Graph getGraph(com.hp.hpl.jena.graph.Node graphNode)
Get the graph named by graphNode : returns null on no graph NB Whether a dataset contains a graph if there are no triples is not defined - see the specifc implementation. Some datasets are "open" - they have all graphs even if no triples,


containsGraph

boolean containsGraph(com.hp.hpl.jena.graph.Node graphNode)

setDefaultGraph

void setDefaultGraph(com.hp.hpl.jena.graph.Graph g)
Set the default graph. Set the active graph if it was null. This replaces the contents default graph, not merge data into it. Do not assume that the same object is returned by getDefaultGraph()


addGraph

void addGraph(com.hp.hpl.jena.graph.Node graphName,
              com.hp.hpl.jena.graph.Graph graph)
Add the given graph to the dataset. Replaces any existing data for the named graph; to add data, get the graph and add triples to it, or add quads to the dataset. Do not assume that the same Java object is returned by getGraph(com.hp.hpl.jena.graph.Node)


removeGraph

void removeGraph(com.hp.hpl.jena.graph.Node graphName)
Remove all data associated with the named graph


listGraphNodes

Iterator<com.hp.hpl.jena.graph.Node> listGraphNodes()
Iterate over all names of named graphs


add

void add(Quad quad)
Add a quad


delete

void delete(Quad quad)
Delete a quad


add

void add(com.hp.hpl.jena.graph.Node g,
         com.hp.hpl.jena.graph.Node s,
         com.hp.hpl.jena.graph.Node p,
         com.hp.hpl.jena.graph.Node o)
Add a quad


delete

void delete(com.hp.hpl.jena.graph.Node g,
            com.hp.hpl.jena.graph.Node s,
            com.hp.hpl.jena.graph.Node p,
            com.hp.hpl.jena.graph.Node o)
Delete a quad


deleteAny

void deleteAny(com.hp.hpl.jena.graph.Node g,
               com.hp.hpl.jena.graph.Node s,
               com.hp.hpl.jena.graph.Node p,
               com.hp.hpl.jena.graph.Node o)
Delete any quads matching the pattern


find

Iterator<Quad> find()
Iterate over all quads in the dataset graph


find

Iterator<Quad> find(Quad quad)
Find matching quads in the dataset - may include wildcards, Node.ANY or null

See Also:
Graph.find(TripleMatch)

find

Iterator<Quad> find(com.hp.hpl.jena.graph.Node g,
                    com.hp.hpl.jena.graph.Node s,
                    com.hp.hpl.jena.graph.Node p,
                    com.hp.hpl.jena.graph.Node o)
Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or null

See Also:
Graph.find(Node,Node,Node)

findNG

Iterator<Quad> findNG(com.hp.hpl.jena.graph.Node g,
                      com.hp.hpl.jena.graph.Node s,
                      com.hp.hpl.jena.graph.Node p,
                      com.hp.hpl.jena.graph.Node o)
Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or null

See Also:
Graph.find(Node,Node,Node)

contains

boolean contains(com.hp.hpl.jena.graph.Node g,
                 com.hp.hpl.jena.graph.Node s,
                 com.hp.hpl.jena.graph.Node p,
                 com.hp.hpl.jena.graph.Node o)
Test whether the dataset (including default graph) contains a quad - may include wildcards, Node.ANY or null


contains

boolean contains(Quad quad)
Test whether the dataset contains a quad (including default graph)- may include wildcards, Node.ANY or null


isEmpty

boolean isEmpty()
Test whether the dataset is empty


getLock

com.hp.hpl.jena.shared.Lock getLock()
Return a lock for the dataset to help with concurrency control

See Also:
Lock

getContext

Context getContext()
Get the context associated with this object - may be null


size

long size()
Get the size (number of named graphs) - may be -1 for unknown


close

void close()
Close the dataset

Specified by:
close in interface Closeable


Licenced under the Apache License, Version 2.0