On 23/02/12 13:33, Jörn Kottmann wrote:
> Hi all,
>
> the CasEditor code assumes that getCoveredText never returns
> null.
>
> Should that always be the case?
>
> I have here a CAS with two DocumentAnnotations:
>
> 1. The one created by UIMA
> 2. An ArticleDocumentAnnotation (extends DocumentAnnotation)
> where the begin and end indexes are 0
>
> The second one returns null when getCoveredText is called
> (I can do more debugging when needed).
>
> Jörn
This is the source code:
public String getCoveredText() {
final CAS casView = this.getView();
final String text = casView.getDocumentText();
if (text == null) {
return null;
}
return text.substring(getBegin(), getEnd());
}
Your ArticleDocumentAnnotation probably belongs to a different
view or sofa or whatever the right terminology is, which doesn't
have a document text.
--Thilo