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


Java ValueMetaString.getTrimTypeByCode方法代码示例

本文整理汇总了Java中org.pentaho.di.core.row.value.ValueMetaString.getTrimTypeByCode方法的典型用法代码示例。如果您正苦于以下问题:Java ValueMetaString.getTrimTypeByCode方法的具体用法?Java ValueMetaString.getTrimTypeByCode怎么用?Java ValueMetaString.getTrimTypeByCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.row.value.ValueMetaString的用法示例。


在下文中一共展示了ValueMetaString.getTrimTypeByCode方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FixedFileInputField

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
public FixedFileInputField( Node fnode ) {
  name = XMLHandler.getTagValue( fnode, "name" );
  type = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fnode, "type" ) );
  format = XMLHandler.getTagValue( fnode, "format" );
  trimType = ValueMetaString.getTrimTypeByCode( XMLHandler.getTagValue( fnode, "trim_type" ) );
  currency = XMLHandler.getTagValue( fnode, "currency" );
  decimal = XMLHandler.getTagValue( fnode, "decimal" );
  grouping = XMLHandler.getTagValue( fnode, "group" );
  width = Const.toInt( XMLHandler.getTagValue( fnode, "width" ), -1 );
  length = Const.toInt( XMLHandler.getTagValue( fnode, "length" ), -1 );
  precision = Const.toInt( XMLHandler.getTagValue( fnode, "precision" ), -1 );

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:FixedFileInputField.java

示例2: readData

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private void readData( Node stepnode ) throws KettleXMLException {
  try {
    splitField = XMLHandler.getTagValue( stepnode, "splitfield" );
    delimiter = XMLHandler.getTagValue( stepnode, "delimiter" );
    enclosure = XMLHandler.getTagValue( stepnode, "enclosure" );

    final Node fields = XMLHandler.getSubNode( stepnode, "fields" );
    final int nrfields = XMLHandler.countNodes( fields, "field" );

    allocate( nrfields );

    for ( int i = 0; i < nrfields; i++ ) {
      final Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );

      fieldName[i] = XMLHandler.getTagValue( fnode, "name" );
      fieldID[i] = XMLHandler.getTagValue( fnode, "id" );
      final String sidrem = XMLHandler.getTagValue( fnode, "idrem" );
      final String stype = XMLHandler.getTagValue( fnode, "type" );
      fieldFormat[i] = XMLHandler.getTagValue( fnode, "format" );
      fieldGroup[i] = XMLHandler.getTagValue( fnode, "group" );
      fieldDecimal[i] = XMLHandler.getTagValue( fnode, "decimal" );
      fieldCurrency[i] = XMLHandler.getTagValue( fnode, "currency" );
      final String slen = XMLHandler.getTagValue( fnode, "length" );
      final String sprc = XMLHandler.getTagValue( fnode, "precision" );
      fieldNullIf[i] = XMLHandler.getTagValue( fnode, "nullif" );
      fieldIfNull[i] = XMLHandler.getTagValue( fnode, "ifnull" );
      final String trim = XMLHandler.getTagValue( fnode, "trimtype" );

      fieldRemoveID[i] = "Y".equalsIgnoreCase( sidrem );
      fieldType[i] = ValueMetaFactory.getIdForValueMeta( stype );
      fieldLength[i] = Const.toInt( slen, -1 );
      fieldPrecision[i] = Const.toInt( sprc, -1 );
      fieldTrimType[i] = ValueMetaString.getTrimTypeByCode( trim );
    }
  } catch ( Exception e ) {
    throw new KettleXMLException( BaseMessages.getString(
      PKG, "FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:FieldSplitterMeta.java

示例3: readRep

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
  try {
    splitField = rep.getStepAttributeString( id_step, "splitfield" );
    delimiter = rep.getStepAttributeString( id_step, "delimiter" );
    enclosure = rep.getStepAttributeString( id_step, "enclosure" );

    int nrfields = rep.countNrStepAttributes( id_step, "field_name" );

    allocate( nrfields );

    for ( int i = 0; i < nrfields; i++ ) {
      fieldName[i] = rep.getStepAttributeString( id_step, i, "field_name" );
      fieldID[i] = rep.getStepAttributeString( id_step, i, "field_id" );
      fieldRemoveID[i] = rep.getStepAttributeBoolean( id_step, i, "field_idrem" );
      fieldType[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
      fieldFormat[i] = rep.getStepAttributeString( id_step, i, "field_format" );
      fieldGroup[i] = rep.getStepAttributeString( id_step, i, "field_group" );
      fieldDecimal[i] = rep.getStepAttributeString( id_step, i, "field_decimal" );
      fieldCurrency[i] = rep.getStepAttributeString( id_step, i, "field_currency" );
      fieldLength[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
      fieldPrecision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
      fieldNullIf[i] = rep.getStepAttributeString( id_step, i, "field_nullif" );
      fieldIfNull[i] = rep.getStepAttributeString( id_step, i, "field_ifnull" );
      fieldTrimType[i] =
        ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "field_trimtype" ) );
    }
  } catch ( Exception e ) {
    throw new KettleException( BaseMessages.getString(
      PKG, "FieldSplitterMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:32,代码来源:FieldSplitterMeta.java

示例4: SasInputField

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
public SasInputField( Repository rep, ObjectId stepId, int fieldNr ) throws KettleException {
  name = rep.getStepAttributeString( stepId, fieldNr, "field_name" );
  rename = rep.getStepAttributeString( stepId, fieldNr, "field_rename" );
  type = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( stepId, fieldNr, "field_type" ) );
  length = (int) rep.getStepAttributeInteger( stepId, fieldNr, "field_length" );
  precision = (int) rep.getStepAttributeInteger( stepId, fieldNr, "field_precision" );
  conversionMask = rep.getStepAttributeString( stepId, fieldNr, "field_conversion_mask" );
  decimalSymbol = rep.getStepAttributeString( stepId, fieldNr, "field_decimal" );
  groupingSymbol = rep.getStepAttributeString( stepId, fieldNr, "field_grouping" );
  trimType = ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( stepId, fieldNr, "field_trim_type" ) );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:SasInputField.java

示例5: readRep

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
  try {
    script = rep.getStepAttributeString( id_step, "script" );
    matcher = rep.getStepAttributeString( id_step, "matcher" );
    resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
    usevar = rep.getStepAttributeBoolean( id_step, "usevar" );
    allowcapturegroups = rep.getStepAttributeBoolean( id_step, "allowcapturegroups" );
    replacefields = rep.getStepAttributeBoolean( id_step, "replacefields" );
    canoneq = rep.getStepAttributeBoolean( id_step, "canoneq" );
    caseinsensitive = rep.getStepAttributeBoolean( id_step, "caseinsensitive" );
    comment = rep.getStepAttributeBoolean( id_step, "comment" );
    multiline = rep.getStepAttributeBoolean( id_step, "multiline" );
    dotall = rep.getStepAttributeBoolean( id_step, "dotall" );
    unicode = rep.getStepAttributeBoolean( id_step, "unicode" );
    unix = rep.getStepAttributeBoolean( id_step, "unix" );

    int nrfields = rep.countNrStepAttributes( id_step, "field_name" );

    allocate( nrfields );

    for ( int i = 0; i < nrfields; i++ ) {
      fieldName[i] = rep.getStepAttributeString( id_step, i, "field_name" );
      fieldType[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );

      fieldFormat[i] = rep.getStepAttributeString( id_step, i, "field_format" );
      fieldGroup[i] = rep.getStepAttributeString( id_step, i, "field_group" );
      fieldDecimal[i] = rep.getStepAttributeString( id_step, i, "field_decimal" );
      fieldLength[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
      fieldPrecision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
      fieldNullIf[i] = rep.getStepAttributeString( id_step, i, "field_nullif" );
      fieldIfNull[i] = rep.getStepAttributeString( id_step, i, "field_ifnull" );
      fieldCurrency[i] = rep.getStepAttributeString( id_step, i, "field_currency" );
      fieldTrimType[i] =
        ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "field_trimtype" ) );
    }
  } catch ( Exception e ) {
    throw new KettleException( BaseMessages.getString(
      PKG, "RegexEvalMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:RegexEvalMeta.java

示例6: string2intPrimitive

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
@Override
public int string2intPrimitive( String v ) throws KettleValueException {
  return ValueMetaString.getTrimTypeByCode( v );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:TrimTypeConverter.java

示例7: readData

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private void readData( Node stepnode, List<? extends SharedObjectInterface> databases ) throws KettleXMLException {
  try {
    script = XMLHandler.getTagValue( stepnode, "script" );
    matcher = XMLHandler.getTagValue( stepnode, "matcher" );
    resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" );
    usevar = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "usevar" ) );
    allowcapturegroups = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "allowcapturegroups" ) );
    replacefields = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "replacefields" ) );
    canoneq = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "canoneq" ) );
    caseinsensitive = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "caseinsensitive" ) );
    comment = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "comment" ) );
    dotall = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "dotall" ) );
    multiline = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "multiline" ) );
    unicode = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "unicode" ) );
    unix = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "unix" ) );

    Node fields = XMLHandler.getSubNode( stepnode, "fields" );
    int nrfields = XMLHandler.countNodes( fields, "field" );

    allocate( nrfields );

    for ( int i = 0; i < nrfields; i++ ) {
      Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );

      fieldName[i] = XMLHandler.getTagValue( fnode, "name" );
      final String stype = XMLHandler.getTagValue( fnode, "type" );
      fieldFormat[i] = XMLHandler.getTagValue( fnode, "format" );
      fieldGroup[i] = XMLHandler.getTagValue( fnode, "group" );
      fieldDecimal[i] = XMLHandler.getTagValue( fnode, "decimal" );
      fieldCurrency[i] = XMLHandler.getTagValue( fnode, "currency" );
      final String slen = XMLHandler.getTagValue( fnode, "length" );
      final String sprc = XMLHandler.getTagValue( fnode, "precision" );
      fieldNullIf[i] = XMLHandler.getTagValue( fnode, "nullif" );
      fieldIfNull[i] = XMLHandler.getTagValue( fnode, "ifnull" );
      final String trim = XMLHandler.getTagValue( fnode, "trimtype" );
      fieldType[i] = ValueMetaFactory.getIdForValueMeta( stype );
      fieldLength[i] = Const.toInt( slen, -1 );
      fieldPrecision[i] = Const.toInt( sprc, -1 );
      fieldTrimType[i] = ValueMetaString.getTrimTypeByCode( trim );
    }
  } catch ( Exception e ) {
    throw new KettleXMLException( BaseMessages.getString(
      PKG, "RegexEvalMeta.Exception.UnableToLoadStepInfoFromXML" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:46,代码来源:RegexEvalMeta.java

示例8: setTrimType

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
@Injection( name = "FIELD_TRIM_TYPE", group = "FIELDS" )
public void setTrimType( String value ) {
  this.trimtype = ValueMetaString.getTrimTypeByCode( value );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:BaseFileField.java


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