public CeusDLGenerator(CoreImport model) { this.model = new CoreModel(model); }
public MainPageViewModel(INavigationService navigationService, CoreModel coreModel) : base(navigationService) { Command = new ReactiveCommand <string>().WithSubscribe(async x => await navigationService.NavigateAsync(x)); Switch = new ReactiveProperty <bool>(); Switch.Subscribe(_ => coreModel.VisualSet(Switch.Value)); }
private static bool HasJustOneFinestTimeUnit(CoreModel m) { var count = m.Interfaces.Where(i => i.IsFinestTime).Count(); return(count == 0 || count == 1); }
public string GenerateFactAttribute(CoreBaseAttribute attr, CoreInterface ifa, CoreModel model) { return(GenerateBaseAttribute("fact", attr, ifa, model)); }
public void populateEnvironment(Environment environment, CoreModel model) { const bool isFirstLevel = true; addAllClassifiersFromInnerPackages(isFirstLevel, model, environment); }
public CreateILGenerator(CoreModel model) { this.model = new ILModel(model); }
public CreateDefDataGenerator(CoreModel model) { this.model = new BLModel(model); }
public CopyStarALGenerator(CoreModel model) { this.model = new StarALModel(model); }
public MainPageViewModel(INavigationService navigationService, CoreModel coreModel) : base(navigationService) { Command = new ReactiveCommand <object>().WithSubscribe(x => coreModel.DbSave()); }
public SinglePageViewModel(INavigationService navigationService, CoreModel coreModel) : base(navigationService) { // 画面に出るカウンター用のViewModelを作る(とりあえず最初のやつ) CounterViewModel = new ReactiveProperty <CounterViewModel>(new CounterViewModel(coreModel.Counters.First())); }
public void Save(CoreModel Model) { _context.Core.Update(Model, User.Id); }
public static void setUmlModelsRepository() { Assert.IsNotNull(umlModel = reader.getModel()); }
private static void ExecuteGenerationMsSql(GenerationOptions options, string conStr, CoreModel model) { // Diagramm generieren ExecuteStep(new GraphvizCeusDLGenerator(model, options.GenerateSlimDiagram), GENERATED_GRAPHVIZ); // IL generieren. CoreILSQLStatements.AddRange(ExecuteStep(new DropILGenerator(model), GENERATED_SQL)); CoreILSQLStatements.AddRange(ExecuteStep(new CreateILGenerator(model), GENERATED_SQL)); ExecuteStep(new LoadILGenerator(model), GENERATED_CODE); ExecuteStep(new GraphvizILGenerator(model), GENERATED_GRAPHVIZ); ExecuteStep(new DummyDataILGenerator(model), GENERATED_CSV); ExecuteStep(new DummyILPythonGenerator(model), GENERATED_PYCODE); // BL generieren ReplaceSQLStatements.AddRange(ExecuteStep(new DropBLGenerator(model), GENERATED_SQL)); ReplaceSQLStatements.AddRange(ExecuteStep(new CreateBLGenerator(model, options.GenerateConstraints), GENERATED_SQL)); ReplaceSQLStatements.AddRange(ExecuteStep(new InitialDefaultValuesGenerator(model), GENERATED_SQL)); ExecuteStep(new GraphvizBLGenerator(model), GENERATED_GRAPHVIZ); ExecuteStep(new LoadBLGenerator(model), GENERATED_SQL); if (!string.IsNullOrEmpty(conStr)) { // Aktualisierung nur generieren, wenn eine Verbindung zur Datenbank angegeben wurde. UpdateSQLStatements.AddRange(ExecuteStep(new UpdateBLGenerator(model, conStr, options.GenerateConstraints), GENERATED_SQL)); } ExecuteStep(new CreateDefDataGenerator(model), GENERATED_PYCODE); // BT generieren CoreBTSQLStatements.AddRange(ExecuteStep(new DropBTGenerator(model), GENERATED_SQL)); CoreBTSQLStatements.AddRange(ExecuteStep(new CreateBTGenerator(model), GENERATED_SQL)); if (options.ExecuteUpdateWithReload) { CoreBTSQLStatements.AddRange(ExecuteStep(new LoadBTGenerator(model), GENERATED_SQL)); } else { ExecuteStep(new LoadBTGenerator(model), GENERATED_SQL); } ExecuteStep(new GraphvizBTGenerator(model), GENERATED_GRAPHVIZ); // AL generieren (Starschema) if (options.GenerateStar) { StarSQLStatements.AddRange(ExecuteStep(new DropStarALGenerator(model), GENERATED_SQL)); StarSQLStatements.AddRange(ExecuteStep(new CreateStarALGenerator(model), GENERATED_SQL)); if (options.ExecuteUpdateWithReload) { StarSQLStatements.AddRange(ExecuteStep(new LoadStarALGenerator(model), GENERATED_SQL)); } else { ExecuteStep(new LoadStarALGenerator(model), GENERATED_SQL); } ExecuteStep(new CopyStarALGenerator(model), GENERATED_SQL); ExecuteStep(new KDV.CeusDL.Generator.AL.Star.CreateMicrostrategyCmdStarGenerator(model), GENERATED_SCP); } // AL generieren (Snowflake-Schema) if (options.GenerateSnowflake) { SnowflakeSQLStatements.AddRange(ExecuteStep(new DropSnowflakeALGenerator(model), GENERATED_SQL)); SnowflakeSQLStatements.AddRange(ExecuteStep(new CreateSnowflakeALGenerator(model), GENERATED_SQL)); if (options.ExecuteUpdateWithReload) { SnowflakeSQLStatements.AddRange(ExecuteStep(new LoadSnowflakeALGenerator(model), GENERATED_SQL)); } else { ExecuteStep(new LoadSnowflakeALGenerator(model), GENERATED_SQL); } ExecuteStep(new KDV.CeusDL.Generator.AL.Snowflake.CreateMicrostrategyCmdSnowflakeGenerator(model), GENERATED_SCP); } }
public InitialDefaultValuesGenerator(CoreModel model) { this.model = new BLModel(model); }
public BTModel(CoreModel m) : this(new BLModel(m)) { }
/* (non-Javadoc) * @see ocl20.CoreClassifier#getAllAssociationEnds() */ public List <object> getAllAssociationEnds() { CoreModel model = getModel(); return(model.getAssociationEndsForClassifier(this)); }
public CreateSnowflakeALGenerator(CoreModel model) { this.model = new SnowflakeALModel(model); }
public static bool isOclTypesModel(CoreModel model) { return(model.getEnvironmentWithoutParents() .lookup("Set<T>") != null); }
private void Remove(string url) { CoreModel.Log(GetResponse(HttpConfiguration(url, HttpMethod.Delete))); }
protected override void Resolve(CoreModel model, Constants constants) { model.delete(QueryFields(model), _container, constants); }
public LoadILGenerator(CoreModel model) { this.model = new ILModel(model); }
private static void ValidateInterface(CoreInterface ifa, CoreModel m, ValidationResultRepository repo) { CoreInterfaceValidator.Validate(ifa, m, repo); }
public DropBLGenerator(CoreModel model) { this.model = new BLModel(model); }
public CeusDLGenerator(CoreModel model) { this.model = model; }
public static void setEnvironment(CoreModel m) { model = m; environment = m.getEnvironmentWithoutParents(); }
private string GenerateBaseAttribute(string type, CoreBaseAttribute attr, CoreInterface ifa, CoreModel model) { var code = $"{type} {attr.Name}:{DataTypeToString(attr.DataType)}".Indent(1); if (attr.IsPrimaryKey || attr.DataType == CoreDataType.DECIMAL || attr.DataType == CoreDataType.VARCHAR || !string.IsNullOrEmpty(attr.Unit) || attr.IsCalculated) { bool dirty = false; code += "("; if (attr.IsPrimaryKey) { dirty = true; code += "primary_key=\"true\""; } if (attr.DataType == CoreDataType.DECIMAL) { if (dirty) { code += ", "; } dirty = true; code += $"len=\"{attr.Length},{attr.Decimals}\""; } if (attr.DataType == CoreDataType.VARCHAR) { if (dirty) { code += ", "; } dirty = true; code += $"len=\"{attr.Length}\""; } if (!string.IsNullOrEmpty(attr.Unit)) { if (dirty) { code += ", "; } dirty = true; code += $"unit=\"{attr.Unit}\""; } if (attr.IsCalculated) { if (dirty) { code += ", "; } dirty = true; code += "calculated=\"true\""; } if (!String.IsNullOrEmpty(attr.FormerName)) { if (dirty) { code += ", "; } dirty = true; code += $"former_name=\"{attr.FormerName}\""; } code += ")"; } code += ";\n"; return(code); }
public GraphvizBLGenerator(CoreModel model) { this.model = new BLModel(model); }
private string GenerateInterface(CoreInterface ifa, CoreModel model) { string code = $"\ninterface {ifa.Name} : {InterfaceTypeToString(ifa.Type)}"; // Interface-Parameter setzen // -------------------------- bool dirty = false; // Mandant und Historie if (ifa.IsMandant || ifa.IsHistorized) { code += "("; if (ifa.IsMandant) { dirty = true; code += "mandant=\"true\""; } if (dirty) { code += ", "; } if (ifa.IsHistorized) { dirty = true; code += "history=\"true\""; } if (dirty) { code += ", "; } if (ifa.IsWithNowTable) { dirty = true; code += $"with_nowtable=\"true\""; } // Ggf. feinste Zeiteinheit festlegen } else if (ifa.IsFinestTime) { dirty = true; code += "(finest_time_attribute=\"true\""; } // Falls Vorhanden alten Namen eintragen. if (!String.IsNullOrEmpty(ifa.FormerName)) { if (dirty) { code += ", "; } else { code += "("; } dirty = true; code += $"former_name=\"{ifa.FormerName}\""; } if (dirty) { code += ")"; } // Und die Attribute setzen code += " {\n"; foreach (var item in ifa.ItemObjects) { if (item is CoreFactAttribute) { code += GenerateFactAttribute((CoreFactAttribute)item, ifa, model); } else if (item is CoreBaseAttribute) { code += GenerateBaseAttribute((CoreBaseAttribute)item, ifa, model); } else if (item is CoreRefAttribute) { code += GenerateRefAttribute((CoreRefAttribute)item, ifa, model); } else if (item is CoreComment) { code += item.ToString().TrimStart(new char[] { ' ', '\t', '\n', '\r' }).Indent(1); //code += "\n"; } } code += "}\n"; return(code); }
public DummyDataILGenerator(CoreModel model) { this.model = new ILModel(model); }
public static void SetTheCoreModel( CoreModel TheObject ) { TheCoreModel = TheObject; }
public CoreViewModel(CoreModel model) { this.model = model; }