Examples of SimpleColumnMetadata


Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        List<Object> elements = new LinkedList<Object>();
       
        for (int i=0; i<columnTypes.length; ++i)
        {
            elements.add(
                new SimpleColumnMetadata(
                    columnNames[i],
                    columnTypes[i],
                    10,
                    ColumnMetadata.COLUMN_NULLABLE,
                    10));
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

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

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        {
          String name = (String) block;
         
          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);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>(elements.size());
        for (Entry<String, SType> element : elements.entrySet())
        {
            int type = getTupleType(element.getValue());
            ColumnMetadata column =
                new SimpleColumnMetadata(
                        element.getKey(),
                        type,
                        0,
                        ColumnMetadata.COLUMN_NULLABLE,
                        0);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>(value.size());
        for (Entry<String, Object> entry : value.entrySet())
        {
            int type = getTupleType(entry.getValue());
            ColumnMetadata column =
                new SimpleColumnMetadata(
                        entry.getKey(),
                        type,
                        0,
                        ColumnMetadata.COLUMN_NULLABLE,
                        0);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

  }

  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

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

          boolean isNumeric = classifiers.get(0).classifier.classIsNumeric();
            mOutput.write(ControlBlock.LIST_BEGIN);
            ColumnMetadata column;
            if (isNumeric)
            {
                column = new SimpleColumnMetadata("class", TupleTypes._DOUBLE, 0, 0, 0);               
            }
            else
            {
                column = new SimpleColumnMetadata("class", TupleTypes._STRING, 0, 0, 0);
            }
           
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

            boolean isNumeric = classifier.classIsNumeric();
            mOutput.write(ControlBlock.LIST_BEGIN);
            ColumnMetadata column;
            if (isNumeric)
            {
                column = new SimpleColumnMetadata(resultColumnName, TupleTypes._DOUBLE, 0, 0, 0);               
            }
            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)
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    private TupleMetadata prepareMetadata(FullListTupleListIterator itemsIterator) throws ActivityUserException, ActivityProcessingException, ActivityTerminatedException {
      Tuple item;
      List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
      while((item = (Tuple)itemsIterator.nextValue()) != null) {
        columns.add(new SimpleColumnMetadata(item.getString(1), TupleTypes._STRING,
                    0,
                    ColumnMetadata.COLUMN_NO_NULLS,
                    0));       
      }
      TupleMetadata metadata = new SimpleTupleMetadata(columns);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

                    new Object[] {ControlBlock.NO_MORE_DATA, obj});
        }
       
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        columns.add(
                new SimpleColumnMetadata(
                        "class",
                        TupleTypes._STRING,
                        0,
                        ColumnMetadata.COLUMN_NO_NULLS,
                        0));
        for (Object object : actualValues)
        {
            columns.add(
                    new SimpleColumnMetadata(
                            object.toString(),
                            TupleTypes._LONG,
                            0,
                            ColumnMetadata.COLUMN_NO_NULLS,
                            0));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.