Ejemplo n.º 1
0
 private static void SetWMSServerEnabled(XmlDocument doc, WMSServerUri uri, bool blValue)
 {
     foreach (XmlElement oWmsCatalog in doc.SelectNodes("/dappleview/servers/builderentry/builderdirectory/builderentry/wmscatalog"))
     {
         if (new WMSServerUri(oWmsCatalog.GetAttribute("capabilitiesurl")).ToString().Equals(uri.ToString()))
         {
             oWmsCatalog.SetAttribute("enabled", blValue.ToString());
         }
     }
 }
Ejemplo n.º 2
0
        private static bool ContainsWMSServer(XmlDocument doc, WMSServerUri uri)
        {
            foreach (XmlAttribute oAttr in doc.SelectNodes("//wmscatalog/@capabilitiesurl"))
            {
                if (new WMSServerUri(oAttr.Value).ToString().Equals(uri.ToString()))
                {
                    return true;
                }
            }

            return false;
        }
Ejemplo n.º 3
0
 private static void RemoveWMSServer(XmlDocument doc, WMSServerUri uri)
 {
     foreach (XmlElement oDapCatalog in doc.SelectNodes("/dappleview/servers/builderentry/builderdirectory/builderentry/wmscatalog"))
     {
         if (new WMSServerUri(oDapCatalog.GetAttribute("capabilitiesurl")).ToString().Equals(uri.ToString()))
         {
             oDapCatalog.ParentNode.ParentNode.RemoveChild(oDapCatalog.ParentNode);
         }
     }
 }
Ejemplo n.º 4
0
 private static void AddWMSServer(XmlDocument doc, WMSServerUri uri)
 {
     XmlElement oWMSRoot = doc.SelectSingleNode("/dappleview/servers/builderentry/builderdirectory[@specialcontainer=\"WMSServers\"]") as XmlElement;
     XmlElement oBuilderEntry = doc.CreateElement("builderentry");
     oWMSRoot.AppendChild(oBuilderEntry);
     XmlElement oDapCatalog = doc.CreateElement("wmscatalog");
     oDapCatalog.SetAttribute("capabilitiesurl", uri.ToString());
     oDapCatalog.SetAttribute("enabled", "true");
     oBuilderEntry.AppendChild(oDapCatalog);
 }