Exemplo n.º 1
0
		/// <summary>
		/// Get the Partition where diagram data will be loaded into.
		/// Base implementation returns the default partition of the store.
		/// </summary>
		protected internal virtual DslModeling::Partition GetDiagramPartition()
		{
			DslModeling::Partition result = null;
			if (this.Store != null)
			{
				if (this.diagramPartitionId == global::System.Guid.Empty || !this.Store.Partitions.TryGetValue(this.diagramPartitionId, out result))
				{
					result = new DslModeling::Partition(this.Store);
					this.diagramPartitionId = result.Id;
				}
			}
			
			return result;
		}
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new link is to be created.</param>
 /// <param name="roleAssignments">List of relationship role assignments.</param>
 public EntityInheritsEntity(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
     : base(partition, roleAssignments, null)
 {
     this.InternalId = Guid.NewGuid();
 }
Exemplo n.º 3
0
        public sealed override DslModeling::ElementLink CreateElementLink(DslModeling::Partition partition, global::System.Type elementLinkType, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementLinkType == null)
            {
                throw new global::System.ArgumentNullException("elementLinkType");
            }
            if (roleAssignments == null)
            {
                throw new global::System.ArgumentNullException("roleAssignments");
            }

            if (createElementLinkMap == null)
            {
                createElementLinkMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(10);
                createElementLinkMap.Add(typeof(EntityTypeHasAttribute), 0);
                createElementLinkMap.Add(typeof(AttributeHasPossibleValue), 1);
                createElementLinkMap.Add(typeof(EntityTypeIsSubtypeOfEntityType), 2);
                createElementLinkMap.Add(typeof(EntityTypePlaysRole), 3);
                createElementLinkMap.Add(typeof(RoleHasCardinalityQualifier), 4);
                createElementLinkMap.Add(typeof(ExclusiveArcSpansOptionalRole), 5);
                createElementLinkMap.Add(typeof(BinaryAssociationContainsRole), 6);
                createElementLinkMap.Add(typeof(BarkerErModelContainsEntityType), 7);
                createElementLinkMap.Add(typeof(BarkerErModelContainsBinaryAssociation), 8);
                createElementLinkMap.Add(typeof(BarkerErModelContainsExclusiveArc), 9);
            }
            int index;

            if (!createElementLinkMap.TryGetValue(elementLinkType, out index))
            {
                // construct exception error message
                string exceptionError = string.Format(
                    global::System.Globalization.CultureInfo.CurrentCulture,
                    global::ORMSolutions.ORMArchitect.EntityRelationshipModels.Barker.BarkerDomainModel.SingletonResourceManager.GetString("UnrecognizedElementLinkType"),
                    elementLinkType.Name);
                throw new global::System.ArgumentException(exceptionError, "elementLinkType");
            }
            switch (index)
            {
            case 0: return(new EntityTypeHasAttribute(partition, roleAssignments, propertyAssignments));

            case 1: return(new AttributeHasPossibleValue(partition, roleAssignments, propertyAssignments));

            case 2: return(new EntityTypeIsSubtypeOfEntityType(partition, roleAssignments, propertyAssignments));

            case 3: return(new EntityTypePlaysRole(partition, roleAssignments, propertyAssignments));

            case 4: return(new RoleHasCardinalityQualifier(partition, roleAssignments, propertyAssignments));

            case 5: return(new ExclusiveArcSpansOptionalRole(partition, roleAssignments, propertyAssignments));

            case 6: return(new BinaryAssociationContainsRole(partition, roleAssignments, propertyAssignments));

            case 7: return(new BarkerErModelContainsEntityType(partition, roleAssignments, propertyAssignments));

            case 8: return(new BarkerErModelContainsBinaryAssociation(partition, roleAssignments, propertyAssignments));

            case 9: return(new BarkerErModelContainsExclusiveArc(partition, roleAssignments, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public Uniqueness(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public DelayValidateSignal(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public InheritanceConnector(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public InformationTypeFormat(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public CommentLink(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 9
0
        public sealed override DslModeling::ModelElement CreateElement(DslModeling::Partition partition, global::System.Type elementType, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementType == null)
            {
                throw new global::System.ArgumentNullException("elementType");
            }

            if (createElementMap == null)
            {
                createElementMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(22);
                createElementMap.Add(typeof(OIALModel), 0);
                createElementMap.Add(typeof(ConceptType), 1);
                createElementMap.Add(typeof(InformationTypeFormat), 2);
                createElementMap.Add(typeof(ChildSequence), 3);
                createElementMap.Add(typeof(SingleChildUniquenessConstraint), 4);
                createElementMap.Add(typeof(SingleChildFrequencyConstraint), 5);
                createElementMap.Add(typeof(ValueConstraint), 6);
                createElementMap.Add(typeof(ChildSequenceFrequencyConstraint), 7);
                createElementMap.Add(typeof(RingConstraint), 8);
                createElementMap.Add(typeof(DisjunctiveMandatoryConstraint), 9);
                createElementMap.Add(typeof(ChildSequenceUniquenessConstraint), 10);
                createElementMap.Add(typeof(MinTwoChildrenChildSequence), 11);
                createElementMap.Add(typeof(SubsetConstraint), 12);
                createElementMap.Add(typeof(ExclusionConstraint), 13);
                createElementMap.Add(typeof(EqualityConstraint), 14);
            }
            int index;

            if (!createElementMap.TryGetValue(elementType, out index))
            {
                throw new global::System.ArgumentException("elementType is not recognized as a type of domain class which belongs to this domain model.");
            }
            switch (index)
            {
            case 0: return(new OIALModel(partition, propertyAssignments));

            case 1: return(new ConceptType(partition, propertyAssignments));

            case 2: return(new InformationTypeFormat(partition, propertyAssignments));

            case 3: return(new ChildSequence(partition, propertyAssignments));

            case 4: return(new SingleChildUniquenessConstraint(partition, propertyAssignments));

            case 5: return(new SingleChildFrequencyConstraint(partition, propertyAssignments));

            case 6: return(new ValueConstraint(partition, propertyAssignments));

            case 7: return(new ChildSequenceFrequencyConstraint(partition, propertyAssignments));

            case 8: return(new RingConstraint(partition, propertyAssignments));

            case 9: return(new DisjunctiveMandatoryConstraint(partition, propertyAssignments));

            case 10: return(new ChildSequenceUniquenessConstraint(partition, propertyAssignments));

            case 11: return(new MinTwoChildrenChildSequence(partition, propertyAssignments));

            case 12: return(new SubsetConstraint(partition, propertyAssignments));

            case 13: return(new ExclusionConstraint(partition, propertyAssignments));

            case 14: return(new EqualityConstraint(partition, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 10
0
 /// <summary>
 /// Customize Model and Diagram Loading.
 /// </summary>
 /// <param name="serializationResult">Stores serialization result from the load operation.</param>
 /// <param name="modelPartition">Partition in which the new DslLibrary instance will be created.</param>
 /// <param name="modelFileName">Name of the file from which the DslLibrary instance will be deserialized.</param>
 /// <param name="diagramPartition">Partition in which the new DslDesignerDiagram instance will be created.</param>
 /// <param name="diagramFileName">Name of the file from which the DslDesignerDiagram instance will be deserialized.</param>
 /// <param name="modelRoot">The root of the file that was loaded.</param>
 /// <param name="diagram">The diagram matching the modelRoot.</param>
 private void OnPostLoadModelAndDiagram(DslModeling::SerializationResult serializationResult, DslModeling::Partition modelPartition, string modelFileName, DslModeling::Partition diagramPartition, string diagramFileName, nHydrateModel modelRoot, nHydrateDiagram diagram)
 {
 }
Exemplo n.º 11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public SpecificElementsDiagramTemplate(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 /// Customize Model Loading.
 /// </summary>
 /// <param name="serializationResult">Stores serialization result from the load operation.</param>
 /// <param name="partition">Partition in which the new nHydrateModel instance will be created.</param>
 /// <param name="fileName">Name of the file from which the nHydrateModel instance will be deserialized.</param>
 /// <param name="modelRoot">The root of the file that was loaded.</param>
 private void OnPostLoadModel(DslModeling::SerializationResult serializationResult, DslModeling::Partition partition, string fileName, nHydrateModel modelRoot)
 {
     //this.LoadModelAndDiagram
 }
Exemplo n.º 13
0
        public override nHydrateModel LoadModelAndDiagram(DslModeling::SerializationResult serializationResult, DslModeling::Partition modelPartition, string modelFileName, DslModeling::Partition diagramPartition, string diagramFileName, DslModeling::ISchemaResolver schemaResolver, DslValidation::ValidationController validationController, DslModeling::ISerializerLocator serializerLocator)
        {
            var modelRoot = base.LoadModelAndDiagram(serializationResult, modelPartition, modelFileName, diagramPartition, diagramFileName, schemaResolver, validationController, serializerLocator);

            _model = modelRoot;

            //Verify that we can open the model
            var thisAssem     = System.Reflection.Assembly.GetExecutingAssembly();
            var thisAssemName = thisAssem.GetName();
            var toolVersion   = thisAssemName.Version;
            var modelVersion  = new Version(0, 0);
            var dslVersion    = new Version(0, 0);

            if (!string.IsNullOrEmpty(modelRoot.ModelVersion))
            {
                modelVersion = new Version(modelRoot.ModelVersion);
            }

            if (toolVersion < modelVersion)
            {
                throw new Exception("This model was created with newer version of the modeler. Please install version '" + modelVersion.ToString() + "' or higher.");
            }

            try
            {
                var document = new XmlDocument();
                document.LoadXml(File.ReadAllText(modelFileName));
                var attr = document.DocumentElement.Attributes["dslVersion"];
                if (attr != null)
                {
                    dslVersion = new Version(attr.Value);
                }
            }
            catch { }

            //When saved the new version will be this tool version
            modelRoot.ModelVersion  = LAST_MODEL_MODEL_COMPATIBLE;
            modelRoot.ModelFileName = modelFileName;

            modelRoot.IsDirty = false;

            var mainInfo  = new FileInfo(modelFileName);
            var modelName = mainInfo.Name.Replace(".nhydrate", ".model");

            if (modelRoot.ModelToDisk)
            {
                //Load from disk store
                nHydrate.Dsl.Custom.SQLFileManagement.LoadFromDisk(modelRoot, mainInfo.DirectoryName, modelRoot.Partition.Store, modelName);

                #region Watch Folder
                //var modelFolder = nHydrate.Dsl.Custom.SQLFileManagement.GetModelFolder(mainInfo.DirectoryName, modelName);
                //_watchFolder.Path = modelFolder;
                //_watchFolder.IncludeSubdirectories = true;
                //_watchFolder.NotifyFilter = System.IO.NotifyFilters.FileName |
                //	NotifyFilters.LastWrite |
                //	NotifyFilters.Size |
                //	NotifyFilters.CreationTime |
                //	NotifyFilters.DirectoryName;

                //_watchFolder.Changed += new FileSystemEventHandler(FolderChangedEvent);
                //_watchFolder.Created += new FileSystemEventHandler(FolderChangedEvent);
                //_watchFolder.Deleted += new FileSystemEventHandler(FolderChangedEvent);
                //_watchFolder.Renamed += new System.IO.RenamedEventHandler(FolderFileRenamedEvent);

                //try
                //{
                //	_watchFolder.EnableRaisingEvents = true;
                //}
                //catch (ArgumentException)
                //{
                //	//Do Nothing
                //}
                #endregion
            }
            else
            {
                try
                {
                    var f = nHydrate.Dsl.Custom.SQLFileManagement.GetModelFolder(mainInfo.DirectoryName, modelName);
                    if (Directory.Exists(f))
                    {
                        Directory.Delete(f, true);
                    }
                }
                catch
                {
                }
            }

            modelRoot.IsDirty = false;

            //SyncServer
            //var syncServerFile = modelFileName + ".syncserver";
            //modelRoot.SyncServerURL = nHydrate.SyncServer.Client.SyncDomain.LoadSyncServerConfig(syncServerFile);

            //Alphabetized columns if need be
            //foreach (var entity in modelRoot.Entities)
            //{
            //  entity.Fields.Sort((x, y) => x.Name.CompareTo(y.Name));
            //}

            #region Load Indexes

            //For now load the indexes into the REAL indexes collection
            //This should only happens the first time
            using (var transaction = modelRoot.Store.TransactionManager.BeginTransaction(Guid.NewGuid().ToString()))
            {
                LoadInitialIndexes(modelRoot);
                transaction.Commit();
            }

            #endregion

            #region Handle the Precedence

            if (modelRoot.StoredProcedures.Count > 0)
            {
                modelRoot.MaxPrecedenceOrder = Math.Max(modelRoot.StoredProcedures.Max(x => x.PrecedenceOrder), modelRoot.MaxPrecedenceOrder);
            }
            if (modelRoot.Views.Count > 0)
            {
                modelRoot.MaxPrecedenceOrder = Math.Max(modelRoot.Views.Max(x => x.PrecedenceOrder), modelRoot.MaxPrecedenceOrder);
            }
            if (modelRoot.Functions.Count > 0)
            {
                modelRoot.MaxPrecedenceOrder = Math.Max(modelRoot.Functions.Max(x => x.PrecedenceOrder), modelRoot.MaxPrecedenceOrder);
            }

            modelRoot.StoredProcedures.Where(x => x.PrecedenceOrder == 0).ToList().ForEach(x => x.PrecedenceOrder = ++modelRoot.MaxPrecedenceOrder);
            modelRoot.Views.Where(x => x.PrecedenceOrder == 0).ToList().ForEach(x => x.PrecedenceOrder            = ++modelRoot.MaxPrecedenceOrder);
            modelRoot.Functions.Where(x => x.PrecedenceOrder == 0).ToList().ForEach(x => x.PrecedenceOrder        = ++modelRoot.MaxPrecedenceOrder);

            #endregion

            #region Load the refactorizations

            if (File.Exists(modelFileName))
            {
                var fi = new FileInfo(modelFileName);
                if (fi.Length > 5)
                {
                    var document = new XmlDocument();
                    document.Load(modelFileName);
                    if (document.DocumentElement != null)
                    {
                        var refactorList = document.DocumentElement.SelectSingleNode("refactorizations");
                        if (refactorList != null)
                        {
                            foreach (XmlNode n in refactorList.ChildNodes)
                            {
                                //if (XmlHelper.GetAttributeValue(n, "type", string.Empty) == "guidtoid")
                                //{
                                //  modelRoot.Refactorizations.Add(new RefactorChangeGuidToID((XmlElement)n));
                                //}
                                //else if (XmlHelper.GetAttributeValue(n, "type", string.Empty) == "guidtoididtoguid")
                                //{
                                //  modelRoot.Refactorizations.Add(new RefactorChangeIDToGuid((XmlElement)n));
                                //}
                                if (XmlHelper.GetAttributeValue(n, "type", string.Empty) == "splittable")
                                {
                                    modelRoot.Refactorizations.Add(new RefactorTableSplit((XmlElement)n));
                                }
                                else if (XmlHelper.GetAttributeValue(n, "type", string.Empty) == "combinetable")
                                {
                                    modelRoot.Refactorizations.Add(new RefactorTableCombine((XmlElement)n));
                                }
                            }
                        }
                    }
                }
            }

            #endregion

            //If using modules from a previous model version then perform this one time action of
            //assigning the indexes to all modules  so user will not be confronted with a a huge action to perform after upgrade
            if (dslVersion <= new Version(5, 1, 2, 118) && modelRoot.UseModules)
            {
                using (var transaction = modelRoot.Store.TransactionManager.BeginTransaction(Guid.NewGuid().ToString()))
                {
                    foreach (var module in modelRoot.Modules)
                    {
                        var contained = module.GetEntities().ToList();
                        foreach (var index in modelRoot.Entities.Where(x => contained.Contains(x)).SelectMany(x => x.IndexList))
                        {
                            _model.IndexModules.Add(new IndexModule(_model.Partition)
                            {
                                IndexID = index.Id, ModuleId = module.Id
                            });
                        }
                    }
                    transaction.Commit();
                }
            }

            return(modelRoot);
        }
Exemplo n.º 14
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ClasePrincipalShape(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 15
0
        public sealed override DslModeling::ModelElement CreateElement(DslModeling::Partition partition, global::System.Type elementType, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementType == null)
            {
                throw new global::System.ArgumentNullException("elementType");
            }

            if (createElementMap == null)
            {
                createElementMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(12);
                createElementMap.Add(typeof(BizTalkMessagingModel), 0);
                createElementMap.Add(typeof(Application), 1);
                createElementMap.Add(typeof(OutPort), 2);
                createElementMap.Add(typeof(InPort), 3);
                createElementMap.Add(typeof(Broker), 4);
                createElementMap.Add(typeof(BizTalkMessagingDiagram), 5);
                createElementMap.Add(typeof(ConnectionApplication_InPort), 6);
                createElementMap.Add(typeof(ConnectionOutPort_Application), 7);
                createElementMap.Add(typeof(ApplicationShape), 8);
                createElementMap.Add(typeof(BrokerShape), 9);
                createElementMap.Add(typeof(OutPortShape), 10);
                createElementMap.Add(typeof(InPortShape), 11);
            }
            int index;

            if (!createElementMap.TryGetValue(elementType, out index))
            {
                // construct exception error message
                string exceptionError = string.Format(
                    global::System.Globalization.CultureInfo.CurrentCulture,
                    global::BizTalkMessaging.BizTalkMessagingDomainModel.SingletonResourceManager.GetString("UnrecognizedElementType"),
                    elementType.Name);
                throw new global::System.ArgumentException(exceptionError, "elementType");
            }
            switch (index)
            {
            case 0: return(new BizTalkMessagingModel(partition, propertyAssignments));

            case 1: return(new Application(partition, propertyAssignments));

            case 2: return(new OutPort(partition, propertyAssignments));

            case 3: return(new InPort(partition, propertyAssignments));

            case 4: return(new Broker(partition, propertyAssignments));

            case 5: return(new BizTalkMessagingDiagram(partition, propertyAssignments));

            case 6: return(new ConnectionApplication_InPort(partition, propertyAssignments));

            case 7: return(new ConnectionOutPort_Application(partition, propertyAssignments));

            case 8: return(new ApplicationShape(partition, propertyAssignments));

            case 9: return(new BrokerShape(partition, propertyAssignments));

            case 10: return(new OutPortShape(partition, propertyAssignments));

            case 11: return(new InPortShape(partition, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 16
0
        public sealed override DslModeling::ElementLink CreateElementLink(DslModeling::Partition partition, global::System.Type elementLinkType, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementLinkType == null)
            {
                throw new global::System.ArgumentNullException("elementType");
            }
            if (roleAssignments == null)
            {
                throw new global::System.ArgumentNullException("roleAssignments");
            }

            if (createElementLinkMap == null)
            {
                createElementLinkMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(18);
                createElementLinkMap.Add(typeof(OIALModelHasORMModel), 0);
                createElementLinkMap.Add(typeof(OIALModelHasConceptType), 1);
                createElementLinkMap.Add(typeof(ConceptTypeAbsorbedConceptType), 2);
                createElementLinkMap.Add(typeof(InformationType), 3);
                createElementLinkMap.Add(typeof(OIALHasInformationTypeFormat), 4);
                createElementLinkMap.Add(typeof(ConceptTypeRef), 5);
                createElementLinkMap.Add(typeof(InformationTypeFormatHasObjectType), 6);
                createElementLinkMap.Add(typeof(ConceptTypeHasObjectType), 7);
                createElementLinkMap.Add(typeof(SingleChildSequenceConstraintHasMinTwoChildrenChildSequence), 8);
                createElementLinkMap.Add(typeof(SubsetConstraintHasSubChildSequence), 9);
                createElementLinkMap.Add(typeof(SubsetConstraintHasSuperChildSequence), 10);
                createElementLinkMap.Add(typeof(TwoOrMoreChildSequenceConstraintHasChildSequence), 11);
                createElementLinkMap.Add(typeof(ChildHasSingleChildConstraint), 12);
                createElementLinkMap.Add(typeof(OIALModelHasChildSequenceConstraint), 13);
                createElementLinkMap.Add(typeof(ConceptTypeChildHasPathRole), 14);
                createElementLinkMap.Add(typeof(ChildSequenceHasConceptTypeChild), 15);
            }
            int index;

            if (!createElementLinkMap.TryGetValue(elementLinkType, out index))
            {
                throw new global::System.ArgumentException("elementLinkType is not recognized as a type of domain relationship which belongs to this domain model.");
            }
            switch (index)
            {
            case 0: return(new OIALModelHasORMModel(partition, roleAssignments, propertyAssignments));

            case 1: return(new OIALModelHasConceptType(partition, roleAssignments, propertyAssignments));

            case 2: return(new ConceptTypeAbsorbedConceptType(partition, roleAssignments, propertyAssignments));

            case 3: return(new InformationType(partition, roleAssignments, propertyAssignments));

            case 4: return(new OIALHasInformationTypeFormat(partition, roleAssignments, propertyAssignments));

            case 5: return(new ConceptTypeRef(partition, roleAssignments, propertyAssignments));

            case 6: return(new InformationTypeFormatHasObjectType(partition, roleAssignments, propertyAssignments));

            case 7: return(new ConceptTypeHasObjectType(partition, roleAssignments, propertyAssignments));

            case 8: return(new SingleChildSequenceConstraintHasMinTwoChildrenChildSequence(partition, roleAssignments, propertyAssignments));

            case 9: return(new SubsetConstraintHasSubChildSequence(partition, roleAssignments, propertyAssignments));

            case 10: return(new SubsetConstraintHasSuperChildSequence(partition, roleAssignments, propertyAssignments));

            case 11: return(new TwoOrMoreChildSequenceConstraintHasChildSequence(partition, roleAssignments, propertyAssignments));

            case 12: return(new ChildHasSingleChildConstraint(partition, roleAssignments, propertyAssignments));

            case 13: return(new OIALModelHasChildSequenceConstraint(partition, roleAssignments, propertyAssignments));

            case 14: return(new ConceptTypeChildHasPathRole(partition, roleAssignments, propertyAssignments));

            case 15: return(new ChildSequenceHasConceptTypeChild(partition, roleAssignments, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 17
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public TestShape(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
 private DslModeling::ModelElement CustomCreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
 {
     return(DefaultCreateInstance(serializationContext, reader, partition));
 }
Exemplo n.º 19
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ConceptType(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
 private DslModeling::Moniker CustomCreateMonikerInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::ModelElement sourceRolePlayer, global::System.Guid relDomainClassId, DslModeling::Partition partition)
 {
     return(DefaultCreateMonikerInstance(serializationContext, reader, sourceRolePlayer, relDomainClassId, partition));
 }
Exemplo n.º 21
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public AbstractionModel(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 22
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public IndexColumn(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 23
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ResultConnector(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 24
0
        public sealed override DslModeling::ElementLink CreateElementLink(DslModeling::Partition partition, global::System.Type elementLinkType, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementLinkType == null)
            {
                throw new global::System.ArgumentNullException("elementLinkType");
            }
            if (roleAssignments == null)
            {
                throw new global::System.ArgumentNullException("roleAssignments");
            }

            if (createElementLinkMap == null)
            {
                createElementLinkMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(14);
                createElementLinkMap.Add(typeof(AssimilationMappingCustomizesFactType), 0);
                createElementLinkMap.Add(typeof(MappingCustomizationModelHasAssimilationMapping), 1);
                createElementLinkMap.Add(typeof(ReferenceModeNamingCustomizesObjectType), 2);
                createElementLinkMap.Add(typeof(MappingCustomizationModelHasReferenceModeNaming), 3);
                createElementLinkMap.Add(typeof(DefaultReferenceModeNamingCustomizesORMModel), 4);
                createElementLinkMap.Add(typeof(MappingCustomizationModelHasDefaultReferenceModeNaming), 5);
                createElementLinkMap.Add(typeof(SchemaIsForAbstractionModel), 6);
                createElementLinkMap.Add(typeof(TableIsPrimarilyForConceptType), 7);
                createElementLinkMap.Add(typeof(TableIsAlsoForConceptType), 8);
                createElementLinkMap.Add(typeof(TableIsAlsoForConceptTypeHasAssimilationPath), 9);
                createElementLinkMap.Add(typeof(ColumnHasConceptTypeChild), 10);
                createElementLinkMap.Add(typeof(UniquenessConstraintIsForUniqueness), 11);
                createElementLinkMap.Add(typeof(DomainIsForInformationTypeFormat), 12);
                createElementLinkMap.Add(typeof(GenerationSettingTargetsSchema), 13);
            }
            int index;

            if (!createElementLinkMap.TryGetValue(elementLinkType, out index))
            {
                // construct exception error message
                string exceptionError = string.Format(
                    global::System.Globalization.CultureInfo.CurrentCulture,
                    global::ORMSolutions.ORMArchitect.ORMAbstractionToConceptualDatabaseBridge.ORMAbstractionToConceptualDatabaseBridgeDomainModel.SingletonResourceManager.GetString("UnrecognizedElementLinkType"),
                    elementLinkType.Name);
                throw new global::System.ArgumentException(exceptionError, "elementLinkType");
            }
            switch (index)
            {
            case 0: return(new AssimilationMappingCustomizesFactType(partition, roleAssignments, propertyAssignments));

            case 1: return(new MappingCustomizationModelHasAssimilationMapping(partition, roleAssignments, propertyAssignments));

            case 2: return(new ReferenceModeNamingCustomizesObjectType(partition, roleAssignments, propertyAssignments));

            case 3: return(new MappingCustomizationModelHasReferenceModeNaming(partition, roleAssignments, propertyAssignments));

            case 4: return(new DefaultReferenceModeNamingCustomizesORMModel(partition, roleAssignments, propertyAssignments));

            case 5: return(new MappingCustomizationModelHasDefaultReferenceModeNaming(partition, roleAssignments, propertyAssignments));

            case 6: return(new SchemaIsForAbstractionModel(partition, roleAssignments, propertyAssignments));

            case 7: return(new TableIsPrimarilyForConceptType(partition, roleAssignments, propertyAssignments));

            case 8: return(new TableIsAlsoForConceptType(partition, roleAssignments, propertyAssignments));

            case 9: return(new TableIsAlsoForConceptTypeHasAssimilationPath(partition, roleAssignments, propertyAssignments));

            case 10: return(new ColumnHasConceptTypeChild(partition, roleAssignments, propertyAssignments));

            case 11: return(new UniquenessConstraintIsForUniqueness(partition, roleAssignments, propertyAssignments));

            case 12: return(new DomainIsForInformationTypeFormat(partition, roleAssignments, propertyAssignments));

            case 13: return(new GenerationSettingTargetsSchema(partition, roleAssignments, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 25
0
 // Constructors were not generated for this relationship because it had HasCustomConstructor
 // set to true. Please provide the constructors below in a partial class.
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="partition">The Partition instance containing this ElementLink</param>
 /// <param name="roleAssignments">A set of role assignments for roleplayer initialization</param>
 /// <param name="propertyAssignments">A set of attribute assignments for attribute initialization</param>
 protected EntityInheritsEntityBase(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, roleAssignments, propertyAssignments)
 {
 }
Exemplo n.º 26
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 protected DesignConnector(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 27
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new link is to be created.</param>
 /// <param name="roleAssignments">List of relationship role assignments.</param>
 /// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
 public EntityInheritsEntity(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, roleAssignments, propertyAssignments)
 {
     this.InternalId = Guid.NewGuid();
 }
Exemplo n.º 28
0
        public sealed override DslModeling::ModelElement CreateElement(DslModeling::Partition partition, global::System.Type elementType, DslModeling::PropertyAssignment[] propertyAssignments)
        {
            if (elementType == null)
            {
                throw new global::System.ArgumentNullException("elementType");
            }

            if (createElementMap == null)
            {
                createElementMap = new global::System.Collections.Generic.Dictionary <global::System.Type, int>(14);
                createElementMap.Add(typeof(Tapiz), 0);
                createElementMap.Add(typeof(Entidad), 1);
                createElementMap.Add(typeof(Relacion), 2);
                createElementMap.Add(typeof(Atributo), 3);
                createElementMap.Add(typeof(ClavePrimaria), 4);
                createElementMap.Add(typeof(AtributoEntidad), 5);
                createElementMap.Add(typeof(AtributoRelacion), 6);
                createElementMap.Add(typeof(XCXABGProyectoIPSDiagram), 7);
                createElementMap.Add(typeof(EntidadRelacion), 8);
                createElementMap.Add(typeof(EntidadGS), 9);
                createElementMap.Add(typeof(RelacionGS), 10);
                createElementMap.Add(typeof(AtributoRelacionGS), 11);
                createElementMap.Add(typeof(AtributoEntidadGS), 12);
                createElementMap.Add(typeof(ClavePrimariaGS), 13);
            }
            int index;

            if (!createElementMap.TryGetValue(elementType, out index))
            {
                // construct exception error message
                string exceptionError = string.Format(
                    global::System.Globalization.CultureInfo.CurrentCulture,
                    global::IPS_GT16.XCXABGProyectoIPS.XCXABGProyectoIPSDomainModel.SingletonResourceManager.GetString("UnrecognizedElementType"),
                    elementType.Name);
                throw new global::System.ArgumentException(exceptionError, "elementType");
            }
            switch (index)
            {
            case 0: return(new Tapiz(partition, propertyAssignments));

            case 1: return(new Entidad(partition, propertyAssignments));

            case 2: return(new Relacion(partition, propertyAssignments));

            case 3: return(new Atributo(partition, propertyAssignments));

            case 4: return(new ClavePrimaria(partition, propertyAssignments));

            case 5: return(new AtributoEntidad(partition, propertyAssignments));

            case 6: return(new AtributoRelacion(partition, propertyAssignments));

            case 7: return(new XCXABGProyectoIPSDiagram(partition, propertyAssignments));

            case 8: return(new EntidadRelacion(partition, propertyAssignments));

            case 9: return(new EntidadGS(partition, propertyAssignments));

            case 10: return(new RelacionGS(partition, propertyAssignments));

            case 11: return(new AtributoRelacionGS(partition, propertyAssignments));

            case 12: return(new AtributoEntidadGS(partition, propertyAssignments));

            case 13: return(new ClavePrimariaGS(partition, propertyAssignments));

            default: return(null);
            }
        }
Exemplo n.º 29
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public Family(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public SlideShowDesignerDiagram(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }
Exemplo n.º 31
0
		/// <summary>
		/// Loads a HostDesignerModel instance and its associated diagram file into the default partition of the given store.
		/// </summary>
		/// <param name="serializationResult">Stores serialization result from the load operation.</param>
		/// <param name="store">The new HostDesignerModel instance will be created into the default partition of this store.</param>
		/// <param name="modelFileName">Name of the file from which the HostDesignerModel instance will be deserialized.</param>
		/// <param name="diagramFileName">Name of the file from which the HostDesignerDiagram instance will be deserialized.</param>
		/// <param name="schemaResolver">
		/// An ISchemaResolver that allows the serializer to do schema validation on the root element (and everything inside it).
		/// If null is passed, schema validation will not be performed.
		/// </param>
		/// <param name="validationController">
		/// A ValidationController that will be used to do load-time validation (validations with validation category "Load"). If null
		/// is passed, load-time validation will not be performed.
		/// </param>
		/// <param name="serializerLocator">
		/// An ISerializerLocator that will be used to locate any additional domain model types required to load the model. Can be null.
		/// </param>
		/// <returns>The loaded HostDesignerModel instance.</returns>
		public virtual HostDesignerModel LoadModelAndDiagram(DslModeling::SerializationResult serializationResult, DslModeling::Store store, string modelFileName, string diagramFileName, DslModeling::ISchemaResolver schemaResolver, DslValidation::ValidationController validationController, DslModeling::ISerializerLocator serializerLocator)
		{
			#region Check Parameters
			if (store == null)
				throw new global::System.ArgumentNullException("store");
			#endregion
			
			DslModeling::Partition diagramPartition = new DslModeling::Partition(store);
			return this.LoadModelAndDiagram(serializationResult, store.DefaultPartition, modelFileName, diagramPartition, diagramFileName, schemaResolver, validationController, serializerLocator);
		}
Exemplo n.º 32
0
Arquivo: Shapes.cs Projeto: rariv/IPS
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="partition">Partition where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ClaseDisplay(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
     : base(partition, propertyAssignments)
 {
 }