本文整理汇总了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" );
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}