本文整理汇总了Java中org.pentaho.di.trans.step.errorhandling.StreamInterface类的典型用法代码示例。如果您正苦于以下问题:Java StreamInterface类的具体用法?Java StreamInterface怎么用?Java StreamInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StreamInterface类属于org.pentaho.di.trans.step.errorhandling包,在下文中一共展示了StreamInterface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ValidatorDialog
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public ValidatorDialog(Shell parent, Object in, TransMeta tr, String sname)
{
super(parent, (BaseStepMeta)in, tr, sname);
input=(ValidatorMeta)in;
// Just to make sure everything is nicely in sync...
//
java.util.List<StreamInterface> infoStreams = input.getStepIOMeta().getInfoStreams();
for (int i=0;i<infoStreams.size();i++) {
input.getValidations().get(i).setSourcingStepName(infoStreams.get(i).getStepname());
}
selectedField = null;
selectionList = new ArrayList<Validation>();
// Copy the data from the input into the map...
//
for (Validation field : input.getValidations()) {
selectionList.add(field.clone());
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:ValidatorDialog.java
示例2: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
@Override
public void handleStreamSelection( StreamInterface stream ) {
List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
int index = targets.indexOf( stream );
StepMeta step = targets.get( index ).getStepMeta();
switch ( index ) {
case 0:
setOrganizationStepMeta( step );
break;
case 1:
setOrganizationTagStepMeta( step );
break;
case 2:
setOrganizationFieldStepMeta( step );
break;
case 3:
setOrganizationDomainStepMeta( step );
break;
default:
break;
}
}
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:23,代码来源:ZendeskInputOrganizationsMeta.java
示例3: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
@Override
public void handleStreamSelection( StreamInterface stream ) {
List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
int index = targets.indexOf( stream );
StepMeta step = targets.get( index ).getStepMeta();
switch ( index ) {
case 0:
setArticleStepMeta( step );
break;
case 1:
setTranslationStepMeta( step );
break;
default:
break;
}
}
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:17,代码来源:ZendeskInputHCArticleMeta.java
示例4: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
@Override
public void handleStreamSelection( StreamInterface stream ) {
List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
int index = targets.indexOf( stream );
StepMeta step = targets.get( index ).getStepMeta();
switch ( index ) {
case 0:
setTicketOverviewStepMeta( step );
break;
case 1:
setTicketCommentsStepMeta( step );
break;
case 2:
setTicketCustomFieldsStepMeta( step );
break;
case 3:
setTicketTagsStepMeta( step );
case 4:
setTicketCollaboratorsStepMeta( step );
default:
break;
}
}
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:24,代码来源:ZendeskInputTicketAuditMeta.java
示例5: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
@Override
public void handleStreamSelection( StreamInterface stream ) {
List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
int index = targets.indexOf( stream );
StepMeta step = targets.get( index ).getStepMeta();
switch ( index ) {
case 0:
setUserStepMeta( step );
break;
case 1:
setUserIdentityStepMeta( step );
break;
default:
break;
}
}
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:17,代码来源:ZendeskInputUsersMeta.java
示例6: setInputToFramesTableFields
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
protected void setInputToFramesTableFields( CPythonScriptExecutorMeta meta ) {
List<String> frameNames = meta.getFrameNames();
List<StreamInterface> infoStreams = meta.getStepIOMeta().getInfoStreams();
wtvInputFrames.clearAll();
for ( int i = 0; i < infoStreams.size(); i++ ) {
String stepName = infoStreams.get( i ).getStepname();
String frameName = frameNames.get( i );
TableItem item = new TableItem( wtvInputFrames.table, SWT.NONE );
item.setText( 1, Const.NVL( stepName, "" ) ); //$NON-NLS-1$
item.setText( 2, Const.NVL( frameName, "" ) ); //$NON-NLS-1$
}
wtvInputFrames.removeEmptyRows();
wtvInputFrames.setRowNums();
wtvInputFrames.optWidth( true );
}
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:19,代码来源:CPythonScriptExecutorDialog.java
示例7: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void handleStreamSelection(StreamInterface stream) {
// A hack to prevent us from losing information in the Trans UI because
// of the resetStepIoMeta() call at the end of this method.
//
List<StreamInterface> streams = getStepIOMeta().getInfoStreams();
for (int i=0;i<validations.size();i++) {
validations.get(i).setSourcingStep(streams.get(i).getStepMeta());
}
if (stream == newValidation) {
// Add the info..
//
Validation validation = new Validation();
validation.setName(stream.getStepname());
validation.setSourcingStep(stream.getStepMeta());
validation.setSourcingValues(true);
validations.add(validation);
}
resetStepIoMeta(); // force stepIo to be recreated when it is next needed.
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:ValidatorMeta.java
示例8: init
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
/**
* @see StepInterface#init( org.pentaho.di.trans.step.StepMetaInterface , org.pentaho.di.trans.step.StepDataInterface)
*/
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
meta=(MergeRowsMeta)smi;
data=(MergeRowsData)sdi;
if (super.init(smi, sdi))
{
List<StreamInterface> infoStreams = meta.getStepIOMeta().getInfoStreams();
if (infoStreams.get(0).getStepMeta()!=null ^ infoStreams.get(1).getStepMeta()!=null)
{
logError(BaseMessages.getString(PKG, "MergeRows.Log.BothTrueAndFalseNeeded")); //$NON-NLS-1$
}
else
{
return true;
}
}
return false;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:MergeRows.java
示例9: init
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
meta=(JavaFilterMeta)smi;
data=(JavaFilterData)sdi;
if (super.init(smi, sdi))
{
List<StreamInterface> targetStreams = meta.getStepIOMeta().getTargetStreams();
data.trueStepname = targetStreams.get(0).getStepname();
data.falseStepname = targetStreams.get(1).getStepname();
if (targetStreams.get(0).getStepMeta()!=null ^ targetStreams.get(1).getStepMeta()!=null)
{
logError(BaseMessages.getString(PKG, "JavaFilter.Log.BothTrueAndFalseNeeded")); //$NON-NLS-1$
}
else
{
data.chosesTargetSteps = targetStreams.get(0).getStepMeta()!=null && targetStreams.get(1).getStepMeta()!=null;
return true;
}
}
return false;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:JavaFilter.java
示例10: getXML
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public String getXML() throws KettleException
{
StringBuffer retval = new StringBuffer(200);
List<StreamInterface> targetStreams = getStepIOMeta().getTargetStreams();
retval.append(XMLHandler.addTagValue("send_true_to", targetStreams.get(0).getStepname())); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("send_false_to", targetStreams.get(1).getStepname())); //$NON-NLS-1$
retval.append(" <compare>").append(Const.CR); //$NON-NLS-1$
if (condition!=null)
{
retval.append(condition.getXML());
}
retval.append(" </compare>").append(Const.CR); //$NON-NLS-1$
return retval.toString();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:FilterRowsMeta.java
示例11: readRep
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
try
{
allocate();
List<StreamInterface> targetStreams = getStepIOMeta().getTargetStreams();
targetStreams.get(0).setSubject( rep.getStepAttributeString (id_step, "send_true_to") ); //$NON-NLS-1$
targetStreams.get(1).setSubject( rep.getStepAttributeString (id_step, "send_false_to") ); //$NON-NLS-1$
condition = rep.loadConditionFromStepAttribute(id_step, "id_condition");
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "FilterRowsMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:FilterRowsMeta.java
示例12: saveRep
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException
{
try
{
if (condition!=null)
{
List<StreamInterface> targetStreams = getStepIOMeta().getTargetStreams();
rep.saveConditionStepAttribute(id_transformation, id_step, "id_condition", condition);
rep.saveStepAttribute(id_transformation, id_step, "send_true_to", targetStreams.get(0).getStepname()); //$NON-NLS-1$
rep.saveStepAttribute(id_transformation, id_step, "send_false_to", targetStreams.get(1).getStepname()); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "FilterRowsMeta.Exception.UnableToSaveStepInfoToRepository")+id_step, e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:FilterRowsMeta.java
示例13: handleStreamSelection
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
/**
* When an optional stream is selected, this method is called to handled the ETL metadata implications of that.
* @param stream The optional stream to handle.
*/
public void handleStreamSelection(StreamInterface stream) {
// This step targets another step.
// Make sure that we don't specify the same step for true and false...
// If the user requests false, we blank out true and vice versa
//
List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
int index = targets.indexOf(stream);
if (index==0) {
// True
//
StepMeta falseStep = targets.get(1).getStepMeta();
if (falseStep!=null && falseStep.equals(stream.getStepMeta())) {
targets.get(1).setStepMeta(null);
}
}
if (index==1) {
// False
//
StepMeta trueStep = targets.get(0).getStepMeta();
if (trueStep!=null && trueStep.equals(stream.getStepMeta())) {
targets.get(0).setStepMeta(null);
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:FilterRowsMeta.java
示例14: getXML
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public String getXML()
{
StringBuffer retval = new StringBuffer();
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
retval.append(XMLHandler.addTagValue("join_type", getJoinType())); //$NON-NLS-1$
for (int i = 0; i < infoStreams.size(); i++)
retval.append(XMLHandler.addTagValue("step"+i, infoStreams.get(i).getStepname())); //$NON-NLS-1$
retval.append(" <number_input>"+infoStreams.size()+"</number_input>"+Const.CR);
retval.append(" <keys>"+Const.CR); //$NON-NLS-1$
for (int i=0;i<keyFields.length;i++)
{
retval.append(" "+XMLHandler.addTagValue("key", keyFields[i])); //$NON-NLS-1$
}
retval.append(" </keys>"+Const.CR); //$NON-NLS-1$
return retval.toString();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:MultiMergeJoinMeta.java
示例15: saveRep
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step)
throws KettleException
{
try
{
for (int i=0;i<keyFields.length;i++)
{
rep.saveStepAttribute(id_transformation, id_step, i, "keys", keyFields[i]); //$NON-NLS-1$
}
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
rep.saveStepAttribute(id_transformation, id_step, "number_inputs", infoStreams.size());
for (int i=0; i<infoStreams.size(); i++)
rep.saveStepAttribute(id_transformation, id_step, "step"+i, infoStreams.get(i).getStepname()); //$NON-NLS-1$
rep.saveStepAttribute(id_transformation, id_step, "join_type", getJoinType()); //$NON-NLS-1$
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "MultiMergeJoinMeta.Exception.UnableToSaveStepInfo")+id_step, e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:MultiMergeJoinMeta.java
示例16: getXML
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public String getXML()
{
StringBuffer retval = new StringBuffer();
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
retval.append(XMLHandler.addTagValue("join_type", getJoinType())); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("step1", infoStreams.get(0).getStepname())); //$NON-NLS-1$
retval.append(XMLHandler.addTagValue("step2", infoStreams.get(1).getStepname())); //$NON-NLS-1$
retval.append(" <keys_1>"+Const.CR); //$NON-NLS-1$
for (int i=0;i<keyFields1.length;i++)
{
retval.append(" "+XMLHandler.addTagValue("key", keyFields1[i])); //$NON-NLS-1$
}
retval.append(" </keys_1>"+Const.CR); //$NON-NLS-1$
retval.append(" <keys_2>"+Const.CR); //$NON-NLS-1$
for (int i=0;i<keyFields2.length;i++)
{
retval.append(" "+XMLHandler.addTagValue("key", keyFields2[i])); //$NON-NLS-1$
}
retval.append(" </keys_2>"+Const.CR); //$NON-NLS-1$
return retval.toString();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:MergeJoinMeta.java
示例17: saveRep
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step)
throws KettleException
{
try
{
for (int i=0;i<keyFields1.length;i++)
{
rep.saveStepAttribute(id_transformation, id_step, i, "keys_1", keyFields1[i]); //$NON-NLS-1$
}
for (int i=0;i<keyFields2.length;i++)
{
rep.saveStepAttribute(id_transformation, id_step, i, "keys_2", keyFields2[i]); //$NON-NLS-1$
}
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
rep.saveStepAttribute(id_transformation, id_step, "step1", infoStreams.get(0).getStepname()); //$NON-NLS-1$
rep.saveStepAttribute(id_transformation, id_step, "step2", infoStreams.get(1).getStepname()); //$NON-NLS-1$
rep.saveStepAttribute(id_transformation, id_step, "join_type", getJoinType()); //$NON-NLS-1$
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "MergeJoinMeta.Exception.UnableToSaveStepInfo")+id_step, e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:MergeJoinMeta.java
示例18: readData
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
private void readData(Node stepnode)
throws KettleXMLException
{
try
{
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
StreamInterface headStream = infoStreams.get(0);
StreamInterface tailStream = infoStreams.get(1);
headStream.setSubject( XMLHandler.getTagValue(stepnode, "head_name") ); //$NON-NLS-1$
tailStream.setSubject( XMLHandler.getTagValue(stepnode, "tail_name") ); //$NON-NLS-1$
}
catch(Exception e)
{
throw new KettleXMLException(BaseMessages.getString(PKG, "AppendMeta.Exception.UnableToLoadStepInfo"), e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:AppendMeta.java
示例19: readData
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
private void readData(Node stepnode, List<? extends SharedObjectInterface> databases)
throws KettleXMLException
{
try
{
databaseMeta = DatabaseMeta.findDatabase(databases, XMLHandler.getTagValue(stepnode, "connection"));
sql = XMLHandler.getTagValue(stepnode, "sql");
rowLimit = XMLHandler.getTagValue(stepnode, "limit");
String lookupFromStepname = XMLHandler.getTagValue(stepnode, "lookup"); //$NON-NLS-1$
StreamInterface infoStream = getStepIOMeta().getInfoStreams().get(0);
infoStream.setSubject(lookupFromStepname);
executeEachInputRow = "Y".equals(XMLHandler.getTagValue(stepnode, "execute_each_row"));
variableReplacementActive = "Y".equals(XMLHandler.getTagValue(stepnode, "variables_active"));
lazyConversionActive = "Y".equals(XMLHandler.getTagValue(stepnode, "lazy_conversion_active"));
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:TableInputMeta.java
示例20: readRep
import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
try
{
databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases); //$NON-NLS-1$
sql = rep.getStepAttributeString (id_step, "sql");
rowLimit = rep.getStepAttributeString(id_step, "limit");
if (rowLimit==null) {
rowLimit = Long.toString( rep.getStepAttributeInteger(id_step, "limit") );
}
String lookupFromStepname = rep.getStepAttributeString (id_step, "lookup"); //$NON-NLS-1$
StreamInterface infoStream = getStepIOMeta().getInfoStreams().get(0);
infoStream.setSubject(lookupFromStepname);
executeEachInputRow = rep.getStepAttributeBoolean(id_step, "execute_each_row");
variableReplacementActive = rep.getStepAttributeBoolean(id_step, "variables_active");
lazyConversionActive = rep.getStepAttributeBoolean(id_step, "lazy_conversion_active");
}
catch(Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:TableInputMeta.java
注:本文中的org.pentaho.di.trans.step.errorhandling.StreamInterface类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论