コード例 #1
0
 public override void updateData(DataObject data)
 {
     lock (this)
     {
         MIDASStaticData measurementSiteStaticData       = (MIDASStaticData)data;
         String          measurementSiteStaticIdentifier = measurementSiteStaticData.getMIDASStaticIdentifier();
         if (dataMap.ContainsKey(measurementSiteStaticIdentifier))
         {
             dataMap.Remove(measurementSiteStaticIdentifier);
             dataMap.Add(measurementSiteStaticIdentifier, measurementSiteStaticData);
         }
         else
         {
             dataMap.Add(measurementSiteStaticIdentifier, measurementSiteStaticData);
         }
     }
 }
コード例 #2
0
        private void processMeasurementSiteRecord(MeasurementSiteRecord measurementSiteRecord, DateTime publicationTime, string measurementSiteTableId)
        {
            String measurementSiteRecordIdentifier = measurementSiteRecord.id;

            if (logWrapper.isTrace())
            {
                logWrapper.Trace("Processing Measurement Site Identifier(" + measurementSiteRecordIdentifier + ")");
            }

            switch (measurementSiteTableId)
            {
            case "NTIS_TAME_Measurement_Sites":
                TAMEStaticData tameStaticData = new TAMEStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                tameStaticDataStore.updateData(tameStaticData);
                break;

            case "NTIS_MIDAS_Measurement_Sites":
                MIDASStaticData midasStaticData = new MIDASStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                midasStaticDataStore.updateData(midasStaticData);
                break;

            case "NTIS_ANPR_Measurement_Sites":
                ANPRStaticData anprStaticData = new ANPRStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                anprStaticDataStore.updateData(anprStaticData);
                break;

            case "NTIS_TMU_Measurement_Sites":
                TMUStaticData tmuStaticData = new TMUStaticData(measurementSiteRecordIdentifier, publicationTime, measurementSiteRecord);
                tmuStaticDataStore.updateData(tmuStaticData);
                break;

            default:
                logWrapper.Error("VMS Unit Table Id not implemented: " + measurementSiteTableId);
                break;
            }
        }