public override void EA_FileOpen(EA.Repository repository)
 {
     this.model       = new TSF_EA.Model(repository);
     this.settings    = new GlossaryManagerSettings(this.model);
     this.factory     = new GlossaryItemFactory(this.settings);
     this.fullyLoaded = true;
 }
 public override void EA_FileOpen(EA.Repository repository)
 {
     this.model    = new TSF_EA.Model(repository);
     this.settings = new GlossaryManagerSettings(this.model);
     this.factory  = new GlossaryItemFactory(this.settings);
     Domain.getAllDomains(this.settings.businessItemsPackage, this.settings.dataItemsPackage);
     this.fullyLoaded = true;
 }
 //let the user select a table from the model
 public static EDDTable selectTable(TSF_EA.Model model, GlossaryManagerSettings settings)
 {
     var tableElement = model.getUserSelectedElement(new List<string> { "Class" }, new List<string> { "table" }) as TSF_EA.Class;
     if (tableElement == null) return null;
     var table = DB_EA.DatabaseFactory.createTable(tableElement);
     if (table == null) return null;
     return new EDDTable(table, settings);
 }
Example #4
0
        public static GlossaryItemFactory getFactory(TSF_EA.Model model, GlossaryManagerSettings settings)
        {
            GlossaryItemFactory factory;

            if (!factories.TryGetValue(model.projectGUID, out factory))
            {
                factory = new GlossaryItemFactory(model, settings);
                factories.Add(model.projectGUID, factory);
            }
            return(factory);
        }
Example #5
0
 public override void EA_FileOpen(EA.Repository repository)
 {
     base.EA_FileOpen(repository);
     //close the tab if still open
     this.model.closeTab(appTitle);
     this._mainControl = null;
     //get settings
     this.settings = new GlossaryManagerSettings(this.model);
     //get the logical datatypes
     this.logicalDatatypes = LogicalDatatype.getAllLogicalDatatypes(this.model);
     //(re)-initialize
     if (this.settings.showWindowAtStartup)
     {
         this.initialiseMainControl();
     }
     this.factory = GlossaryItemFactory.getFactory(this.model, this.settings);
 }
        public static List <EDDTable> createColumns(TSF_EA.Model model, List <DataItem> dataItems, GlossaryManagerSettings settings)
        {
            //get the columns based on the given data items
            var    guidString    = string.Join(",", dataItems.Select(x => "'" + x.GUID + "'"));
            string sqlGetColumns = @"select a.[ea_guid] from(t_attribute a
                                    inner join[t_attributetag] tv on(tv.[ElementID] = a.[ID]
                                                                      and tv.[Property] = 'EDD::dataitem'))
                                    where tv.VALUE in (" + guidString + ")";
            List <TSF_EA.Attribute> attributes = model.getAttributesByQuery(sqlGetColumns);
            var tables = new Dictionary <string, EDDTable>();

            foreach (var attribute in attributes)
            {
                var classElement = attribute.owner as TSF_EA.Class;
                if (classElement != null)
                {
                    //for each attribute create the column
                    var dbColumn = DB_EA.DatabaseFactory.createColumn(attribute);
                    if (dbColumn != null)
                    {
                        EDDTable ownerTable = tables.ContainsKey(classElement.uniqueID) ?
                                              tables[classElement.uniqueID]
                                              : new EDDTable((DB_EA.Table)dbColumn.ownerTable, settings);
                        var newColumn = new EDDColumn(dbColumn, ownerTable, settings);
                        ownerTable.addColumn(newColumn);
                        tables[ownerTable.uniqueID] = ownerTable;
                    }
                }
            }
            //return colums
            return(tables.Values.ToList());
        }
 public EDDColumn(DB_EA.Column wrappedColumn, EDDTable table, GlossaryManagerSettings settings)
 {
     this._wrappedColumn = wrappedColumn;
     this.table          = table;
     this.settings       = settings;
 }
Example #8
0
 public EDDTable(DB_EA.Table wrappedTable, GlossaryManagerSettings settings)
 {
     this._wrappedTable = wrappedTable;
     this.settings      = settings;
 }
Example #9
0
 private GlossaryItemFactory(TSF_EA.Model model, GlossaryManagerSettings settings)
 {
     this.settings = settings;
     this.model    = model;
 }
Example #10
0
 public GlossaryItemFactory(GlossaryManagerSettings settings)
 {
     this.settings = settings;
 }