Beispiel #1
0
 public PSMGeneralization(Project p, Guid g, PSMClass general, PSMClass specific, PSMSchema schema)
     : base(p, g)
 {
     General  = general;
     Specific = specific;
     General.GeneralizationsAsGeneral.Add(this);
     Specific.GeneralizationAsSpecific = this;
     schema.PSMGeneralizations.Add(this);
 }
Beispiel #2
0
        public override Path GetXPathFull(bool followGeneralizations)
        {
            Path result        = PSMClass.GetXPathFull().DeepCopy();
            Step attributeStep = new Step {
                NodeTest = Name, Axis = Axis.attribute
            };

            result.AddStep(attributeStep);
            return(result);
        }
Beispiel #3
0
 public PSMAttribute(Project p, Guid g, PSMClass c, PSMSchema schema, int index = -1)
     : base(p, g)
 {
     schema.PSMAttributes.Add(this);
     if (index == -1)
     {
         c.PSMAttributes.Add(this);
     }
     else
     {
         c.PSMAttributes.Insert(this, index);
     }
     PSMClass = c;
 }
Beispiel #4
0
        public override void FillCopy(IExolutioCloneable copyComponent, ProjectVersion projectVersion,
                                      ElementCopiesMap createdCopies)
        {
            base.FillCopy(copyComponent, projectVersion, createdCopies);

            PSMClass copyPSMClass = (PSMClass)copyComponent;

            if (RepresentedClass != null)
            {
                copyPSMClass.representedClassGuid = createdCopies.GetGuidForCopyOf(RepresentedClass);
            }
            this.CopyCollection(PSMAttributes, copyPSMClass.PSMAttributes, projectVersion, createdCopies);
            copyPSMClass.Abstract = this.Abstract;
            copyPSMClass.Final    = this.Final;
        }