Package org.eclipse.rdf4j.query.impl
Class BackgroundGraphResult
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
-
- org.eclipse.rdf4j.common.iteration.IterationWrapper<Statement,QueryEvaluationException>
-
- org.eclipse.rdf4j.query.impl.BackgroundGraphResult
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Iterable<Statement>
,java.lang.Runnable
,CloseableIteration<Statement,QueryEvaluationException>
,Iteration<Statement,QueryEvaluationException>
,GraphQueryResult
,QueryResult<Statement>
,RDFHandler
@Deprecated(since="4.1.0") public class BackgroundGraphResult extends IterationWrapper<Statement,QueryEvaluationException> implements GraphQueryResult, java.lang.Runnable, RDFHandler
Deprecated.Provides concurrent access to statements as they are being parsed when instances of this class are run as Threads.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseURI
Deprecated.private java.nio.charset.Charset
charset
Deprecated.private java.util.concurrent.CountDownLatch
finishedParsing
Deprecated.private java.io.InputStream
in
Deprecated.private java.util.Map<java.lang.String,java.lang.String>
namespaces
Deprecated.private java.util.concurrent.CountDownLatch
namespacesReady
Deprecated.private RDFParser
parser
Deprecated.private QueueCursor<Statement>
queue
Deprecated.-
Fields inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
wrappedIter
-
-
Constructor Summary
Constructors Constructor Description BackgroundGraphResult(QueueCursor<Statement> queue, RDFParser parser, java.io.InputStream in, java.nio.charset.Charset charset, java.lang.String baseURI)
Deprecated.BackgroundGraphResult(RDFParser parser, java.io.InputStream in, java.nio.charset.Charset charset, java.lang.String baseURI, java.lang.ref.WeakReference<?> callerRef)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
endRDF()
Deprecated.Signals the end of the RDF data.java.util.Map<java.lang.String,java.lang.String>
getNamespaces()
Deprecated.Retrieves relevant namespaces from the query result.protected void
handleClose()
Deprecated.Closes this Iteration and also closes the wrapped Iteration if it is aCloseableIteration
.void
handleComment(java.lang.String comment)
Deprecated.Handles a comment.void
handleNamespace(java.lang.String prefix, java.lang.String uri)
Deprecated.Handles a namespace declaration/definition.void
handleStatement(Statement st)
Deprecated.Handles a statement.void
run()
Deprecated.void
startRDF()
Deprecated.Signals the start of the RDF data.-
Methods inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
hasNext, next, remove
-
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
close
-
Methods inherited from interface org.eclipse.rdf4j.query.QueryResult
hasNext, iterator, next, stream
-
-
-
-
Field Detail
-
parser
private final RDFParser parser
Deprecated.
-
charset
private final java.nio.charset.Charset charset
Deprecated.
-
in
private final java.io.InputStream in
Deprecated.
-
baseURI
private final java.lang.String baseURI
Deprecated.
-
namespacesReady
private final java.util.concurrent.CountDownLatch namespacesReady
Deprecated.
-
finishedParsing
private final java.util.concurrent.CountDownLatch finishedParsing
Deprecated.
-
namespaces
private final java.util.Map<java.lang.String,java.lang.String> namespaces
Deprecated.
-
queue
private final QueueCursor<Statement> queue
Deprecated.
-
-
Constructor Detail
-
BackgroundGraphResult
public BackgroundGraphResult(RDFParser parser, java.io.InputStream in, java.nio.charset.Charset charset, java.lang.String baseURI, java.lang.ref.WeakReference<?> callerRef)
Deprecated.
-
BackgroundGraphResult
public BackgroundGraphResult(QueueCursor<Statement> queue, RDFParser parser, java.io.InputStream in, java.nio.charset.Charset charset, java.lang.String baseURI)
Deprecated.
-
-
Method Detail
-
handleClose
protected void handleClose() throws QueryEvaluationException
Deprecated.Description copied from class:IterationWrapper
Closes this Iteration and also closes the wrapped Iteration if it is aCloseableIteration
.- Overrides:
handleClose
in classIterationWrapper<Statement,QueryEvaluationException>
- Throws:
QueryEvaluationException
-
run
public void run()
Deprecated.- Specified by:
run
in interfacejava.lang.Runnable
-
startRDF
public void startRDF() throws RDFHandlerException
Deprecated.Description copied from interface:RDFHandler
Signals the start of the RDF data. This method is called before any data is reported.- Specified by:
startRDF
in interfaceRDFHandler
- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
getNamespaces
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Deprecated.Description copied from interface:GraphQueryResult
Retrieves relevant namespaces from the query result.
The contents of the Map may be modified after it is returned, as the initial return may be performed when the first RDF Statement is encountered.- Specified by:
getNamespaces
in interfaceGraphQueryResult
- Returns:
- a Map<String, String> object containing (prefix, namespace) pairs.
-
handleComment
public void handleComment(java.lang.String comment) throws RDFHandlerException
Deprecated.Description copied from interface:RDFHandler
Handles a comment.- Specified by:
handleComment
in interfaceRDFHandler
- Parameters:
comment
- The comment.- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
handleNamespace
public void handleNamespace(java.lang.String prefix, java.lang.String uri) throws RDFHandlerException
Deprecated.Description copied from interface:RDFHandler
Handles a namespace declaration/definition. A namespace declaration associates a (short) prefix string with the namespace's URI. The prefix for default namespaces, which do not have an associated prefix, are represented as empty strings.- Specified by:
handleNamespace
in interfaceRDFHandler
- Parameters:
prefix
- The prefix for the namespace, or an empty string in case of a default namespace.uri
- The URI that the prefix maps to.- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
handleStatement
public void handleStatement(Statement st) throws RDFHandlerException
Deprecated.Description copied from interface:RDFHandler
Handles a statement.- Specified by:
handleStatement
in interfaceRDFHandler
- Parameters:
st
- The statement.- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
endRDF
public void endRDF() throws RDFHandlerException
Deprecated.Description copied from interface:RDFHandler
Signals the end of the RDF data. This method is called when all data has been reported.- Specified by:
endRDF
in interfaceRDFHandler
- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
-