Esempio n. 1
0
        public EAClass createEAClassFromXMLNode(XmlNode xmlNode)
        {
            XmlElement xmlElement = xmlNode as XmlElement;
            string     name       = xmlElement.GetAttribute("name");
            string     id         = xmlElement.GetAttribute("xmi:id");
            string     stereoType = getFaceType(xmlNode);
            EAClass    eaClass    = new EAClass(name, stereoType, id);
            string     realizeId  = xmlElement.GetAttribute("realizes");

            if (realizeId != "")
            {
                eaClass.RealizeClassID = realizeId;
            }
            string measurementAxis = xmlElement.GetAttribute("measurementAxis");

            if (measurementAxis != "")
            {
                List <string> measurementList = measurementAxis.Split(' ').ToList();
            }
            foreach (XmlNode n in xmlNode.ChildNodes)
            {
                XmlElement  element     = n as XmlElement;
                EAAttribute eAAttribute = null;
                if (isAttribute(n))
                {
                    eAAttribute = new EAAttribute(element.GetAttribute(attributeStr), getFaceType(n));
                }
                if (eAAttribute != null && isAttributeClass(n))
                {
                    eAAttribute.Name      = element.GetAttribute("name");
                    eAAttribute.IsEAClass = true;
                }

                if (eAAttribute != null)
                {
                    eaClass.addAttribute(eAAttribute);
                }
            }
            return(eaClass);
        }
Esempio n. 2
0
 public void removeAttribute(EAAttribute attribute)
 {
     this.attributes.Remove(attribute);
 }
Esempio n. 3
0
 public void addAttribute(EAAttribute attribute)
 {
     this.attributes.Add(attribute);
 }