From dev-return-39159-apmail-uima-dev-archive=uima.apache.org@uima.apache.org Fri Oct 6 15:03:05 2017 Return-Path: X-Original-To: apmail-uima-dev-archive@www.apache.org Delivered-To: apmail-uima-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6678B10846 for ; Fri, 6 Oct 2017 15:03:05 +0000 (UTC) Received: (qmail 44276 invoked by uid 500); 6 Oct 2017 15:03:05 -0000 Delivered-To: apmail-uima-dev-archive@uima.apache.org Received: (qmail 44240 invoked by uid 500); 6 Oct 2017 15:03:05 -0000 Mailing-List: contact dev-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@uima.apache.org Delivered-To: mailing list dev@uima.apache.org Received: (qmail 44207 invoked by uid 99); 6 Oct 2017 15:03:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 15:03:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 96A8D1A38C4 for ; Fri, 6 Oct 2017 15:03:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.718 X-Spam-Level: * X-Spam-Status: No, score=1.718 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id C3NvBUlmX60p for ; Fri, 6 Oct 2017 15:03:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 81D0260DDF for ; Fri, 6 Oct 2017 15:03:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7602DE0F3C for ; Fri, 6 Oct 2017 15:03:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6E3852432F for ; Fri, 6 Oct 2017 15:03:00 +0000 (UTC) Date: Fri, 6 Oct 2017 15:03:00 +0000 (UTC) From: "Marshall Schor (JIRA)" To: dev@uima.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (UIMA-5603) uv3 add ability to do extended-for on all FSs of a type in a view MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/UIMA-5603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marshall Schor resolved UIMA-5603. ---------------------------------- Resolution: Fixed > uv3 add ability to do extended-for on all FSs of a type in a view > ----------------------------------------------------------------- > > Key: UIMA-5603 > URL: https://issues.apache.org/jira/browse/UIMA-5603 > Project: UIMA > Issue Type: Improvement > Components: Core Java Framework > Affects Versions: 3.0.0SDK-alpha02 > Reporter: Marshall Schor > Assignee: Marshall Schor > Priority: Trivial > Fix For: 3.0.0SDK-beta > > > 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. -- This message was sent by Atlassian JIRA (v6.4.14#64029)