public InlineEtlPhysicalTable() { super(); // physical table has the following default properties: setName( new LocalizedString() ); setDescription( new LocalizedString() ); }
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() ); }
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 ); }
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; }
@Bindable public void setName( String name ) { if ( !( name == null ) ) { super.setName( name ); if ( logicalColumn != null ) { logicalColumn.setName( new LocalizedString( locale, name ) ); } } }
@Deprecated public List<LogicalRelationship> generateLogicalRelationships( List<JoinRelationshipModel> joins ) { String locale = LocalizedString.DEFAULT_LOCALE; List<LogicalRelationship> logicalRelationships = new ArrayList<LogicalRelationship>(); for ( JoinRelationshipModel join : joins ) { LogicalTable fromTable = new LogicalTable(); fromTable.setName( new LocalizedString( locale, join.getLeftKeyFieldModel().getParentTable().getName() ) ); LogicalTable toTable = new LogicalTable(); toTable.setName( new LocalizedString( locale, join.getRightKeyFieldModel().getParentTable().getName() ) ); LogicalColumn fromColumn = new LogicalColumn(); fromColumn.setName( new LocalizedString( locale, join.getLeftKeyFieldModel().getName() ) ); LogicalColumn toColumn = new LogicalColumn(); toColumn.setName( new LocalizedString( locale, join.getRightKeyFieldModel().getName() ) ); LogicalRelationship logicalRelationship = new LogicalRelationship(); logicalRelationship.setFromTable( fromTable ); logicalRelationship.setToTable( toTable ); logicalRelationship.setFromColumn( fromColumn ); logicalRelationship.setToColumn( toColumn ); logicalRelationships.add( logicalRelationship ); } return logicalRelationships; }
protected void populateCategories( ModelerWorkspace workspace ) { RelationalModelNode model = workspace.getRelationalModel(); LogicalModel logicalModel = workspace.getDomain().getLogicalModels().get( 0 ); logicalModel.getCategories().clear(); for ( CategoryMetaData catMeta : model.getCategories() ) { Category cat = new Category(); cat.setName( new LocalizedString( this.getLocale(), catMeta.getName() ) ); cat.setId( catMeta.getName() ); for ( FieldMetaData fieldMeta : catMeta ) { LogicalColumn lCol = fieldMeta.getLogicalColumn(); LogicalTable lTable = lCol.getLogicalTable(); if ( !lTable.getLogicalColumns().contains( lCol ) ) { lTable.addLogicalColumn( lCol ); } lCol.setName( new LocalizedString( locale, fieldMeta.getName() ) ); AggregationType type = fieldMeta.getDefaultAggregation(); lCol.setAggregationType( type ); setLogicalColumnFormat( fieldMeta.getFormat(), lCol ); Set<AggregationType> possibleAggs = new HashSet<AggregationType>(); possibleAggs.add( fieldMeta.getDefaultAggregation() ); possibleAggs.addAll( fieldMeta.getSelectedAggregations() ); lCol.setAggregationList( Arrays.<AggregationType>asList( possibleAggs .toArray( new AggregationType[possibleAggs.size()] ) ) ); cat.addLogicalColumn( lCol ); } logicalModel.addCategory( cat ); } }
physicalTable.setName( new LocalizedString( locale, niceName ) );
for ( IPhysicalModel physicalModel : domain.getPhysicalModels() ) { for ( IPhysicalTable physicalTable : physicalModel.getPhysicalTables() ) { physicalTable.setName( new LocalizedString( locale, datasourceName ) ); logicalTable.setName( new LocalizedString( locale, datasourceName ) ); businessModel.setName( new LocalizedString( locale, tableName ) ); businessModel.setDescription( new LocalizedString( locale, "This is the data model for " + datasourceName ) ); businessTable.setName( new LocalizedString( locale, businessTable.getPhysicalTable().getName( locale ) ) );
private void setLocationMemberProperties( ModelerWorkspace workspace, AvailableTable table, LevelMetaData locationLevel, int latColIndex, int lonColIndex ) { // if it is a LocationField we need to make sure the lat & long columns get // added as logical columns to the model. AvailableField latField = table.findFieldByPhysicalColumn( table.getPhysicalTable().getPhysicalColumns().get( latColIndex ) ); AvailableField lonField = table.findFieldByPhysicalColumn( table.getPhysicalTable().getPhysicalColumns().get( lonColIndex ) ); ColumnBackedNode tmp = workspace.createColumnBackedNode( latField, ModelerPerspective.ANALYSIS ); tmp.getLogicalColumn().setName( new LocalizedString( workspace.getWorkspaceHelper().getLocale(), LATITUDE ) ); MemberPropertyMetaData memberProp = workspace.createMemberPropertyForParentWithNode( locationLevel, tmp ); memberProp.setName( LATITUDE ); locationLevel.add( memberProp ); tmp = workspace.createColumnBackedNode( lonField, ModelerPerspective.ANALYSIS ); tmp.getLogicalColumn().setName( new LocalizedString( workspace.getWorkspaceHelper().getLocale(), LONGITUDE ) ); memberProp = workspace.createMemberPropertyForParentWithNode( locationLevel, tmp ); memberProp.setName( LONGITUDE ); locationLevel.add( memberProp ); } }
@Bindable public void setName( String name ) { if ( getNode() != null ) { getNode().setName( name ); if ( getNode().getLogicalColumn() != null ) { getNode().getLogicalColumn().setName( new LocalizedString( locale, name ) ); } } this.name.setValue( name ); }
@Bindable public void setDescription( String desc ) { if ( getNode() != null ) { getNode().setDescription( desc ); if ( getNode().getLogicalColumn() != null ) { getNode().getLogicalColumn().setDescription( new LocalizedString( locale, desc ) ); } } this.desc.setValue( desc ); }
String modelID = Settings.getBusinessModelIDPrefix() + modelName; model.setId( modelID ); model.setName( new LocalizedString( locale.getCode(), modelName ) ); logicalModel.setPhysicalModel( model ); logicalModel.setId( "MODEL_1" ); //$NON-NLS-1$ logicalModel.setName( new LocalizedString( locale.getCode(), modelName ) ); mainCategory.setName( new LocalizedString( locale.getCode(), modelName ) ); column.setId( "PC_" + i ); //$NON-NLS-1$ column.setFieldName( fieldNames[i] ); column.setName( new LocalizedString( locale.getCode(), fieldNames[i] ) ); column.setDataType( dataTypeConverter.evaluateDataType( csvDataReader.getColumnData( i ) ) ); table.getPhysicalColumns().add( column );
private LogicalTable createBusinessTable( SqlPhysicalTable physicalTable, String locale ) { // Create a business table with a new ID and localized name // LogicalTable businessTable = new LogicalTable( null, physicalTable ); // Try to set the name of the business table to something nice (beautify) // String tableName = PhysicalTableImporter.beautifyName( physicalTable.getTargetTable() ); businessTable.setName( new LocalizedString( locale, tableName ) ); businessTable.setId( Util.proposeSqlBasedLogicalTableId( locale, businessTable, physicalTable ) ); // Add columns to this by copying the physical columns to the business // columns... // for ( IPhysicalColumn physicalColumn : physicalTable.getPhysicalColumns() ) { LogicalColumn businessColumn = new LogicalColumn(); businessColumn.setPhysicalColumn( physicalColumn ); businessColumn.setLogicalTable( businessTable ); // We're done, add the business column. // // Propose a new ID businessColumn.setId( Util.proposeSqlBasedLogicalColumnId( locale, businessTable, (SqlPhysicalColumn) physicalColumn ) ); businessTable.addLogicalColumn( businessColumn ); } return businessTable; }
physicalColumn.setName( new LocalizedString( locale, niceName ) );
lCol.setAggregationType( field.getPhysicalColumn().getAggregationType() ); lCol.setName( new LocalizedString( locale, field.getPhysicalColumn().getName( locale ) ) ); String colId = "LC_" + toId( lTab.getPhysicalTable().getName( locale ) ) + "_" + toId( field.getPhysicalColumn().getId() );