Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTuple


        while(i<listColumnMetadata.size() && it.hasNext()){
          QueryResults rst = (QueryResults) it.next();
          lst.add(rst.getValue());
          i++;
        }
        Tuple tuple = new SimpleTuple(lst);
                output.write(tuple);
      }
     
            if (includeListMarkers)
            {
View Full Code Here


                    else
                    {
                        lst.add(node.toString());
                    }
                }
                Tuple tuple = new SimpleTuple(lst);
                System.out.println(tuple);
            }

            if (includeListMarkers)
            {
View Full Code Here

          new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
        MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
   
        List elements = new ArrayList();
        elements.add(data);
        Tuple tuple = new SimpleTuple(elements);
       
       
        String resultColumnName = "expected";
        Classifier classifier = new Classifier();
        classifier.addClassType(0);
View Full Code Here

           temp = new Vector();
    //       String iterResult = new String("{("+keyIter.next().toString()+")}");
           String iterResult = new String(keyIter.next().toString());
           temp.add(iterResult);
           temp.add(support);
           Tuple dtSupport = new SimpleTuple(temp);
           return dtSupport;
         }
        else
        {
          keyIter.next();
View Full Code Here

                List<Object> elements = new ArrayList<Object>();
                elements.add(rule.toString());
                for(int i=1; i<columns.size();i++) {
                  elements.add(rule.getMetricValuesForRule()[i - 1]);
                }
                SimpleTuple t = new SimpleTuple(elements);
                mOutputRules.write(t);
              }
              mOutputRules.write(ControlBlock.LIST_END);
            }
           
View Full Code Here

                      resNest.add(((Tuple)tmpGroup.get(i)).getObject(1));
                  }//edn of for
              res.add(resNest);
                  tmpGroup = new LinkedList();
              tmpGroup.add(lastIn);
                  Tuple dt = new SimpleTuple(res);
                  return dt;
            }//end of else
            lastIn = (Tuple)inputOp.nextValue();
        }//end of if
      }//end of if
   
      if(atEOF && tmpGroup!=null)
      {
             Vector res = new Vector();
        //grouping field
             res.add(((Tuple)tmpGroup.get(0)).getObject(0));
             Vector resNest = new Vector();
            
        for(int i=0;i<tmpGroup.size();i++)
        {
              resNest.add(((Tuple)tmpGroup.get(i)).getObject(1));
             }//end of for
        res.add(resNest);
             tmpGroup = null;
             Tuple dt = new SimpleTuple(res);
             return dt;
      }//end of if
      return null;
    }
View Full Code Here

{
    List temp = new ArrayList();
    if(index<maxSequence.size())
    {
        temp.add(maxSequence.get(index).toString());
        Tuple returnMaxSeq = new SimpleTuple(temp);
        index++;
        return returnMaxSeq ;
    }
    return null;    
}
View Full Code Here

public Tuple Next(TupleListIterator inputOp)
  throws ActivityUserException, ActivityProcessingException, ActivityTerminatedException
{
 
  if(resultForCurrentVi != null && resultForCurrentVi.size()>0) {
    Tuple ret = new SimpleTuple((Vector)resultForCurrentVi.remove(0));
    if(resultForCurrentVi.size()==0) {
      currentIndexVector++;     
    }
    return ret;
  }
 
  if(sizeVector<=currentIndexVector) {
    lastIn = (Tuple)inputOp.nextValue();
   
    if(lastIn==null)
    {
      return null;
    }
    else {       
      sizeVector = ((Vector)lastIn.getObject(1)).size();
      currentIndexVector=0;
    }
  }
 
  String s = (String)((Vector)lastIn.getObject(1)).get(currentIndexVector);
  String[] items = s.split(" ");
  if(items.length==1) {
    Vector dummy = new Vector();
    //id
    dummy.add(lastIn.getString(0));
    //item
    dummy.add(items[0]);
    currentIndexVector++;
    return new SimpleTuple(dummy);
  } else {
    resultForCurrentVi = GetPowerSet(lastIn.getString(0),items);
    return new SimpleTuple((Vector)resultForCurrentVi.remove(0));
  }     
}
View Full Code Here

            else
            {
                elements.add(tuple.getObject(i));
            }
        }
        return new SimpleTuple(elements);
    }
View Full Code Here

               else if(sGetTokensAgain.length == 1 &&   ht.contains(sGetTokens[arrayIndex]))
         
                   sTemp = sTemp + "{"+ htForMapping.get(sGetTokens[arrayIndex])+"}";
            }//end of for
          temp.add(sTemp);
          Tuple returnTransformedRow = new SimpleTuple(temp);
        return returnTransformedRow ;
    //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      }//end of while loop
      return null;    
    }
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.tuple.SimpleTuple

Copyright © 2018 www.massapicom. 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.