Пример #1
0
        public override void FillCopy(IExolutioCloneable copyComponent, ProjectVersion projectVersion,
                                      ElementCopiesMap createdCopies)
        {
            base.FillCopy(copyComponent, projectVersion, createdCopies);

            PSMSchemaClass copyPSMSchemaClass = (PSMSchemaClass)copyComponent;
        }
Пример #2
0
 public void UnRegisterPSMSchemaClass(PSMSchemaClass psmSchemaClass)
 {
     psmSchemaClass.Schema = null;
     psmSchemaClassGuid    = Guid.Empty;
     UnregisterPSMComponent(psmSchemaClass);
     NotifyPropertyChanged("PSMSchemaClass");
 }
Пример #3
0
 public void RegisterPSMSchemaClass(PSMSchemaClass psmSchemaClass)
 {
     psmSchemaClass.Schema = this;
     psmSchemaClassGuid    = psmSchemaClass;
     RegisterPSMComponent(psmSchemaClass);
     NotifyPropertyChanged("PSMSchemaClass");
 }
Пример #4
0
        public override void FillCopy(IExolutioCloneable copyComponent, ProjectVersion projectVersion,
                                      ElementCopiesMap createdCopies)
        {
            base.FillCopy(copyComponent, projectVersion, createdCopies);

            PSMSchema copyPSMSchema = (PSMSchema)copyComponent;

            copyPSMSchema.SetProjectVersion(projectVersion);

            if (PSMSchemaClass != null)
            {
                PSMSchemaClass psmSchemaClass = PSMSchemaClass.CreateTypedCopy(projectVersion, createdCopies);
                copyPSMSchema.RegisterPSMSchemaClass(psmSchemaClass);
            }
            this.CopyCollection(PSMClasses, copyPSMSchema.PSMClasses, projectVersion, createdCopies);
            this.CopyCollection(PSMAssociations, copyPSMSchema.PSMAssociations, projectVersion, createdCopies);
            this.CopyCollection(PSMContentModels, copyPSMSchema.PSMContentModels, projectVersion, createdCopies);
            this.CopyRefCollection(PSMAttributes, copyPSMSchema.PSMAttributes, projectVersion, createdCopies);
            this.CopyRefCollection(Roots, copyPSMSchema.Roots, projectVersion, createdCopies);
        }
Пример #5
0
        public override void Deserialize(XElement parentNode, SerializationContext context)
        {
            base.Deserialize(parentNode, context);
            context.CurrentSchemaGuid = this;

            if (parentNode.Element(context.ExolutioNS + "PSMSchemaReferences") != null)
            {
                this.DeserializeWrappedCollection("PSMSchemaReferences", PSMSchemaReferences, PSMSchemaReference.CreateInstance, parentNode, context);
            }

            if (parentNode.Element(context.ExolutioNS + "PSMSchemaClass") != null)
            {
                PSMSchemaClass objPSMSchemaClass = new PSMSchemaClass(Project, Guid.Empty);
                objPSMSchemaClass.DeserializeFromChildElement("PSMSchemaClass", parentNode, context);
                RegisterPSMSchemaClass(objPSMSchemaClass);
            }

            this.DeserializeWrappedIDRefCollection("Roots", "rootID", Roots, parentNode, context);
            this.DeserializeWrappedCollection("PSMClasses", PSMClasses, PSMClass.CreateInstance, parentNode, context);
            this.DeserializeWrappedCollection("PSMGeneralizations", PSMGeneralizations, PSMGeneralization.CreateInstance, parentNode, context);
            this.DeserializeWrappedCollection("PSMAssociations", PSMAssociations, PSMAssociation.CreateInstance, parentNode, context);
            this.DeserializeWrappedCollection("PSMContentModels", PSMContentModels, PSMContentModel.CreateInstance, parentNode, context);
            this.DeserializeWrappedCollection("PSMSchemaDefinedTypes", PSMSchemaDefinedTypes, AttributeType.CreateInstance, parentNode, context, true);

            foreach (PSMAssociation psmAssociation in PSMAssociations)
            {
                // assignment has sideffects
                psmAssociation.Parent = psmAssociation.Parent;
            }

            foreach (PSMGeneralization psmGeneralization in PSMGeneralizations)
            {
                // assignment has sideffects
                psmGeneralization.General = psmGeneralization.General;
            }

            base.DeserializeRemaining(parentNode, context);
            context.CurrentSchemaGuid = Guid.Empty;
        }