Examples of ListIterator


Examples of java.util.ListIterator

  }
   
  public String toXML() {
  Collections.sort(oSortedList, DBMatch.COMPARATOR);
    StringBuffer oBuff = new StringBuffer(200*count()+1);
    ListIterator oIter = iterator();
    oBuff.append("<DBMatchSet>\n");
  while (oIter.hasNext()) {
    DBMatch oMatch = (DBMatch) oIter.next();
      oBuff.append("  <DBMatch>\n");
    oBuff.append("    <guid>"+oMatch.guid()+"</guid>\n");
    oBuff.append("    <index>"+String.valueOf(oMatch.index())+"</index>\n");
    oBuff.append("    <grade>"+String.valueOf(oMatch.grade())+"</grade>\n");
    oBuff.append("    <value><![CDATA["+oMatch.matchingValue()+"]]></value>\n");
View Full Code Here

Examples of java.util.ListIterator

        } // fi
      } // next (r)

      StringBuffer oTermsBuff = new StringBuffer();
   
      ListIterator oIter = oTerms.listIterator();
      while (oIter.hasNext()) {
        Term oChld = (Term) oIter.next();

        oTermsBuff.append("<OPTION VALUE=\"" + oChld.getString(DB.gu_term) + "\">");
        for (int s=1; s<oChld.level(); s++)
          oTermsBuff.append(" ");
        oTermsBuff.append(oChld.getString(DB.tx_term));
View Full Code Here

Examples of java.util.ListIterator

    oThreadPool = new WorkerThreadPool(oCsr, oEnvProps);

    // Register callbacks on each worker thread

    ListIterator oIter = oCallbacks.listIterator();
    while (oIter.hasNext())
      oThreadPool.registerCallback((WorkerThreadCallback) oIter.next());

    dtStartDate = new Date();

    do {
      try {

        while (bContinue) {

          oJcn = oDbb.getConnection("SchedulerDaemon");
          oJcn.setAutoCommit(true);
         
          // Count how many atoms are pending of processing at the database
          oStmt = oJcn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

          // ***************************************************
          // Finish all the jobs that have no more pending atoms
          sSQL = "SELECT j.gu_job FROM k_jobs j WHERE ("+
                 "j.id_status="+String.valueOf(Job.STATUS_PENDING)+" OR "+
                 "j.id_status="+String.valueOf(Job.STATUS_RUNNING)+") AND "+
                 "NOT EXISTS (SELECT a.pg_atom FROM k_job_atoms a WHERE "+
                 "j.gu_job=a.gu_job AND a.id_status IN ("+
                 String.valueOf(Atom.STATUS_PENDING)+","+
                 String.valueOf(Atom.STATUS_RUNNING)+","+
                 String.valueOf(Atom.STATUS_SUSPENDED)+"))";

          if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery("+sSQL+") on connection with process id. "+oJcn.pid());

          oRSet = oStmt.executeQuery(sSQL);
          LinkedList<String> oFinished = new LinkedList<String>();
          while (oRSet.next()) {
            oFinished.add(oRSet.getString(1));
          } // wend
          oRSet.close();
      oStmt.close();

          if (DebugFile.trace) DebugFile.writeln("Already finished jobs "+String.valueOf(oFinished.size()));

          if (oFinished.size()>0) {
            sSQL = "UPDATE k_jobs SET id_status="+String.valueOf(Job.STATUS_FINISHED)+",dt_finished="+DBBind.Functions.GETDATE+" WHERE gu_job=?";
            if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement("+sSQL+") on connection with process id. "+oJcn.pid());
            PreparedStatement oUpdt = oJcn.prepareStatement(sSQL);
            oIter = oFinished.listIterator();
            while (oIter.hasNext()) {
              oUpdt.setObject(1, oIter.next(), java.sql.Types.CHAR);
              oUpdt.executeUpdate();
            } // wend
            oUpdt.close();
          } // fi

View Full Code Here

Examples of net.sf.saxon.om.ListIterator

     * Get an iterator over the items in the current group
     * @return the iterator
     */

    public SequenceIterator iterateCurrentGroup() {
        return new ListIterator(groups.get(position-1));
    }
View Full Code Here

Examples of org.pdf4j.saxon.om.ListIterator

     * @return the required SequenceIterator, positioned at the start of the
     *     sequence
     */

    public SequenceIterator iterate() {
        return new ListIterator(list, end);
    }
View Full Code Here

Examples of uk.org.ogsadai.activity.io.ListIterator

  validateInput(PARAMETERS);
    count++;
    mOutputBlockWriter = getOutput(OUTPUT_DATA);
  mMetadataOutputBlockWriter = getOutput(METADATA);

    ListIterator files = (ListIterator)iterationData[0];
    ListIterator parameters = (ListIterator)iterationData[1];
    ArrayList listfiles = new ArrayList();
   
    parametersMap=extractParameters(parameters);
   
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.