use of org.pentaho.di.trans.step.StepIOMeta 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;
}
use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.
the class FuzzyMatchMeta method getStepIOMeta.
/**
* Returns the Input/Output metadata for this step. The generator step only produces output, does not accept input!
*/
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, "FuzzyMatchMeta.InfoStream.Description"), StreamIcon.INFO, null);
ioMeta.addStream(stream);
}
return ioMeta;
}
use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.
the class JavaFilterMeta method getStepIOMeta.
/**
* Returns the Input/Output metadata for this step.
*/
public StepIOMetaInterface getStepIOMeta() {
if (ioMeta == null) {
ioMeta = new StepIOMeta(true, true, false, false, false, false);
ioMeta.addStream(new Stream(StreamType.TARGET, null, BaseMessages.getString(PKG, "JavaFilterMeta.InfoStream.True.Description"), StreamIcon.TRUE, null));
ioMeta.addStream(new Stream(StreamType.TARGET, null, BaseMessages.getString(PKG, "JavaFilterMeta.InfoStream.False.Description"), StreamIcon.FALSE, null));
}
return ioMeta;
}
use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.
the class JobExecutorMeta method getStepIOMeta.
@Override
public StepIOMetaInterface getStepIOMeta() {
if (ioMeta == null) {
ioMeta = new StepIOMeta(true, true, true, false, true, false);
ioMeta.addStream(new Stream(StreamType.TARGET, executionResultTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultStream.Description"), StreamIcon.TARGET, null));
ioMeta.addStream(new Stream(StreamType.TARGET, resultRowsTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultRowsStream.Description"), StreamIcon.TARGET, null));
ioMeta.addStream(new Stream(StreamType.TARGET, resultFilesTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultFilesStream.Description"), StreamIcon.TARGET, null));
}
return ioMeta;
}
use of org.pentaho.di.trans.step.StepIOMeta in project pentaho-kettle by pentaho.
the class TransMetaTest method getThisStepFieldsPassesCloneRowMeta.
@Test
public void getThisStepFieldsPassesCloneRowMeta() throws Exception {
final String overriddenValue = "overridden";
StepMeta nextStep = mockStepMeta("nextStep");
StepMetaInterface smi = mock(StepMetaInterface.class);
StepIOMeta ioMeta = mock(StepIOMeta.class);
when(smi.getStepIOMeta()).thenReturn(ioMeta);
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
RowMetaInterface rmi = (RowMetaInterface) invocation.getArguments()[0];
rmi.clear();
rmi.addValueMeta(new ValueMetaString(overriddenValue));
return null;
}
}).when(smi).getFields(any(RowMetaInterface.class), anyString(), any(RowMetaInterface[].class), eq(nextStep), any(VariableSpace.class), any(Repository.class), any(IMetaStore.class));
StepMeta thisStep = mockStepMeta("thisStep");
when(thisStep.getStepMetaInterface()).thenReturn(smi);
RowMeta rowMeta = new RowMeta();
rowMeta.addValueMeta(new ValueMetaString("value"));
RowMetaInterface thisStepsFields = transMeta.getThisStepFields(thisStep, nextStep, rowMeta);
assertEquals(1, thisStepsFields.size());
assertEquals(overriddenValue, thisStepsFields.getValueMeta(0).getName());
}
Aggregations