Search in sources :

Example 11 with Stream

use of org.pentaho.di.trans.step.errorhandling.Stream 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 12 with Stream

use of org.pentaho.di.trans.step.errorhandling.Stream 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 13 with Stream

use of org.pentaho.di.trans.step.errorhandling.Stream 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)

Example 14 with Stream

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

the class MergeRowsMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step.
 */
@Override
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, false, false);
        ioMeta.addStream(new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "MergeRowsMeta.InfoStream.FirstStream.Description"), StreamIcon.INFO, null));
        ioMeta.addStream(new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "MergeRowsMeta.InfoStream.SecondStream.Description"), StreamIcon.INFO, null));
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream)

Example 15 with Stream

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

the class BaseStepMeta method clone.

/*
   * (non-Javadoc)
   *
   * @see java.lang.Object#clone()
   */
@Override
public Object clone() {
    try {
        BaseStepMeta retval = (BaseStepMeta) super.clone();
        // then the step references must be corrected.
        if (ioMeta != null) {
            StepIOMetaInterface stepIOMeta = new StepIOMeta(ioMeta.isInputAcceptor(), ioMeta.isOutputProducer(), ioMeta.isInputOptional(), ioMeta.isSortedDataRequired(), ioMeta.isInputDynamic(), ioMeta.isOutputDynamic());
            List<StreamInterface> infoStreams = ioMeta.getInfoStreams();
            for (StreamInterface infoStream : infoStreams) {
                stepIOMeta.addStream(new Stream(infoStream));
            }
            List<StreamInterface> targetStreams = ioMeta.getTargetStreams();
            for (StreamInterface targetStream : targetStreams) {
                stepIOMeta.addStream(new Stream(targetStream));
            }
            retval.ioMeta = stepIOMeta;
        }
        return retval;
    } catch (CloneNotSupportedException e) {
        return null;
    }
}
Also used : Stream(org.pentaho.di.trans.step.errorhandling.Stream) InputStream(java.io.InputStream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Aggregations

Stream (org.pentaho.di.trans.step.errorhandling.Stream)20 StepIOMeta (org.pentaho.di.trans.step.StepIOMeta)15 StreamInterface (org.pentaho.di.trans.step.errorhandling.StreamInterface)11 StepIOMetaInterface (org.pentaho.di.trans.step.StepIOMetaInterface)4 ArrayList (java.util.ArrayList)3 Repository (org.pentaho.di.repository.Repository)3 StepMeta (org.pentaho.di.trans.step.StepMeta)2 InputStream (java.io.InputStream)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Arrays (java.util.Arrays)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 ResourceBundle (java.util.ResourceBundle)1 Set (java.util.Set)1 StringTokenizer (java.util.StringTokenizer)1 Timer (java.util.Timer)1 TimerTask (java.util.TimerTask)1 UUID (java.util.UUID)1