本文整理汇总了Java中org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta类的典型用法代码示例。如果您正苦于以下问题:Java PropertyInputMeta类的具体用法?Java PropertyInputMeta怎么用?Java PropertyInputMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyInputMeta类属于org.pentaho.di.trans.steps.propertyinput包,在下文中一共展示了PropertyInputMeta类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setEncodings
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void setEncodings()
{
// Encoding of the text file:
if (!gotEncodings)
{
gotEncodings = true;
wEncoding.removeAll();
ArrayList<Charset> values = new ArrayList<Charset>(Charset.availableCharsets().values());
for (int i=0;i<values.size();i++)
{
Charset charSet = (Charset)values.get(i);
wEncoding.add( charSet.displayName() );
}
// Now select the default!
String defEncoding = Const.getEnvironmentVariable("file.encoding", PropertyInputMeta.DEFAULT_ENCODING);
int idx = Const.indexOfString(defEncoding, wEncoding.getItems() );
if (idx>=0) wEncoding.select( idx );
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:PropertyInputDialog.java
示例2: setEncodings
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void setEncodings() {
// Encoding of the text file:
if ( !gotEncodings ) {
gotEncodings = true;
wEncoding.removeAll();
ArrayList<Charset> values = new ArrayList<Charset>( Charset.availableCharsets().values() );
for ( int i = 0; i < values.size(); i++ ) {
Charset charSet = values.get( i );
wEncoding.add( charSet.displayName() );
}
// Now select the default!
String defEncoding = Const.getEnvironmentVariable( "file.encoding", PropertyInputMeta.DEFAULT_ENCODING );
int idx = Const.indexOfString( defEncoding, wEncoding.getItems() );
if ( idx >= 0 ) {
wEncoding.select( idx );
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:PropertyInputDialog.java
示例3: setFileType
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void setFileType()
{
boolean active=(PropertyInputMeta.getFileTypeByDesc(wFileType.getText())==PropertyInputMeta.FILE_TYPE_INI);
wlSection.setEnabled(active);
wSection.setEnabled(active);
wbbSection.setEnabled(active);
wlEncoding.setEnabled(active);
wEncoding.setEnabled(active);
if(!active && wInclINIsection.getSelection()) wInclINIsection.setSelection(false);
wlInclINIsection.setEnabled(active);
wInclINIsection.setEnabled(active);
setIncludeSection();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:14,代码来源:PropertyInputDialog.java
示例4: setFileType
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void setFileType() {
boolean active =
( PropertyInputMeta.getFileTypeByDesc( wFileType.getText() ) == PropertyInputMeta.FILE_TYPE_INI );
wlSection.setEnabled( active );
wSection.setEnabled( active );
wbbSection.setEnabled( active );
wlEncoding.setEnabled( active );
wEncoding.setEnabled( active );
if ( !active && wInclINIsection.getSelection() ) {
wInclINIsection.setSelection( false );
}
wlInclINIsection.setEnabled( active );
wInclINIsection.setEnabled( active );
setIncludeSection();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:PropertyInputDialog.java
示例5: PropertyInputDialog
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
public PropertyInputDialog(Shell parent, Object in, TransMeta transMeta, String sname)
{
super(parent, (BaseStepMeta)in, transMeta, sname);
input=(PropertyInputMeta)in;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:PropertyInputDialog.java
示例6: getInfo
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void getInfo(PropertyInputMeta in) throws KettleException
{
stepname = wStepname.getText(); // return value
// copy info to PropertyInputMeta class (input)
in.setRowLimit( Const.toLong(wLimit.getText(), 0L) );
in.setIncludeFilename( wInclFilename.getSelection() );
in.setFilenameField( wInclFilenameField.getText() );
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setFileField(wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setResetRowNumber( wResetRownum.getSelection() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();
in.allocate(nrFiles, nrFields);
in.setFileName( wFilenameList.getItems(0) );
in.setFileMask( wFilenameList.getItems(1) );
for (int i=0;i<nrFields;i++)
{
PropertyInputField field = new PropertyInputField();
TableItem item = wFields.getNonEmpty(i);
field.setName( item.getText(1) );
field.setColumn( PropertyInputField.getColumnByDesc(item.getText(2)) );
field.setType(ValueMeta.getType(item.getText(3)));
field.setFormat( item.getText(4) );
field.setLength( Const.toInt(item.getText(5), -1) );
field.setPrecision( Const.toInt(item.getText(6), -1) );
field.setCurrencySymbol( item.getText(7) );
field.setDecimalSymbol( item.getText(8) );
field.setGroupSymbol( item.getText(9) );
field.setTrimType( PropertyInputField.getTrimTypeByDesc(item.getText(10)) );
field.setRepeated( Messages.getString("System.Combo.Yes").equalsIgnoreCase(item.getText(11)) );
in.getInputFields()[i] = field;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:44,代码来源:PropertyInputDialog.java
示例7: preview
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void preview()
{
try
{
PropertyInputMeta oneMeta = new PropertyInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("PropertyInputDialog.NumberRows.DialogTitle"), Messages.getString("PropertyInputDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
catch(KettleException e)
{
new ErrorDialog(shell, Messages.getString("PropertyInputDialog.ErrorPreviewingData.DialogTitle"), Messages.getString("PropertyInputDialog.ErrorPreviewingData.DialogMessage"), e);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:47,代码来源:PropertyInputDialog.java
示例8: setIncludeSection
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
public void setIncludeSection()
{
boolean active=(PropertyInputMeta.getFileTypeByDesc(wFileType.getText())==PropertyInputMeta.FILE_TYPE_INI);
wlInclINIsectionField.setEnabled(active && wInclINIsection.getSelection());
wInclINIsectionField.setEnabled(active && wInclINIsection.getSelection());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:PropertyInputDialog.java
示例9: getInfo
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void getInfo(PropertyInputMeta in) throws KettleException
{
stepname = wStepname.getText(); // return value
// copy info to PropertyInputMeta class (input)
in.setRowLimit( Const.toLong(wLimit.getText(), 0L) );
in.setIncludeFilename( wInclFilename.getSelection() );
in.setFilenameField( wInclFilenameField.getText() );
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setIncludeIniSection(wInclINIsection.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setEncoding(wEncoding.getText() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setFileField(wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setINISectionField(wInclINIsectionField.getText() );
in.setResetRowNumber( wResetRownum.getSelection() );
in.setResolveValueVariable( wresolveValueVariable.getSelection() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();
in.allocate(nrFiles, nrFields);
in.setSection(wSection.getText());
in.setFileName( wFilenameList.getItems(0) );
in.setFileMask( wFilenameList.getItems(1) );
in.setExcludeFileMask(wFilenameList.getItems(2) );
in.setFileRequired(wFilenameList.getItems(3));
in.setIncludeSubFolders(wFilenameList.getItems(4));
in.setFileType(PropertyInputMeta.getFileTypeCode(PropertyInputMeta.getFileTypeByDesc(wFileType.getText())));
for (int i=0;i<nrFields;i++)
{
PropertyInputField field = new PropertyInputField();
TableItem item = wFields.getNonEmpty(i);
field.setName( item.getText(1) );
field.setColumn( PropertyInputField.getColumnByDesc(item.getText(2)) );
field.setType(ValueMeta.getType(item.getText(3)));
field.setFormat( item.getText(4) );
field.setLength( Const.toInt(item.getText(5), -1) );
field.setPrecision( Const.toInt(item.getText(6), -1) );
field.setCurrencySymbol( item.getText(7) );
field.setDecimalSymbol( item.getText(8) );
field.setGroupSymbol( item.getText(9) );
field.setTrimType( PropertyInputField.getTrimTypeByDesc(item.getText(10)) );
field.setRepeated( BaseMessages.getString(PKG, "System.Combo.Yes").equalsIgnoreCase(item.getText(11)) );
in.getInputFields()[i] = field;
}
in.setShortFileNameField(wShortFileFieldName.getText());
in.setPathField(wPathFieldName.getText());
in.setIsHiddenField(wIsHiddenName.getText());
in.setLastModificationDateField(wLastModificationTimeName.getText());
in.setUriField(wUriName.getText());
in.setRootUriField(wRootUriName.getText());
in.setExtensionField(wExtensionFieldName.getText());
in.setSizeField(wSizeFieldName.getText());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:58,代码来源:PropertyInputDialog.java
示例10: preview
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void preview()
{
try
{
PropertyInputMeta oneMeta = new PropertyInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "PropertyInputDialog.NumberRows.DialogTitle"), BaseMessages.getString(PKG, "PropertyInputDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
catch(KettleException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "PropertyInputDialog.ErrorPreviewingData.DialogTitle"), BaseMessages.getString(PKG, "PropertyInputDialog.ErrorPreviewingData.DialogMessage"), e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:45,代码来源:PropertyInputDialog.java
示例11: PropertyInputDialog
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
public PropertyInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
super( parent, (BaseStepMeta) in, transMeta, sname );
input = (PropertyInputMeta) in;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:PropertyInputDialog.java
示例12: setIncludeSection
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
public void setIncludeSection() {
boolean active =
( PropertyInputMeta.getFileTypeByDesc( wFileType.getText() ) == PropertyInputMeta.FILE_TYPE_INI );
wlInclINIsectionField.setEnabled( active && wInclINIsection.getSelection() );
wInclINIsectionField.setEnabled( active && wInclINIsection.getSelection() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:PropertyInputDialog.java
示例13: getInfo
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void getInfo( PropertyInputMeta in ) throws KettleException {
stepname = wStepname.getText(); // return value
// copy info to PropertyInputMeta class (input)
in.setRowLimit( Const.toLong( wLimit.getText(), 0L ) );
in.setIncludeFilename( wInclFilename.getSelection() );
in.setFilenameField( wInclFilenameField.getText() );
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setIncludeIniSection( wInclINIsection.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setEncoding( wEncoding.getText() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setFileField( wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setINISectionField( wInclINIsectionField.getText() );
in.setResetRowNumber( wResetRownum.getSelection() );
in.setResolveValueVariable( wresolveValueVariable.getSelection() );
int nrFiles = wFilenameList.getItemCount();
int nrFields = wFields.nrNonEmpty();
in.allocate( nrFiles, nrFields );
in.setSection( wSection.getText() );
in.setFileName( wFilenameList.getItems( 0 ) );
in.setFileMask( wFilenameList.getItems( 1 ) );
in.setExcludeFileMask( wFilenameList.getItems( 2 ) );
in.setFileRequired( wFilenameList.getItems( 3 ) );
in.setIncludeSubFolders( wFilenameList.getItems( 4 ) );
in
.setFileType( PropertyInputMeta
.getFileTypeCode( PropertyInputMeta.getFileTypeByDesc( wFileType.getText() ) ) );
for ( int i = 0; i < nrFields; i++ ) {
PropertyInputField field = new PropertyInputField();
TableItem item = wFields.getNonEmpty( i );
field.setName( item.getText( 1 ) );
field.setColumn( PropertyInputField.getColumnByDesc( item.getText( 2 ) ) );
field.setType( ValueMetaFactory.getIdForValueMeta( item.getText( 3 ) ) );
field.setFormat( item.getText( 4 ) );
field.setLength( Const.toInt( item.getText( 5 ), -1 ) );
field.setPrecision( Const.toInt( item.getText( 6 ), -1 ) );
field.setCurrencySymbol( item.getText( 7 ) );
field.setDecimalSymbol( item.getText( 8 ) );
field.setGroupSymbol( item.getText( 9 ) );
field.setTrimType( PropertyInputField.getTrimTypeByDesc( item.getText( 10 ) ) );
field.setRepeated( BaseMessages.getString( PKG, "System.Combo.Yes" ).equalsIgnoreCase( item.getText( 11 ) ) );
//CHECKSTYLE:Indentation:OFF
in.getInputFields()[i] = field;
}
in.setShortFileNameField( wShortFileFieldName.getText() );
in.setPathField( wPathFieldName.getText() );
in.setIsHiddenField( wIsHiddenName.getText() );
in.setLastModificationDateField( wLastModificationTimeName.getText() );
in.setUriField( wUriName.getText() );
in.setRootUriField( wRootUriName.getText() );
in.setExtensionField( wExtensionFieldName.getText() );
in.setSizeField( wSizeFieldName.getText() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:59,代码来源:PropertyInputDialog.java
示例14: preview
import org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta; //导入依赖的package包/类
private void preview() {
try {
PropertyInputMeta oneMeta = new PropertyInputMeta();
getInfo( oneMeta );
TransMeta previewMeta =
TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );
EnterNumberDialog numberDialog = new EnterNumberDialog( shell, props.getDefaultPreviewSize(),
BaseMessages.getString( PKG, "PropertyInputDialog.NumberRows.DialogTitle" ),
BaseMessages.getString( PKG, "PropertyInputDialog.NumberRows.DialogMessage" ) );
int previewSize = numberDialog.open();
if ( previewSize > 0 ) {
TransPreviewProgressDialog progressDialog =
new TransPreviewProgressDialog(
shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if ( !progressDialog.isCancelled() ) {
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
EnterTextDialog etd =
new EnterTextDialog(
shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
.getString( PKG, "System.Dialog.PreviewError.Message" ), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd =
new PreviewRowsDialog(
shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
.getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
prd.open();
}
}
} catch ( KettleException e ) {
new ErrorDialog(
shell, BaseMessages.getString( PKG, "PropertyInputDialog.ErrorPreviewingData.DialogTitle" ),
BaseMessages.getString( PKG, "PropertyInputDialog.ErrorPreviewingData.DialogMessage" ), e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:48,代码来源:PropertyInputDialog.java
注:本文中的org.pentaho.di.trans.steps.propertyinput.PropertyInputMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论