本文整理汇总了Java中org.pentaho.di.trans.steps.mapping.MappingParameters类的典型用法代码示例。如果您正苦于以下问题:Java MappingParameters类的具体用法?Java MappingParameters怎么用?Java MappingParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MappingParameters类属于org.pentaho.di.trans.steps.mapping包,在下文中一共展示了MappingParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MappingDialog
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public MappingDialog(Shell parent, Object in, TransMeta tr, String sname)
{
super(parent, (BaseStepMeta) in, tr, sname);
mappingMeta = (MappingMeta) in;
transModified = false;
// Make a copy for our own purposes...
// This allows us to change everything directly in the classes with
// listeners.
// Later we need to copy it to the input class on ok()
//
mappingParameters = (MappingParameters) mappingMeta.getMappingParameters().clone();
inputMappings = new ArrayList<MappingIODefinition>();
outputMappings = new ArrayList<MappingIODefinition>();
for (int i = 0; i < mappingMeta.getInputMappings().size(); i++)
inputMappings.add((MappingIODefinition) mappingMeta.getInputMappings().get(i).clone());
for (int i = 0; i < mappingMeta.getOutputMappings().size(); i++)
outputMappings.add((MappingIODefinition) mappingMeta.getOutputMappings().get(i).clone());
changeList = new ArrayList<ApplyChanges>();
}
示例2: readRep
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
String method = rep.getStepAttributeString( id_step, "specification_method" );
specificationMethod = ObjectLocationSpecificationMethod.getSpecificationMethodByCode( method );
String transId = rep.getStepAttributeString( id_step, "trans_object_id" );
transObjectId = Utils.isEmpty( transId ) ? null : new StringObjectId( transId );
transName = rep.getStepAttributeString( id_step, "trans_name" );
fileName = rep.getStepAttributeString( id_step, "filename" );
directoryPath = rep.getStepAttributeString( id_step, "directory_path" );
// Backward compatibility check for object specification
//
checkObjectLocationSpecificationMethod();
inputMapping = new MappingIODefinition( rep, id_step, "input_", 0 );
outputMapping = new MappingIODefinition( rep, id_step, "output_", 0 );
mappingParameters = new MappingParameters( rep, id_step );
}
示例3: MappingDialog
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public MappingDialog( Shell parent, Object in, TransMeta tr, String sname ) {
super( parent, (BaseStepMeta) in, tr, sname );
mappingMeta = (MappingMeta) in;
transModified = false;
// Make a copy for our own purposes...
// This allows us to change everything directly in the classes with
// listeners.
// Later we need to copy it to the input class on ok()
//
mappingParameters = (MappingParameters) mappingMeta.getMappingParameters().clone();
inputMappings = new ArrayList<MappingIODefinition>();
outputMappings = new ArrayList<MappingIODefinition>();
for ( int i = 0; i < mappingMeta.getInputMappings().size(); i++ ) {
inputMappings.add( (MappingIODefinition) mappingMeta.getInputMappings().get( i ).clone() );
}
for ( int i = 0; i < mappingMeta.getOutputMappings().size(); i++ ) {
outputMappings.add( (MappingIODefinition) mappingMeta.getOutputMappings().get( i ).clone() );
}
}
示例4: SimpleMappingDialog
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public SimpleMappingDialog( Shell parent, Object in, TransMeta tr, String sname ) {
super( parent, (BaseStepMeta) in, tr, sname );
mappingMeta = (SimpleMappingMeta) in;
transModified = false;
// Make a copy for our own purposes...
// This allows us to change everything directly in the classes with
// listeners.
// Later we need to copy it to the input class on ok()
//
mappingParameters = (MappingParameters) mappingMeta.getMappingParameters().clone();
inputMapping = (MappingIODefinition) mappingMeta.getInputMapping().clone();
outputMapping = (MappingIODefinition) mappingMeta.getOutputMapping().clone();
changeList = new ArrayList<ApplyChanges>();
}
示例5: SimpleMappingMeta
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public SimpleMappingMeta() {
super(); // allocate BaseStepMeta
inputMapping = new MappingIODefinition();
outputMapping = new MappingIODefinition();
mappingParameters = new MappingParameters();
}
示例6: getTestObject
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
@Override
public MappingParameters getTestObject() {
MappingParameters rtn = new MappingParameters();
rtn.setVariable( new String[] {
UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString()
} );
rtn.setInputField( new String[] {
UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString()
} );
rtn.setInheritingAllVariables( rand.nextBoolean() );
return rtn;
}
示例7: validateTestObject
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
@Override
public boolean validateTestObject( MappingParameters testObject, Object actual ) {
if ( !( actual instanceof MappingParameters ) ) {
return false;
}
MappingParameters actualInput = (MappingParameters) actual;
return ( testObject.getXML().equals( actualInput.getXML() ) );
}
示例8: MappingParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public MappingParametersTab(TableView wMappingParameters, Button wInheritAll, MappingParameters parameters)
{
this.wMappingParameters = wMappingParameters;
this.wInheritAll = wInheritAll;
this.parameters = parameters;
}
示例9: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
private void addParametersTab(final MappingParameters parameters)
{
CTabItem wParametersTab = new CTabItem(wTabFolder, SWT.NONE);
wParametersTab.setText(Messages.getString("MappingDialog.Parameters.Title")); //$NON-NLS-1$
wParametersTab.setToolTipText(Messages.getString("MappingDialog.Parameters.Tooltip")); //$NON-NLS-1$
Composite wParametersComposite = new Composite(wTabFolder, SWT.NONE);
props.setLook(wParametersComposite);
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = Const.FORM_MARGIN;
parameterTabLayout.marginHeight = Const.FORM_MARGIN;
wParametersComposite.setLayout(parameterTabLayout);
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button(wParametersComposite, SWT.CHECK);
wInheritAll.setText(Messages.getString("MappingDialog.Parameters.InheritAll"));
props.setLook(wInheritAll);
FormData fdInheritAll = new FormData();
fdInheritAll.bottom = new FormAttachment(100,0);
fdInheritAll.left = new FormAttachment(0,0);
fdInheritAll.right = new FormAttachment(100,-30);
wInheritAll.setLayoutData(fdInheritAll);
wInheritAll.setSelection(parameters.isInheritingAllVariables());
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo = new ColumnInfo[] {
new ColumnInfo(
Messages.getString("MappingDialog.Parameters.column.Variable"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
new ColumnInfo(
Messages.getString("MappingDialog.Parameters.column.ValueOrField"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
};
colinfo[1].setUsingVariables(true);
final TableView wMappingParameters = new TableView(transMeta, wParametersComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters.getVariable().length,
lsMod, props);
props.setLook(wMappingParameters);
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment(0, 0);
fdMappings.right = new FormAttachment(100, 0);
fdMappings.top = new FormAttachment(0, 0);
fdMappings.bottom = new FormAttachment(wInheritAll, -margin*2);
wMappingParameters.setLayoutData(fdMappings);
for (int i = 0; i < parameters.getVariable().length; i++)
{
TableItem tableItem = wMappingParameters.table.getItem(i);
tableItem.setText(1, parameters.getVariable()[i]);
tableItem.setText(2, parameters.getInputField()[i]);
}
wMappingParameters.setRowNums();
wMappingParameters.optWidth(true);
FormData fdParametersComposite = new FormData();
fdParametersComposite.left = new FormAttachment(0, 0);
fdParametersComposite.top = new FormAttachment(0, 0);
fdParametersComposite.right = new FormAttachment(100, 0);
fdParametersComposite.bottom = new FormAttachment(100, 0);
wParametersComposite.setLayoutData(fdParametersComposite);
wParametersComposite.layout();
wParametersTab.setControl(wParametersComposite);
changeList.add(new MappingParametersTab(wMappingParameters, wInheritAll, parameters));
}
示例10: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
private void addParametersTab(final MappingParameters parameters)
{
CTabItem wParametersTab = new CTabItem(wTabFolder, SWT.NONE);
wParametersTab.setText(BaseMessages.getString(PKG, "MappingDialog.Parameters.Title")); //$NON-NLS-1$
wParametersTab.setToolTipText(BaseMessages.getString(PKG, "MappingDialog.Parameters.Tooltip")); //$NON-NLS-1$
Composite wParametersComposite = new Composite(wTabFolder, SWT.NONE);
props.setLook(wParametersComposite);
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = Const.FORM_MARGIN;
parameterTabLayout.marginHeight = Const.FORM_MARGIN;
wParametersComposite.setLayout(parameterTabLayout);
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button(wParametersComposite, SWT.CHECK);
wInheritAll.setText(BaseMessages.getString(PKG, "MappingDialog.Parameters.InheritAll"));
props.setLook(wInheritAll);
FormData fdInheritAll = new FormData();
fdInheritAll.bottom = new FormAttachment(100,0);
fdInheritAll.left = new FormAttachment(0,0);
fdInheritAll.right = new FormAttachment(100,-30);
wInheritAll.setLayoutData(fdInheritAll);
wInheritAll.setSelection(parameters.isInheritingAllVariables());
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo = new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString(PKG, "MappingDialog.Parameters.column.Variable"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
new ColumnInfo(
BaseMessages.getString(PKG, "MappingDialog.Parameters.column.ValueOrField"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //$NON-NLS-1$
};
colinfo[1].setUsingVariables(true);
final TableView wMappingParameters = new TableView(transMeta, wParametersComposite,
SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters.getVariable().length,
lsMod, props);
props.setLook(wMappingParameters);
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment(0, 0);
fdMappings.right = new FormAttachment(100, 0);
fdMappings.top = new FormAttachment(0, 0);
fdMappings.bottom = new FormAttachment(wInheritAll, -margin*2);
wMappingParameters.setLayoutData(fdMappings);
for (int i = 0; i < parameters.getVariable().length; i++)
{
TableItem tableItem = wMappingParameters.table.getItem(i);
tableItem.setText(1, parameters.getVariable()[i]);
tableItem.setText(2, parameters.getInputField()[i]);
}
wMappingParameters.setRowNums();
wMappingParameters.optWidth(true);
FormData fdParametersComposite = new FormData();
fdParametersComposite.left = new FormAttachment(0, 0);
fdParametersComposite.top = new FormAttachment(0, 0);
fdParametersComposite.right = new FormAttachment(100, 0);
fdParametersComposite.bottom = new FormAttachment(100, 0);
wParametersComposite.setLayoutData(fdParametersComposite);
wParametersComposite.layout();
wParametersTab.setControl(wParametersComposite);
changeList.add(new MappingParametersTab(wMappingParameters, wInheritAll, parameters));
}
示例11: getMappingParameters
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
/**
* @return the mappingParameters
*/
public MappingParameters getMappingParameters() {
return mappingParameters;
}
示例12: MappingParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
public MappingParametersTab( TableView wMappingParameters, Button wInheritAll, MappingParameters parameters ) {
this.wMappingParameters = wMappingParameters;
this.wInheritAll = wInheritAll;
this.parameters = parameters;
}
示例13: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
private void addParametersTab( final MappingParameters parameters ) {
CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE );
wParametersTab.setText( BaseMessages.getString( PKG, "MappingDialog.Parameters.Title" ) );
wParametersTab.setToolTipText( BaseMessages.getString( PKG, "MappingDialog.Parameters.Tooltip" ) );
Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE );
props.setLook( wParametersComposite );
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = 15;
parameterTabLayout.marginHeight = 15;
wParametersComposite.setLayout( parameterTabLayout );
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button( wParametersComposite, SWT.CHECK );
wInheritAll.setText( BaseMessages.getString( PKG, "MappingDialog.Parameters.InheritAll" ) );
props.setLook( wInheritAll );
FormData fdInheritAll = new FormData();
fdInheritAll.bottom = new FormAttachment( 100, 0 );
fdInheritAll.left = new FormAttachment( 0, 0 );
fdInheritAll.right = new FormAttachment( 100, -30 );
wInheritAll.setLayoutData( fdInheritAll );
wInheritAll.setSelection( parameters.isInheritingAllVariables() );
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo =
new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString( PKG, "MappingDialog.Parameters.column.Variable" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
new ColumnInfo(
BaseMessages.getString( PKG, "MappingDialog.Parameters.column.ValueOrField" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ), };
colinfo[ 1 ].setUsingVariables( true );
final TableView wMappingParameters =
new TableView(
transMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters
.getVariable().length, lsMod, props
);
props.setLook( wMappingParameters );
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment( 0, 0 );
fdMappings.right = new FormAttachment( 100, 0 );
fdMappings.top = new FormAttachment( 0, 0 );
fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );
for ( int i = 0; i < parameters.getVariable().length; i++ ) {
TableItem tableItem = wMappingParameters.table.getItem( i );
tableItem.setText( 1, Const.NVL( parameters.getVariable()[ i ], "" ) );
tableItem.setText( 2, Const.NVL( parameters.getInputField()[ i ], "" ) );
}
wMappingParameters.setRowNums();
wMappingParameters.optWidth( true );
FormData fdParametersComposite = new FormData();
fdParametersComposite.left = new FormAttachment( 0, 0 );
fdParametersComposite.top = new FormAttachment( 0, 0 );
fdParametersComposite.right = new FormAttachment( 100, 0 );
fdParametersComposite.bottom = new FormAttachment( 100, 0 );
wParametersComposite.setLayoutData( fdParametersComposite );
wParametersComposite.layout();
wParametersTab.setControl( wParametersComposite );
parameterChanges = new MappingParametersTab( wMappingParameters, wInheritAll, parameters );
}
示例14: addParametersTab
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
private void addParametersTab( final MappingParameters parameters ) {
CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE );
wParametersTab.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Title" ) );
wParametersTab.setToolTipText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Tooltip" ) );
Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE );
props.setLook( wParametersComposite );
FormLayout parameterTabLayout = new FormLayout();
parameterTabLayout.marginWidth = 15;
parameterTabLayout.marginHeight = 15;
wParametersComposite.setLayout( parameterTabLayout );
// Add a checkbox: inherit all variables...
//
Button wInheritAll = new Button( wParametersComposite, SWT.CHECK );
wInheritAll.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.InheritAll" ) );
props.setLook( wInheritAll );
FormData fdInheritAll = new FormData();
fdInheritAll.bottom = new FormAttachment( 100, 0 );
fdInheritAll.left = new FormAttachment( 0, 0 );
fdInheritAll.right = new FormAttachment( 100, -30 );
wInheritAll.setLayoutData( fdInheritAll );
wInheritAll.setSelection( parameters.isInheritingAllVariables() );
// Now add a tableview with the 2 columns to specify: input and output
// fields for the source and target steps.
//
ColumnInfo[] colinfo =
new ColumnInfo[] {
new ColumnInfo(
BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.Variable" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ),
new ColumnInfo(
BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.column.ValueOrField" ),
ColumnInfo.COLUMN_TYPE_TEXT, false, false ), };
colinfo[ 1 ].setUsingVariables( true );
final TableView wMappingParameters =
new TableView(
transMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, parameters
.getVariable().length, false, lsMod, props, false
);
props.setLook( wMappingParameters );
FormData fdMappings = new FormData();
fdMappings.left = new FormAttachment( 0, 0 );
fdMappings.right = new FormAttachment( 100, 0 );
fdMappings.top = new FormAttachment( 0, 0 );
fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );
for ( int i = 0; i < parameters.getVariable().length; i++ ) {
TableItem tableItem = wMappingParameters.table.getItem( i );
tableItem.setText( 1, parameters.getVariable()[ i ] );
tableItem.setText( 2, parameters.getInputField()[ i ] );
}
wMappingParameters.setRowNums();
wMappingParameters.optWidth( true );
FormData fdParametersComposite = new FormData();
fdParametersComposite.left = new FormAttachment( 0, 0 );
fdParametersComposite.top = new FormAttachment( 0, 0 );
fdParametersComposite.right = new FormAttachment( 100, 0 );
fdParametersComposite.bottom = new FormAttachment( 100, 0 );
wParametersComposite.setLayoutData( fdParametersComposite );
wParametersComposite.layout();
wParametersTab.setControl( wParametersComposite );
changeList.add( new MappingParametersTab( wMappingParameters, wInheritAll, parameters ) );
}
示例15: setMappingParameters
import org.pentaho.di.trans.steps.mapping.MappingParameters; //导入依赖的package包/类
/**
* @param mappingParameters
* the mappingParameters to set
*/
public void setMappingParameters( MappingParameters mappingParameters ) {
this.mappingParameters = mappingParameters;
}