当前位置: 首页>>代码示例>>Java>>正文


Java VariableSpace类代码示例

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


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

示例1: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
public void getFields(RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) {
    
    JSONArray transInfo = configInfo.getJSONArray(TRANS_INFO);
    for(JSONObject ti:transInfo.toArray(new JSONObject[]{})){
        //将转换结果赋予新字段的,添加新字段
        if(ti.containsKey(RESULT_LATER)&&StringUtils.isNotBlank(ti.getString(RESULT_LATER))){
            addField(r,ti.getString(TRANS_FIELD)+ti.getString(RESULT_LATER),
                    ValueMeta.TYPE_STRING,ValueMeta.TRIM_TYPE_BOTH,origin,ti.getString(TRANS_FIELD)+"名称");
        }
        if(RULE_TOJSON.equals(ti.getString(TRANS_RULE))){
            //转换为JSON串
            addField(r,ti.getString(TRANS_FIELD),
                    ValueMeta.TYPE_STRING,ValueMeta.TRIM_TYPE_BOTH,origin,ti.getString(TRANS_FIELD));
        }
        if(RULE_TOTXT.equals(ti.getString(TRANS_RULE))){
            //转换为JSON串
            addField(r,ti.getString(TRANS_FIELD),
                    ValueMeta.TYPE_STRING,ValueMeta.TRIM_TYPE_BOTH,origin,ti.getString(TRANS_FIELD));
        }
    }
    if(isHbjl()){
        addField(r,"GROUP_KEY",ValueMeta.TYPE_STRING,ValueMeta.TRIM_TYPE_BOTH,origin,"分组字段拼接出的key");
    }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:25,代码来源:DataTransform.java

示例2: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
/**
 * This method is called to determine the changes the step is making to the row-stream.
 * To that end a RowMetaInterface object is passed in, containing the row-stream structure as it is when entering
 * the step. This method must apply any changes the step makes to the row stream. Usually a step adds fields to the
 * row-stream.
 * 
 * @param inputRowMeta		the row structure coming in to the step
 * @param name 				the name of the step making the changes
 * @param info				row structures of any info steps coming in
 * @param nextStep			the description of a step this step is passing rows to
 * @param space				the variable space for resolving variables
 * @param repository		the repository instance optionally read from
 * @param metaStore			the metaStore to optionally read from
 */
 @Override
public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException{

   for ( int i = 0; i < fields.length; i++ ) {
     int type = fields[i].getType();
     if ( type == ValueMetaInterface.TYPE_NONE) type = ValueMetaInterface.TYPE_STRING;

     try {
       ValueMetaInterface v = ValueMetaFactory.createValueMeta( fields[i].getName(), type );
       v.setConversionMask( fields[i].getFormat() );
       v.setLength( fields[i].getLength() );
       v.setPrecision( fields[i].getPrecision() );
       v.setCurrencySymbol( fields[i].getCurrencySymbol() );
       v.setDecimalSymbol( fields[i].getDecimalSymbol() );
       v.setGroupingSymbol( fields[i].getGroupSymbol() );
       v.setTrimType( fields[i].getTrimType() );

       v.setOrigin( name );

       inputRowMeta.addValueMeta( v );
     } catch (KettlePluginException e) {
       throw new KettleStepException( e );
     }
   }
}
 
开发者ID:andtorg,项目名称:sdmx-kettle,代码行数:40,代码来源:SdmxStepMeta.java

示例3: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
  
  // Optionally add a fields...
  //
  if (StringUtils.isNotEmpty(responseCodeField)) {
    ValueMetaInterface codeValue = new ValueMetaInteger(responseCodeField);
    codeValue.setLength(3);
    codeValue.setOrigin(name);
    inputRowMeta.addValueMeta(codeValue);
  }
  
  if (StringUtils.isNotEmpty(responseTimeField)) {
    ValueMetaInterface timeValue = new ValueMetaInteger(responseTimeField);
    timeValue.setLength(7);
    timeValue.setOrigin(name);
    inputRowMeta.addValueMeta(timeValue);
  }
}
 
开发者ID:mattcasters,项目名称:pdi-hcp-plugin,代码行数:21,代码来源:HCPDeleteMeta.java

示例4: testGetUrl

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Test
public void testGetUrl() {
  VariableSpace space = new Variables();
  space.setVariable("SERVER", "hcpdemo.com");
  space.setVariable("PORT", "8000");
  space.setVariable("NAMESPACE", "hcp-demo");
  space.setVariable("TENANT", "pentaho");
  
  HCPConnection connection = new HCPConnection();
  connection.setServer("${SERVER}");
  connection.setPort("${PORT}");
  connection.setNamespace("${NAMESPACE}");
  connection.setTenant("${TENANT}");
  
  String restUrl = connection.getRestUrl(space);
  assertEquals("http://pentaho.hcp-demo.hcpdemo.com:8000/rest", restUrl);    
}
 
开发者ID:mattcasters,项目名称:pdi-hcp-plugin,代码行数:18,代码来源:HCPConnectionTest.java

示例5: getStage

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
/**
 * Gets the Snowflake stage name based on the configured metadata
 * @param space The variable space
 * @return The Snowflake stage name to use
 */
public String getStage( VariableSpace space ) {
  if ( locationType.equals( LOCATION_TYPE_CODES[LOCATION_TYPE_USER] ) ) {
    return "@~/" + space.environmentSubstitute( targetTable );
  } else if ( locationType.equals( LOCATION_TYPE_CODES[LOCATION_TYPE_TABLE] ) ) {
    if ( !Const.isEmpty( space.environmentSubstitute( targetSchema ) ) ) {
      return "@" + space.environmentSubstitute( targetSchema ) + ".%" + space.environmentSubstitute( targetTable );
    } else {
      return "@%" + space.environmentSubstitute( targetTable );
    }
  } else if ( locationType.equals( LOCATION_TYPE_CODES[LOCATION_TYPE_INTERNAL_STAGE] ) ) {
    if ( !Const.isEmpty( space.environmentSubstitute( targetSchema ) ) ) {
      return "@" + space.environmentSubstitute( targetSchema ) + "." + space.environmentSubstitute( stageName );
    } else {
      return "@" + space.environmentSubstitute( stageName );
    }
  }
  return null;
}
 
开发者ID:inquidia,项目名称:PentahoSnowflakePlugin,代码行数:24,代码来源:SnowflakeBulkLoaderMeta.java

示例6: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  if ( nextStep != null ) {
    if ( nextStep.equals( organizationStepMeta ) ) {
      prepareExecutionResultsOrganization( inputRowMeta, space );
    } else if ( nextStep.equals( organizationTagStepMeta ) ) {
      prepareExecutionResultsOrganizationTag( inputRowMeta, space );
    } else if ( nextStep.equals( organizationFieldStepMeta ) ) {
      prepareExecutionResultsOrganizationField( inputRowMeta, space );
    } else if ( nextStep.equals( organizationDomainStepMeta ) ) {
      prepareExecutionResultsOrganizationDomain( inputRowMeta, space );
    }
  }
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:17,代码来源:ZendeskInputOrganizationsMeta.java

示例7: prepareExecutionResultsArticle

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的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

示例8: prepareExecutionResultsTranslation

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的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

示例9: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldIdFieldname() ),
    ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldUrlFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldTypeFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldTitleFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldActiveFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldRequiredFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldVisibleEndUsersFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:22,代码来源:ZendeskInputTicketFieldsMeta.java

示例10: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionNameFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:17,代码来源:ZendeskInputHCSectionMeta.java

示例11: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  if ( nextStep != null ) {
    if ( nextStep.equals( ticketOverviewStepMeta ) ) {
      prepareExecutionResultsTicketOverview( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCommentsStepMeta ) ) {
      prepareExecutionResultsTicketComments( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCustomFieldsStepMeta ) ) {
      prepareExecutionResultsTicketCustomFields( inputRowMeta, space );
    } else if ( nextStep.equals( ticketTagsStepMeta ) ) {
      prepareExecutionResultsTicketTags( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCollaboratorsStepMeta ) ) {
      prepareExecutionResultsTicketCollaborators( inputRowMeta, space );
    }
  }
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:18,代码来源:ZendeskInputTicketAuditMeta.java

示例12: prepareExecutionResultsTicketOverview

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的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

示例13: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryNameFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDescriptionFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:17,代码来源:ZendeskInputHCCategoryMeta.java

示例14: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSuspendedTicketIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSuspendedTicketUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuthorFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSubjectFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getContentFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCauseFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getMessageIdFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getRecipientFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getViaFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getBrandIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:19,代码来源:ZendeskInputSuspendedTicketsMeta.java

示例15: getFields

import org.pentaho.di.core.variables.VariableSpace; //导入依赖的package包/类
public void getFields(RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep,
                      VariableSpace space, Repository repository, IMetaStore metaStore) {

    for (SocrataTextFileField field : outputFields) {
        ValueMetaInterface v = r.searchValueMeta( field.getName() );
        if ( v != null ) {
            v.setLength(field.getLength());
            v.setPrecision(field.getPrecision());
            v.setConversionMask(field.getFormat());
            v.setDecimalSymbol(field.getDecimalSymbol());
            v.setGroupingSymbol(field.getGroupingSymbol());
            v.setCurrencySymbol(field.getCurrencySymbol());
            v.setTrimType( field.getTrimType() );

            // enable output padding by default to be compatible with v2.5.x
            //
            v.setOutputPaddingEnabled( true );
        }
    }
}
 
开发者ID:socrata,项目名称:socrata-kettle,代码行数:21,代码来源:SocrataPluginMeta.java


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