Package com.complexible.common.rdf.rio
Class RDFStreamProcessor
java.lang.Object
com.complexible.common.rdf.rio.RDFStreamProcessor
Stream processor that handles concurrent production of statements from multiple streams and passes the statements
to
handlers or provides the results as an iteration(List).- Since:
- 0.1
- Author:
- Michael Grove, Evren Sirin, Fernando Hernandez
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new stream to process.voidcheck(CancelCheck theCheck) static RDFStreamProcessorcreate(ProcessorContext cxt) handler(RDFNamespaceHandler theNamespaceHandler) Specifies the namespace handler that will be used by this process.handler(RDFStatementHandler.Factory theHandler) Specifies the factory that will be used to create handlers.static StatementIteratorstatic voidmaxHandlers(int count) maxParsers(int count) monitorOutput(ProgressReporter reporter) monitorOutput(OutputStream theStream, String theDBName) Sets the output progress if progress should be reported ornullif progress should not be reported.voidprocess()Waits for the processing of streams to finish.Waits for the processing of streams to finish and returns a mapping from the streams to exceptions.resizeHandlers(boolean value)
-
Method Details
-
create
-
iteration
-
handler
Specifies the factory that will be used to create handlers. Multiple handlers may be created depending on the number of streams processed, number of available processors, etc. -
handler
Specifies the namespace handler that will be used by this process. A single namespace handler is used for all the streams processed. -
check
-
monitorOutput
Sets the output progress if progress should be reported ornullif progress should not be reported. Passingnullvalue is preferred compared to passing an output stream that ignores its output so that we will avoid keeping track of progress completely. -
monitorOutput
-
maxParsers
-
maxHandlers
-
resizeHandlers
-
add
Adds a new stream to process. Processing might start immediately -
add
-
anyException
-
process
Waits for the processing of streams to finish. No more streams may be added to the processor after this function is called. An exception is thrown at the very end if there was an error processing any one of the streams.- Throws:
InvalidRDFIOException
-
processSilently
Waits for the processing of streams to finish and returns a mapping from the streams to exceptions. The map will be empty if there were no exceptions during processing. No more streams may be added to the processor after this function is called. -
cancel
-
main
-