org.openrdf.http.object.util
Class BackgroundGraphResult

java.lang.Object
  extended by org.openrdf.http.object.util.BackgroundGraphResult
All Implemented Interfaces:
CloseableIteration<Statement,QueryEvaluationException>, Iteration<Statement,QueryEvaluationException>, Closeable, Runnable, GraphQueryResult, QueryResult<Statement>, RDFHandler

public class BackgroundGraphResult
extends Object
implements GraphQueryResult, Runnable, RDFHandler, Closeable

Allows concurrent access to statements as they are being parsed.

Author:
James Leigh

Constructor Summary
BackgroundGraphResult(QueueCursor<Statement> queue, RDFParser parser, InputStream in, Charset charset, String baseURI)
           
BackgroundGraphResult(RDFParser parser, InputStream in, Charset charset, String baseURI)
           
 
Method Summary
 void close()
           
 void endRDF()
           
 Map<String,String> getNamespaces()
           
 void handleComment(String comment)
           
 void handleNamespace(String prefix, String uri)
           
 void handleStatement(Statement st)
           
 boolean hasNext()
           
 Statement next()
           
 void remove()
           
 void run()
           
 void startRDF()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BackgroundGraphResult

public BackgroundGraphResult(RDFParser parser,
                             InputStream in,
                             Charset charset,
                             String baseURI)

BackgroundGraphResult

public BackgroundGraphResult(QueueCursor<Statement> queue,
                             RDFParser parser,
                             InputStream in,
                             Charset charset,
                             String baseURI)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hasNext

public boolean hasNext()
                throws QueryEvaluationException
Specified by:
hasNext in interface Iteration<Statement,QueryEvaluationException>
Throws:
QueryEvaluationException

next

public Statement next()
               throws QueryEvaluationException
Specified by:
next in interface Iteration<Statement,QueryEvaluationException>
Throws:
QueryEvaluationException

remove

public void remove()
            throws QueryEvaluationException
Specified by:
remove in interface Iteration<Statement,QueryEvaluationException>
Throws:
QueryEvaluationException

close

public void close()
Specified by:
close in interface CloseableIteration<Statement,QueryEvaluationException>
Specified by:
close in interface Closeable

run

public void run()
Specified by:
run in interface Runnable

startRDF

public void startRDF()
              throws RDFHandlerException
Specified by:
startRDF in interface RDFHandler
Throws:
RDFHandlerException

getNamespaces

public Map<String,String> getNamespaces()
Specified by:
getNamespaces in interface GraphQueryResult

handleComment

public void handleComment(String comment)
                   throws RDFHandlerException
Specified by:
handleComment in interface RDFHandler
Throws:
RDFHandlerException

handleNamespace

public void handleNamespace(String prefix,
                            String uri)
                     throws RDFHandlerException
Specified by:
handleNamespace in interface RDFHandler
Throws:
RDFHandlerException

handleStatement

public void handleStatement(Statement st)
                     throws RDFHandlerException
Specified by:
handleStatement in interface RDFHandler
Throws:
RDFHandlerException

endRDF

public void endRDF()
            throws RDFHandlerException
Specified by:
endRDF in interface RDFHandler
Throws:
RDFHandlerException


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.