Hello.
I am using the UIMA (or better to say the CPE) to analyze some text within my
application.
My application uses a class, let's name it my MyDocument, whose objects store the text to analyze
(MyDocument.text).
When the text of MyDocument object was analyzed, the result should be stored back to the MyDocument
object.
What would be the best way to find out from which MyDocument object the text
comes from?
I could check if "cas.getDocumentText.equals(myDocument.getText())", but this is not a clean
solution as there could be multiple MyDocument objects with the same text.
Another thing that won't work is to assoiate the CAS with the MyDocument object in the collection
reader by doint myDocument.setCas(aCas). But a CAS is reused this will fail too.
So the only possible solution seems to be to associate the MyDocument object with the CAS like
(aCas.setSource(myDocument). But I am not sure if there is some way to do this.
Any suggestions?
Best regards,
Kai