Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTuple


       
        ReplaceWithValueActivity activity = new ReplaceWithValueActivity();
        MockInputPipe inputTuples = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, "A"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, "B"})),
                new SimpleTuple(Arrays.asList(new Object[] {3, "C"})),
                ControlBlock.LIST_END
        });
        activity.addInput("data", inputTuples);
       
        cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("X", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("Y", TupleTypes._ODNULL, 0, 0, 11));
        metadata = new SimpleTupleMetadata(cdlist);
        MockInputPipe inputValues = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {0, Null.getValue()})),
                ControlBlock.LIST_END
        });
        activity.addInput("values", inputValues);
       
        MockInputPipe inputColumns = new MockInputPipe( new Object[] {
View Full Code Here


       
        ReplaceWithValueActivity activity = new ReplaceWithValueActivity();
        MockInputPipe inputTuples = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, "A"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, 3, "B"})),
                new SimpleTuple(Arrays.asList(new Object[] {3, 4, "C"})),
                ControlBlock.LIST_END
        });
        activity.addInput("data", inputTuples);
       
        cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("X", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("Y", TupleTypes._STRING, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("S", TupleTypes._STRING, 0, 0, 11));
        metadata = new SimpleTupleMetadata(cdlist);
        MockInputPipe inputValues = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(
                        new Object[] {
                                Null.getValue(),
                                Null.getValue(),
                                Null.getValue()})),
                ControlBlock.LIST_END
View Full Code Here

       
        ReplaceWithValueActivity activity = new ReplaceWithValueActivity();
        MockInputPipe inputTuples = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, "A"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, 3, "B"})),
                new SimpleTuple(Arrays.asList(new Object[] {3, 4, "C"})),
                ControlBlock.LIST_END
        });
        activity.addInput("data", inputTuples);
       
        cdlist = new ArrayList<ColumnMetadata>();
View Full Code Here

       
        ReplaceWithValueActivity activity = new ReplaceWithValueActivity();
        MockInputPipe inputTuples = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, "A"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, 3, "B"})),
                new SimpleTuple(Arrays.asList(new Object[] {3, 4, "C"})),
                ControlBlock.LIST_END
        });
        activity.addInput("data", inputTuples);
       
        cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("X", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("Y", TupleTypes._STRING, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("S", TupleTypes._STRING, 0, 0, 11));
        metadata = new SimpleTupleMetadata(cdlist);
        MockInputPipe inputValues = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, 3} )),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, 3} )),
                ControlBlock.LIST_END
        });
        activity.addInput("values", inputValues);
       
        MockInputPipe inputColumns = new MockInputPipe( new Object[] {
View Full Code Here

       
        ReplaceWithValueActivity activity = new ReplaceWithValueActivity();
        MockInputPipe inputTuples = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, 2, "A"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, 3, "B"})),
                new SimpleTuple(Arrays.asList(new Object[] {3, 4, "C"})),
                ControlBlock.LIST_END
        });
        activity.addInput("data", inputTuples);
       
        cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("X", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("Y", TupleTypes._STRING, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("S", TupleTypes._STRING, 0, 0, 11));
        metadata = new SimpleTupleMetadata(cdlist);
        MockInputPipe inputValues = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1} )),
                ControlBlock.LIST_END
        });
        activity.addInput("values", inputValues);
       
        MockInputPipe inputColumns = new MockInputPipe( new Object[] {
View Full Code Here

                    20);
        columns.add(col);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        List<Object> elements = new ArrayList<Object>();
        elements.add(new Float(10));
        Tuple tuple1 = new SimpleTuple(elements);
        elements = new ArrayList<Object>();
        elements.add(new Float(20));
        Tuple tuple2 = new SimpleTuple(elements);
        elements = new ArrayList<Object>();
        elements.add(new Float(30));
        Tuple tuple3 = new SimpleTuple(elements);
        MockInputPipe input = new MockInputPipe(
                new Object[] {
                        ControlBlock.LIST_BEGIN,
                        new MetadataWrapper(metadata),
                        tuple1, tuple2, tuple3,
View Full Code Here

                    20);
        columns.add(col);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        List elements = new ArrayList();
        elements.add(new Float(10));
        Tuple tuple1 = new SimpleTuple(elements);
        elements = new ArrayList();
        elements.add(new Float(20));
        Tuple tuple2 = new SimpleTuple(elements);
        elements = new ArrayList();
        elements.add(new Float(30));
        Tuple tuple3 = new SimpleTuple(elements);
        MockInputPipe input = new MockInputPipe(
                new Object[] {
                        ControlBlock.LIST_BEGIN,
                        new MetadataWrapper(metadata),
                        tuple1, tuple2, tuple3,
View Full Code Here

     *            contents of the tuple
     * @return a new tuple
     */
    public static Tuple createTuple(Object... elements)
    {
        return new SimpleTuple(Arrays.asList(elements));
    }
View Full Code Here

     * @return merged tuple containing the elements of the first and second
     *         tuple
     */
    public static Tuple createTuple(Tuple tuple1, Tuple tuple2)
    {
        return new SimpleTuple(tuple1, tuple2);
    }
View Full Code Here

        mOutput.write(ControlBlock.LIST_BEGIN);
        mOutput.write(prepareMetadata(dataTuples));
        while((tuple = (Tuple)dataTuples.nextValue()) != null) {
          ArrayList<String> list = new ArrayList<String>();
          list.add(getBinName(tuple, binNames, aggregates));
          mOutput.write(new SimpleTuple(list));
        }
        mOutput.write(ControlBlock.LIST_END);
        mOutput.toString();
      }
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.