public static AggregationSettings convertToLegacy( AggregationType aggType ) { if ( aggType == null ) { return null; } return AggregationSettings.types[aggType.ordinal()]; }
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 InlineEtlPhysicalTable() { super(); // physical table has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
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 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 ); } }
@Override public boolean equals( Object object ) { LocaleType l = (LocaleType) object; return ( ( getDescription() == null && l.getDescription() == null ) || ( getDescription() != null && getDescription() .equals( l.getDescription() ) ) ) && ( ( getCode() == null && l.getCode() == null ) || ( getCode() != null && getCode().equals( l.getCode() ) ) ); } }
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 ); } }
@Override public boolean equals( Object object ) { LocalizedString l = (LocalizedString) object; return localeStringMap.equals( l.getLocaleStringMap() ); } }
/** * * @param datatype {@link String} representation of {@link DataType} * @param mask * @param data * @return {@link String} - data which was formatted by mask */ public static String getFormatedString( String datatype, String mask, Object data ) { return getFormatedString( DataType.valueOf( datatype ), mask, data ); }
public boolean hasAggregate() { // this selection is an aggregate if the business column is an aggregate and the agg type is not null return !AggregationType.NONE.equals( getActiveAggregationType() ); }
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; }
public InlineEtlPhysicalColumn() { super(); // physical column has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
public LogicalModel() { super(); // logical model has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
public Category() { super(); // category has the following default properties setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
public SqlPhysicalColumn() { super(); setTargetColumnType( TargetColumnType.COLUMN_NAME ); // physical column has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
public SqlPhysicalTable() { super(); setTargetTableType( TargetTableType.TABLE ); // physical table has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }