Package org.pentaho.di.core.row

Examples of org.pentaho.di.core.row.ValueMeta


        }
       
        ValueMetaInterface v = r.getValueMeta(idx);
        if (v.getType() != field.getType()){
          // this field needs to be converted to another type
          ValueMetaInterface newValueMeta = new ValueMeta(field.getName(), field.getType());
          newValueMeta.setOrigin(origin);
          r.setValueMeta(idx, newValueMeta);
        }
       
        // add the field to affected fields
        affectedFields.add(r.getValueMeta(idx));       
       
      }
      else{
        // new field
        ValueMetaInterface v = new ValueMeta(field.getName(), field.getType());
        v.setOrigin(origin);
        r.addValueMeta(v);
       
        // add the last to affected fields (might have been renamed)
        v = r.getValueMetaList().get(r.getValueMetaList().size()-1);
        field.setName(v.getName());
        affectedFields.add(v);
       
      }
     
    }
View Full Code Here


    /*
     * This implementation appends the outputField to the row-stream
     */

    // a value meta object contains the meta data for a field
    ValueMetaInterface v = new ValueMeta(outputField, ValueMeta.TYPE_STRING);
   
    // setting trim type to "both"
    v.setTrimType(ValueMeta.TRIM_TYPE_BOTH);

    // the name of the step that adds this field
    v.setOrigin(name);
   
    // modify the row structure and add the field this step generates 
    inputRowMeta.addValueMeta(v);
   
  }
View Full Code Here

    /*
     * This implementation appends the outputField to the row-stream
     */

    // a value meta object contains the meta data for a field
    ValueMetaInterface v = new ValueMeta(outputField, ValueMeta.TYPE_STRING);
   
    // setting trim type to "both"
    v.setTrimType(ValueMeta.TRIM_TYPE_BOTH);

    // the name of the step that adds this field
    v.setOrigin(name);
   
    // modify the row structure and add the field this step generates 
    inputRowMeta.addValueMeta(v);
   
  }
View Full Code Here

    /*
     * This implementation appends the outputField to the row-stream
     */
        if(getProcessType() == Process.LIST){
    // a value meta object contains the meta data for a field
    ValueMetaInterface v = new ValueMeta("id", ValueMeta.TYPE_STRING);
   
    // setting trim type to "both"
    v.setTrimType(ValueMeta.TRIM_TYPE_BOTH);

    // the name of the step that adds this field
    v.setOrigin(name);
   
    // modify the row structure and add the field this step generates 
    inputRowMeta.addValueMeta(v);

        ValueMetaInterface v2 = new ValueMeta("type", ValueMeta.TYPE_STRING);
        v2.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
        v2.setOrigin(name);
        inputRowMeta.addValueMeta(v2);

        ValueMetaInterface v3 = new ValueMeta("name", ValueMeta.TYPE_STRING);
        v3.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
        v3.setOrigin(name);
        inputRowMeta.addValueMeta(v3);

        ValueMetaInterface v4 = new ValueMeta("structure", ValueMeta.TYPE_STRING);
        v4.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
        v4.setOrigin(name);
        inputRowMeta.addValueMeta(v4);

        ValueMetaInterface v5 = new ValueMeta("transferstatus", ValueMeta.TYPE_STRING);
        v5.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
        v5.setOrigin(name);
        inputRowMeta.addValueMeta(v5);

        ValueMetaInterface v6 = new ValueMeta("metadata", ValueMeta.TYPE_STRING);
        v6.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
        v6.setOrigin(name);
        inputRowMeta.addValueMeta(v6);
        }
        else{
            ValueMetaInterface v6 = new ValueMeta("export", ValueMeta.TYPE_STRING);
            v6.setTrimType(ValueMeta.TRIM_TYPE_BOTH);
            v6.setOrigin(name);
            inputRowMeta.addValueMeta(v6);
        }
  }
View Full Code Here

    /*
     * This implementation appends the outputField to the row-stream
     */

    // a value meta object contains the meta data for a field
    ValueMetaInterface v = new ValueMeta(outputField, ValueMeta.TYPE_STRING);
   
    // setting trim type to "both"
    v.setTrimType(ValueMeta.TRIM_TYPE_BOTH);

    // the name of the step that adds this field
    v.setOrigin(name);
   
    // modify the row structure and add the field this step generates 
    inputRowMeta.addValueMeta(v);
   
  }
View Full Code Here

TOP

Related Classes of org.pentaho.di.core.row.ValueMeta

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.