Search in sources :

Example 6 with StepIOMeta

use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.

the class ValidatorMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step.
 */
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, true, false);
        // 
        for (Validation validation : validations) {
            StreamInterface stream = new Stream(StreamType.INFO, validation.getSourcingStep(), BaseMessages.getString(PKG, "ValidatorMeta.InfoStream.ValidationInput.Description", Const.NVL(validation.getName(), "")), StreamIcon.INFO, validation);
            ioMeta.addStream(stream);
        }
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Example 7 with StepIOMeta

use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.

the class StreamLookupMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step. The generator step only produces output, does not accept input!
 */
@Override
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, false, false);
        StreamInterface stream = new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "StreamLookupMeta.InfoStream.Description"), StreamIcon.INFO, null);
        ioMeta.addStream(stream);
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Example 8 with StepIOMeta

use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.

the class SwitchCaseMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step.
 */
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, false, false, false, false, true);
        // 
        for (SwitchCaseTarget target : caseTargets) {
            StreamInterface stream = new Stream(StreamType.TARGET, target.caseTargetStep, BaseMessages.getString(PKG, "SwitchCaseMeta.TargetStream.CaseTarget.Description", Const.NVL(target.caseValue, "")), StreamIcon.TARGET, target);
            ioMeta.addStream(stream);
        }
        // 
        if (getDefaultTargetStep() != null) {
            ioMeta.addStream(new Stream(StreamType.TARGET, getDefaultTargetStep(), BaseMessages.getString(PKG, "SwitchCaseMeta.TargetStream.Default.Description"), StreamIcon.TARGET, null));
        }
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Example 9 with StepIOMeta

use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.

the class MappingMeta method getStepIOMeta.

@Override
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        // TODO Create a dynamic StepIOMeta so that we can more easily manipulate the info streams?
        ioMeta = new StepIOMeta(true, true, true, false, true, false);
        for (MappingIODefinition def : inputMappings) {
            if (isInfoMapping(def)) {
                Stream stream = new Stream(StreamType.INFO, def.getInputStep(), BaseMessages.getString(PKG, "MappingMeta.InfoStream.Description"), StreamIcon.INFO, null);
                ioMeta.addStream(stream);
            }
        }
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream)

Example 10 with StepIOMeta

use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.

the class MergeJoinMeta method clone.

public Object clone() {
    MergeJoinMeta retval = (MergeJoinMeta) super.clone();
    int nrKeys1 = keyFields1.length;
    int nrKeys2 = keyFields2.length;
    retval.allocate(nrKeys1, nrKeys2);
    System.arraycopy(keyFields1, 0, retval.keyFields1, 0, nrKeys1);
    System.arraycopy(keyFields2, 0, retval.keyFields2, 0, nrKeys2);
    StepIOMetaInterface stepIOMeta = new StepIOMeta(true, true, false, false, false, false);
    List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
    for (StreamInterface infoStream : infoStreams) {
        stepIOMeta.addStream(new Stream(infoStream));
    }
    retval.ioMeta = stepIOMeta;
    return retval;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) StepIOMetaInterface(org.pentaho.di.trans.step.StepIOMetaInterface) Stream(org.pentaho.di.trans.step.errorhandling.Stream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Aggregations

StepIOMeta (org.pentaho.di.trans.step.StepIOMeta)16 Stream (org.pentaho.di.trans.step.errorhandling.Stream)15 StreamInterface (org.pentaho.di.trans.step.errorhandling.StreamInterface)6 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)2 VariableSpace (org.pentaho.di.core.variables.VariableSpace)2 Repository (org.pentaho.di.repository.Repository)2 StepMeta (org.pentaho.di.trans.step.StepMeta)2 IMetaStore (org.pentaho.metastore.api.IMetaStore)2 Test (org.junit.Test)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 RowMeta (org.pentaho.di.core.row.RowMeta)1 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)1 StepIOMetaInterface (org.pentaho.di.trans.step.StepIOMetaInterface)1 StepMetaInterface (org.pentaho.di.trans.step.StepMetaInterface)1