public GenericAgreement(XmlNode xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; AgreementType ob = new AgreementType(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new AgreementType(typeNode); } } else { type_ = new AgreementType(typeNode); } } XmlNode versionNode = xmlNode.SelectSingleNode("version"); if (versionNode != null) { if (versionNode.Attributes["href"] != null || versionNode.Attributes["id"] != null) { if (versionNode.Attributes["id"] != null) { versionIDRef_ = versionNode.Attributes["id"].Value; AgreementVersion ob = new AgreementVersion(versionNode); IDManager.SetID(versionIDRef_, ob); } else if (versionNode.Attributes["href"] != null) { versionIDRef_ = versionNode.Attributes["href"].Value; } else { version_ = new AgreementVersion(versionNode); } } else { version_ = new AgreementVersion(versionNode); } } XmlNode dateNode = xmlNode.SelectSingleNode("date"); if (dateNode != null) { if (dateNode.Attributes["href"] != null || dateNode.Attributes["id"] != null) { if (dateNode.Attributes["id"] != null) { dateIDRef_ = dateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(dateNode); IDManager.SetID(dateIDRef_, ob); } else if (dateNode.Attributes["href"] != null) { dateIDRef_ = dateNode.Attributes["href"].Value; } else { date_ = new XsdTypeDate(dateNode); } } else { date_ = new XsdTypeDate(dateNode); } } XmlNodeList amendmentDateNodeList = xmlNode.SelectNodes("amendmentDate"); if (amendmentDateNodeList != null) { this.amendmentDate_ = new List<XsdTypeDate>(); foreach (XmlNode item in amendmentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { amendmentDateIDRef_ = item.Attributes["id"].Value; amendmentDate_.Add(new XsdTypeDate(item)); IDManager.SetID(amendmentDateIDRef_, amendmentDate_[amendmentDate_.Count - 1 ]); } else if (item.Attributes["href"] != null) { amendmentDateIDRef_ = item.Attributes["href"].Value; } else { amendmentDate_.Add(new XsdTypeDate(item)); } } else { amendmentDate_.Add(new XsdTypeDate(item)); } } } XmlNode governingLawNode = xmlNode.SelectSingleNode("governingLaw"); if (governingLawNode != null) { if (governingLawNode.Attributes["href"] != null || governingLawNode.Attributes["id"] != null) { if (governingLawNode.Attributes["id"] != null) { governingLawIDRef_ = governingLawNode.Attributes["id"].Value; GoverningLaw ob = new GoverningLaw(governingLawNode); IDManager.SetID(governingLawIDRef_, ob); } else if (governingLawNode.Attributes["href"] != null) { governingLawIDRef_ = governingLawNode.Attributes["href"].Value; } else { governingLaw_ = new GoverningLaw(governingLawNode); } } else { governingLaw_ = new GoverningLaw(governingLawNode); } } }
public GenericAgreement(XmlNode xmlNode) { XmlNodeList typeNodeList = xmlNode.SelectNodes("type"); if (typeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in typeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { typeIDRef = item.Attributes["id"].Name; AgreementType ob = AgreementType(); IDManager.SetID(typeIDRef, ob); } else if (item.Attributes.ToString() == "href") { typeIDRef = item.Attributes["href"].Name; } else { type = new AgreementType(item); } } } XmlNodeList versionNodeList = xmlNode.SelectNodes("version"); if (versionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in versionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { versionIDRef = item.Attributes["id"].Name; AgreementVersion ob = AgreementVersion(); IDManager.SetID(versionIDRef, ob); } else if (item.Attributes.ToString() == "href") { versionIDRef = item.Attributes["href"].Name; } else { version = new AgreementVersion(item); } } } XmlNodeList dateNodeList = xmlNode.SelectNodes("date"); if (dateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(dateIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateIDRef = item.Attributes["href"].Name; } else { date = new XsdTypeDate(item); } } } XmlNodeList amendmentDateNodeList = xmlNode.SelectNodes("amendmentDate"); foreach (XmlNode item in amendmentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amendmentDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = new XsdTypeDate(); ob.Add(new XsdTypeDate(item)); IDManager.SetID(amendmentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { amendmentDateIDRef = item.Attributes["href"].Name; } else { amendmentDate.Add(new XsdTypeDate(item)); } } } XmlNodeList governingLawNodeList = xmlNode.SelectNodes("governingLaw"); if (governingLawNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in governingLawNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { governingLawIDRef = item.Attributes["id"].Name; GoverningLaw ob = GoverningLaw(); IDManager.SetID(governingLawIDRef, ob); } else if (item.Attributes.ToString() == "href") { governingLawIDRef = item.Attributes["href"].Name; } else { governingLaw = new GoverningLaw(item); } } } }
public GenericAgreement(XmlNode xmlNode) { XmlNodeList typeNodeList = xmlNode.SelectNodes("type"); if (typeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in typeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { typeIDRef = item.Attributes["id"].Name; AgreementType ob = AgreementType(); IDManager.SetID(typeIDRef, ob); } else if (item.Attributes.ToString() == "href") { typeIDRef = item.Attributes["href"].Name; } else { type = new AgreementType(item); } } } XmlNodeList versionNodeList = xmlNode.SelectNodes("version"); if (versionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in versionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { versionIDRef = item.Attributes["id"].Name; AgreementVersion ob = AgreementVersion(); IDManager.SetID(versionIDRef, ob); } else if (item.Attributes.ToString() == "href") { versionIDRef = item.Attributes["href"].Name; } else { version = new AgreementVersion(item); } } } XmlNodeList dateNodeList = xmlNode.SelectNodes("date"); if (dateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(dateIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateIDRef = item.Attributes["href"].Name; } else { date = new XsdTypeDate(item); } } } XmlNodeList amendmentDateNodeList = xmlNode.SelectNodes("amendmentDate"); foreach (XmlNode item in amendmentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amendmentDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = new XsdTypeDate(); ob.Add(new XsdTypeDate(item)); IDManager.SetID(amendmentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { amendmentDateIDRef = item.Attributes["href"].Name; } else { amendmentDate.Add(new XsdTypeDate(item)); } } } XmlNodeList governingLawNodeList = xmlNode.SelectNodes("governingLaw"); if (governingLawNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in governingLawNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { governingLawIDRef = item.Attributes["id"].Name; GoverningLaw ob = GoverningLaw(); IDManager.SetID(governingLawIDRef, ob); } else if (item.Attributes.ToString() == "href") { governingLawIDRef = item.Attributes["href"].Name; } else { governingLaw = new GoverningLaw(item); } } } }
public GenericAgreement(XmlNode xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; AgreementType ob = new AgreementType(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new AgreementType(typeNode); } } else { type_ = new AgreementType(typeNode); } } XmlNode versionNode = xmlNode.SelectSingleNode("version"); if (versionNode != null) { if (versionNode.Attributes["href"] != null || versionNode.Attributes["id"] != null) { if (versionNode.Attributes["id"] != null) { versionIDRef_ = versionNode.Attributes["id"].Value; AgreementVersion ob = new AgreementVersion(versionNode); IDManager.SetID(versionIDRef_, ob); } else if (versionNode.Attributes["href"] != null) { versionIDRef_ = versionNode.Attributes["href"].Value; } else { version_ = new AgreementVersion(versionNode); } } else { version_ = new AgreementVersion(versionNode); } } XmlNode dateNode = xmlNode.SelectSingleNode("date"); if (dateNode != null) { if (dateNode.Attributes["href"] != null || dateNode.Attributes["id"] != null) { if (dateNode.Attributes["id"] != null) { dateIDRef_ = dateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(dateNode); IDManager.SetID(dateIDRef_, ob); } else if (dateNode.Attributes["href"] != null) { dateIDRef_ = dateNode.Attributes["href"].Value; } else { date_ = new XsdTypeDate(dateNode); } } else { date_ = new XsdTypeDate(dateNode); } } XmlNodeList amendmentDateNodeList = xmlNode.SelectNodes("amendmentDate"); if (amendmentDateNodeList != null) { this.amendmentDate_ = new List <XsdTypeDate>(); foreach (XmlNode item in amendmentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { amendmentDateIDRef_ = item.Attributes["id"].Value; amendmentDate_.Add(new XsdTypeDate(item)); IDManager.SetID(amendmentDateIDRef_, amendmentDate_[amendmentDate_.Count - 1]); } else if (item.Attributes["href"] != null) { amendmentDateIDRef_ = item.Attributes["href"].Value; } else { amendmentDate_.Add(new XsdTypeDate(item)); } } else { amendmentDate_.Add(new XsdTypeDate(item)); } } } XmlNode governingLawNode = xmlNode.SelectSingleNode("governingLaw"); if (governingLawNode != null) { if (governingLawNode.Attributes["href"] != null || governingLawNode.Attributes["id"] != null) { if (governingLawNode.Attributes["id"] != null) { governingLawIDRef_ = governingLawNode.Attributes["id"].Value; GoverningLaw ob = new GoverningLaw(governingLawNode); IDManager.SetID(governingLawIDRef_, ob); } else if (governingLawNode.Attributes["href"] != null) { governingLawIDRef_ = governingLawNode.Attributes["href"].Value; } else { governingLaw_ = new GoverningLaw(governingLawNode); } } else { governingLaw_ = new GoverningLaw(governingLawNode); } } }