uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: AnnotationFS.getCoveredText returns null?
Date Thu, 23 Feb 2012 14:10:55 GMT


On 02/23/2012 03:05 PM, Thilo Goetz wrote:
> 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.
>


Should we update the javadoc and say that it returns null in case
there is no document text?

I will update the Cas Editor to handle this null case correctly.

Jörn

Mime
View raw message