Search in sources :

Example 1 with ValueMetaSerializable

use of org.pentaho.di.core.row.value.ValueMetaSerializable in project pentaho-kettle by pentaho.

the class AutoDocMeta method getFields.

@Override
public void getFields(RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
    if (outputType == OutputType.METADATA) {
        // Add a bunch of metadata to the output for each input row
        // 
        ValueMetaInterface valueMeta = new ValueMetaSerializable("meta");
        valueMeta.setOrigin(origin);
        rowMeta.addValueMeta(valueMeta);
        if (includingName) {
            valueMeta = new ValueMetaString("name");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingDescription) {
            valueMeta = new ValueMetaString("description");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingExtendedDescription) {
            valueMeta = new ValueMetaString("extended_description");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingCreated) {
            valueMeta = new ValueMetaString("created");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingModified) {
            valueMeta = new ValueMetaString("modified");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingImage) {
            valueMeta = new ValueMetaBinary("image");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingLoggingConfiguration) {
            valueMeta = new ValueMetaString("logging");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingLastExecutionResult) {
            valueMeta = new ValueMetaString("last_result");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
        if (includingImageAreaList) {
            valueMeta = new ValueMetaSerializable("area");
            valueMeta.setOrigin(origin);
            rowMeta.addValueMeta(valueMeta);
        }
    } else {
        // Start with a clean slate, eats the input
        rowMeta.clear();
        // Generate one report in the output...
        // 
        ValueMetaInterface valueMeta = new ValueMetaString("filename");
        valueMeta.setOrigin(origin);
        rowMeta.addValueMeta(valueMeta);
    }
}
Also used : ValueMetaBinary(org.pentaho.di.core.row.value.ValueMetaBinary) ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) ValueMetaInterface(org.pentaho.di.core.row.ValueMetaInterface) ValueMetaSerializable(org.pentaho.di.core.row.value.ValueMetaSerializable)

Aggregations

ValueMetaInterface (org.pentaho.di.core.row.ValueMetaInterface)1 ValueMetaBinary (org.pentaho.di.core.row.value.ValueMetaBinary)1 ValueMetaSerializable (org.pentaho.di.core.row.value.ValueMetaSerializable)1 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)1