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; }
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 ); }
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; }
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 ); } }
protected void addLocalizedString( Element description, Concept concept, String name, String body ) { /* * <CWM:Description body="Oficinas" language="es" name="name" type="LocString" xmi.id="a14"> */ String lang = description.getAttribute( "language" ); //$NON-NLS-1$ LocalizedString str = (LocalizedString) concept.getChildProperty( name ); if ( str == null ) { str = new LocalizedString(); concept.setProperty( name, str ); } str.setString( lang, body ); }
public InlineEtlPhysicalTable() { super(); // physical table has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
Set<String> locales = lCol.getName().getLocales(); String[] stringLocals = locales.toArray( new String[] {} ); if ( stringLocals != null && stringLocals.length > 0 ) { theMeasure.setName( possibleMeasureName ); lCol.setName( new LocalizedString( stringLocals[0], theMeasure.getName() ) );
private void setSchemaName( String catalogName ) { String newName = catalogName; if ( businessModel.getProperty( "AGILE_BI_GENERATED_SCHEMA" ) != null ) { newName = catalogName.concat( "_OLAP" ); } if ( businessModel.getName() == null ) { businessModel.setId( newName ); } else { businessModel.getName().setString( locale, newName ); } }
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$
for ( String locale : lstr.getLocales() ) { createDescription( doc, lstr.getLocalizedString( locale ), key, "LocString", locale, idGen, parentTag, idstr, allDescriptions ); //$NON-NLS-1$
if ( logicalModel.getName().getLocales() != null && logicalModel.getName().getLocales().size() > 0 ) { for ( String l : logicalModel.getName().getLocales() ) { locale = l; break;
@Override public boolean equals( Object object ) { LocalizedString l = (LocalizedString) object; return localeStringMap.equals( l.getLocaleStringMap() ); } }
public InlineEtlPhysicalColumn() { super(); // physical column has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
LocalizedString localizedString = (LocalizedString) concept.getProperty( property ); if ( localizedString != null ) { localizedString.setString( locale, props.getProperty( k ) );
.add( new LogicalModelSummary( domainId, model.getId(), model.getName().getString( locale ) ) );
} else if ( property instanceof LocalizedString ) { LocalizedString str = (LocalizedString) property; LocalizedStringSettings value = new LocalizedStringSettings( str.getLocaleStringMap() ); ConceptPropertyLocalizedString string = new ConceptPropertyLocalizedString( propertyName, value ); return string;
public LogicalModel() { super(); // logical model has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
@Bindable public void setDatasourceName( String datasourceName ) { String previousVal = this.datasourceName; this.datasourceName = datasourceName; // if we're editing a generated or already defined domain, // we need to keep the datasource name in sync if ( domain != null ) { domain.setId( datasourceName ); LogicalModel model = domain.getLogicalModels().get( 0 ); String localeCode = domain.getLocales().get( 0 ).getCode(); model.getName().setString( localeCode, datasourceName ); } this.getModelInfo().setStageTableName( generateTableName() ); this.firePropertyChange( "datasourceName", previousVal, datasourceName ); //$NON-NLS-1$ validate(); }
if ( name != null && contextName.equals( name.getString( locale ) ) ) { c = col; break;
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; }