Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTupleMetadata


        columns.add(new SimpleColumnMetadata(item.getString(1), TupleTypes._STRING,
                    0,
                    ColumnMetadata.COLUMN_NO_NULLS,
                    0));       
      }
      TupleMetadata metadata = new SimpleTupleMetadata(columns);
    return metadata;
    }
View Full Code Here


        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        ColumnMetadata column = new SimpleColumnMetadata("class", TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("date", TupleTypes._DATE, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        List<Object> table = new ArrayList<Object>();
        table.add(ControlBlock.LIST_BEGIN);
        table.add(new MetadataWrapper(metadata));
        SimpleDateFormat format = new SimpleDateFormat(WekaUtilities.DATE_FORMAT);
        table.add(new SimpleTuple(Arrays.asList("yes", format.parse("2009-01-01T10:00:00"))));
View Full Code Here

        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        ColumnMetadata column = new SimpleColumnMetadata("class", TupleTypes._DOUBLE, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("attribute", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        List<Object> table = new ArrayList<Object>();
        table.add(ControlBlock.LIST_BEGIN);
        table.add(new MetadataWrapper(metadata));
        table.add(new SimpleTuple(Arrays.asList(2, 3)));
        table.add(new SimpleTuple(Arrays.asList(2, 4)));
View Full Code Here

        columns.add(column);
        column = new SimpleColumnMetadata("humidity", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("play", TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
View Full Code Here

        columns.add(column);
        column = new SimpleColumnMetadata("humidity", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("play", TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
View Full Code Here

    public void testSimple() throws Exception
    {
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("cust_id", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("items_bought", TupleTypes._STRING, 0, 0, 11));
        SimpleTupleMetadata metadata = new SimpleTupleMetadata(cdlist);
       
        ConversionActivity activity = new ConversionActivity();
        MockInputPipe input = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
View Full Code Here

        try{
            mOutput.write(ControlBlock.LIST_BEGIN);
            ColumnMetadata columnMetadata = new SimpleColumnMetadata
                ("", TupleTypes._STRING, 0, ColumnMetadata.COLUMN_NO_NULLS, 0);
            TupleMetadata tupleMetadata =
                new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
            MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
            mOutput.write(metadataWrapper);
        }
            catch (PipeClosedException e)
            {
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

TOP

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

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.