You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2018/08/01 23:20:00 UTC
[jira] [Resolved] (UIMA-3234) Differentiate no Annotation and
multiple Annotation case in CasUtil.selectSingle(CAS cas, Type type)
[ https://issues.apache.org/jira/browse/UIMA-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Eckart de Castilho resolved UIMA-3234.
----------------------------------------------
Resolution: Won't Fix
The SelectFS functionality of UIMA v3 supersedes this issue.
> Differentiate no Annotation and multiple Annotation case in CasUtil.selectSingle(CAS cas, Type type)
> ----------------------------------------------------------------------------------------------------
>
> Key: UIMA-3234
> URL: https://issues.apache.org/jira/browse/UIMA-3234
> Project: UIMA
> Issue Type: Wish
> Components: uimaFIT
> Affects Versions: 2.0.0uimaFIT
> Reporter: Artem
> Priority: Trivial
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Currently there is one exception type in CasUtil.selectSingle(CAS cas, Type type) method for the case if CAS does not contain an Annotation or CAS contains more than one Annotation. However, I sometimes need to differentiate between these two cases in exception handling. A new method like, selectSingleOrNull(...) could solve this problem: return null if no Annotation, RuntimeException if multiple Annotations.
> Currently to handle this problem I just use CasUtil.select(...) and check for the size of the returned collection.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)