public ContractualMatrix(XmlNode xmlNode)
 {
     XmlNode matrixTypeNode = xmlNode.SelectSingleNode("matrixType");
     
     if (matrixTypeNode != null)
     {
         if (matrixTypeNode.Attributes["href"] != null || matrixTypeNode.Attributes["id"] != null) 
         {
             if (matrixTypeNode.Attributes["id"] != null) 
             {
                 matrixTypeIDRef_ = matrixTypeNode.Attributes["id"].Value;
                 MatrixType ob = new MatrixType(matrixTypeNode);
                 IDManager.SetID(matrixTypeIDRef_, ob);
             }
             else if (matrixTypeNode.Attributes["href"] != null)
             {
                 matrixTypeIDRef_ = matrixTypeNode.Attributes["href"].Value;
             }
             else
             {
                 matrixType_ = new MatrixType(matrixTypeNode);
             }
         }
         else
         {
             matrixType_ = new MatrixType(matrixTypeNode);
         }
     }
     
 
     XmlNode publicationDateNode = xmlNode.SelectSingleNode("publicationDate");
     
     if (publicationDateNode != null)
     {
         if (publicationDateNode.Attributes["href"] != null || publicationDateNode.Attributes["id"] != null) 
         {
             if (publicationDateNode.Attributes["id"] != null) 
             {
                 publicationDateIDRef_ = publicationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(publicationDateNode);
                 IDManager.SetID(publicationDateIDRef_, ob);
             }
             else if (publicationDateNode.Attributes["href"] != null)
             {
                 publicationDateIDRef_ = publicationDateNode.Attributes["href"].Value;
             }
             else
             {
                 publicationDate_ = new XsdTypeDate(publicationDateNode);
             }
         }
         else
         {
             publicationDate_ = new XsdTypeDate(publicationDateNode);
         }
     }
     
 
     XmlNode matrixTermNode = xmlNode.SelectSingleNode("matrixTerm");
     
     if (matrixTermNode != null)
     {
         if (matrixTermNode.Attributes["href"] != null || matrixTermNode.Attributes["id"] != null) 
         {
             if (matrixTermNode.Attributes["id"] != null) 
             {
                 matrixTermIDRef_ = matrixTermNode.Attributes["id"].Value;
                 MatrixTerm ob = new MatrixTerm(matrixTermNode);
                 IDManager.SetID(matrixTermIDRef_, ob);
             }
             else if (matrixTermNode.Attributes["href"] != null)
             {
                 matrixTermIDRef_ = matrixTermNode.Attributes["href"].Value;
             }
             else
             {
                 matrixTerm_ = new MatrixTerm(matrixTermNode);
             }
         }
         else
         {
             matrixTerm_ = new MatrixTerm(matrixTermNode);
         }
     }
     
 
 }
示例#2
0
        public ContractualMatrix(XmlNode xmlNode)
        {
            XmlNodeList matrixTypeNodeList = xmlNode.SelectNodes("matrixType");

            if (matrixTypeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in matrixTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        matrixTypeIDRef = item.Attributes["id"].Name;
                        MatrixType ob = MatrixType();
                        IDManager.SetID(matrixTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        matrixTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        matrixType = new MatrixType(item);
                    }
                }
            }


            XmlNodeList publicationDateNodeList = xmlNode.SelectNodes("publicationDate");

            if (publicationDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in publicationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        publicationDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(publicationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        publicationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        publicationDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList matrixTermNodeList = xmlNode.SelectNodes("matrixTerm");

            if (matrixTermNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in matrixTermNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        matrixTermIDRef = item.Attributes["id"].Name;
                        MatrixTerm ob = MatrixTerm();
                        IDManager.SetID(matrixTermIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        matrixTermIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        matrixTerm = new MatrixTerm(item);
                    }
                }
            }
        }