Florian Laws wrote:
Christoph Büscher schrieb:
Hi,
so far I've always used UIMA CPEs to read whole collections of
documents from e.g. a source directory. In a new application it will
be necessary to run a CPE on new documents beeing passed to it by
another application (outside UIMA). It would be nice to be able to
simply hand single documents over to a collection reader and then
simply to "run/wake up" the CPE to process the document.
My idea was to put the incoming documents into a waiting queue,
register this at a custom collection reader and then let the
hasNext/getNext-Method simply to ask the queue if there is work to do.
But when "hasNext()" in the collection reader returns "false", the CPE
stops execution.
What about the naive solution:
Wait in the hasNext() method until a new document is available.
Regards,
Florian
I think that's possible. You may need to be
careful how to configure the CPE so you don't get
time outs? Not sure.
--Thilo