org.openrdf.query.impl
Class DatasetImpl

java.lang.Object
  extended by org.openrdf.query.impl.DatasetImpl
All Implemented Interfaces:
Dataset

public class DatasetImpl
extends Object
implements Dataset

Author:
Arjohn Kampman, James Leigh

Constructor Summary
DatasetImpl()
           
 
Method Summary
 void addDefaultGraph(URI graphURI)
          Adds a graph URI to the set of default graph URIs.
 void addDefaultRemoveGraph(URI graphURI)
          Adds a graph URI to the set of default remove graph URIs.
 void addNamedGraph(URI graphURI)
          Adds a graph URI to the set of named graph URIs.
 void clear()
          Removes all graph URIs (both default and named) from this dataset.
 Set<URI> getDefaultGraphs()
          Gets the default graph URIs of this dataset.
 URI getDefaultInsertGraph()
          Gets the default insert graph URI of this dataset.
 Set<URI> getDefaultRemoveGraphs()
          Gets the default remove graph URIs of this dataset.
 Set<URI> getNamedGraphs()
          Gets the (unmodifiable) set of named graph URIs.
 boolean removeDefaultGraph(URI graphURI)
          Removes a graph URI from the set of default graph URIs.
 boolean removeDefaultRemoveGraph(URI graphURI)
          Removes a graph URI from the set of default remove graph URIs.
 boolean removeNamedGraph(URI graphURI)
          Removes a graph URI from the set of named graph URIs.
 void setDefaultInsertGraph(URI defaultInsertGraph)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatasetImpl

public DatasetImpl()
Method Detail

getDefaultRemoveGraphs

public Set<URI> getDefaultRemoveGraphs()
Description copied from interface: Dataset
Gets the default remove graph URIs of this dataset. An empty set indicates the the store's default behaviour should be used, if not otherwise indicated in the operation.

Specified by:
getDefaultRemoveGraphs in interface Dataset

addDefaultRemoveGraph

public void addDefaultRemoveGraph(URI graphURI)
Adds a graph URI to the set of default remove graph URIs.


removeDefaultRemoveGraph

public boolean removeDefaultRemoveGraph(URI graphURI)
Removes a graph URI from the set of default remove graph URIs.

Returns:
true if the URI was removed from the set, false if the set did not contain the URI.

getDefaultInsertGraph

public URI getDefaultInsertGraph()
Description copied from interface: Dataset
Gets the default insert graph URI of this dataset. An null value indicates that the store's default behaviour should be used, if not otherwise indicated in the operation.

Specified by:
getDefaultInsertGraph in interface Dataset
Returns:
Returns the default insert graph.

setDefaultInsertGraph

public void setDefaultInsertGraph(URI defaultInsertGraph)
Parameters:
defaultUpdateGraph - The default insert graph to used.

getDefaultGraphs

public Set<URI> getDefaultGraphs()
Description copied from interface: Dataset
Gets the default graph URIs of this dataset. An empty default graph set and a non-empty named graph set indicates that the default graph is an empty graph. However, if both the default graph set and the named graph set are empty, that indicates that the store's default behaviour should be used.

Specified by:
getDefaultGraphs in interface Dataset

addDefaultGraph

public void addDefaultGraph(URI graphURI)
Adds a graph URI to the set of default graph URIs.


removeDefaultGraph

public boolean removeDefaultGraph(URI graphURI)
Removes a graph URI from the set of default graph URIs.

Returns:
true if the URI was removed from the set, false if the set did not contain the URI.

getNamedGraphs

public Set<URI> getNamedGraphs()
Gets the (unmodifiable) set of named graph URIs.

Specified by:
getNamedGraphs in interface Dataset

addNamedGraph

public void addNamedGraph(URI graphURI)
Adds a graph URI to the set of named graph URIs.


removeNamedGraph

public boolean removeNamedGraph(URI graphURI)
Removes a graph URI from the set of named graph URIs.

Returns:
true if the URI was removed from the set, false if the set did not contain the URI.

clear

public void clear()
Removes all graph URIs (both default and named) from this dataset.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 Aduna. All Rights Reserved.