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


Java RowMetaInterface.clear方法代碼示例

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


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

示例1: prepareExecutionResultsArticle

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
private void prepareExecutionResultsArticle( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleTitleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleBodyFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuthorIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCommentsDisabledFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLabelsFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDraftFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPromotedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getVoteSumFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getVoteCountFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:22,代碼來源:ZendeskInputHCArticleMeta.java

示例2: prepareExecutionResultsTranslation

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
private void prepareExecutionResultsTranslation( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationSourceIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationSourceTypeFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationTitleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationBodyFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationDraftFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUpdatedByIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationCreatedByIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:19,代碼來源:ZendeskInputHCArticleMeta.java

示例3: prepareExecutionResultsTicketOverview

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
private void prepareExecutionResultsTicketOverview( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, getTicketIdFieldname(), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuditIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuditRownumFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedTimeFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOrganizationIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getRequesterIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAssigneeIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getGroupIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSubjectFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getStatusFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPriorityFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getChannelFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTypeFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSatisfactionFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDueAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSatisfactionCommentFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getFormIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getBrandIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:23,代碼來源:ZendeskInputTicketAuditMeta.java

示例4: determineInputFieldScriptFieldSplit

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
/**
 * Given a fully defined output row metadata structure, determine which of the output fields are being copied from
 * the input fields and which must be the output of the script.
 *
 * @param fullOutputRowMeta    the fully defined output row metadata structure
 * @param scriptFields         row meta that will hold script only fields
 * @param inputPresentInOutput row meta that will hold input fields being copied
 * @param infos                the array of info row metas
 * @param stepName             the name of the step
 */
protected void determineInputFieldScriptFieldSplit( RowMetaInterface fullOutputRowMeta, RowMetaInterface scriptFields,
    RowMetaInterface inputPresentInOutput, RowMetaInterface[] infos, String stepName ) {

  scriptFields.clear();
  inputPresentInOutput.clear();
  RowMetaInterface consolidatedInputFields = new RowMeta();
  for ( RowMetaInterface r : infos ) {
    consolidatedInputFields.addRowMeta( r );
  }

  for ( ValueMetaInterface vm : fullOutputRowMeta.getValueMetaList() ) {
    int index = consolidatedInputFields.indexOfValue( vm.getName() );
    if ( index >= 0 ) {
      inputPresentInOutput.addValueMeta( vm );
    } else {
      // must be a script output (either a variable name field or data frame column name
      scriptFields.addValueMeta( vm );
    }
  }
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-cpython-plugin,代碼行數:31,代碼來源:CPythonScriptExecutorMeta.java

示例5: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
   public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException {   	
   	if (info!=null && isPassingThruFields() && isFileNameInField){
           boolean found=false;
           for (int i=0;i<info.length && !found;i++){
               if (info[i]!=null){
                   row.mergeRowMeta(info[i]);
                   found=true;
               }
           }
       }
   	if (!isFileNameInField()){
       	FileInputList fileList = getFileList(space);
           if (fileList.nrOfFiles()==0)           
               throw new KettleStepException(Messages.getString("KMLFileInputMeta.Exception.NoFilesFoundToProcess")); //$NON-NLS-1$ 
           
           row.clear();
           row.addRowMeta( getOutputFields(fileList, name));
       }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:21,代碼來源:KMLFileInputMeta.java

示例6: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
public void getFields(RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException 
{
    // Input rows and output rows are different in the webservice step
	//
    if (!isPassingInputData()) 
    {
    	r.clear();
    }

    // Add the output fields...
    //
    for (WebServiceField field : getFieldsOut())
    {
        ValueMetaInterface vValue = new ValueMeta(field.getName(), field.getType());
        
        // If the type is unrecognized we give back the XML as a String...
        //
        if (field.getType()==ValueMetaInterface.TYPE_NONE) {
        	vValue.setType(ValueMetaInterface.TYPE_STRING);
        }
        vValue.setOrigin(name);
        r.addValueMeta(vValue);
    }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:26,代碼來源:WebServiceMeta.java

示例7: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
/**
 * Generates row meta data to represent
 * the fields output by this step
 *
 * @param row the meta data for the output produced
 * @param origin the name of the step to be used as the origin
 * @param info The input rows metadata that enters the step through 
 * the specified channels in the same order as in method getInfoSteps(). 
 * The step metadata can then choose what to do with it: ignore it or not.
 * @param nextStep if this is a non-null value, it's the next step in 
 * the transformation. The one who's asking, the step where the data is 
 * targetted towards.
 * @param space not sure what this is :-)
 * @exception KettleStepException if an error occurs
 */
public void getFields(RowMetaInterface row, 
                      String origin, 
                      RowMetaInterface[] info, 
                      StepMeta nextStep, 
                      VariableSpace space) 
  throws KettleStepException {
  
  row.clear();
  for (int i = 0; i < m_stats.length; i++) {
    UnivariateStatsMetaFunction fn = m_stats[i];

    ValueMetaInterface[] vmis =
      getValueMetas(fn, origin);
    
    for (int j = 0; j < vmis.length; j++) {
      row.addValueMeta(vmis[j]);
    }
  }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:35,代碼來源:UnivariateStatsMeta.java

示例8: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
public void getFields(RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space)
{
	// re-assemble a new row of metadata
	//
   	RowMetaInterface fields = new RowMeta();
   	
   	// Add existing values
   	fields.addRowMeta(r);
       
       
       // add analytic values
       for (int i = 0 ; i < number_of_fields; i ++ ){
       	int index_of_subject = -1;
       	index_of_subject = r.indexOfValue(subjectField[i]);
       	ValueMetaInterface vmi = r.getValueMeta(index_of_subject).clone();
       	vmi.setOrigin(origin);
       	vmi.setName(aggregateField[i]);
       	fields.addValueMeta(r.size() + i, vmi);
       }
       
       r.clear();
       // Add back to Row Meta
       r.addRowMeta(fields);
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:25,代碼來源:AnalyticQueryMeta.java

示例9: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
   public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException {   	
   	if (info!=null && isPassingThruFields() && isFileNameInField){
           boolean found=false;
           for (int i=0;i<info.length && !found;i++){
               if (info[i]!=null){
                   row.mergeRowMeta(info[i]);
                   found=true;
               }
           }
       }
   	if (!isFileNameInField()){
       	FileInputList fileList = getFileList(space);
           if (fileList.nrOfFiles()==0)           
               throw new KettleStepException(Messages.getString("GMLFileInputMeta.Exception.NoFilesFoundToProcess")); //$NON-NLS-1$ 
           
           row.clear();
           row.addRowMeta( getOutputFields(fileList, name));
       }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:21,代碼來源:GMLFileInputMeta.java

示例10: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException {
	if (info!=null && isPassingThruFields() && (isSourceInField || isLayerNameInField)){
           boolean found=false;
           for (int i=0;i<info.length && !found;i++){
               if (info[i]!=null){
                   row.mergeRowMeta(info[i]);
                   found=true;
               }
           }
       }
   	if (!isSourceInField() && !isLayerNameInField()){
   		FileInputList fileList = null;
   		List<String> cnxStrings = null;
   		if(isFileSource){
   			fileList = getFileList(space);
               if (fileList.nrOfFiles()==0)           
                   throw new KettleStepException(Messages.getString("OGRFileInputMeta.Exception.NoFilesFoundToProcess")); //$NON-NLS-1$ 
   		}else
   			cnxStrings = Arrays.asList(source);
   		
   		List<String> layernames = Arrays.asList(layerName);
           row.clear();
           row.addRowMeta( getOutputFields(fileList, cnxStrings,  layernames, name));
       }  
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:27,代碼來源:OGRFileInputMeta.java

示例11: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
public void getFields(RowMetaInterface row, String origin, RowMetaInterface info[], StepMeta nextStep, VariableSpace space) throws KettleStepException {

    // First load some interesting data...
    //
    // Then see which fields get added to the row.
    //
    TransMeta mappingTransMeta = null;
    try {
      mappingTransMeta = loadSingleThreadedTransMeta(this, repository, space);
    } catch (KettleException e) {
      throw new KettleStepException(BaseMessages.getString(PKG, "SingleThreaderMeta.Exception.UnableToLoadMappingTransformation"), e);
    }

    row.clear();

    // Let's keep it simple!
    //
    if (!Const.isEmpty(space.environmentSubstitute(retrieveStep))) {
      RowMetaInterface stepFields = mappingTransMeta.getStepFields(retrieveStep);
      row.addRowMeta(stepFields);
    }
  }
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:23,代碼來源:SingleThreaderMeta.java

示例12: createOutputRowMeta

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
void createOutputRowMeta(RowMetaInterface row, ResultSet rs) {
    row.clear();

    for (ColumnDefinitions.Definition d : rs.getColumnDefinitions()) {
        logDebug(d.getName() + ',' + d.getType().getName() + ',' + d.getType().asFunctionParameterString());

        ValueMetaBase valueMeta = new ValueMetaBase(d.getName(), Utils.convertDataType(d.getType()));
        valueMeta.setTrimType(0);
        row.addValueMeta(valueMeta);
    }
}
 
開發者ID:bcolas,項目名稱:pentaho-cassandra-plugin,代碼行數:12,代碼來源:CassandraInputMeta.java

示例13: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
public void getFields( RowMetaInterface rowMeta, String stepName, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repo, IMetaStore metaStore ) throws KettleStepException {

  rowMeta.clear();
  try {
    rowMeta.addValueMeta( ValueMetaFactory.createValueMeta( "Topic", ValueMetaInterface.TYPE_STRING ) );
    rowMeta.addValueMeta(
        ValueMetaFactory.createValueMeta( "Message", ValueMetaFactory.getIdForValueMeta( getMessageType() ) ) );
  } catch ( KettlePluginException e ) {
    throw new KettleStepException( e );
  }
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-mqtt-plugin,代碼行數:14,代碼來源:MQTTSubscriberMeta.java

示例14: getFields

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
@Override
public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
    if (this.inputRowMeta == null) {
        throw new KettleStepException("Need to do a get fields from parent trans first");
    }
    inputRowMeta.clear();
    inputRowMeta.setValueMetaList(this.inputRowMeta.getValueMetaList());
}
 
開發者ID:brosander,項目名稱:kettle-docker,代碼行數:9,代碼來源:DockerTransInputMeta.java

示例15: prepareExecutionResultsOrganization

import org.pentaho.di.core.row.RowMetaInterface; //導入方法依賴的package包/類
private void prepareExecutionResultsOrganization( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOrganizationIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getExternalIdFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getNameFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDetailsFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getNotesFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getGroupIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSharedTicketsFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSharedCommentsFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:15,代碼來源:ZendeskInputOrganizationsMeta.java


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