Package org.eclipse.rdf4j.rio.helpers
Class BufferedGroupingRDFHandler
java.lang.Object
org.eclipse.rdf4j.rio.helpers.RDFHandlerWrapper
org.eclipse.rdf4j.rio.helpers.BufferedGroupingRDFHandler
- All Implemented Interfaces:
RDFHandler
An
RDFHandlerWrapper
that buffers statements internally and passes them to underlying handlers grouped by
context, then subject, then predicate.- Author:
- Jeen Broekstra
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBufferedGroupingRDFHandler
(int bufferSize, RDFHandler... handlers) Creates a new BufferedGroupedWriter that wraps the supplied handlers, using the supplied buffer size.BufferedGroupingRDFHandler
(RDFHandler... handlers) Creates a new BufferedGroupedWriter that wraps the supplied handlers, using the default buffer size. -
Method Summary
Methods inherited from class org.eclipse.rdf4j.rio.helpers.RDFHandlerWrapper
getModelFactory, handleComment, handleNamespace, startRDF
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZEDefault buffer size. Buffer size is expressed in number of RDF statements. The default is set to 1024.- See Also:
-
-
Constructor Details
-
BufferedGroupingRDFHandler
Creates a new BufferedGroupedWriter that wraps the supplied handlers, using the default buffer size.- Parameters:
handlers
- one or more wrapped RDFHandlers
-
BufferedGroupingRDFHandler
Creates a new BufferedGroupedWriter that wraps the supplied handlers, using the supplied buffer size.- Parameters:
bufferSize
- size of the buffer expressed in number of RDF statementshandlers
- one or more wrapped RDFHandlers
-
-
Method Details
-
getBufferedStatements
-
handleStatement
Description copied from interface:RDFHandler
Handles a statement.- Specified by:
handleStatement
in interfaceRDFHandler
- Overrides:
handleStatement
in classRDFHandlerWrapper
- Parameters:
st
- The statement.- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
processBuffer
- Throws:
RDFHandlerException
-
endRDF
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
- Overrides:
endRDF
in classRDFHandlerWrapper
- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-