public String getLocalizedString( final String locale ) { String str = getString( locale ); String tmpLocale = locale; while ( stringIsEmpty( str ) && tmpLocale != null && tmpLocale.indexOf( '_' ) > 0 ) { tmpLocale = tmpLocale.substring( 0, tmpLocale.lastIndexOf( '_' ) ); str = getString( tmpLocale ); } if ( !stringIsEmpty( str ) ) { return str; } else { return getString( DEFAULT_LOCALE ); } }
private static LocalizedString appendOlap( LocalizedString localizedString ) { LocalizedString newString = new LocalizedString(); for ( String locale : localizedString.getLocaleStringMap().keySet() ) { newString.setString( locale, localizedString.getString( locale ) + BaseModelerWorkspaceHelper.OLAP_SUFFIX ); } return newString; }
LocalizedString name = (LocalizedString) resultSet.getMetaData().getAttribute( 0, i, Concept.NAME_PROPERTY ); if ( name != null && locale != null ) { info.put( "colLabel", name.getString( locale ) ); //$NON-NLS-1$
public static WAQRTransport createFromMetadata( Domain domain ) { // this assumes a single logical model with a single logical category LogicalModel model = domain.getLogicalModels().get( 0 ); Iterator<String> iter = model.getName().getLocales().iterator(); String locale = iter.next(); Category category = model.getCategories().get( 0 ); String domainId = domain.getId(); String modelId = model.getId(); String modelName = model.getName() != null ? model.getName().getString( locale ) : null; String categoryId = category.getId(); String categoryName = category.getName() != null ? category.getName().getString( locale ) : null; String schemaName = model.getName( locale ); return createDomain( domainId, modelId, modelName, categoryId, categoryName, schemaName ); }
.add( new LogicalModelSummary( domainId, model.getId(), model.getName().getString( locale ) ) );
if ( name != null && contextName.equals( name.getString( locale ) ) ) { c = col; break;