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


Java LocalizedString.getLocalizedString方法代码示例

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


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

示例1: exportLocalizedPropertiesRecursively

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
protected void exportLocalizedPropertiesRecursively( Properties props, IConcept parent, String locale ) {
  for ( String propName : parent.getChildProperties().keySet() ) {
    if ( parent.getChildProperty( propName ) instanceof LocalizedString ) {
      // externalize string
      String key = stringizeTokens( parent.getUniqueId() ) + ".[" + escapeKey( propName ) + "]";
      LocalizedString lstr = (LocalizedString) parent.getChildProperty( propName );
      String value = lstr.getLocalizedString( locale );
      if ( value == null ) {
        value = "";
      }
      props.setProperty( key, value );
    }
  }
  if ( parent.getChildren() != null ) {
    for ( IConcept child : parent.getChildren() ) {
      exportLocalizedPropertiesRecursively( props, child, locale );
    }
  } else {
    if ( logger.isDebugEnabled() ) {
      logger.debug( "concept " + stringizeTokens( parent.getUniqueId() ) + " does not have children" );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:24,代码来源:LocalizationUtil.java

示例2: extractId

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
private String extractId(Concept item) {
  LocalizedString localizedName = item.getName();
  Set<String> locales = localizedName.getLocales();
  if (locales.isEmpty()) return "";
  // Just grab the first locale we come across
  // This should normally only one for the star modeler
  //
  String locale = locales.iterator().next(); 
  
  String id = localizedName.getLocalizedString(locale);
  id = id.toUpperCase().replace(" ", "_");
  
  return id;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:15,代码来源:MetadataGenerator.java

示例3: getName

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
public String getName( String locale ) {
  LocalizedString locName = getName();
  if ( locName == null ) {
    return getId();
  }
  String name = locName.getLocalizedString( locale );
  if ( name == null || name.trim().length() == 0 ) {
    return getId();
  }
  return name;
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:12,代码来源:Concept.java

示例4: getDescription

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
public String getDescription( String locale ) {
  LocalizedString locDesc = getDescription();
  if ( locDesc == null ) {
    return getId();
  }
  String name = locDesc.getLocalizedString( locale );
  if ( name == null || name.trim().length() == 0 ) {
    return getId();
  }
  return name;
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:12,代码来源:Concept.java

示例5: extractId

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
private String extractId(Concept item) {
  LocalizedString localizedName = item.getName();
  Set<String> locales = localizedName.getLocales();
  if (locales.isEmpty()) return "";
  // Just grab the first locale we come across
  // This should normally only one for the star modeler
  //
  String locale = locales.iterator().next();

  String id = localizedName.getLocalizedString(locale);
  id = id.toUpperCase().replace(" ", "_");

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

示例6: getDescription

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
public static String getDescription(Concept concept, String locale) {
  LocalizedString localizedString = (LocalizedString) concept.getProperty(Concept.DESCRIPTION_PROPERTY);
  if (localizedString==null) return null;
  return localizedString.getLocalizedString(locale);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:6,代码来源:ConceptUtil.java

示例7: getName

import org.pentaho.metadata.model.concept.types.LocalizedString; //导入方法依赖的package包/类
public static String getName(Concept concept, String locale) {
  LocalizedString localizedString = (LocalizedString) concept.getProperty(Concept.NAME_PROPERTY);
  if (localizedString==null) return null;
  return localizedString.getLocalizedString(locale);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:6,代码来源:ConceptUtil.java


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