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

Field Summary
protected  Set<URI> defaultGraphs
           
protected  Set<URI> namedGraphs
           
 
Constructor Summary
DatasetImpl()
           
 
Method Summary
 void addDefaultGraph(URI graphURI)
          Adds a graph URI to the set of default 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.
 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 removeNamedGraph(URI graphURI)
          Removes a graph URI from the set of named graph URIs.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultGraphs

protected Set<URI> defaultGraphs

namedGraphs

protected Set<URI> namedGraphs
Constructor Detail

DatasetImpl

public DatasetImpl()
Method Detail

getDefaultGraphs

public Set<URI> getDefaultGraphs()
Description copied from interface: Dataset
Gets the default graph URIs of this dataset. An empty set indicates that the default graph is an empty graph.

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-2010 Aduna. All Rights Reserved.