Пример #1
0
			/// <summary>
			/// Initializes a WmsServiceDescription object
			/// </summary>
			/// <param name="title">Mandatory Human-readable title for pick lists</param>
			/// <param name="onlineResource">Top-level web address of service or service provider.</param>
			public WmsServiceDescription(string title, string onlineResource)
			{
				Title = title;
				OnlineResource = onlineResource;
				Keywords = null;
				Abstract = "";
				ContactInformation = new WmsContactInformation();
				Fees = "";
				AccessConstraints = "";
				LayerLimit = 0;
				MaxWidth = 0;
				MaxHeight = 0;
			}
Пример #2
0
 /// <summary>
 /// Initializes a WmsServiceDescription object
 /// </summary>
 /// <param name="title">Mandatory Human-readable title for pick lists</param>
 /// <param name="onlineResource">Top-level web address of service or service provider.</param>
 public WmsServiceDescription(string title, string onlineResource)
 {
     Title              = title;
     OnlineResource     = onlineResource;
     Keywords           = null;
     Abstract           = "";
     ContactInformation = new WmsContactInformation();
     Fees = "";
     AccessConstraints = "";
     LayerLimit        = 0;
     MaxWidth          = 0;
     MaxHeight         = 0;
 }
Пример #3
0
        private static XmlElement GenerateContactInfoElement(XmlDocument capabilities, WmsContactInformation info)
        {
            XmlElement infoNode = capabilities.CreateElement("ContactInformation", WmsNamespaceUri);

            // Add primary person
            XmlElement cpp = capabilities.CreateElement("ContactPersonPrimary", WmsNamespaceUri);

            if (!String.IsNullOrEmpty(info.PersonPrimary.Person))
            {
                XmlNode primary = CreateElement("ContactPerson", info.PersonPrimary.Person, capabilities, WmsNamespaceUri);
                cpp.AppendChild(primary);
            }
            if (!String.IsNullOrEmpty(info.PersonPrimary.Organisation))
            {
                XmlNode organization = CreateElement("ContactOrganization", info.PersonPrimary.Organisation, capabilities, WmsNamespaceUri);
                cpp.AppendChild(organization);
            }
            if (cpp.HasChildNodes)
            {
                infoNode.AppendChild(cpp);
            }

            if (!String.IsNullOrEmpty(info.Position))
            {
                XmlNode position = CreateElement("ContactPosition", info.Position, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(position);
            }

            // Add address
            XmlElement ca = capabilities.CreateElement("ContactAddress", WmsNamespaceUri);

            if (!string.IsNullOrEmpty(info.Address.AddressType))
            {
                XmlNode addressType = CreateElement("AddressType", info.Address.AddressType, capabilities, WmsNamespaceUri);
                ca.AppendChild(addressType);
            }
            if (!String.IsNullOrEmpty(info.Address.Address))
            {
                XmlNode address = CreateElement("Address", info.Address.Address, capabilities, WmsNamespaceUri);
                ca.AppendChild(address);
            }
            if (!String.IsNullOrEmpty(info.Address.City))
            {
                XmlNode city = CreateElement("City", info.Address.City, capabilities, WmsNamespaceUri);
                ca.AppendChild(city);
            }
            if (!String.IsNullOrEmpty(info.Address.StateOrProvince))
            {
                XmlNode state = CreateElement("StateOrProvince", info.Address.StateOrProvince, capabilities, WmsNamespaceUri);
                ca.AppendChild(state);
            }
            if (!String.IsNullOrEmpty(info.Address.PostCode))
            {
                XmlNode postCode = CreateElement("PostCode", info.Address.PostCode, capabilities, WmsNamespaceUri);
                ca.AppendChild(postCode);
            }
            if (!String.IsNullOrEmpty(info.Address.Country))
            {
                XmlNode country = CreateElement("Country", info.Address.Country, capabilities, WmsNamespaceUri);
                ca.AppendChild(country);
            }
            if (ca.HasChildNodes)
            {
                infoNode.AppendChild(ca);
            }

            if (!String.IsNullOrEmpty(info.VoiceTelephone))
            {
                XmlNode telephone = CreateElement("ContactVoiceTelephone", info.VoiceTelephone, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(telephone);
            }
            if (!String.IsNullOrEmpty(info.FacsimileTelephone))
            {
                XmlNode facsimile = CreateElement("ContactFacsimileTelephone", info.FacsimileTelephone, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(facsimile);
            }
            if (!String.IsNullOrEmpty(info.ElectronicMailAddress))
            {
                XmlNode email = CreateElement("ContactElectronicMailAddress", info.ElectronicMailAddress, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(email);
            }
            return(infoNode);
        }
Пример #4
0
		private static XmlElement GenerateContactInfoElement(XmlDocument capabilities, WmsContactInformation info)
		{
			XmlElement infoNode = capabilities.CreateElement("ContactInformation", wmsNamespaceURI);
			
			//Add primary person
			XmlElement cpp = capabilities.CreateElement("ContactPersonPrimary", wmsNamespaceURI);
			if (info.PersonPrimary.Person != null && info.PersonPrimary.Person != String.Empty)
				cpp.AppendChild(CreateElement("ContactPerson", info.PersonPrimary.Person, capabilities, false, wmsNamespaceURI));
			if (info.PersonPrimary.Organisation!=null && info.PersonPrimary.Organisation!=String.Empty)
				cpp.AppendChild(CreateElement("ContactOrganization", info.PersonPrimary.Organisation, capabilities, false, wmsNamespaceURI));
			if (cpp.HasChildNodes)
				infoNode.AppendChild(cpp);

			if (info.Position != null && info.Position != string.Empty)
				infoNode.AppendChild(CreateElement("ContactPosition", info.Position, capabilities, false, wmsNamespaceURI));

			//Add address
			XmlElement ca = capabilities.CreateElement("ContactAddress", wmsNamespaceURI);
			if (info.Address.AddressType != null && info.Address.AddressType != string.Empty)
				ca.AppendChild(CreateElement("AddressType", info.Address.AddressType, capabilities, false, wmsNamespaceURI));
			if (info.Address.Address!=null && info.Address.Address != string.Empty)
				ca.AppendChild(CreateElement("Address", info.Address.Address, capabilities, false, wmsNamespaceURI));
			if (info.Address.City!=null && info.Address.City != string.Empty)
				ca.AppendChild(CreateElement("City", info.Address.City, capabilities, false, wmsNamespaceURI));
			if (info.Address.StateOrProvince!=null && info.Address.StateOrProvince != string.Empty)
				ca.AppendChild(CreateElement("StateOrProvince", info.Address.StateOrProvince, capabilities, false, wmsNamespaceURI));
			if (info.Address.PostCode !=null && info.Address.PostCode != string.Empty)
				ca.AppendChild(CreateElement("PostCode", info.Address.PostCode, capabilities, false, wmsNamespaceURI));
			if (info.Address.Country!=null && info.Address.Country != string.Empty)
				ca.AppendChild(CreateElement("Country", info.Address.Country, capabilities, false, wmsNamespaceURI));
			if (ca.HasChildNodes)
				infoNode.AppendChild(ca);

			if (info.VoiceTelephone!=null && info.VoiceTelephone != string.Empty)
				infoNode.AppendChild(CreateElement("ContactVoiceTelephone", info.VoiceTelephone, capabilities, false, wmsNamespaceURI));
			if (info.FacsimileTelephone!=null && info.FacsimileTelephone != string.Empty)
				infoNode.AppendChild(CreateElement("ContactFacsimileTelephone", info.FacsimileTelephone, capabilities, false, wmsNamespaceURI));
			if (info.ElectronicMailAddress!=null && info.ElectronicMailAddress != string.Empty)
				infoNode.AppendChild(CreateElement("ContactElectronicMailAddress", info.ElectronicMailAddress, capabilities, false, wmsNamespaceURI));

			return infoNode;
		}
Пример #5
0
        private static XmlElement GenerateContactInfoElement(XmlDocument capabilities, WmsContactInformation info)
        {
            XmlElement infoNode = capabilities.CreateElement("ContactInformation", wmsNamespaceURI);

            //Add primary person
            XmlElement cpp = capabilities.CreateElement("ContactPersonPrimary", wmsNamespaceURI);

            if (info.PersonPrimary.Person != null && info.PersonPrimary.Person != String.Empty)
            {
                cpp.AppendChild(CreateElement("ContactPerson", info.PersonPrimary.Person, capabilities, false,
                                              wmsNamespaceURI));
            }
            if (info.PersonPrimary.Organisation != null && info.PersonPrimary.Organisation != String.Empty)
            {
                cpp.AppendChild(CreateElement("ContactOrganization", info.PersonPrimary.Organisation, capabilities,
                                              false, wmsNamespaceURI));
            }
            if (cpp.HasChildNodes)
            {
                infoNode.AppendChild(cpp);
            }

            if (info.Position != null && info.Position != string.Empty)
            {
                infoNode.AppendChild(CreateElement("ContactPosition", info.Position, capabilities, false,
                                                   wmsNamespaceURI));
            }

            //Add address
            XmlElement ca = capabilities.CreateElement("ContactAddress", wmsNamespaceURI);

            if (info.Address.AddressType != null && info.Address.AddressType != string.Empty)
            {
                ca.AppendChild(CreateElement("AddressType", info.Address.AddressType, capabilities, false,
                                             wmsNamespaceURI));
            }
            if (info.Address.Address != null && info.Address.Address != string.Empty)
            {
                ca.AppendChild(CreateElement("Address", info.Address.Address, capabilities, false, wmsNamespaceURI));
            }
            if (info.Address.City != null && info.Address.City != string.Empty)
            {
                ca.AppendChild(CreateElement("City", info.Address.City, capabilities, false, wmsNamespaceURI));
            }
            if (info.Address.StateOrProvince != null && info.Address.StateOrProvince != string.Empty)
            {
                ca.AppendChild(CreateElement("StateOrProvince", info.Address.StateOrProvince, capabilities, false,
                                             wmsNamespaceURI));
            }
            if (info.Address.PostCode != null && info.Address.PostCode != string.Empty)
            {
                ca.AppendChild(CreateElement("PostCode", info.Address.PostCode, capabilities, false, wmsNamespaceURI));
            }
            if (info.Address.Country != null && info.Address.Country != string.Empty)
            {
                ca.AppendChild(CreateElement("Country", info.Address.Country, capabilities, false, wmsNamespaceURI));
            }
            if (ca.HasChildNodes)
            {
                infoNode.AppendChild(ca);
            }

            if (info.VoiceTelephone != null && info.VoiceTelephone != string.Empty)
            {
                infoNode.AppendChild(CreateElement("ContactVoiceTelephone", info.VoiceTelephone, capabilities, false,
                                                   wmsNamespaceURI));
            }
            if (info.FacsimileTelephone != null && info.FacsimileTelephone != string.Empty)
            {
                infoNode.AppendChild(CreateElement("ContactFacsimileTelephone", info.FacsimileTelephone, capabilities,
                                                   false, wmsNamespaceURI));
            }
            if (info.ElectronicMailAddress != null && info.ElectronicMailAddress != string.Empty)
            {
                infoNode.AppendChild(CreateElement("ContactElectronicMailAddress", info.ElectronicMailAddress,
                                                   capabilities, false, wmsNamespaceURI));
            }

            return(infoNode);
        }
Пример #6
0
        private static XmlElement GenerateContactInfoElement(XmlDocument capabilities, WmsContactInformation info)
        {
            XmlElement infoNode = capabilities.CreateElement("ContactInformation", WmsNamespaceUri);

            // Add primary person
            XmlElement cpp = capabilities.CreateElement("ContactPersonPrimary", WmsNamespaceUri);
            if (!String.IsNullOrEmpty(info.PersonPrimary.Person))
            {
                XmlNode primary = CreateElement("ContactPerson", info.PersonPrimary.Person, capabilities, WmsNamespaceUri);
                cpp.AppendChild(primary);
            }
            if (!String.IsNullOrEmpty(info.PersonPrimary.Organisation))
            {
                XmlNode organization = CreateElement("ContactOrganization", info.PersonPrimary.Organisation, capabilities, WmsNamespaceUri);
                cpp.AppendChild(organization);
            }
            if (cpp.HasChildNodes)
                infoNode.AppendChild(cpp);

            if (!String.IsNullOrEmpty(info.Position))
            {
                XmlNode position = CreateElement("ContactPosition", info.Position, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(position);
            }

            // Add address
            XmlElement ca = capabilities.CreateElement("ContactAddress", WmsNamespaceUri);
            if (!string.IsNullOrEmpty(info.Address.AddressType))
            {
                XmlNode addressType = CreateElement("AddressType", info.Address.AddressType, capabilities, WmsNamespaceUri);
                ca.AppendChild(addressType);
            }
            if (!String.IsNullOrEmpty(info.Address.Address))
            {
                XmlNode address = CreateElement("Address", info.Address.Address, capabilities, WmsNamespaceUri);
                ca.AppendChild(address);
            }
            if (!String.IsNullOrEmpty(info.Address.City))
            {
                XmlNode city = CreateElement("City", info.Address.City, capabilities, WmsNamespaceUri);
                ca.AppendChild(city);
            }
            if (!String.IsNullOrEmpty(info.Address.StateOrProvince))
            {
                XmlNode state = CreateElement("StateOrProvince", info.Address.StateOrProvince, capabilities, WmsNamespaceUri);
                ca.AppendChild(state);
            }
            if (!String.IsNullOrEmpty(info.Address.PostCode))
            {
                XmlNode postCode = CreateElement("PostCode", info.Address.PostCode, capabilities, WmsNamespaceUri);
                ca.AppendChild(postCode);
            }
            if (!String.IsNullOrEmpty(info.Address.Country))
            {
                XmlNode country = CreateElement("Country", info.Address.Country, capabilities, WmsNamespaceUri);
                ca.AppendChild(country);
            }
            if (ca.HasChildNodes)
                infoNode.AppendChild(ca);

            if (!String.IsNullOrEmpty(info.VoiceTelephone))
            {
                XmlNode telephone = CreateElement("ContactVoiceTelephone", info.VoiceTelephone, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(telephone);
            }
            if (!String.IsNullOrEmpty(info.FacsimileTelephone))
            {
                XmlNode facsimile = CreateElement("ContactFacsimileTelephone", info.FacsimileTelephone, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(facsimile);
            }
            if (!String.IsNullOrEmpty(info.ElectronicMailAddress))
            {
                XmlNode email = CreateElement("ContactElectronicMailAddress", info.ElectronicMailAddress, capabilities, WmsNamespaceUri);
                infoNode.AppendChild(email);
            }
            return infoNode;
        }