當前位置: 首頁>>代碼示例>>Java>>正文


Java StepMetaInterface.getFields方法代碼示例

本文整理匯總了Java中org.pentaho.di.trans.step.StepMetaInterface.getFields方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMetaInterface.getFields方法的具體用法?Java StepMetaInterface.getFields怎麽用?Java StepMetaInterface.getFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.trans.step.StepMetaInterface的用法示例。


在下文中一共展示了StepMetaInterface.getFields方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
	if (data.resultFilesList == null || getLinesRead() >= data.resultFilesList.size())
	{
		setOutputDone();
		return false;
	}

	ResultFile resultFile = (ResultFile) data.resultFilesList.get((int) getLinesRead());
	RowMetaAndData r = resultFile.getRow();
	
	data.outputRowMeta = r.getRowMeta();
	
	smi.getFields(data.outputRowMeta, getStepname(), null, null, this);
	incrementLinesRead();

	putRow(data.outputRowMeta, r.getData()); // copy row to possible alternate
									// rowset(s).

	if (checkFeedback(getLinesRead()))
		logBasic(Messages.getString("FilesFromResult.Log.LineNumber") + getLinesRead()); //$NON-NLS-1$

	return true;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:25,代碼來源:FilesFromResult.java

示例2: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
	if (data.resultFilesList == null || getLinesRead() >= data.resultFilesList.size())
	{
		setOutputDone();
		return false;
	}

	ResultFile resultFile = (ResultFile) data.resultFilesList.get((int) getLinesRead());
	RowMetaAndData r = resultFile.getRow();

	if (first) {
		first=false;
		data.outputRowMeta = new RowMeta();
		smi.getFields(data.outputRowMeta, getStepname(), null, null, this);
	}
	incrementLinesRead();

	putRow(data.outputRowMeta, r.getData()); // copy row to possible alternate
									// rowset(s).

	if (checkFeedback(getLinesRead()))
		logBasic(BaseMessages.getString(PKG, "FilesFromResult.Log.LineNumber") + getLinesRead()); //$NON-NLS-1$

	return true;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:27,代碼來源:FilesFromResult.java

示例3: processRow

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {

    if ( !isStopped() ) {

      if ( first ) {
        first = false;

        if ( ( (MQTTSubscriberData) sdi ).m_executionDuration > 0 ) {
          ( (MQTTSubscriberData) sdi ).m_startTime = new Date();
        }

        ( (MQTTSubscriberData) sdi ).m_outputRowMeta = new RowMeta();

        smi.getFields( ( (MQTTSubscriberData) sdi ).m_outputRowMeta, getStepname(), null, null, getTransMeta(), null,
            null );
      }

      if ( m_reconnectFailed ) {
        logError( BaseMessages.getString( MQTTPublisherMeta.PKG, "MQTTClientStep.Error.ReconnectFailed" ) );
        setStopped( true );
        return false;
      }

      if ( ( (MQTTSubscriberData) sdi ).m_executionDuration > 0 ) {
        if ( System.currentTimeMillis() - ( (MQTTSubscriberData) sdi ).m_startTime.getTime()
            > ( (MQTTSubscriberData) sdi ).m_executionDuration * 1000 ) {
          setOutputDone();
          return false;
        }
      }

      return true;
    } else {
      setStopped( true );
      return false;
    }
  }
 
開發者ID:pentaho-labs,項目名稱:pentaho-mqtt-plugin,代碼行數:38,代碼來源:MQTTSubscriber.java

示例4: getThisStepFields

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * Returns the fields that are emitted by a step
 *
 * @param stepMeta : The StepMeta object that's being queried
 * @param nextStep : if non-null this is the next step that's call back to ask what's being sent
 * @param row : A row containing the input fields or an empty row if no input is required.
 *
 * @return A Row containing the output fields.
 */
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
    // Then this one.
	if(log.isDebug()) log.logDebug(BaseMessages.getString(PKG, "TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
    String name = stepMeta.getName();

    if (monitor != null)
    {
        monitor.subTask(BaseMessages.getString(PKG, "TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
    }

    StepMetaInterface stepint = stepMeta.getStepMetaInterface();
    RowMetaInterface inform[] = null;
    StepMeta[] lu = getInfoStep(stepMeta);
    if (Const.isEmpty(lu))
    {
        inform = new RowMetaInterface[] { stepint.getTableFields(), };
    }
    else
    {
        inform = new RowMetaInterface[lu.length];
        for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
    }

    setRepositoryOnMappingSteps();
    
    // Go get the fields...
    //
    stepint.getFields(row, name, inform, nextStep, this);

    return row;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:42,代碼來源:TransMeta.java

示例5: getThisStepFields

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * Returns the fields that are emitted by a step
 *
 * @param stepMeta : The StepMeta object that's being queried
 * @param nextStep : if non-null this is the next step that's call back to ask what's being sent
 * @param row : A row containing the input fields or an empty row if no input is required.
 *
 * @return A Row containing the output fields.
 */
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
    // Then this one.
	if(log.isDebug()) log.logDebug(toString(), Messages.getString("TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
    String name = stepMeta.getName();

    if (monitor != null)
    {
        monitor.subTask(Messages.getString("TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
    }

    StepMetaInterface stepint = stepMeta.getStepMetaInterface();
    RowMetaInterface inform[] = null;
    StepMeta[] lu = getInfoStep(stepMeta);
    if (Const.isEmpty(lu))
    {
        inform = new RowMetaInterface[] { stepint.getTableFields(), };
    }
    else
    {
        inform = new RowMetaInterface[lu.length];
        for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
    }

    // Set the Repository object on the Mapping step
    // That way the mapping step can determine the output fields for repository hosted mappings...
    // This is the exception to the rule so we don't pass this through the getFields() method.
    //
    for (StepMeta step : steps)
    {
    	if (step.getStepMetaInterface() instanceof MappingMeta) 
    	{
    		((MappingMeta)step.getStepMetaInterface()).setRepository(repository);
    	}
    }
    
    // Go get the fields...
    //
    stepint.getFields(row, name, inform, nextStep, this);

    return row;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:52,代碼來源:TransMeta.java


注:本文中的org.pentaho.di.trans.step.StepMetaInterface.getFields方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。