Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTupleMetadata


        try{
          mOutput.write(ControlBlock.LIST_BEGIN);
          ColumnMetadata columnMetadata = new SimpleColumnMetadata
          (columnName, TupleTypes._INT, 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


          try{
              mOutput.write(ControlBlock.LIST_BEGIN);
              ColumnMetadata columnMetadata = new SimpleColumnMetadata
                  (name, type, 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

                        0,
                        ColumnMetadata.COLUMN_NULLABLE,
                        0);
            columns.add(column);
        }
        return new SimpleTupleMetadata(columns);
    }
View Full Code Here

                        0,
                        ColumnMetadata.COLUMN_NULLABLE,
                        0);
            columns.add(column);
        }
        return new SimpleTupleMetadata(columns);
    }
View Full Code Here

  private MetadataWrapper prepareMetadata(TupleListIterator tuples) throws ActivityUserException, ActivityProcessingException, ActivityTerminatedException {
        TupleMetadata prevMetadata = (TupleMetadata)tuples.getMetadataWrapper().getMetadata();
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        ColumnMetadata column = new SimpleColumnMetadata(prevMetadata.getColumnMetadata(0).getName(), TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
    return new MetadataWrapper(metadata);
  }
View Full Code Here

            else
            {
                column = new SimpleColumnMetadata("class", TupleTypes._STRING, 0, 0, 0);
            }
           
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
               
View Full Code Here

            }
            else
            {
                column = new SimpleColumnMetadata(resultColumnName, TupleTypes._STRING, 0, 0, 0);
            }
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
                Object result;
View Full Code Here

        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

                            TupleTypes._LONG,
                            0,
                            ColumnMetadata.COLUMN_NO_NULLS,
                            0));
        }
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        try
        {
            mOutput.write(ControlBlock.LIST_BEGIN);
            mOutput.write(new MetadataWrapper(metadata));
            for (Object key : confusionMatrix.keySet())
View Full Code Here

              {
                  column = new SimpleColumnMetadata(columnNames.get(i), TupleTypes._DOUBLE, 0, 0, 0);
              }
              columnsMetadata.add(column);
            }
            TupleMetadata outMetadata = new SimpleTupleMetadata(columnsMetadata);
           
           
           
            mResultOutput.write(new MetadataWrapper(outMetadata));
            for(List<Object> v:values) {
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.