Package uk.org.ogsadai.metadata

Examples of uk.org.ogsadai.metadata.MetadataWrapper


        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"))));
        table.add(new SimpleTuple(Arrays.asList("yes", format.parse("2009-01-01T12:34:00"))));
        table.add(new SimpleTuple(Arrays.asList("no", format.parse("2008-02-01T09:00:00"))));
        table.add(new SimpleTuple(Arrays.asList("no", format.parse("2008-02-03T22:00:00"))));
View Full Code Here


        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)));
        table.add(new SimpleTuple(Arrays.asList(1, 1)));
        table.add(new SimpleTuple(Arrays.asList(1, 2)));
        table.add(ControlBlock.LIST_END);
View Full Code Here

        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
        result.add(new SimpleTuple(Arrays.asList("sunny", "false", 85, 85, "no")));
        result.add(new SimpleTuple(Arrays.asList("sunny", "true", 80, 90, "no")));
        result.add(new SimpleTuple(Arrays.asList("overcast", "false", 83, 78, "yes")));
        result.add(new SimpleTuple(Arrays.asList("rain", "false", 70, 96, "yes")));
        result.add(new SimpleTuple(Arrays.asList("rain", "false", 68, 80, "yes")));
View Full Code Here

        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
        result.add(new SimpleTuple(Arrays.asList("sunny", "false", 85, 85, "no")));
        result.add(new SimpleTuple(Arrays.asList("sunny", "true", 80, 90, "no")));
        result.add(new SimpleTuple(Arrays.asList("overcast", "false", 83, 78, "yes")));
        result.add(new SimpleTuple(Arrays.asList("rain", "false", 70, 96, "yes")));
        result.add(new SimpleTuple(Arrays.asList("rain", "false", 68, 80, "yes")));
View Full Code Here

            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)
            {
                iterativeStageComplete();
View Full Code Here

        SimpleTupleMetadata metadata = new SimpleTupleMetadata(cdlist);
       
        ConversionActivity activity = new ConversionActivity();
        MockInputPipe input = new MockInputPipe( new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(new Object[] {1, "30"})),
                new SimpleTuple(Arrays.asList(new Object[] {1, "90"})),
                new SimpleTuple(Arrays.asList(new Object[] {2, "10 20"})),
                ControlBlock.LIST_END
        });
View Full Code Here

        {
            Object result = mCurrent;
            switch (mNextBlockType)
            {
            case METADATA_BLOCK:
                mCurrent = new MetadataWrapper(mMetadata);
                mNextBlockType = TUPLE_BLOCK;
                break;
               
            case TUPLE_BLOCK:
                mCurrent = mFactory.createTuple();
View Full Code Here

        {
            ColumnMetadata col = new SimpleColumnMetadata("", TupleTypes._DOUBLE, 0,0,0);
            columns.add(col);
        }
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        return new MetadataWrapper(metadata);
      
    }
View Full Code Here

          TupleMetadata metadata = new SimpleTupleMetadata(columns);
       
          List<Object> result = new ArrayList<Object>();
       
          result.add(ControlBlock.LIST_BEGIN);
          result.add(new MetadataWrapper(metadata));
         
          //Iterational classifier needs more data, just repeat things 500 times for test
          for (int i=0; i < 500; i ++) {
            result.add(new SimpleTuple(Arrays.asList("sunny", "false", 85, 85, "no")));
            result.add(new SimpleTuple(Arrays.asList("sunny", "true", 80, 90, "no")));
View Full Code Here

    {
        ColumnMetadata col = new SimpleColumnMetadata("class", TupleTypes._STRING, 0,0,0);
        TupleMetadata metadata = new SimpleTupleMetadata(Collections.singletonList(col));
        MockInputPipe inputExpected = new MockInputPipe(new Object[] {
            ControlBlock.LIST_BEGIN,
            new MetadataWrapper(metadata),
            new SimpleTuple(Arrays.asList("yes")),
            new SimpleTuple(Arrays.asList("no")),
            new SimpleTuple(Arrays.asList("yes")),
            new SimpleTuple(Arrays.asList("maybe")),
            new SimpleTuple(Arrays.asList("yes")),
            new SimpleTuple(Arrays.asList("no")),
            new SimpleTuple(Arrays.asList("no")),
            new SimpleTuple(Arrays.asList("no")),
            ControlBlock.LIST_END
        });
        MockInputPipe inputPredicted = new MockInputPipe(new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList("yes")),
                new SimpleTuple(Arrays.asList("yes")),
                new SimpleTuple(Arrays.asList("yes")),
                new SimpleTuple(Arrays.asList("yes")),
                new SimpleTuple(Arrays.asList("no")),
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.metadata.MetadataWrapper

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.