Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.Tuple


            TupleProject project = inv.getInterface(TupleProject.class);
            mOutput.write(ControlBlock.LIST_BEGIN);
            TupleMetadata outputMetadata =
                project.getMetadata((TupleMetadata)tuples.getMetadataWrapper().getMetadata());
            mOutput.write(outputMetadata);
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
                List<Tuple> result = (List<Tuple>)project.process(tuple);
                if (result != 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

               ActivityUserException
    {
        mSupport = (Double)iterationData[0];
        TupleListIterator tuples = (TupleListIterator)iterationData[1];
       
        Tuple tuple;
        try
        {
            List columns = new ArrayList();
            ColumnMetadata col = new SimpleColumnMetadata("groupID", TupleTypes._STRING, 0, 0, 0);
            columns.add(col);
View Full Code Here

    {
        boolean first = true;
        int index = 0;
        for (int i=0; i<data.size(); i++)
        {
            Tuple tuple = data.get(i);
            //if value is missing is missing, we interpolate it - Linear Trend
            if (tuple.getObject(linearIndex) != Null.VALUE)
            {
                if (first)
                {
                    if (data.get(index).getObject(linearIndex) == Null.VALUE)
                    {
View Full Code Here

               ActivityProcessingException,
               ActivityTerminatedException
    {
        List<UpdateableTuple> result = new ArrayList<UpdateableTuple>();
        TupleListIterator iterator = (TupleListIterator)input;
        Tuple tuple;
        while ((tuple = (Tuple)iterator.nextValue()) != null)
        {
            result.add(new UpdateableTuple(tuple));
        }
        return result;
View Full Code Here

            mOutput.write(ControlBlock.LIST_BEGIN);
            MetadataWrapper wrapper = tuples.getMetadataWrapper();
            Filter filter =
                new Filter(condition, (TupleMetadata)wrapper.getMetadata());
            mOutput.write(wrapper);
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
                if (filter.isValid(tuple))
                {
                    mOutput.write(tuple);
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;
  }
View Full Code Here

protected void processIteration(Object[] iterationData)
  throws ActivityProcessingException,
       ActivityTerminatedException,
       ActivityUserException {
  TupleListIterator tuples = (TupleListIterator)iterationData[0];
    Tuple tuple;
    try
    {
        mOutput.write(ControlBlock.LIST_BEGIN);
        List columns = new ArrayList();
        ColumnMetadata col0 = new SimpleColumnMetadata("ID", TupleTypes._STRING, 0, 0, 0);
View Full Code Here

            MetadataWrapper wrapper = tuples.getMetadataWrapper();
            Filter filter =
                new Filter(condition, (TupleMetadata)wrapper.getMetadata());
            mOutputTrue.write(wrapper);
            mOutputFalse.write(wrapper);
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
                if (filter.isValid(tuple))
                {
                    mOutputTrue.write(tuple);
View Full Code Here

        mInterval = DPPHelper.loadIntervals(metadata, pmml.getPMML());

        // write metadata to output
        writeBlock(tupleList.getMetadataWrapper());
        // now apply DPP methods to input tuples and write the results
        Tuple tuple;
        while ((tuple = (Tuple) tupleList.nextValue()) != null)
        {
            Tuple result = applyMethods(tuple);
            writeBlock(result);
        }
    }
View Full Code Here

TOP

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

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.