org.openanzo.glitter.dataset
Class HTTPStreamingDataset

java.lang.Object
  extended by org.openanzo.glitter.dataset.HTTPStreamingDataset
All Implemented Interfaces:
RDFDataset<java.io.InputStream>, StreamingDataset

public class HTTPStreamingDataset
extends java.lang.Object
implements StreamingDataset

This is the default implementation of an RDF dataset in Glitter. It retrieves all of the graphs via HTTP GET and returns them as byte-oriented InputStreams. It's up to the consumer to parse the graphs, and as such, this will only be useful in limited cases.

Author:
Lee

Constructor Summary
HTTPStreamingDataset()
          Default constructor.
 
Method Summary
 void addDefaultGraph(java.net.URI name)
          Adds (by RDF merge) the graph represented by name to the default graph for this dataset
 void addNamedGraph(java.net.URI name)
          Adds the graph represented by name to the set of named graphs for this dataset
 java.io.InputStream getDefaultGraph(java.net.URI name)
          Retrieve the representation of the given default graph
 java.util.Iterator<java.net.URI> getDefaultGraphs()
           
 java.io.InputStream getNamedGraph(java.net.URI name)
          Retrieve the representation of the given named graph
 java.util.Iterator<java.net.URI> getNamedGraphs()
           
 void setDefaultGraphs(java.util.Set<java.net.URI> graphs)
          Sets the full set of graphs that are merged to form the default graph for this dataset.
 void setNamedGraphs(java.util.Set<java.net.URI> graphs)
          Sets the full set of graphs that comprise the named graph portion of this dataset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPStreamingDataset

public HTTPStreamingDataset()
Default constructor.

Method Detail

addDefaultGraph

public void addDefaultGraph(java.net.URI name)
Description copied from interface: RDFDataset
Adds (by RDF merge) the graph represented by name to the default graph for this dataset

Specified by:
addDefaultGraph in interface RDFDataset<java.io.InputStream>
Parameters:
name - Identifier of the graph being added

addNamedGraph

public void addNamedGraph(java.net.URI name)
Description copied from interface: RDFDataset
Adds the graph represented by name to the set of named graphs for this dataset

Specified by:
addNamedGraph in interface RDFDataset<java.io.InputStream>
Parameters:
name - Identifier of the graph being added

setDefaultGraphs

public void setDefaultGraphs(java.util.Set<java.net.URI> graphs)
Description copied from interface: RDFDataset
Sets the full set of graphs that are merged to form the default graph for this dataset.

Specified by:
setDefaultGraphs in interface RDFDataset<java.io.InputStream>
Parameters:
graphs - The new graphs that form the default graph

setNamedGraphs

public void setNamedGraphs(java.util.Set<java.net.URI> graphs)
Description copied from interface: RDFDataset
Sets the full set of graphs that comprise the named graph portion of this dataset

Specified by:
setNamedGraphs in interface RDFDataset<java.io.InputStream>
Parameters:
graphs - The new named graphs

getDefaultGraph

public java.io.InputStream getDefaultGraph(java.net.URI name)
                                    throws UnknownGraphException
Description copied from interface: RDFDataset
Retrieve the representation of the given default graph

Specified by:
getDefaultGraph in interface RDFDataset<java.io.InputStream>
Parameters:
name - Identifies the component of the default graph whose representation should be returned
Returns:
A representation of the given graph
Throws:
UnknownGraphException

getNamedGraph

public java.io.InputStream getNamedGraph(java.net.URI name)
                                  throws UnknownGraphException
Description copied from interface: RDFDataset
Retrieve the representation of the given named graph

Specified by:
getNamedGraph in interface RDFDataset<java.io.InputStream>
Parameters:
name - Identifies the named graph whose representation should be returned
Returns:
A representation of the given graph
Throws:
UnknownGraphException

getDefaultGraphs

public java.util.Iterator<java.net.URI> getDefaultGraphs()
Specified by:
getDefaultGraphs in interface RDFDataset<java.io.InputStream>
Returns:
An iterator over the graph identifiers that comprise the default graph

getNamedGraphs

public java.util.Iterator<java.net.URI> getNamedGraphs()
Specified by:
getNamedGraphs in interface RDFDataset<java.io.InputStream>
Returns:
An iterator over the graph identifiers for the named graphs in this dataset


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.