[Biojava-l] interator problem

Thomas Down td2@sanger.ac.uk
Mon, 30 Jul 2001 10:18:13 +0100


On Wed, Jul 25, 2001 at 11:17:21AM -0700, Kemin Zhou wrote:
> while using the AceSequenceDB
> object to get the information about sequences:
> 
> the ids() function returne a set with 46,749 sequence ids
> 
>  Iterator idit = allid.iterator();
>          int count =0;
>            while (idit.hasNext()) {
>          count++;
>              String an_id = (String)idit.next();
>             System.out.println(an_id);
>            }
>         System.out.println("total objects retrieved " + count);
> 
> The total objects retrieved is only 4698.
> 
> This must be due to Aceserver is doing slicing with ACESERV_MSGENCORE.

The `encore' mechanism is handled quite low down in the biojava-acedb
stack.  Take a look in AceSocket.java, around line 130 -- by the
time data reached the parser, it has already been `unsliced'.

Or at least that's the theory.  You might want to try a few lines
of debugging code in this file to check that this is really
working out with current versions of the Ace server.

   Thomas.