[ 
https://issues.apache.org/jira/browse/UIMA-6159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009003#comment-17009003
 ] 

Marshall Schor edited comment on UIMA-6159 at 1/6/20 7:50 PM:
--------------------------------------------------------------

Hmmm, in UIMA v3, I think the only actual supported implementations of Feature 
Structures are instances of TOP. 

So, I'm thinking we could add a method that takes AnnotationFS arg, and casts 
it to TOP...  ?  

Tried that, got an ambiguous error when calling startAt(Annotation) because 
Annotation has both supertype TOP and AnnotationFS.  

Fixed that by adding a 3rd method: startAt(Annotation).  So now have
   startAt(TOP), startAt(AnnotationFS), and startAt(Annotation), the latter 2 
casting their args to TOP.

Does this seem reasonable?  


was (Author: schor):
Hmmm, in UIMA v3, I think the only actual supported implementations of Feature 
Structures are instances of TOP. 

So, I'm thinking we could add a method that takes AnnotationFS arg, and casts 
it to TOP...  ?  But it can't be called the same name, otherwise you get 
compile errors "the method startAt(TOP) is ambiguous...".   

Need to investigate if we changed the api from startAt(TOP) to 
startAt(AnnotatorFS) whether or not that would break existing code, or be a 
semantic version 2nd digit change.

 

> select.startAt() cannot be called with AnnotationFS argument
> ------------------------------------------------------------
>
>                 Key: UIMA-6159
>                 URL: https://issues.apache.org/jira/browse/UIMA-6159
>             Project: UIMA
>          Issue Type: Improvement
>          Components: UIMA
>    Affects Versions: 3.1.1SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>
> The method
> SelectFSs<T> startAt(TOP fs);
> Does not accept an `AnnotationFS` instance as argument because AnnotationFS 
> does not extend TOP. However, the documentation clearly states that this 
> method requires an AnnotationIndex and a "starting position", so I guess it 
> only works for subtypes of AnnotationFS?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to