示例#1
0
 public override void updateData(DataObject data)
 {
     lock (this)
     {
         NwkNodeStaticData nwkNodeStaticData       = (NwkNodeStaticData)data;
         String            nwkNodeStaticIdentifier = nwkNodeStaticData.getNwkNodeStaticIdentifier();
         if (dataMap.ContainsKey(nwkNodeStaticIdentifier))
         {
             dataMap.Remove(nwkNodeStaticIdentifier);
             dataMap.Add(nwkNodeStaticIdentifier, nwkNodeStaticData);
         }
         else
         {
             dataMap.Add(nwkNodeStaticIdentifier, nwkNodeStaticData);
         }
     }
 }
        private void processPredefinedLocation(PredefinedLocation predefinedLocation, DateTime publicationTime, string predefinedLocationContainerId)
        {
            string predefinedLocationIdentifier = predefinedLocation.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing Predefined Location Identifier(" + predefinedLocationIdentifier + ")");
            }

            if (predefinedLocationContainerId.Equals("NTIS_Network_Links"))
            {
                NwkLinkStaticData nwkLinkStaticData = new NwkLinkStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                nwkLinkStaticDataStore.updateData(nwkLinkStaticData);
            }
            else if (predefinedLocationContainerId.Equals("NTIS_Network_Nodes"))
            {
                NwkNodeStaticData nwkNodeStaticData = new NwkNodeStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                nwkNodeStaticDataStore.updateData(nwkNodeStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_Link_Shape_"))
            {
                LinkShapeStaticData linkShapeStaticData = new LinkShapeStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                linkShapeStaticDataStore.updateData(linkShapeStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_ANPR_Route_"))
            {
                ANPRRouteStaticData anprRouteStaticData = new ANPRRouteStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                anprRouteStaticDataStore.updateData(anprRouteStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_HATRIS_Section_"))
            {
                HATRISSectionStaticData hatrisSectionStaticData = new HATRISSectionStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                hatrisSectionStaticDataStore.updateData(hatrisSectionStaticData);
            }
            else if (predefinedLocationContainerId.StartsWith("NTIS_Alternate_Route_"))
            {
                AlternateRouteStaticData alternateRouteStaticData = new AlternateRouteStaticData(predefinedLocationIdentifier, publicationTime, predefinedLocation);
                alternateRouteStaticDataStore.updateData(alternateRouteStaticData);
            }
            else
            {
                logWrapper.Error("Predefined Location Container not implemented: " + predefinedLocationContainerId);
            }
        }