• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JobEntrySimpleEval类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval的典型用法代码示例。如果您正苦于以下问题:Java JobEntrySimpleEval类的具体用法?Java JobEntrySimpleEval怎么用?Java JobEntrySimpleEval使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JobEntrySimpleEval类属于org.pentaho.di.job.entries.simpleeval包,在下文中一共展示了JobEntrySimpleEval类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getData

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData()
{
	if (jobEntry.getName()    != null) wName.setText( jobEntry.getName() );
	wName.selectAll();
	wValueType.setText(JobEntrySimpleEval.getValueTypeDesc(jobEntry.valuetype));
	if (jobEntry.getFieldName()    != null) wFieldName.setText( jobEntry.getFieldName() );
	if (jobEntry.getVariableName() != null) wVariableName.setText( jobEntry.getVariableName() );
	
	wFieldType.setText(JobEntrySimpleEval.getFieldTypeDesc(jobEntry.fieldtype));
	if (jobEntry.getMask()!= null) wMask.setText( jobEntry.getMask() );
	if (jobEntry.getCompareValue()!= null) wCompareValue.setText( jobEntry.getCompareValue() );
	if (jobEntry.getMinValue()!= null) wMinValue.setText( jobEntry.getMinValue() );
	if (jobEntry.getMaxValue()!= null) wMaxValue.setText( jobEntry.getMaxValue() );
	wSuccessCondition.setText(JobEntrySimpleEval.getSuccessConditionDesc(jobEntry.successcondition));
	wSuccessNumberCondition.setText(JobEntrySimpleEval.getSuccessNumberConditionDesc(jobEntry.successnumbercondition));
	
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:JobEntrySimpleEvalDialog.java


示例2: ok

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
private void ok()
{

      if(Const.isEmpty(wName.getText())) 
       {
		MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
		mb.setMessage(Messages.getString("System.StepJobEntryNameMissing.Title"));
		mb.setText(Messages.getString("System.JobEntryNameMissing.Msg"));
		mb.open(); 
		return;
       }
	jobEntry.setName(wName.getText());
	
	jobEntry.valuetype=  JobEntrySimpleEval.getValueTypeByDesc(wValueType.getText());
	jobEntry.setFieldName(wFieldName.getText());
	jobEntry.setVariableName(wVariableName.getText());
	
	jobEntry.fieldtype=  JobEntrySimpleEval.getFieldTypeByDesc(wFieldType.getText());
	jobEntry.setMask(wMask.getText());
	jobEntry.setCompareValue(wCompareValue.getText());
	jobEntry.setMinValue(wMinValue.getText());
	jobEntry.setMaxValue(wMaxValue.getText());
	jobEntry.successcondition=  JobEntrySimpleEval.getSuccessConditionByDesc(wSuccessCondition.getText());
	jobEntry.successnumbercondition=  JobEntrySimpleEval.getSuccessNumberConditionByDesc(wSuccessNumberCondition.getText());
	dispose();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:27,代码来源:JobEntrySimpleEvalDialog.java


示例3: JobEntryEvalFilesMetrics

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public JobEntryEvalFilesMetrics(String n)
{
	super(n, "");
	source_filefolder=null;
	wildcard=null;
	includeSubFolders=null;
	scale = SCALE_BYTES;
	sourceFiles = SOURCE_FILES_FILES;
	evaluationType = EVALUATE_TYPE_SIZE;
	successnumbercondition = JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_GREATER;
	resultFilenamesWildcard=null;
	ResultFieldFile=null;
	ResultFieldWildcard=null;
	ResultFieldIncludesubFolders=null;
	setID(-1L);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:JobEntryEvalFilesMetrics.java


示例4: getData

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData()
{
	if (jobEntry.getName()    != null) wName.setText( jobEntry.getName() );
	wName.selectAll();
	wValueType.setText(JobEntrySimpleEval.getValueTypeDesc(jobEntry.valuetype));
	if (jobEntry.getFieldName()    != null) wFieldName.setText( jobEntry.getFieldName() );
	if (jobEntry.getVariableName() != null) wVariableName.setText( jobEntry.getVariableName() );
	wSuccessWhenSet.setSelection(jobEntry.isSuccessWhenVarSet());
	wFieldType.setText(JobEntrySimpleEval.getFieldTypeDesc(jobEntry.fieldtype));
	if (jobEntry.getMask()!= null) wMask.setText( jobEntry.getMask() );
	if (jobEntry.getCompareValue()!= null) wCompareValue.setText( jobEntry.getCompareValue() );
	if (jobEntry.getMinValue()!= null) wMinValue.setText( jobEntry.getMinValue() );
	if (jobEntry.getMaxValue()!= null) wMaxValue.setText( jobEntry.getMaxValue() );
	wSuccessCondition.setText(JobEntrySimpleEval.getSuccessConditionDesc(jobEntry.successcondition));
	wSuccessNumberCondition.setText(JobEntrySimpleEval.getSuccessNumberConditionDesc(jobEntry.successnumbercondition));
	wSuccessBooleanCondition.setText(JobEntrySimpleEval.getSuccessBooleanConditionDesc(jobEntry.successbooleancondition));
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:JobEntrySimpleEvalDialog.java


示例5: createAttributeValidatorsMap

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
@Override
protected Map<String, FieldLoadSaveValidator<?>> createAttributeValidatorsMap() {
  Map<String, FieldLoadSaveValidator<?>> validators = new HashMap<String, FieldLoadSaveValidator<?>>();
  int sourceFileCount = new Random().nextInt( 50 ) + 1;
  validators.put( "sourceFileFolder", new ArrayLoadSaveValidator<String>(
    new StringLoadSaveValidator(), sourceFileCount ) );
  validators.put( "sourceWildcard", new ArrayLoadSaveValidator<String>(
    new StringLoadSaveValidator(), sourceFileCount ) );
  validators.put( "sourceIncludeSubfolders", new ArrayLoadSaveValidator<String>(
    new StringLoadSaveValidator(), sourceFileCount ) );
  validators.put( "successConditionType",
    new IntLoadSaveValidator( JobEntrySimpleEval.successNumberConditionCode.length ) );
  validators.put( "sourceFiles",
    new IntLoadSaveValidator( JobEntryEvalFilesMetrics.SourceFilesCodes.length ) );
  validators.put( "evaluationType",
    new IntLoadSaveValidator( JobEntryEvalFilesMetrics.EvaluationTypeCodes.length ) );
  validators.put( "scale",
    new IntLoadSaveValidator( JobEntryEvalFilesMetrics.scaleCodes.length ) );

  return validators;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JobEntryEvalFilesMetricsLoadSaveTest.java


示例6: getXML

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public String getXML()
{
	StringBuffer retval = new StringBuffer(300);
	
	retval.append(super.getXML());		
	retval.append("      ").append(XMLHandler.addTagValue("result_filenames_wildcard",  resultFilenamesWildcard));
	retval.append("      ").append(XMLHandler.addTagValue("Result_field_file",  ResultFieldFile));
	retval.append("      ").append(XMLHandler.addTagValue("Result_field_wildcard",  ResultFieldWildcard));
	retval.append("      ").append(XMLHandler.addTagValue("Result_field_includesubfolders",  ResultFieldIncludesubFolders));
	
	retval.append("      <fields>").append(Const.CR);
	if (source_filefolder!=null)
	{
		for (int i=0;i<source_filefolder.length;i++)
		{
			retval.append("        <field>").append(Const.CR);
			retval.append("          ").append(XMLHandler.addTagValue("source_filefolder",     source_filefolder[i]));
			retval.append("          ").append(XMLHandler.addTagValue("wildcard", wildcard[i]));
			retval.append("          ").append(XMLHandler.addTagValue("include_subFolders", includeSubFolders[i]));
			retval.append("        </field>").append(Const.CR);
		}
	}
	retval.append("      </fields>").append(Const.CR);
	retval.append("      ").append(XMLHandler.addTagValue("comparevalue", comparevalue));
	retval.append("      ").append(XMLHandler.addTagValue("minvalue", minvalue));
	retval.append("      ").append(XMLHandler.addTagValue("maxvalue", maxvalue));
	retval.append("      ").append(XMLHandler.addTagValue("successnumbercondition",JobEntrySimpleEval.getSuccessNumberConditionCode(successnumbercondition)));
	retval.append("      ").append(XMLHandler.addTagValue("source_files",getSourceFilesCode(sourceFiles)));
	retval.append("      ").append(XMLHandler.addTagValue("evaluation_type",getEvaluationTypeCode(evaluationType)));
	retval.append("      ").append(XMLHandler.addTagValue("scale",getScaleCode(scale)));
	return retval.toString();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:33,代码来源:JobEntryEvalFilesMetrics.java


示例7: loadXML

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException
  {
	try
	{
		super.loadXML(entrynode, databases, slaveServers);
		
		Node fields = XMLHandler.getSubNode(entrynode, "fields");
		
		// How many field arguments?
		int nrFields = XMLHandler.countNodes(fields, "field");	
		source_filefolder = new String[nrFields];
		wildcard = new String[nrFields];
		includeSubFolders = new String[nrFields];
		// Read them all...
		for (int i = 0; i < nrFields; i++)
		{
			Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
			
			source_filefolder[i] = XMLHandler.getTagValue(fnode, "source_filefolder");
			wildcard[i] = XMLHandler.getTagValue(fnode, "wildcard");
			includeSubFolders[i] = XMLHandler.getTagValue(fnode, "include_subFolders");
		}
		
		resultFilenamesWildcard          = XMLHandler.getTagValue(entrynode, "result_filenames_wildcard");
		ResultFieldFile          = XMLHandler.getTagValue(entrynode, "result_field_file");
		ResultFieldWildcard          = XMLHandler.getTagValue(entrynode, "result_field_wildcard");
		ResultFieldIncludesubFolders          = XMLHandler.getTagValue(entrynode, "result_field_includesubfolders");
		comparevalue          = XMLHandler.getTagValue(entrynode, "comparevalue");
		minvalue          = XMLHandler.getTagValue(entrynode, "minvalue");
		maxvalue          = XMLHandler.getTagValue(entrynode, "maxvalue");
		successnumbercondition = JobEntrySimpleEval.getSuccessNumberConditionByCode(Const.NVL(XMLHandler.getTagValue(entrynode,	"successnumbercondition"), ""));
		sourceFiles =getSourceFilesByCode(Const.NVL(XMLHandler.getTagValue(entrynode,	"source_files"), ""));
		evaluationType =getEvaluationTypeByCode(Const.NVL(XMLHandler.getTagValue(entrynode,	"evaluation_type"), ""));
		scale =getScaleByCode(Const.NVL(XMLHandler.getTagValue(entrynode,	"scale"), ""));
	}
	catch(KettleXMLException xe)
	{
		throw new KettleXMLException(BaseMessages.getString(PKG, "JobEvalFilesMetrics.Error.Exception.UnableLoadXML"), xe);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:41,代码来源:JobEntryEvalFilesMetrics.java


示例8: loadRep

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public void loadRep(Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException
{
  try
  {
		// How many arguments?
		int argnr = rep.countNrJobEntryAttributes(id_jobentry, "source_filefolder");
		source_filefolder = new String[argnr];
		wildcard = new String[argnr];
		includeSubFolders = new String[argnr];
		// Read them all...
		for (int a=0;a<argnr;a++) 
		{
			source_filefolder[a]= rep.getJobEntryAttributeString(id_jobentry, a, "source_filefolder");
			wildcard[a]= rep.getJobEntryAttributeString(id_jobentry, a, "wildcard");
			includeSubFolders[a]= rep.getJobEntryAttributeString(id_jobentry, a, "include_subFolders");
		}
		
		resultFilenamesWildcard  = rep.getJobEntryAttributeString(id_jobentry, "result_filenames_wildcard");
		ResultFieldFile  = rep.getJobEntryAttributeString(id_jobentry, "result_field_file");
		ResultFieldWildcard  = rep.getJobEntryAttributeString(id_jobentry, "result_field_wildcard");
		ResultFieldIncludesubFolders  = rep.getJobEntryAttributeString(id_jobentry, "result_field_includesubfolders");
		comparevalue  = rep.getJobEntryAttributeString(id_jobentry, "comparevalue");
		minvalue  = rep.getJobEntryAttributeString(id_jobentry, "minvalue");
		maxvalue  = rep.getJobEntryAttributeString(id_jobentry, "maxvalue");
		successnumbercondition = JobEntrySimpleEval.getSuccessNumberConditionByCode(Const.NVL(rep.getJobEntryAttributeString(id_jobentry,"successnumbercondition"), ""));
		sourceFiles = getSourceFilesByCode(Const.NVL(rep.getJobEntryAttributeString(id_jobentry,"source_files"), ""));
		evaluationType = getEvaluationTypeByCode(Const.NVL(rep.getJobEntryAttributeString(id_jobentry,"evaluation_type"), ""));
		scale = getScaleByCode(Const.NVL(rep.getJobEntryAttributeString(id_jobentry,"scale"), ""));
	}
	catch(KettleException dbe)
	{
		
		throw new KettleException(BaseMessages.getString(PKG, "JobEvalFilesMetrics.Error.Exception.UnableLoadRep")+id_jobentry, dbe);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:JobEntryEvalFilesMetrics.java


示例9: saveRep

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public void saveRep(Repository rep, ObjectId id_job) throws KettleException
{
	try
	{
		
		// save the arguments...
		if (source_filefolder!=null)
		{
			for (int i=0;i<source_filefolder.length;i++) 
			{
				rep.saveJobEntryAttribute(id_job, getObjectId(), i, "source_filefolder",     source_filefolder[i]);
				rep.saveJobEntryAttribute(id_job, getObjectId(), i, "wildcard", wildcard[i]);
				rep.saveJobEntryAttribute(id_job, getObjectId(), i, "include_subFolders", includeSubFolders[i]);
			}
		}
		
		rep.saveJobEntryAttribute(id_job, getObjectId(), "result_filenames_wildcard",  resultFilenamesWildcard);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "result_field_file",  ResultFieldFile);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "result_field_wild",  ResultFieldWildcard);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "result_field_includesubfolders",  ResultFieldIncludesubFolders);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "comparevalue",  comparevalue);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "minvalue",  minvalue);
		rep.saveJobEntryAttribute(id_job, getObjectId(), "maxvalue",  maxvalue);
		rep.saveJobEntryAttribute(id_job, getObjectId(),"successnumbercondition", JobEntrySimpleEval.getSuccessNumberConditionCode(successnumbercondition));
		rep.saveJobEntryAttribute(id_job, getObjectId(),"scale", getScaleCode(scale));
		rep.saveJobEntryAttribute(id_job, getObjectId(),"source_files", getSourceFilesCode(sourceFiles));
		rep.saveJobEntryAttribute(id_job, getObjectId(),"evaluation_type", getEvaluationTypeCode(evaluationType));
	}
	catch(KettleDatabaseException dbe)
	{
		throw new KettleException(BaseMessages.getString(PKG, "JobEvalFilesMetrics.Error.Exception.UnableSaveRep")+id_job, dbe);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:34,代码来源:JobEntryEvalFilesMetrics.java


示例10: isSuccess

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
private boolean isSuccess() {
	boolean retval=false;
	
	switch (successnumbercondition) {
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_EQUAL: // equal
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));					
			retval=(getEvaluationValue().compareTo(compareValue)==0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_DIFFERENT: // different
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));
			retval=(getEvaluationValue().compareTo(compareValue)!=0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_SMALLER: // smaller
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));
			retval=(getEvaluationValue().compareTo(compareValue)<0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_SMALLER_EQUAL: // smaller or equal
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));
			retval=(getEvaluationValue().compareTo(compareValue)<=0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_GREATER: // greater
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));
			retval=(getEvaluationValue().compareTo(compareValue)>0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_GREATER_EQUAL: // greater or equal
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValue",String.valueOf(evaluationValue),String.valueOf(compareValue)));
			retval=(getEvaluationValue().compareTo(compareValue)>=0);
		break;
		case JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_BETWEEN: // between min and max
			if(isDebug()) logDebug( BaseMessages.getString(PKG, "JobEvalFilesMetrics.Log.CompareWithValues",String.valueOf(evaluationValue), String.valueOf(minValue),String.valueOf(maxValue)));
			retval=(getEvaluationValue().compareTo(minValue)>=0 && getEvaluationValue().compareTo(maxValue)<=0);
		break;
		default:
		break;
	}
	
	return retval;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:39,代码来源:JobEntryEvalFilesMetrics.java


示例11: initMetrics

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
private void initMetrics() throws Exception {
	evaluationValue=new BigDecimal(0);
	filesCount=new BigDecimal(0);
	nrErrors=0;

	if(successnumbercondition==JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_BETWEEN) {
		minValue= new BigDecimal(environmentSubstitute(getMinValue()));
		maxValue= new BigDecimal(environmentSubstitute(getMaxValue()));
	}else {
		compareValue= new BigDecimal(environmentSubstitute(getCompareValue()));
	}
	
	if(evaluationType== EVALUATE_TYPE_SIZE) {
		int multyply=1;
		switch (getScale()){
			case SCALE_KBYTES: 				
				multyply=1024;
			break;
			case SCALE_MBYTES:
				multyply=1048576;
			break;
			case SCALE_GBYTES:
				multyply=1073741824;
			break;
			default:
			break;
		}

		if(successnumbercondition==JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_BETWEEN) {
			minValue=minValue.multiply(BigDecimal.valueOf(multyply));
			maxValue=maxValue.multiply(BigDecimal.valueOf(multyply));
		}else {
			compareValue=compareValue.multiply(BigDecimal.valueOf(multyply));
		}
	}
	arg_from_previous= (getSourceFiles()== SOURCE_FILES_PREVIOUS_RESULT);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:JobEntryEvalFilesMetrics.java


示例12: ok

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
private void ok()
{

      if(Const.isEmpty(wName.getText())) 
       {
		MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
		mb.setMessage(BaseMessages.getString(PKG, "System.StepJobEntryNameMissing.Title"));
		mb.setText(BaseMessages.getString(PKG, "System.JobEntryNameMissing.Msg"));
		mb.open(); 
		return;
       }
	jobEntry.setName(wName.getText());
	
	jobEntry.valuetype=  JobEntrySimpleEval.getValueTypeByDesc(wValueType.getText());
	jobEntry.setFieldName(wFieldName.getText());
	jobEntry.setVariableName(wVariableName.getText());
	
	jobEntry.fieldtype=  JobEntrySimpleEval.getFieldTypeByDesc(wFieldType.getText());
	jobEntry.setMask(wMask.getText());
	jobEntry.setCompareValue(wCompareValue.getText());
	jobEntry.setMinValue(wMinValue.getText());
	jobEntry.setMaxValue(wMaxValue.getText());
	jobEntry.successcondition=  JobEntrySimpleEval.getSuccessConditionByDesc(wSuccessCondition.getText());
	jobEntry.successnumbercondition=  JobEntrySimpleEval.getSuccessNumberConditionByDesc(wSuccessNumberCondition.getText());
	jobEntry.successbooleancondition=  JobEntrySimpleEval.getSuccessBooleanConditionByDesc(wSuccessBooleanCondition.getText());
	jobEntry.setSuccessWhenVarSet(wSuccessWhenSet.getSelection());
	dispose();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:JobEntrySimpleEvalDialog.java


示例13: getData

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData()
{
	if (jobEntry.getName()!= null) wName.setText( jobEntry.getName() );
	wName.selectAll();
	
	if (jobEntry.source_filefolder != null)
	{
		for (int i = 0; i < jobEntry.source_filefolder.length; i++)
		{
			TableItem ti = wFields.table.getItem(i);
			if (jobEntry.source_filefolder[i] != null)
				ti.setText(1, jobEntry.source_filefolder[i]);

			if (jobEntry.wildcard[i] != null)
				ti.setText(2, jobEntry.wildcard[i]);
			
			if (jobEntry.includeSubFolders[i] != null)
				ti.setText(3, JobEntryEvalFilesMetrics.getIncludeSubFoldersDesc(jobEntry.includeSubFolders[i]));
		}
		wFields.setRowNums();
		wFields.optWidth(true);
	}
	if (jobEntry.getResultFilenamesWildcard()!= null) wResultFilenamesWildcard.setText( jobEntry.getResultFilenamesWildcard() );
	if (jobEntry.getResultFieldFile()!= null) wResultFieldFile.setText( jobEntry.getResultFieldFile());
	if (jobEntry.getResultFieldWildcard()!= null) wResultFieldWildcard.setText( jobEntry.getResultFieldWildcard());
	if (jobEntry.getResultFieldIncludeSubfolders()!= null) wResultFieldIncludeSubFolders.setText( jobEntry.getResultFieldIncludeSubfolders());
	wSourceFiles.setText(JobEntryEvalFilesMetrics.getSourceFilesDesc(jobEntry.sourceFiles));
	wEvaluationType.setText(JobEntryEvalFilesMetrics.getEvaluationTypeDesc(jobEntry.evaluationType));
	wScale.setText(JobEntryEvalFilesMetrics.getScaleDesc(jobEntry.scale));
	wSuccessNumberCondition.setText(JobEntrySimpleEval.getSuccessNumberConditionDesc(jobEntry.successnumbercondition));
	if (jobEntry.getCompareValue()!= null) wCompareValue.setText( jobEntry.getCompareValue() );
	if (jobEntry.getMinValue()!= null) wMinValue.setText( jobEntry.getMinValue() );
	if (jobEntry.getMaxValue()!= null) wMaxValue.setText( jobEntry.getMaxValue() );
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:JobEntryEvalFilesMetricsDialog.java


示例14: refresh

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
private void refresh()
{
	 boolean compareValue= (JobEntrySimpleEval.getSuccessNumberConditionByDesc(wSuccessNumberCondition.getText())
			 !=JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_BETWEEN);
	 wlCompareValue.setVisible(compareValue);
	 wCompareValue.setVisible(compareValue);
	 wlMinValue.setVisible(!compareValue);
	 wMinValue.setVisible(!compareValue);
	 wlMaxValue.setVisible(!compareValue);
	 wMaxValue.setVisible(!compareValue);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:12,代码来源:JobEntryEvalFilesMetricsDialog.java


示例15: JobEntryEvalFilesMetrics

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public JobEntryEvalFilesMetrics( String n ) {
  super( n, "" );
  sourceFileFolder = null;
  sourceWildcard = null;
  sourceIncludeSubfolders = null;
  scale = SCALE_BYTES;
  sourceFiles = SOURCE_FILES_FILES;
  evaluationType = EVALUATE_TYPE_SIZE;
  successConditionType = JobEntrySimpleEval.SUCCESS_NUMBER_CONDITION_GREATER;
  resultFilenamesWildcard = null;
  ResultFieldFile = null;
  ResultFieldWildcard = null;
  ResultFieldIncludesubFolders = null;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:JobEntryEvalFilesMetrics.java


示例16: getXML

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public String getXML() {
  StringBuilder retval = new StringBuilder( 300 );

  retval.append( super.getXML() );
  retval.append( "      " ).append(
    XMLHandler.addTagValue( "result_filenames_wildcard", resultFilenamesWildcard ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "Result_field_file", ResultFieldFile ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "Result_field_wildcard", ResultFieldWildcard ) );
  retval.append( "      " ).append(
    XMLHandler.addTagValue( "Result_field_includesubfolders", ResultFieldIncludesubFolders ) );

  retval.append( "      <fields>" ).append( Const.CR );
  if ( sourceFileFolder != null ) {
    for ( int i = 0; i < sourceFileFolder.length; i++ ) {
      retval.append( "        <field>" ).append( Const.CR );
      retval.append( "          " ).append( XMLHandler.addTagValue( "source_filefolder", sourceFileFolder[i] ) );
      retval.append( "          " ).append( XMLHandler.addTagValue( "wildcard", sourceWildcard[i] ) );
      retval
        .append( "          " ).append( XMLHandler.addTagValue( "include_subFolders", sourceIncludeSubfolders[i] ) );
      retval.append( "        </field>" ).append( Const.CR );
      if ( parentJobMeta != null ) {
        parentJobMeta.getNamedClusterEmbedManager().registerUrl( sourceFileFolder[i] );
      }
    }
  }
  retval.append( "      </fields>" ).append( Const.CR );
  retval.append( "      " ).append( XMLHandler.addTagValue( "comparevalue", comparevalue ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "minvalue", minvalue ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "maxvalue", maxvalue ) );
  retval.append( "      " ).append(
    XMLHandler.addTagValue( "successnumbercondition", JobEntrySimpleEval
      .getSuccessNumberConditionCode( successConditionType ) ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "source_files", getSourceFilesCode( sourceFiles ) ) );
  retval.append( "      " ).append(
    XMLHandler.addTagValue( "evaluation_type", getEvaluationTypeCode( evaluationType ) ) );
  retval.append( "      " ).append( XMLHandler.addTagValue( "scale", getScaleCode( scale ) ) );
  return retval.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:39,代码来源:JobEntryEvalFilesMetrics.java


示例17: loadXML

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
  Repository rep, IMetaStore metaStore ) throws KettleXMLException {
  try {
    super.loadXML( entrynode, databases, slaveServers );

    Node fields = XMLHandler.getSubNode( entrynode, "fields" );

    // How many field arguments?
    int nrFields = XMLHandler.countNodes( fields, "field" );
    allocate( nrFields );

    // Read them all...
    for ( int i = 0; i < nrFields; i++ ) {
      Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );

      sourceFileFolder[i] = XMLHandler.getTagValue( fnode, "source_filefolder" );
      sourceWildcard[i] = XMLHandler.getTagValue( fnode, "wildcard" );
      sourceIncludeSubfolders[i] = XMLHandler.getTagValue( fnode, "include_subFolders" );
    }

    resultFilenamesWildcard = XMLHandler.getTagValue( entrynode, "result_filenames_wildcard" );
    ResultFieldFile = XMLHandler.getTagValue( entrynode, "result_field_file" );
    ResultFieldWildcard = XMLHandler.getTagValue( entrynode, "result_field_wildcard" );
    ResultFieldIncludesubFolders = XMLHandler.getTagValue( entrynode, "result_field_includesubfolders" );
    comparevalue = XMLHandler.getTagValue( entrynode, "comparevalue" );
    minvalue = XMLHandler.getTagValue( entrynode, "minvalue" );
    maxvalue = XMLHandler.getTagValue( entrynode, "maxvalue" );
    successConditionType =
      JobEntrySimpleEval.getSuccessNumberConditionByCode( Const.NVL( XMLHandler.getTagValue(
        entrynode, "successnumbercondition" ), "" ) );
    sourceFiles = getSourceFilesByCode( Const.NVL( XMLHandler.getTagValue( entrynode, "source_files" ), "" ) );
    evaluationType =
      getEvaluationTypeByCode( Const.NVL( XMLHandler.getTagValue( entrynode, "evaluation_type" ), "" ) );
    scale = getScaleByCode( Const.NVL( XMLHandler.getTagValue( entrynode, "scale" ), "" ) );
  } catch ( KettleXMLException xe ) {
    throw new KettleXMLException( BaseMessages.getString(
      PKG, "JobEvalFilesMetrics.Error.Exception.UnableLoadXML" ), xe );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:JobEntryEvalFilesMetrics.java


示例18: loadRep

import org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval; //导入依赖的package包/类
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
  List<SlaveServer> slaveServers ) throws KettleException {
  try {
    // How many arguments?
    int argnr = rep.countNrJobEntryAttributes( id_jobentry, "source_filefolder" );
    allocate( argnr );

    // Read them all...
    for ( int a = 0; a < argnr; a++ ) {
      sourceFileFolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, "source_filefolder" );
      sourceWildcard[a] = rep.getJobEntryAttributeString( id_jobentry, a, "wildcard" );
      sourceIncludeSubfolders[a] = rep.getJobEntryAttributeString( id_jobentry, a, "include_subFolders" );
    }

    resultFilenamesWildcard = rep.getJobEntryAttributeString( id_jobentry, "result_filenames_wildcard" );
    ResultFieldFile = rep.getJobEntryAttributeString( id_jobentry, "result_field_file" );
    ResultFieldWildcard = rep.getJobEntryAttributeString( id_jobentry, "result_field_wild" );
    ResultFieldIncludesubFolders =
      rep.getJobEntryAttributeString( id_jobentry, "result_field_includesubfolders" );
    comparevalue = rep.getJobEntryAttributeString( id_jobentry, "comparevalue" );
    minvalue = rep.getJobEntryAttributeString( id_jobentry, "minvalue" );
    maxvalue = rep.getJobEntryAttributeString( id_jobentry, "maxvalue" );
    successConditionType =
      JobEntrySimpleEval.getSuccessNumberConditionByCode( Const.NVL( rep.getJobEntryAttributeString(
        id_jobentry, "successnumbercondition" ), "" ) );
    sourceFiles =
      getSourceFilesByCode( Const.NVL( rep.getJobEntryAttributeString( id_jobentry, "source_files" ), "" ) );
    evaluationType =
      getEvaluationTypeByCode( Const
        .NVL( rep.getJobEntryAttributeString( id_jobentry, "evaluation_type" ), "" ) );
    scale = getScaleByCode( Const.NVL( rep.getJobEntryAttributeString( id_jobentry, "scale" ), "" ) );
  } catch ( KettleException dbe ) {

    throw new KettleException( BaseMessages.getString( PKG, "JobEvalFilesMetrics.Error.Exception.UnableLoadRep" )
      + id_jobentry, dbe );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:38,代码来源:JobEntryEvalFilesMetrics.java



注:本文中的org.pentaho.di.job.entries.simpleeval.JobEntrySimpleEval类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HibernateAccessor类代码示例发布时间:2022-05-22
下一篇:
Java Request类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap