Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5603

uv3 add ability to do extended-for on all FSs of a type in a view

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.0.0SDK-alpha02
    • 3.0.0SDK-beta
    • Core Java Framework
    • None

    Description

      Forms like cas.getIndexRepository().getAllIndexedFSs(...) return an iterator. It would be nice to be able to use the returned result in an extended for : for (TOP x : cas.getInd... etc).

      Add a new set of methods, getIndexedFSs( Type or JCas.class or nothing) to CAS/JCas and FSIndexRepository interfaces, that return Collections, without copying the index arrays, but just using them. Make these copy-on-write style, so subsequent updates to the UIMA indexes won't affect the collection. These can then be used in extended-for loops.

      Update internal uses of getAllIndexedFS (which does copy the indexes) to use the new style.

      Attachments

        Activity

          People

            schor Marshall Schor
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: