You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org> on 2009/08/13 00:50:14 UTC

[jira] Created: (UIMA-1489) Generify FSIndexRepository

Generify FSIndexRepository
--------------------------

                 Key: UIMA-1489
                 URL: https://issues.apache.org/jira/browse/UIMA-1489
             Project: UIMA
          Issue Type: Improvement
          Components: Core Java Framework
            Reporter: Jörn Kottmann
            Assignee: Jörn Kottmann
             Fix For: 2.3


Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened UIMA-1489:
---------------------------------


Test code must also be generified.

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann closed UIMA-1489.
-------------------------------

    Resolution: Fixed

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann closed UIMA-1489.
-------------------------------

    Resolution: Fixed

Test code is now uses generic FSIndex and FSIterator in places where it was not possible previously.

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann closed UIMA-1489.
-------------------------------

    Resolution: Fixed

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann updated UIMA-1489:
--------------------------------

    Comment: was deleted

(was: Marshall Schor:

"After generification of iterators, this line in Lucas doesn't compile:

In src/main/java, org.apache.uima.lucas.indexer.analysis,
the class: AnnotationTokenStream
line 340:

    annotationIterator =
Iterators.filter(jCas.getAnnotationIndex(annotationType).iterator(),
            new NotNullPredicate<Annotation>());

gives message:

The method filter(Iterator<T>, Predicate<? super T>) in the type
Iterators is not applicable for the arguments (FSIterator<AnnotationFS>,
AnnotationTokenStream.NotNullPredicate<Annotation>)


I observe that if I change
            new NotNullPredicate<Annotation>());  // to
            new NotNullPredicate<AnnotationFS>());

that the error goes away, but is replaced with another error:

Type mismatch: cannot convert from Iterator<AnnotationFS> to
Iterator<Annotation>

I think the original form assigns to T the value AnnotationFS.  This
makes the assignment of the predicate NotNullPredicate<X> have the type
X be a super type of AnnotationFS.  But Annotation is a subtype, not a
supertype.  So it fails.

I think the JCas version of
getAnnotationIndex(annotationType).iterator() should end up returning an
iterator over Annotation, not AnnotationFS.  This would fix this, I think.")

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened UIMA-1489:
---------------------------------


Marshall Schor:

"After generification of iterators, this line in Lucas doesn't compile:

In src/main/java, org.apache.uima.lucas.indexer.analysis,
the class: AnnotationTokenStream
line 340:

    annotationIterator =
Iterators.filter(jCas.getAnnotationIndex(annotationType).iterator(),
            new NotNullPredicate<Annotation>());

gives message:

The method filter(Iterator<T>, Predicate<? super T>) in the type
Iterators is not applicable for the arguments (FSIterator<AnnotationFS>,
AnnotationTokenStream.NotNullPredicate<Annotation>)


I observe that if I change
            new NotNullPredicate<Annotation>());  // to
            new NotNullPredicate<AnnotationFS>());

that the error goes away, but is replaced with another error:

Type mismatch: cannot convert from Iterator<AnnotationFS> to
Iterator<Annotation>

I think the original form assigns to T the value AnnotationFS.  This
makes the assignment of the predicate NotNullPredicate<X> have the type
X be a super type of AnnotationFS.  But Annotation is a subtype, not a
supertype.  So it fails.

I think the JCas version of
getAnnotationIndex(annotationType).iterator() should end up returning an
iterator over Annotation, not AnnotationFS.  This would fix this, I think."

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened UIMA-1489:
---------------------------------


> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-1489) Generify FSIndexRepository

Posted by "Jörn Kottmann (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann closed UIMA-1489.
-------------------------------

    Resolution: Fixed

> Generify FSIndexRepository
> --------------------------
>
>                 Key: UIMA-1489
>                 URL: https://issues.apache.org/jira/browse/UIMA-1489
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Jörn Kottmann
>            Assignee: Jörn Kottmann
>             Fix For: 2.3
>
>
> Add generics to the FSIndexRepository interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.