diff --git a/edexOsgi/com.raytheon.edex.plugin.airep/utility/common_static/base/purge/airepPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.airep/utility/common_static/base/purge/airepPurgeRules.xml index f9a761aa5e..1182b36c71 100644 --- a/edexOsgi/com.raytheon.edex.plugin.airep/utility/common_static/base/purge/airepPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.airep/utility/common_static/base/purge/airepPurgeRules.xml @@ -1,12 +1,8 @@ - - - - airep - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/utility/common_static/base/purge/binlightningPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.binlightning/utility/common_static/base/purge/binlightningPurgeRules.xml index 86b5416917..40446eac37 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/utility/common_static/base/purge/binlightningPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/utility/common_static/base/purge/binlightningPurgeRules.xml @@ -1,12 +1,8 @@ - - - - binlightning - default - + + 36 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/utility/common_static/base/purge/bufrmosPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.bufrmos/utility/common_static/base/purge/bufrmosPurgeRules.xml index 3cb036a9ee..fc380f5b48 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/utility/common_static/base/purge/bufrmosPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/utility/common_static/base/purge/bufrmosPurgeRules.xml @@ -1,69 +1,40 @@ - - + - - - bufrmosETA - default - + 5 =00-01:00:00 00-01:00:00 - - - - bufrmosGFS - default - + + 5 =00-01:00:00 00-01:00:00 - - - - bufrmosAVN - default - + + 8 =00-01:00:00 00-01:00:00 - - - - bufrmosLAMP - default - + + 5 =00-01:00:00 00-01:00:00 - - - - bufrmosHPC - default - + + 5 =00-01:00:00 00-01:00:00 - - - - bufrmosMRF - default - + + 4 =00-01:00:00 00-01:00:00 - - - - bufrmosNGM - default - + + 5 =00-01:00:00 00-01:00:00 - + - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/common_static/base/purge/bufruaPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/common_static/base/purge/bufruaPurgeRules.xml index c4f54abdd4..8691a0bdf5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/common_static/base/purge/bufruaPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/common_static/base/purge/bufruaPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrua - default - + + 21 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/utility/common_static/base/purge/ccfpPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.ccfp/utility/common_static/base/purge/ccfpPurgeRules.xml index 67e5eafe0b..1182b36c71 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/utility/common_static/base/purge/ccfpPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/utility/common_static/base/purge/ccfpPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ccfp - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.goessounding/utility/common_static/base/purge/goessoundingPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.goessounding/utility/common_static/base/purge/goessoundingPurgeRules.xml index 3d845dd1ac..ef0c05b8b0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.goessounding/utility/common_static/base/purge/goessoundingPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.goessounding/utility/common_static/base/purge/goessoundingPurgeRules.xml @@ -1,12 +1,8 @@ - - - - goessounding - default - + + 33 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/purge/gribPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/purge/gribPurgeRules.xml index b1881b69cd..ca03820ffc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/purge/gribPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/purge/gribPurgeRules.xml @@ -1,1246 +1,723 @@ - - + + modelInfo.modelName - - - grib - default - + 2 02-00:00:00 - - - + - - grib - modelInfo.modelName=ETA - + ETA 2 - - - grib - modelInfo.modelName=RUC - + RUC 8 - - - grib - modelInfo.modelName=AVN - + AVN 2 - - - grib - modelInfo.modelName=LAPS - + LAPS 30 - - - grib - modelInfo.modelName=NGM - + NGM 2 - - - grib - modelInfo.modelName=MRF - + MRF 2 - - - grib - modelInfo.modelName=MSAS - + MSAS 24 - - - grib - modelInfo.modelName=GFS201 - + GFS201 2 - - - grib - modelInfo.modelName=mrfNH - + mrfNH 2 - - - grib - modelInfo.modelName=GFS213 - + GFS213 2 - - - grib - modelInfo.modelName=NGM213 - + NGM213 1 00-00:15:00 - - - grib - modelInfo.modelName=NGM202 - + NGM202 2 - - - grib - modelInfo.modelName=AVN211 - + AVN211 2 - - - grib - modelInfo.modelName=mesoEta212 - + mesoEta212 2 00-00:15:00 - - - grib - modelInfo.modelName=mesoEta215 - + mesoEta215 2 00-00:15:00 - - - grib - modelInfo.modelName=ENSEMBLE - + ENSEMBLE 2 - - grib - modelInfo.modelName=ENSEMBLE37 - + ENSEMBLE37 2 - - grib - modelInfo.modelName=ENSEMBLE38 - + ENSEMBLE38 2 - - grib - modelInfo.modelName=ENSEMBLE39 - + ENSEMBLE39 2 - - grib - modelInfo.modelName=ENSEMBLE40 - + ENSEMBLE40 2 - - grib - modelInfo.modelName=ENSEMBLE41 - + ENSEMBLE41 2 - - grib - modelInfo.modelName=ENSEMBLE42 - + ENSEMBLE42 2 - - grib - modelInfo.modelName=ENSEMBLE43 - + ENSEMBLE43 2 - - grib - modelInfo.modelName=ENSEMBLE44 - + ENSEMBLE44 2 - - - grib - modelInfo.modelName=ETA212 - + ETA212 1 00-00:15:00 - - - grib - modelInfo.modelName=MRF203 - + MRF203 3 - - - grib - modelInfo.modelName=AVN203 - + AVN203 3 - - - grib - modelInfo.modelName=MRF204 - + MRF204 3 - - - grib - modelInfo.modelName=MRF205 - + MRF205 3 - - - grib - modelInfo.modelName=NGM207 - + NGM207 3 - - - grib - modelInfo.modelName=NAM207 - + NAM207 3 - - - grib - modelInfo.modelName=ECMF-NorthernHemisphere - + ECMF-NorthernHemisphere 2 - - grib - modelInfo.modelName=ECMF1 - + ECMF1 2 - - grib - modelInfo.modelName=ECMF2 - + ECMF2 2 - - grib - modelInfo.modelName=ECMF3 - + ECMF3 2 - - grib - modelInfo.modelName=ECMF4 - + ECMF4 2 - - grib - modelInfo.modelName=ECMF5 - + ECMF5 2 - - grib - modelInfo.modelName=ECMF6 - + ECMF6 2 - - grib - modelInfo.modelName=ECMF7 - + ECMF7 2 - - grib - modelInfo.modelName=ECMF8 - + ECMF8 2 - - grib - modelInfo.modelName=ECMF9 - + ECMF9 2 - - grib - modelInfo.modelName=ECMF10 - + ECMF10 2 - - grib - modelInfo.modelName=ECMF11 - + ECMF11 2 - - grib - modelInfo.modelName=ECMF12 - + ECMF12 2 - - - grib - modelInfo.modelName=UKMET-NorthernHemisphere - + UKMET-NorthernHemisphere 2 - - grib - modelInfo.modelName=UKMET37 - + UKMET37 2 - - grib - modelInfo.modelName=UKMET38 - + UKMET38 2 - - grib - modelInfo.modelName=UKMET39 - + UKMET39 2 - - grib - modelInfo.modelName=UKMET40 - + UKMET40 2 - - grib - modelInfo.modelName=UKMET41 - + UKMET41 2 - - grib - modelInfo.modelName=UKMET42 - + UKMET42 2 - - grib - modelInfo.modelName=UKMET43 - + UKMET43 2 - - grib - modelInfo.modelName=UKMET44 - + UKMET44 2 - - - grib - modelInfo.modelName=AVN-NorthernHemisphere - + AVN-NorthernHemisphere 2 - - grib - modelInfo.modelName=AVN37 - + AVN37 2 - - grib - modelInfo.modelName=AVN38 - + AVN38 2 - - grib - modelInfo.modelName=AVN39 - + AVN39 2 - - grib - modelInfo.modelName=AVN40 - + AVN40 2 - - grib - modelInfo.modelName=AVN41 - + AVN41 2 - - grib - modelInfo.modelName=AVN42 - + AVN42 2 - - grib - modelInfo.modelName=AVN43 - + AVN43 2 - - grib - modelInfo.modelName=AVN44 - + AVN44 2 - - - grib - modelInfo.modelName=GWW233 - + GWW233 1 00-00:15:00 - - - grib - modelInfo.modelName=RFCqpf - + RFCqpf 5 - - - grib - modelInfo.modelName=RUC236 - + RUC236 8 - - - grib - modelInfo.modelName=AVN225 - + AVN225 3 - - - grib - modelInfo.modelName=WNAWAVE238 - + WNAWAVE238 1 00-00:15:00 - - - grib - modelInfo.modelName=mesoEta216 - + mesoEta216 1 00-00:15:00 - - - grib - modelInfo.modelName=mesoEta217 - + mesoEta217 1 00-00:15:00 - - - grib - modelInfo.modelName=ETA218 - + ETA218 1 00-00:15:00 - - - grib - modelInfo.modelName=ETA242 - + ETA242 1 00-00:15:00 - - - grib - modelInfo.modelName=HPCqpf - + HPCqpf 5 - - - grib - modelInfo.modelName=ENPWAVE253 - + ENPWAVE253 1 00-00:15:00 - - - grib - modelInfo.modelName=HPCdelta - + HPCdelta 4 - - - grib - modelInfo.modelName=HurWind226 - + HurWind226 4 - - - grib - modelInfo.modelName=CPCoutlook211 - + CPCoutlook211 14 - - - grib - modelInfo.modelName=RTGSSTHR - + RTGSSTHR 2 - - - grib - modelInfo.modelName=NICICE - + NICICE 2 - - - grib - modelInfo.modelName=DGEX185 - + DGEX185 2 00-00:15:00 - - - grib - modelInfo.modelName=HPCGuide - + HPCGuide 2 00-00:15:00 - - - grib - modelInfo.modelName=GFSGuide - + GFSGuide 8 00-00:15:00 - - - grib - modelInfo.modelName=GFS212 - + GFS212 1 00-00:15:00 - - - grib - modelInfo.modelName=GFS160 - + GFS160 1 00-00:15:00 - - - grib - modelInfo.modelName=GFS254 - + GFS254 1 00-00:15:00 - - - grib - modelInfo.modelName=GFS161 - + GFS161 1 00-00:15:00 - - - grib - modelInfo.modelName=MPE-Local - + MPE-Local 72 - - - grib - modelInfo.modelName=TPCWindProb - + TPCWindProb 8 00-00:15:00 - - - grib - modelInfo.modelName=MOSGuide - + MOSGuide 2 00-00:15:00 - - - grib - modelInfo.modelName=QPE - + QPE 72 - - grib - modelInfo.modelName=QPE-TUA - + QPE-TUA 72 - - grib - modelInfo.modelName=QPE-ACR - + QPE-ACR 72 - - grib - modelInfo.modelName=QPE-STR - + QPE-STR 72 - - grib - modelInfo.modelName=QPE-RSA - + QPE-RSA 72 - - grib - modelInfo.modelName=QPE-ORN - + QPE-ORN 72 - - grib - modelInfo.modelName=QPE-RHA - + QPE-RHA 72 - - grib - modelInfo.modelName=QPE-KRF - + QPE-KRF 72 - - grib - modelInfo.modelName=QPE-MSR - + QPE-MSR 72 - - grib - modelInfo.modelName=QPE-TAR - + QPE-TAR 72 - - grib - modelInfo.modelName=QPE-PTR - + QPE-PTR 72 - - grib - modelInfo.modelName=QPE-TIR - + QPE-TIR 72 - - grib - modelInfo.modelName=QPE-ALR - + QPE-ALR 72 - - grib - modelInfo.modelName=QPE-FWR - + QPE-FWR 72 - - - - grib - modelInfo.modelName=OPCWave180 - + OPCWave180 8 00-00:15:00 - - - grib - modelInfo.modelName=OPCWave181 - + OPCWave181 8 00-00:15:00 - - - grib - modelInfo.modelName=OPCWave182 - + OPCWave182 8 00-00:15:00 - - - grib - modelInfo.modelName=RTMA - + RTMA 24 00-00:15:00 - - - grib - modelInfo.modelName=SREF212 - + SREF212 2 00-00:15:00 - - - grib - modelInfo.modelName=RTGSST - + RTGSST 2 00-00:15:00 - - - grib - modelInfo.modelName=GFSLAMPTstorm - + GFSLAMPTstorm 24 00-00:15:00 - - - grib - modelInfo.modelName=ECMWF-HiRes - + ECMWF-HiRes 2 00-00:15:00 - - - grib - modelInfo.modelName=HPCqpfNDFD - + HPCqpfNDFD 42 00-00:15:00 - - - grib - modelInfo.modelName=NamDNG5 - + NamDNG5 2 00-00:15:00 - - - grib - modelInfo.modelName=TPCSurgeProb - + TPCSurgeProb 3 00-00:15:00 - - - grib - modelInfo.modelName=HPE - + HPE 00-12:00:00 00-00:15:00 - - - grib - modelInfo.modelName=BHPE - + BHPE 00-12:00:00 00-00:15:00 - - - grib - modelInfo.modelName=GlobalWave - + GlobalWave 1 00-00:15:00 - - - grib - modelInfo.modelName=AKWave10 - + AKWave10 1 00-00:15:00 - - - grib - modelInfo.modelName=AKWave4 - + AKWave4 1 00-00:15:00 - - - grib - modelInfo.modelName=EPWave10 - + EPWave10 1 00-00:15:00 - - - grib - modelInfo.modelName=WCWave10 - + WCWave10 1 00-00:15:00 - - - grib - modelInfo.modelName=WCWave4 - + WCWave4 1 00-00:15:00 - - - grib - modelInfo.modelName=WNAWave10 - + WNAWave10 1 00-00:15:00 - - - grib - modelInfo.modelName=WNAWave4 - + WNAWave4 1 00-00:15:00 - - - grib - modelInfo.modelName=MOSGuide-AK - + MOSGuide-AK 2 00-00:15:00 - - - grib - modelInfo.modelName=HI_RTMA - + HI_RTMA 24 - - - grib - modelInfo.modelName=HiRes-ARW-East - + HiRes-ARW-East 2 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-ARW-West - + HiRes-ARW-West 1 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-ARW-AK - + HiRes-ARW-AK 1 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-ARW-HI - + HiRes-ARW-HI 2 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-ARW-SJU - + HiRes-ARW-SJU 1 00-00:15:00 - - - - - grib - modelInfo.modelName=HiRes-NMM-East - + HiRes-NMM-East 2 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-NMM-West - + HiRes-NMM-West 1 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-NMM-AK - + HiRes-NMM-AK 1 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-NMM-HI - + HiRes-NMM-HI 2 00-00:15:00 - - - grib - modelInfo.modelName=HiRes-NMM-SJU - + HiRes-NMM-SJU 1 00-00:15:00 - - - grib - modelInfo.modelName=GRLKwave - + GRLKwave 1 00-00:15:00 - - - grib - modelInfo.modelName=CPCoutlook-Short - + CPCoutlook-Short 5 00-00:15:00 - - - grib - modelInfo.modelName=CPCoutlook-Medium - + CPCoutlook-Medium 7 00-00:15:00 - - - grib - modelInfo.modelName=CPCoutlook-Short-AK - + CPCoutlook-Short-AK 5 00-00:15:00 - - - grib - modelInfo.modelName=CPCoutlook-Medium-AK - + CPCoutlook-Medium-AK 7 00-00:15:00 - - - grib - modelInfo.modelName=SPCGuide - + SPCGuide 5 00-00:15:00 diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/utility/common_static/base/purge/ldadhydroPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/utility/common_static/base/purge/ldadhydroPurgeRules.xml index 3070b5ecc9..1182b36c71 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/utility/common_static/base/purge/ldadhydroPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/utility/common_static/base/purge/ldadhydroPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ldadhydro - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/utility/common_static/base/purge/ldadmanualPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/utility/common_static/base/purge/ldadmanualPurgeRules.xml index 8b591402fc..1182b36c71 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/utility/common_static/base/purge/ldadmanualPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/utility/common_static/base/purge/ldadmanualPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ldadmanual - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/utility/common_static/base/purge/ldadprofilerPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/utility/common_static/base/purge/ldadprofilerPurgeRules.xml index 5171ef591e..1182b36c71 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/utility/common_static/base/purge/ldadprofilerPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/utility/common_static/base/purge/ldadprofilerPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ldadprofiler - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/utility/common_static/base/purge/obsPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.obs/utility/common_static/base/purge/obsPurgeRules.xml index 5c5f4bd096..590cddc3e0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/utility/common_static/base/purge/obsPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.obs/utility/common_static/base/purge/obsPurgeRules.xml @@ -1,40 +1,23 @@ - + - - obs - - 34 =00-01:00:00 00-01:00:00 - - - obs - - 38 =00-03:00:00 00-01:00:00 - - obs - - 42 =00-06:00:00 00-01:00:00 - - obs - - 50 =01-00:00:00 +00-12:00:00 - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.edex.plugin.pirep/utility/common_static/base/purge/pirepPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.pirep/utility/common_static/base/purge/pirepPurgeRules.xml index cc25728ef9..d8401ec954 100644 --- a/edexOsgi/com.raytheon.edex.plugin.pirep/utility/common_static/base/purge/pirepPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.pirep/utility/common_static/base/purge/pirepPurgeRules.xml @@ -1,10 +1,6 @@ - - - - pirep - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.poessounding/utility/common_static/base/purge/poessoundingPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.poessounding/utility/common_static/base/purge/poessoundingPurgeRules.xml index c8a9d9c22e..c2cb1258f6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.poessounding/utility/common_static/base/purge/poessoundingPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.poessounding/utility/common_static/base/purge/poessoundingPurgeRules.xml @@ -1,12 +1,8 @@ - - - - poessounding - default - + + 12 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/utility/common_static/base/purge/profilerPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.profiler/utility/common_static/base/purge/profilerPurgeRules.xml index 8947ab80c0..ef0c05b8b0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/utility/common_static/base/purge/profilerPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/utility/common_static/base/purge/profilerPurgeRules.xml @@ -1,12 +1,8 @@ - - - - profiler - default - + + 33 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/purge/radarPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/purge/radarPurgeRules.xml index d41fc244f9..d8401ec954 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/purge/radarPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/purge/radarPurgeRules.xml @@ -1,10 +1,6 @@ - - - - radar - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/utility/common_static/base/purge/reccoPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.recco/utility/common_static/base/purge/reccoPurgeRules.xml index 4e645b3a71..40446eac37 100644 --- a/edexOsgi/com.raytheon.edex.plugin.recco/utility/common_static/base/purge/reccoPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.recco/utility/common_static/base/purge/reccoPurgeRules.xml @@ -1,12 +1,8 @@ - - - - recco - default - + + 36 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/utility/common_static/base/purge/redbookPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.redbook/utility/common_static/base/purge/redbookPurgeRules.xml index 5df0ce6846..269533dddc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/utility/common_static/base/purge/redbookPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/utility/common_static/base/purge/redbookPurgeRules.xml @@ -1,1648 +1,943 @@ - - - - redbook - default - + + wmoTTAAii + 2 - + - - redbook - wmoTTAAii=PAWO82 - + PAWO82 48 - - redbook - wmoTTAAii=PAWO83 - + PAWO83 48 - - redbook - wmoTTAAii=PAW883 - + PAW883 2 - - redbook - wmoTTAAii=PDKI59 - + PDKI59 2 - - redbook - wmoTTAAii=PEI745 - + PEI745 4 - - redbook - wmoTTAAii=PEIC43 - + PEIC43 4 - - redbook - wmoTTAAii=PEIC61 - + PEIC61 2 - - redbook - wmoTTAAii=PEID44 - + PEID44 4 - - redbook - wmoTTAAii=PEIE41 - + PEIE41 2 - - redbook - wmoTTAAii=PEIE62 - + PEIE62 2 - - redbook - wmoTTAAii=PEIG63 - + PEIG63 2 - - redbook - wmoTTAAii=PEII42 - + PEII42 2 - - redbook - wmoTTAAii=PEII64 - + PEII64 2 - - redbook - wmoTTAAii=PEIO46 - + PEIO46 2 - - redbook - wmoTTAAii=PEWA31 - + PEWA31 14 - - redbook - wmoTTAAii=PEWA32 - + PEWA32 2 - - redbook - wmoTTAAii=PEWA33 - + PEWA33 2 - - redbook - wmoTTAAii=PEWA34 - + PEWA34 2 - - redbook - wmoTTAAii=PGIC42 - + PGIC42 4 - - redbook - wmoTTAAii=PGIE43 - + PGIE43 4 - - redbook - wmoTTAAii=PGWA31 - + PGWA31 24 - - redbook - wmoTTAAii=PGWA32 - + PGWA32 24 - - redbook - wmoTTAAii=PGWA39 - + PGWA39 24 - - redbook - wmoTTAAii=PJMB44 - + PJMB44 4 - - redbook - wmoTTAAii=PJMB45 - + PJMB45 4 - - redbook - wmoTTAAii=PGWE46 - + PGWE46 4 - - redbook - wmoTTAAii=PGWI47 - + PGWI47 4 - - redbook - wmoTTAAii=PHZO50 - + PHZO50 2 - - redbook - wmoTTAAii=PLQI51 - + PLQI51 2 - - redbook - wmoTTAAii=PNWA68 - + PNWA68 2 - - redbook - wmoTTAAii=POWA31 - + POWA31 2 - - redbook - wmoTTAAii=PPHK01 - + PPHK01 2 - - redbook - wmoTTAAii=PPHM01 - + PPHM01 2 - - redbook - wmoTTAAii=PPHO01 - + PPHO01 2 - - redbook - wmoTTAAii=PPIC01 - + PPIC01 4 - - redbook - wmoTTAAii=PPIE01 - + PPIE01 4 - - redbook - wmoTTAAii=PPIG01 - + PPIG01 4 - - redbook - wmoTTAAii=PPII01 - + PPII01 4 - - redbook - wmoTTAAii=PPAA89 - + PPAA89 8 - - redbook - wmoTTAAii=PPZO50 - + PPZO50 2 - - redbook - wmoTTAAii=PRWA51 - + PRWA51 2 - - redbook - wmoTTAAii=PTIC94 - + PTIC94 2 - - redbook - wmoTTAAii=PTIE94 - + PTIE94 2 - - redbook - wmoTTAAii=PTIO52 - + PTIO52 2 - - redbook - wmoTTAAii=PTIO53 - + PTIO53 2 - - redbook - wmoTTAAii=PTWA31 - + PTWA31 3 - - redbook - wmoTTAAii=PTWA32 - + PTWA32 3 - - redbook - wmoTTAAii=PTWA94 - + PTWA94 2 - - redbook - wmoTTAAii=PTWO33 - + PTWO33 3 - - redbook - wmoTTAAii=PTWO34 - + PTWO34 3 - - redbook - wmoTTAAii=PTWA93 - + PTWA93 2 - - redbook - wmoTTAAii=PXVA01 - + PXVA01 2 - - redbook - wmoTTAAii=PXWA50 - + PXWA50 2 - - redbook - wmoTTAAii=PYMA20 - + PYMA20 2 - - redbook - wmoTTAAii=PYMA25 - + PYMA25 2 - - redbook - wmoTTAAii=PYMA30 - + PYMA30 2 - - redbook - wmoTTAAii=PYMA50 - + PYMA50 2 - - redbook - wmoTTAAii=PYMA70 - + PYMA70 2 - - redbook - wmoTTAAii=PYMA85 - + PYMA85 2 - - redbook - wmoTTAAii=PYWA31 - + PYWA31 4 - - redbook - wmoTTAAii=PYWA32 - + PYWA32 4 - - redbook - wmoTTAAii=PYWK43 - + PYWK43 2 - - redbook - wmoTTAAii=PYWK62 - + PYWK62 2 - - redbook - wmoTTAAii=PYWM44 - + PYWM44 2 - - redbook - wmoTTAAii=PYWO45 - + PYWO45 2 - - redbook - wmoTTAAii=PZKY51 - + PZKY51 2 - - redbook - wmoTTAAii=PEIY47 - + PEIY47 2 - - redbook - wmoTTAAii=PTIY51 - + PTIY51 2 - - redbook - wmoTTAAii=PHBV50 - + PHBV50 2 - - redbook - wmoTTAAii=PEIB40 - + PEIB40 4 - - redbook - wmoTTAAii=PEIE40 - + PEIE40 4 - - redbook - wmoTTAAii=PEIF40 - + PEIF40 4 - - redbook - wmoTTAAii=PYAA98 - + PYAA98 8 - - redbook - wmoTTAAii=PHZM50 - + PHZM50 2 - - redbook - wmoTTAAii=PHZQ50 - + PHZQ50 2 - - redbook - wmoTTAAii=PPZM50 - + PPZM50 2 - - redbook - wmoTTAAii=PPKK01 - + PPKK01 2 - - redbook - wmoTTAAii=PPKM01 - + PPKM01 2 - - redbook - wmoTTAAii=PPKO01 - + PPKO01 2 - - redbook - wmoTTAAii=PPKQ01 - + PPKQ01 2 - - redbook - wmoTTAAii=PYBA98 - + PYBA98 4 - - redbook - wmoTTAAii=PPBA89 - + PPBA89 4 - - redbook - wmoTTAAii=PWIA98 - + PWIA98 8 - - redbook - wmoTTAAii=PWIE98 - + PWIE98 2 - - redbook - wmoTTAAii=PTNT98 - + PTNT98 2 - - redbook - wmoTTAAii=PWIA97 - + PWIA97 8 - - redbook - wmoTTAAii=PWIE97 - + PWIE97 2 - - redbook - wmoTTAAii=PMNV88 - + PMNV88 4 - - redbook - wmoTTAAii=PPZQ50 - + PPZQ50 2 - - redbook - wmoTTAAii=PEIY50 - + PEIY50 4 - - redbook - wmoTTAAii=PTIY98 - + PTIY98 4 - - redbook - wmoTTAAii=PYIY88 - + PYIY88 4 - - redbook - wmoTTAAii=PYIA88 - + PYIA88 2 - - redbook - wmoTTAAii=PEIK98 - + PEIK98 4 - - redbook - wmoTTAAii=PTAS90 - + PTAS90 2 - - redbook - wmoTTAAii=PTAS95 - + PTAS95 2 - - redbook - wmoTTAAii=PTAS00 - + PTAS00 2 - - redbook - wmoTTAAii=PEIY97 - + PEIY97 2 - - redbook - wmoTTAAii=PTIY97 - + PTIY97 2 - - redbook - wmoTTAAii=PYIY97 - + PYIY97 2 - - redbook - wmoTTAAii=PEIY96 - + PEIY96 2 - - redbook - wmoTTAAii=PTIY96 - + PTIY96 2 - - redbook - wmoTTAAii=PYIY96 - + PYIY96 2 - - redbook - wmoTTAAii=PTAT90 - + PTAT90 2 - - redbook - wmoTTAAii=PTAT95 - + PTAT95 2 - - redbook - wmoTTAAii=PTAT00 - + PTAT00 2 - - redbook - wmoTTAAii=PEBF98 - + PEBF98 4 - - redbook - wmoTTAAii=PEBG98 - + PEBG98 4 - - redbook - wmoTTAAii=PEBH98 - + PEBH98 4 - - redbook - wmoTTAAii=PEBI88 - + PEBI88 4 - - redbook - wmoTTAAii=PEBI98 - + PEBI98 4 - - redbook - wmoTTAAii=PEBJ88 - + PEBJ88 4 - - redbook - wmoTTAAii=PEBJ98 - + PEBJ98 4 - - redbook - wmoTTAAii=PEBK98 - + PEBK98 4 - - redbook - wmoTTAAii=PYNA98 - + PYNA98 4 - - redbook - wmoTTAAii=PWAA85 - + PWAA85 2 - - redbook - wmoTTAAii=PWAA20 - + PWAA20 2 - - redbook - wmoTTAAii=PWAA00 - + PWAA00 2 - - redbook - wmoTTAAii=PWAA65 - + PWAA65 2 - - redbook - wmoTTAAii=PWBA88 - + PWBA88 2 - - redbook - wmoTTAAii=PWDA00 - + PWDA00 2 - - redbook - wmoTTAAii=PWDA65 - + PWDA65 2 - - redbook - wmoTTAAii=PWEA88 - + PWEA88 2 - - redbook - wmoTTAAii=PWEC88 - + PWEC88 2 - - redbook - wmoTTAAii=PWEE88 - + PWEE88 2 - - redbook - wmoTTAAii=PWEG88 - + PWEG88 2 - - redbook - wmoTTAAii=PYAA89 - + PYAA89 4 - - redbook - wmoTTAAii=PJAA88 - + PJAA88 2 - - redbook - wmoTTAAii=PJAI88 - + PJAI88 2 - - redbook - wmoTTAAii=PPAE89 - + PPAE89 2 - - redbook - wmoTTAAii=PPAI89 - + PPAI89 2 - - redbook - wmoTTAAii=PPAM89 - + PPAM89 2 - - redbook - wmoTTAAii=PYBA89 - + PYBA89 4 - - redbook - wmoTTAAii=PJBA88 - + PJBA88 2 - - redbook - wmoTTAAii=PJBI88 - + PJBI88 2 - - redbook - wmoTTAAii=PPBE89 - + PPBE89 2 - - redbook - wmoTTAAii=PPBI89 - + PPBI89 2 - - redbook - wmoTTAAii=PPBM89 - + PPBM89 2 - - redbook - wmoTTAAii=PGNE88 - + PGNE88 2 - - redbook - wmoTTAAii=PGNE98 - + PGNE98 2 - - redbook - wmoTTAAii=PPTG98 - + PPTG98 2 - - redbook - wmoTTAAii=PPTR98 - + PPTR98 2 - - redbook - wmoTTAAii=PYWQ46 - + PYWQ46 2 - - redbook - wmoTTAAii=PYWS98 - + PYWS98 2 - - redbook - wmoTTAAii=PEIV98 - + PEIV98 2 - - redbook - wmoTTAAii=PEIW01 - + PEIW01 1 - - redbook - wmoTTAAii=PEIW02 - + PEIW02 1 - - redbook - wmoTTAAii=PEIW03 - + PEIW03 1 - - redbook - wmoTTAAii=PEIW04 - + PEIW04 1 - - redbook - wmoTTAAii=PEIW05 - + PEIW05 1 - - redbook - wmoTTAAii=PEIW06 - + PEIW06 1 - - redbook - wmoTTAAii=PEIW07 - + PEIW07 1 - - redbook - wmoTTAAii=PEIW08 - + PEIW08 1 - - redbook - wmoTTAAii=PEIW09 - + PEIW09 1 - - redbook - wmoTTAAii=PEIW10 - + PEIW10 1 - - redbook - wmoTTAAii=PEIW11 - + PEIW11 1 - - redbook - wmoTTAAii=PEIW12 - + PEIW12 1 - - redbook - wmoTTAAii=PEIW13 - + PEIW13 1 - - redbook - wmoTTAAii=PTIV98 - + PTIV98 2 - - redbook - wmoTTAAii=PTIW01 - + PTIW01 1 - - redbook - wmoTTAAii=PTIW02 - + PTIW02 1 - - redbook - wmoTTAAii=PTIW03 - + PTIW03 1 - - redbook - wmoTTAAii=PTIW04 - + PTIW04 1 - - redbook - wmoTTAAii=PTIW05 - + PTIW05 1 - - redbook - wmoTTAAii=PTIW06 - + PTIW06 1 - - redbook - wmoTTAAii=PTIW07 - + PTIW07 1 - - redbook - wmoTTAAii=PTIW08 - + PTIW08 1 - - redbook - wmoTTAAii=PTIW09 - + PTIW09 1 - - redbook - wmoTTAAii=PTIW10 - + PTIW10 1 - - redbook - wmoTTAAii=PTIW11 - + PTIW11 1 - - redbook - wmoTTAAii=PTIW12 - + PTIW12 1 - - redbook - wmoTTAAii=PTIW13 - + PTIW13 1 - - redbook - wmoTTAAii=PMWE98 - + PMWE98 2 - - redbook - wmoTTAAii=PMWI98 - + PMWI98 2 - - redbook - wmoTTAAii=PETT00 - + PETT00 2 - - redbook - wmoTTAAii=PTTU98 - + PTTU98 2 - - redbook - wmoTTAAii=PHTT50 - + PHTT50 2 - - redbook - wmoTTAAii=PHTT51 - + PHTT51 2 - - redbook - wmoTTAAii=PENE00 - + PENE00 4 - - redbook - wmoTTAAii=PWNE00 - + PWNE00 4 - - redbook - wmoTTAAii=PGNE00 - + PGNE00 4 - - redbook - wmoTTAAii=PGNI00 - + PGNI00 4 - - redbook - wmoTTAAii=PHNT50 - + PHNT50 2 - - redbook - wmoTTAAii=PTNK98 - + PTNK98 9 - - redbook - wmoTTAAii=PTNQ98 - + PTNQ98 9 - - redbook - wmoTTAAii=PTNR98 - + PTNR98 2 - - redbook - wmoTTAAii=PZNK00 - + PZNK00 4 - - redbook - wmoTTAAii=PGWK48 - + PGWK48 4 - - redbook - wmoTTAAii=PTNM98 - + PTNM98 9 - - redbook - wmoTTAAii=PTNO98 - + PTNO98 9 - - redbook - wmoTTAAii=PTNS98 - + PTNS98 9 - - redbook - wmoTTAAii=PENJ88 - + PENJ88 4 - - redbook - wmoTTAAii=PGNA00 - + PGNA00 100 - - redbook - wmoTTAAii=PSBB04 - + PSBB04 4 - - redbook - wmoTTAAii=PSBB08 - + PSBB08 4 - - redbook - wmoTTAAii=PSBB12 - + PSBB12 4 - - redbook - wmoTTAAii=PSBB25 - + PSBB25 4 - - redbook - wmoTTAAii=PSBC04 - + PSBC04 6 - - redbook - wmoTTAAii=PSBC08 - + PSBC08 6 - - redbook - wmoTTAAii=PSBC12 - + PSBC12 6 - - redbook - wmoTTAAii=PSBC25 - + PSBC25 6 - - redbook - wmoTTAAii=PSBD04 - + PSBD04 6 - - redbook - wmoTTAAii=PSBD08 - + PSBD08 6 - - redbook - wmoTTAAii=PSBD12 - + PSBD12 6 - - redbook - wmoTTAAii=PSBD25 - + PSBD25 6 - - redbook - wmoTTAAii=PSAO72 - + PSAO72 6 - - redbook - wmoTTAAii=PENV01 - + PENV01 1 - - redbook - wmoTTAAii=PENV02 - + PENV02 1 - - redbook - wmoTTAAii=PENV03 - + PENV03 1 - - redbook - wmoTTAAii=PENV04 - + PENV04 1 - - redbook - wmoTTAAii=PENV05 - + PENV05 1 - - redbook - wmoTTAAii=PENV06 - + PENV06 1 - - redbook - wmoTTAAii=PENV07 - + PENV07 1 - - redbook - wmoTTAAii=PENV08 - + PENV08 1 - - redbook - wmoTTAAii=PENV09 - + PENV09 1 - - redbook - wmoTTAAii=PENV10 - + PENV10 1 - - redbook - wmoTTAAii=PENV11 - + PENV11 1 - - redbook - wmoTTAAii=PENV12 - + PENV12 1 - - redbook - wmoTTAAii=PENV13 - + PENV13 1 - - redbook - wmoTTAAii=PTNV01 - + PTNV01 1 - - redbook - wmoTTAAii=PTNV02 - + PTNV02 1 - - redbook - wmoTTAAii=PTNV03 - + PTNV03 1 - - redbook - wmoTTAAii=PTNV04 - + PTNV04 1 - - redbook - wmoTTAAii=PTNV05 - + PTNV05 1 - - redbook - wmoTTAAii=PTNV06 - + PTNV06 1 - - redbook - wmoTTAAii=PTNV07 - + PTNV07 1 - - redbook - wmoTTAAii=PTNV08 - + PTNV08 1 - - redbook - wmoTTAAii=PTNV09 - + PTNV09 1 - - redbook - wmoTTAAii=PTNV10 - + PTNV10 1 - - redbook - wmoTTAAii=PTNV11 - + PTNV11 1 - - redbook - wmoTTAAii=PTNV12 - + PTNV12 1 - - redbook - wmoTTAAii=PTNV13 - + PTNV13 1 - - redbook - wmoTTAAii=PGNM98 - + PGNM98 4 - - redbook - wmoTTAAii=PGNO98 - + PGNO98 2 - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/utility/common_static/base/purge/satellitePurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.satellite/utility/common_static/base/purge/satellitePurgeRules.xml index 41fe0bbb80..d17fe041fe 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/utility/common_static/base/purge/satellitePurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/utility/common_static/base/purge/satellitePurgeRules.xml @@ -1,796 +1,570 @@ - - - - satellite - default - + + sectorID + physicalElement + 24 - + - - satellite - sectorID=Alaska National;physicalElement=Imager 11 micron IR - + Alaska National + Imager 11 micron IR 48 - - satellite - sectorID=Alaska National;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Alaska National + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - sectorID=Alaska National;physicalElement=Imager Visible - + Alaska National + Imager Visible 36 - - satellite - sectorID=Alaska National;physicalElement=Percent of Normal TPW - + Alaska National + Percent of Normal TPW 48 - - satellite - sectorID=Alaska National;physicalElement=Rain fall rate - + Alaska National + Rain fall rate 48 - - satellite - sectorID=Alaska National;physicalElement=Sounder Based Derived Precipitable Water (PW) - + Alaska National + Sounder Based Derived Precipitable Water (PW) 48 - - satellite - sectorID=Alaska Regional;physicalElement=Imager 11 micron IR - + Alaska Regional + Imager 11 micron IR 96 - - satellite - sectorID=Alaska Regional;physicalElement=Imager 12 micron IR - + Alaska Regional + Imager 12 micron IR 96 - - satellite - sectorID=Alaska Regional;physicalElement=Imager 13 micron (IR) - + Alaska Regional + Imager 13 micron (IR) 96 - - satellite - sectorID=Alaska Regional;physicalElement=Imager 3.9 micron IR - + Alaska Regional + Imager 3.9 micron IR 96 - - satellite - sectorID=Alaska Regional;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Alaska Regional + Imager 6.7-6.5 micron IR (WV) 96 - - satellite - sectorID=Alaska Regional;physicalElement=Imager Visible - + Alaska Regional + Imager Visible 72 - - satellite - sectorID=East CONUS;physicalElement=Imager 11 micron IR - + East CONUS + Imager 11 micron IR 96 - - satellite - sectorID=East CONUS;physicalElement=Imager 12 micron IR - + East CONUS + Imager 12 micron IR 96 - - satellite - sectorID=East CONUS;physicalElement=Imager 13 micron (IR) - + East CONUS + Imager 13 micron (IR) 96 - - satellite - sectorID=East CONUS;physicalElement=Imager 3.9 micron IR - + East CONUS + Imager 3.9 micron IR 96 - - satellite - sectorID=East CONUS;physicalElement=Imager 6.7-6.5 micron IR (WV) - + East CONUS + Imager 6.7-6.5 micron IR (WV) 96 - - satellite - sectorID=East CONUS;physicalElement=Imager Visible - + East CONUS + Imager Visible 56 - - satellite - sectorID=East CONUS;physicalElement=Low cloud base imagery - + East CONUS + Low cloud base imagery 62 - - satellite - sectorID=East CONUS;physicalElement=Sounder 11.03 micron imagery - + East CONUS + Sounder 11.03 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 14.06 micron imagery - + East CONUS + Sounder 14.06 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 3.98 micron imagery - + East CONUS + Sounder 3.98 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 4.45 micron imagery - + East CONUS + Sounder 4.45 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 6.51 micron imagery - + East CONUS + Sounder 6.51 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 7.02 micron imagery - + East CONUS + Sounder 7.02 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder 7.43 micron imagery - + East CONUS + Sounder 7.43 micron imagery 4 - - satellite - sectorID=East CONUS;physicalElement=Sounder Visible imagery - + East CONUS + Sounder Visible imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Imager 11 micron IR - + Hawaii National + Imager 11 micron IR 48 - - satellite - sectorID=Hawaii National;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Hawaii National + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - sectorID=Hawaii National;physicalElement=Imager Visible - + Hawaii National + Imager Visible 36 - - satellite - sectorID=Hawaii National;physicalElement=Percent of Normal TPW - + Hawaii National + Percent of Normal TPW 48 - - satellite - sectorID=Hawaii National;physicalElement=Rain fall rate - + Hawaii National + Rain fall rate 48 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 11.03 micron imagery - + Hawaii National + Sounder 11.03 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 14.06 micron imagery - + Hawaii National + Sounder 14.06 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 3.98 micron imagery - + Hawaii National + Sounder 3.98 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 4.45 micron imagery - + Hawaii National + Sounder 4.45 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 6.51 micron imagery - + Hawaii National + Sounder 6.51 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 7.02 micron imagery - + Hawaii National + Sounder 7.02 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder 7.43 micron imagery - + Hawaii National + Sounder 7.43 micron imagery 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder Based Derived Precipitable Water (PW) - + Hawaii National + Sounder Based Derived Precipitable Water (PW) 4 - - satellite - sectorID=Hawaii National;physicalElement=Sounder Visible imagery - + Hawaii National + Sounder Visible imagery 4 - - satellite - sectorID=Hawaii Regional;physicalElement=Imager 11 micron IR - + Hawaii Regional + Imager 11 micron IR 96 - - satellite - sectorID=Hawaii Regional;physicalElement=Imager 12 micron IR - + Hawaii Regional + Imager 12 micron IR 96 - - satellite - sectorID=Hawaii Regional;physicalElement=Imager 3.9 micron IR - + Hawaii Regional + Imager 3.9 micron IR 96 - - satellite - sectorID=Hawaii Regional;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Hawaii Regional + Imager 6.7-6.5 micron IR (WV) 96 - - satellite - sectorID=Hawaii Regional;physicalElement=Imager Visible - + Hawaii Regional + Imager Visible 72 - - satellite - sectorID=NH Composite - Meteosat-GOES E-GOES W-GMS;physicalElement=Imager 11 micron IR - + NH Composite - Meteosat-GOES E-GOES W-GMS + Imager 11 micron IR 48 - - satellite - sectorID=NH Composite - Meteosat-GOES E-GOES W-GMS;physicalElement=Imager 6.7-6.5 micron IR (WV) - + NH Composite - Meteosat-GOES E-GOES W-GMS + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - sectorID=NH Composite - Meteosat-GOES E-GOES W-GMS;physicalElement=Imager Visible - + NH Composite - Meteosat-GOES E-GOES W-GMS + Imager Visible 48 - - satellite - sectorID=Northern Hemisphere Composite;physicalElement=Imager 11 micron IR - + Northern Hemisphere Composite + Imager 11 micron IR 48 - - satellite - sectorID=Northern Hemisphere Composite;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Northern Hemisphere Composite + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - sectorID=Northern Hemisphere Composite;physicalElement=Imager Visible - + Northern Hemisphere Composite + Imager Visible 36 - - satellite - sectorID=Puerto Rico National;physicalElement=Imager 11 micron IR - + Puerto Rico National + Imager 11 micron IR 48 - - satellite - sectorID=Puerto Rico National;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Puerto Rico National + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - sectorID=Puerto Rico National;physicalElement=Imager Visible - + Puerto Rico National + Imager Visible 36 - - satellite - sectorID=Puerto Rico National;physicalElement=Percent of Normal TPW - + Puerto Rico National + Percent of Normal TPW 48 - - satellite - sectorID=Puerto Rico National;physicalElement=Rain fall rate - + Puerto Rico National + Rain fall rate 48 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 11.03 micron imagery - + Puerto Rico National + Sounder 11.03 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 14.06 micron imagery - + Puerto Rico National + Sounder 14.06 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 3.98 micron imagery - + Puerto Rico National + Sounder 3.98 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 4.45 micron imagery - + Puerto Rico National + Sounder 4.45 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 6.51 micron imagery - + Puerto Rico National + Sounder 6.51 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 7.02 micron imagery - + Puerto Rico National + Sounder 7.02 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder 7.43 micron imagery - + Puerto Rico National + Sounder 7.43 micron imagery 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder Based Derived Precipitable Water (PW) - + Puerto Rico National + Sounder Based Derived Precipitable Water (PW) 4 - - satellite - sectorID=Puerto Rico National;physicalElement=Sounder Visible imagery - + Puerto Rico National + Sounder Visible imagery 36 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager 11 micron IR - + Puerto Rico Regional + Imager 11 micron IR 96 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager 12 micron IR - + Puerto Rico Regional + Imager 12 micron IR 96 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager 13 micron (IR) - + Puerto Rico Regional + Imager 13 micron (IR) 96 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager 3.9 micron IR - + Puerto Rico Regional + Imager 3.9 micron IR 96 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Puerto Rico Regional + Imager 6.7-6.5 micron IR (WV) 96 - - satellite - sectorID=Puerto Rico Regional;physicalElement=Imager Visible - + Puerto Rico Regional + Imager Visible 72 - - satellite - sectorID=Supernational;physicalElement=Gridded Cloud Amount - + Supernational + Gridded Cloud Amount 48 - - satellite - sectorID=Supernational;physicalElement=Gridded Cloud Top Pressure or Height - + Supernational + Gridded Cloud Top Pressure or Height 48 - - satellite - sectorID=Supernational;physicalElement=Imager 11 micron IR - + Supernational + Imager 11 micron IR 32 - - satellite - sectorID=Supernational;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Supernational + Imager 6.7-6.5 micron IR (WV) 32 - - satellite - sectorID=Supernational;physicalElement=Imager Visible - + Supernational + Imager Visible 32 - - satellite - sectorID=Supernational;physicalElement=Percent of Normal TPW - + Supernational + Percent of Normal TPW 48 - - satellite - sectorID=Supernational;physicalElement=Rain fall rate - + Supernational + Rain fall rate 48 - - satellite - sectorID=Supernational;physicalElement=Sounder Based Derived Lifted Index (LI) - + Supernational + Sounder Based Derived Lifted Index (LI) 48 - - satellite - sectorID=Supernational;physicalElement=Sounder Based Derived Precipitable Water (PW) - + Supernational + Sounder Based Derived Precipitable Water (PW) 48 - - satellite - sectorID=Supernational;physicalElement=Sounder Based Derived Surface Skin Temp (SFC Skin) - + Supernational + Sounder Based Derived Surface Skin Temp (SFC Skin) 48 - - satellite - sectorID=Supernational;physicalElement=Imager 11 micron IR - + Supernational + Imager 11 micron IR 24 - - satellite - sectorID=Supernational;physicalElement=Imager 12 micron IR - + Supernational + Imager 12 micron IR 32 - - satellite - sectorID=Supernational;physicalElement=Imager 13 micron (IR) - + Supernational + Imager 13 micron (IR) 32 - - satellite - sectorID=Supernational;physicalElement=Imager 3.9 micron IR - + Supernational + Imager 3.9 micron IR 32 - - satellite - sectorID=Supernational;physicalElement=Imager 6.7-6.5 micron IR (WV) - + Supernational + Imager 6.7-6.5 micron IR (WV) 32 - - satellite - sectorID=Supernational;physicalElement=Imager Visible - + Supernational + Imager Visible 20 - - satellite - sectorID=Supernational;physicalElement=Low cloud base imagery - + Supernational + Low cloud base imagery 36 - - satellite - sectorID=Supernational;physicalElement=Sounder 11.03 micron imagery - + Supernational + Sounder 11.03 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 14.06 micron imagery - + Supernational + Sounder 14.06 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 3.98 micron imagery - + Supernational + Sounder 3.98 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 4.45 micron imagery - + Supernational + Sounder 4.45 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 6.51 micron imagery - + Supernational + Sounder 6.51 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 7.02 micron imagery - + Supernational + Sounder 7.02 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder 7.43 micron imagery - + Supernational + Sounder 7.43 micron imagery 4 - - satellite - sectorID=Supernational;physicalElement=Sounder Visible imagery - + Supernational + Sounder Visible imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Imager 11 micron IR - + West CONUS + Imager 11 micron IR 96 - - satellite - sectorID=West CONUS;physicalElement=Imager 12 micron IR - + West CONUS + Imager 12 micron IR 96 - - satellite - sectorID=West CONUS;physicalElement=Imager 13 micron (IR) - + West CONUS + Imager 13 micron (IR) 96 - - satellite - sectorID=West CONUS;physicalElement=Imager 3.9 micron IR - + West CONUS + Imager 3.9 micron IR 96 - - satellite - sectorID=West CONUS;physicalElement=Imager 6.7-6.5 micron IR (WV) - + West CONUS + Imager 6.7-6.5 micron IR (WV) 96 - - satellite - sectorID=West CONUS;physicalElement=Imager Visible - + West CONUS + Imager Visible 56 - - satellite - sectorID=West CONUS;physicalElement=Low cloud base imagery - + West CONUS + Low cloud base imagery 62 - - satellite - sectorID=West CONUS;physicalElement=Sounder 11.03 micron imagery - + West CONUS + Sounder 11.03 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 14.06 micron imagery - + West CONUS + Sounder 14.06 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 3.98 micron imagery - + West CONUS + Sounder 3.98 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 4.45 micron imagery - + West CONUS + Sounder 4.45 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 6.51 micron imagery - + West CONUS + Sounder 6.51 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 7.02 micron imagery - + West CONUS + Sounder 7.02 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder 7.43 micron imagery - + West CONUS + Sounder 7.43 micron imagery 4 - - satellite - sectorID=West CONUS;physicalElement=Sounder Visible imagery - + West CONUS + Sounder Visible imagery 4 diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/utility/common_static/base/purge/sfcobsPurgeRules.xml b/edexOsgi/com.raytheon.edex.plugin.sfcobs/utility/common_static/base/purge/sfcobsPurgeRules.xml index 3905e79a32..cde48034fc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/utility/common_static/base/purge/sfcobsPurgeRules.xml +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/utility/common_static/base/purge/sfcobsPurgeRules.xml @@ -1,21 +1,15 @@ - - + + reportType - - sfcobs - reportType=1001 - + 1001 13 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1001 - + 1001 50 =01-00:00:00 +00-12:00:00 @@ -24,217 +18,146 @@ - - sfcobs - reportType=1002 - + 1002 13 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1002 - + 1002 50 =01-00:00:00 +00-12:00:00 - - - sfcobs - reportType=1003 - + 1003 34 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1003 - + 1003 38 =00-03:00:00 00-01:00:00 - - sfcobs - reportType=1003 - + 1003 42 =00-06:00:00 00-01:00:00 - - sfcobs - reportType=1003 - + 1003 50 =01-00:00:00 +00-12:00:00 - - - sfcobs - reportType=1004 - + 1004 34 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1004 - + 1004 38 =00-03:00:00 00-01:00:00 - - sfcobs - reportType=1004 - + 1004 42 =00-06:00:00 00-01:00:00 - - sfcobs - reportType=1004 - + 1004 50 =01-00:00:00 +00-12:00:00 - - - sfcobs - reportType=1005 - + 1005 34 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1005 - + 1005 38 =00-03:00:00 00-01:00:00 - - sfcobs - reportType=1005 - + 1005 42 =00-06:00:00 00-01:00:00 - - sfcobs - reportType=1005 - + 1005 50 =01-00:00:00 +00-12:00:00 - - - sfcobs - reportType=1006 - + 1006 34 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1006 - + 1006 38 =00-03:00:00 00-01:00:00 - - sfcobs - reportType=1006 - + 1006 42 =00-06:00:00 00-01:00:00 - - sfcobs - reportType=1006 - + 1006 50 =01-00:00:00 +00-12:00:00 - - - sfcobs - reportType=1007 - + 1007 34 =00-01:00:00 00-01:00:00 - - sfcobs - reportType=1007 - + 1007 38 =00-03:00:00 00-01:00:00 - - sfcobs - reportType=1007 - + 1007 42 =00-06:00:00 00-01:00:00 - - sfcobs - reportType=1007 - + 1007 50 =01-00:00:00 +00-12:00:00 - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java index 65d058c5d4..6db666eeb9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java @@ -51,31 +51,31 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; */ public class TextDao extends DefaultPluginDao { - public TextDao(String pluginName) throws PluginException { - super(pluginName); - } - - @Override - public void purgeAllData() { - logger.warn("purgeAllPluginData not implemented for text. No data will be purged."); - } - - protected void loadScripts() throws PluginException { - // no op - } + public TextDao(String pluginName) throws PluginException { + super(pluginName); + } @Override - public void purgeExpiredData() throws PluginException { - int deletedRecords = 0; + public void purgeAllData() { + logger.warn("purgeAllPluginData not implemented for text. No data will be purged."); + } - // only do full purge every few hours since incremental purge runs every - // minute - if (Calendar.getInstance().get(Calendar.HOUR_OF_DAY) % 3 == 0) { - TextDB.purgeStdTextProducts(); - } + protected void loadScripts() throws PluginException { + // no op + } - PurgeLogger.logInfo("Purged " + deletedRecords + " items total.", - "text"); + @Override + public void purgeExpiredData() throws PluginException { + int deletedRecords = 0; + + // only do full purge every few hours since incremental purge runs every + // minute + if (Calendar.getInstance().get(Calendar.HOUR_OF_DAY) % 3 == 0) { + TextDB.purgeStdTextProducts(); + } + + PurgeLogger.logInfo("Purged " + deletedRecords + " items total.", + "text"); } @SuppressWarnings("unchecked") @@ -95,14 +95,17 @@ public class TextDao extends DefaultPluginDao { } @Override - public Date getMinInsertTime(String productKey) + public Date getMinInsertTime(String[][] productKeys) throws DataAccessLayerException { StdTextProductDao dao = new StdTextProductDao(true); DatabaseQuery query = new DatabaseQuery(dao.getDaoClass()); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addReturnedField("insertTime"); query.addOrder("insertTime", true); query.setMaxResults(1); @@ -113,5 +116,5 @@ public class TextDao extends DefaultPluginDao { } else { return result.get(0).getTime(); } - } + } } diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRetentionTimeManager.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRetentionTimeManager.java index 53732db9e1..7676740a56 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRetentionTimeManager.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FFMPRetentionTimeManager.java @@ -51,7 +51,7 @@ public class FFMPRetentionTimeManager implements ILocalizationFileObserver { */ protected PurgeRuleSet configXml; - private ArrayList listeners = new ArrayList(); + private final ArrayList listeners = new ArrayList(); /** Singleton instance of this class */ private static FFMPRetentionTimeManager instance = new FFMPRetentionTimeManager(); @@ -166,12 +166,12 @@ public class FFMPRetentionTimeManager implements ILocalizationFileObserver { * @return */ public long getRetentionTime() { + PurgeRule rule = configXml.getDefaultRule(); - for (PurgeRule rule : configXml.getRules()) { - if (rule.getId().getPluginName().equals("ffmp")) { - return rule.getPeriodInMillis(); - } + if (rule != null) { + return rule.getPeriodInMillis(); } + return 0l; } @@ -181,12 +181,14 @@ public class FFMPRetentionTimeManager implements ILocalizationFileObserver { * @param time */ public void setRetentionTime(String time) { - for (PurgeRule rule : configXml.getRules()) { - if (rule.getId().getPluginName().equals("ffmp")) { - rule.setPeriod(time); - } + PurgeRule rule = configXml.getDefaultRule(); + if (rule == null) { + rule = new PurgeRule(); + configXml.setDefaultRule(rule); } + rule.setPeriod(time); + saveConfigXml(); } } diff --git a/edexOsgi/com.raytheon.uf.edex.database/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.edex.database/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index f0c95e8943..23c5a8e3df 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.uf.edex.database/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -2,5 +2,4 @@ com.raytheon.uf.edex.database.cluster.ClusterTask com.raytheon.uf.edex.database.cluster.ClusterTaskPK com.raytheon.uf.edex.database.plugin.PluginVersion com.raytheon.uf.edex.database.purge.PurgeRule -com.raytheon.uf.edex.database.purge.PurgeRulePK com.raytheon.uf.edex.database.purge.PurgeRuleSet \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java index dffee34d7e..dfe4f3618f 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java @@ -68,7 +68,6 @@ import com.raytheon.uf.edex.database.dao.CoreDao; import com.raytheon.uf.edex.database.dao.DaoConfig; import com.raytheon.uf.edex.database.purge.PurgeLogger; import com.raytheon.uf.edex.database.purge.PurgeRule; -import com.raytheon.uf.edex.database.purge.PurgeRulePK; import com.raytheon.uf.edex.database.purge.PurgeRuleSet; import com.raytheon.uf.edex.database.query.DatabaseQuery; @@ -446,11 +445,11 @@ public abstract class PluginDao extends CoreDao { List allRefTimes = getRefTimes(); Set roundedRefTimes = new HashSet(); for (Date d : allRefTimes) { - this.purgeDataByRefTime(d, ""); + this.purgeDataByRefTime(d, null); roundedRefTimes.add(roundDateToHour(d)); } for (Date d : roundedRefTimes) { - this.purgeHDF5DataByRefTime(d, ""); + this.purgeHDF5DataByRefTime(d, null); } } catch (Exception e) { throw new PluginException("Error purging all data for " @@ -468,364 +467,31 @@ public abstract class PluginDao extends CoreDao { try { PluginDao pluginDao = PluginFactory.getInstance().getPluginDao( pluginName); - List ruleList = new ArrayList(); - ruleList.addAll(getPurgeRulesForPlugin(pluginName)); + PurgeRuleSet ruleSet = getPurgeRulesForPlugin(pluginName); - /* - * This section generates default rules for data not addressed by - * the rule set accompanying this plugin. This prevents orphaned - * data. - */ - Set keysWithoutRules = new HashSet(); + if (ruleSet == null) { + PurgeLogger.logInfo( + "No valid purge rules found. Skipping purge.", + pluginName); + return; + } // Query the database to get all possible product keys for this data - // and assume they have no rules associated with them - keysWithoutRules.addAll(getDistinctProductKeys()); - Set keysWithRules = new HashSet(); - PurgeRule pluginDefaultRule = null; - - // Get the default rule for this plugin if it specifies one. - for (PurgeRule rule : ruleList) { - if (rule.getId().getKey().equals("default")) { - pluginDefaultRule = rule; - continue; - } - keysWithRules.add(rule.getId().getKey()); - } - - // If this plugin does not specify a default rule, the system - // default will be used - if (pluginDefaultRule == null) { - pluginDefaultRule = loadDefaultPurgeRule(); - if (pluginDefaultRule == null) { - PurgeLogger.logError("Unable to purge plugin", pluginName); - } - } else { - ruleList.remove(pluginDefaultRule); - } - - // Remove the keys we have determined to have rules associated with - // them - keysWithoutRules.removeAll(keysWithRules); - - // If keys remain without rules, we iterate over them and assign the - // default rule - if (!keysWithoutRules.isEmpty()) { - PurgeLogger.logWarn("Data exists with no purge rule.", - pluginName); - for (String keyNeedingRule : keysWithoutRules) { - PurgeLogger.logWarn( - "Generated default purge rule for key: " - + keyNeedingRule, pluginName); - PurgeRule newRule = (PurgeRule) pluginDefaultRule.clone(); - newRule.getId().setPluginName(pluginName); - newRule.getId().setKey(keyNeedingRule); - ruleList.add(newRule); - } - } - - // If no purge rules are specified for this plugin, we assign the - // default rule so data for this plugin is still purged - if (ruleList.isEmpty()) { - PurgeLogger.logWarn("No purge rules specified. Using default", - pluginName); - pluginDefaultRule.getId().setPluginName(pluginName); - pluginDefaultRule.getId().setKey(""); - ruleList.add(pluginDefaultRule); - } - - // Map containing the times to retain for each rule - Map> timesToKeep = new HashMap>(); - - // Map containing the times to purge for each rule - Map> timesToPurge = new HashMap>(); - - // Iterate through the rules and determine the times to purge - for (PurgeRule rule : ruleList) { - - // If this rule is not valid, we cannot apply it - if (!isRuleValid(rule)) { - PurgeLogger.logWarn("Ignoring Invalid Rule: " + rule, - this.pluginName); - continue; - } - - // Holds the times kept by this rule - List timesKeptByRule = new ArrayList(); - - Set roundedTimes = new HashSet(); - - // Holds the times to be purged by this rule - List timesPurgedByRule = new ArrayList(); - - PurgeRulePK rulePK = rule.getId(); - if (!timesToKeep.containsKey(rulePK)) { - timesToKeep.put(rulePK, new HashSet()); - } - if (!timesToPurge.containsKey(rulePK)) { - timesToPurge.put(rulePK, new HashSet()); - } - - String key = rulePK.getKey(); - - /* - * This section applies the purge rule - */ - - List refTimesForKey = pluginDao - .getRefTimesForCriteria(key); - - if (rule.isModTimeToWaitSpecified()) { - Date maxInsertTime = pluginDao.getMaxInsertTime(key); - if (maxInsertTime != null) { - long lastInsertTime = maxInsertTime.getTime(); - long currentTime = System.currentTimeMillis(); - if ((currentTime - lastInsertTime) < rule - .getModTimeToWaitInMillis()) { - PurgeLogger - .logInfo( - "For key, " - + key - + ", the most recent version is less than " - + rule.getModTimeToWaitDescription() - + " old. Increasing versions to keep for this key.", - pluginName); - rule.setVersionsToKeep(rule.getVersionsToKeep() + 1); - } - } - } - - // Calculate the period cutoff time if necessary - Date periodCutoffTime = new Date(); - if (rule.isPeriodSpecified()) { - if (rule.isPeriodBasedOnLatestTime()) { - Date maxRefTime = pluginDao.getMaxRefTime(key); - if (maxRefTime == null) { - PurgeLogger.logInfo("No data available to purge", - pluginName); - continue; - } else { - periodCutoffTime = new Date(maxRefTime.getTime() - - rule.getPeriodInMillis()); - } - } else { - periodCutoffTime = new Date(System.currentTimeMillis() - - rule.getPeriodInMillis()); - } - } - - // Filter the keepers by the delta time specified - if (rule.isDeltaSpecified()) { - for (Date refTime : refTimesForKey) { - Date timeToCompare = rule.getRoundedDate(refTime)[1]; - long delta = rule.getDeltaTimeInMillis(); - long dateTimeAsLong = timeToCompare.getTime(); - - if (rule.isDeltaTimeMultiple()) { - if (dateTimeAsLong % delta == 0) { - // If the versions to keep is zero we keep it if - // it does not exceed the period specified, if - // any - if (rule.getVersionsToKeep() == 0) { - if (rule.isPeriodSpecified() - && refTime.before(periodCutoffTime)) { - timesPurgedByRule.add(refTime); - - } else { - timesKeptByRule.add(refTime); - } - } - - // If the versions to keep is not zero and - // adding this will not exceed the specified - // number of versions to keep and it does not - // exceed the period specified, the time is kept - else if (rule.getVersionsToKeep() > 0) { - if (rule.isRoundSpecified()) { - if (roundedTimes.size() < rule - .getVersionsToKeep()) { - roundedTimes.add(timeToCompare); - timesKeptByRule.add(refTime); - } else { - timesPurgedByRule.add(refTime); - } - } else { - if (timesKeptByRule.size() < rule - .getVersionsToKeep()) { - if (rule.isPeriodSpecified() - && refTime - .before(periodCutoffTime)) { - timesPurgedByRule.add(refTime); - } else { - timesKeptByRule.add(refTime); - } - } - } - - } - } else { - timesPurgedByRule.add(refTime); - } - } - } - } - - /* - * If a versions to keep is specified, determine the versions to - * keep. If a delta is specified for this rule, then the - * versions have already been calculated based on the delta - * time. This section is used only if a delta time is not used - */ - else if (!rule.isDeltaSpecified() - && rule.isVersionsToKeepSpecified()) { - Date currentRefTime = null; - for (int i = 0; i < refTimesForKey.size(); i++) { - currentRefTime = refTimesForKey.get(i); - if (i < rule.getVersionsToKeep()) { - if (rule.isPeriodSpecified() - && currentRefTime.before(periodCutoffTime)) { - timesPurgedByRule.add(currentRefTime); - } else { - timesKeptByRule.add(currentRefTime); - } - timesKeptByRule.add(currentRefTime); - } else { - timesPurgedByRule.add(currentRefTime); - } - - } - } - - /* - * This rule only specifies a time cutoff - */ - else if (!rule.isDeltaSpecified() - && !rule.isVersionsToKeepSpecified() - && rule.isPeriodSpecified()) { - for (Date currentRefTime : refTimesForKey) { - if (currentRefTime.before(periodCutoffTime)) { - timesPurgedByRule.add(currentRefTime); - } else { - timesKeptByRule.add(currentRefTime); - } - } - } - - /* - * This rule has been so poorly written that it does nothing - */ - else { - PurgeLogger - .logInfo( - "Purge rule does not specify a delta, period, or versions to keep.", - pluginName); - } - - /* - * If log only is specified, log the results but purge nothing - */ - if (rule.isLogOnly()) { - PurgeLogger.logInfo("Rule is configured to log only", - pluginName); - PurgeLogger.logInfo( - "These version would be removed by the rule:", - pluginName); - Collections.sort(timesPurgedByRule); - Collections.sort(timesKeptByRule); - for (Date d : timesPurgedByRule) { - PurgeLogger.logInfo(d.toString(), pluginName); - } - PurgeLogger - .logInfo( - "These versions would have been retained by the rule:", - pluginName); - for (Date d : timesKeptByRule) { - PurgeLogger.logInfo(d.toString(), pluginName); - } - - } else { - timesToKeep.get(rulePK).addAll(timesKeptByRule); - timesToPurge.get(rulePK).addAll(timesPurgedByRule); - } - - // We must remove the keep times from the purge list. This - // ensures that if the time passes at least one rule, then it - // will be retained - timesToPurge.get(rulePK).removeAll(timesToKeep.get(rulePK)); - } - - // Counter for recording the number of items purged for a given time - int itemsDeletedForTime = 0; - - // The total number of items purged + List ruleKeys = ruleSet.getKeys(); int totalItems = 0; - for (PurgeRulePK purgeKey : timesToPurge.keySet()) { - String key = purgeKey.getKey(); - - int itemsDeletedForKey = 0; - for (Date deleteDate : timesToPurge.get(purgeKey)) { - - // Delete the data in the database - itemsDeletedForTime = pluginDao.purgeDataByRefTime( - deleteDate, key); - - totalItems += itemsDeletedForTime; - itemsDeletedForKey += itemsDeletedForTime; + if ((ruleKeys != null) && !ruleKeys.isEmpty()) { + // Iterate through keys, fully purge each key set + String[][] distinctKeys = getDistinctProductKeys(ruleSet + .getKeys()); + for (String[] key : distinctKeys) { + totalItems += purgeExpiredKey(pluginDao, ruleSet, key); } - if (itemsDeletedForKey > 0) { - StringBuilder messageBuffer = new StringBuilder(); - messageBuffer.append("Purged ").append(itemsDeletedForKey) - .append(" item"); - if (itemsDeletedForKey != 1) { - messageBuffer.append("s"); - } - if (key.equals("default")) { - messageBuffer.append(" for default key"); - } else if (!key.isEmpty()) { - messageBuffer.append(" for key ").append(key); - } - PurgeLogger.logInfo(messageBuffer.toString(), pluginName); - } - boolean purgeHDF5Data = false; - try { - // Determine if this plugin uses HDF5 to store data - purgeHDF5Data = (PluginFactory.getInstance() - .getPluginRecordClass(pluginName).newInstance() instanceof IPersistable); - } catch (Exception e) { - throw new DataAccessLayerException( - "Error instantiating plugin record class!", e); - } - if (purgeHDF5Data) { - - /* - * If this plugin stores data in HDF5, we must round the - * times to hour granularity since the files are named to - * the hour. Rounding the time allows us to delete files - * instead of deleting individual records from the HDF5 - * file. - */ - Set roundedTimesToPurge = new HashSet(); - Set roundedTimesToKeep = new HashSet(); - - for (Date dateToRound : timesToKeep.get(purgeKey)) { - roundedTimesToKeep.add(roundDateToHour(dateToRound)); - } - for (Date dateToRound : timesToPurge.get(purgeKey)) { - roundedTimesToPurge.add(roundDateToHour(dateToRound)); - } - - // Make sure not files are erroneously purged - roundedTimesToPurge.removeAll(roundedTimesToKeep); - - // Delete the HDF5 files that are no longer referenced - for (Date deleteDate : roundedTimesToPurge) { - this.purgeHDF5DataByRefTime(deleteDate, - purgeKey.getKey()); - } - } - + } else { + // no rule keys defined, can only apply default rule + totalItems += purgeExpiredKey(pluginDao, ruleSet, null); } + StringBuilder messageBuffer = new StringBuilder(); messageBuffer.append("Purged ").append(totalItems).append(" item"); if (totalItems != 1) { @@ -834,37 +500,273 @@ public abstract class PluginDao extends CoreDao { messageBuffer.append(" total."); PurgeLogger.logInfo(messageBuffer.toString(), pluginName); - - // Debug output to see which times were retained - if (PurgeLogger.isDebugEnabled()) { - for (PurgeRulePK purgeKey : timesToKeep.keySet()) { - List keepers = new ArrayList(); - keepers.addAll(timesToKeep.get(purgeKey)); - if (!keepers.isEmpty()) { - StringBuilder builder = new StringBuilder(); - Collections.sort(keepers); - builder.append("The following times were retained"); - if (purgeKey.getKey().isEmpty()) { - builder.append(":"); - } else { - builder.append(" for key ") - .append(purgeKey.getKey()).append(":"); - } - - for (Date keepDate : keepers) { - builder.append("[").append(keepDate).append("]") - .append(" "); - } - PurgeLogger.logDebug(builder.toString(), pluginName); - } - } - } - } catch (EdexException e) { throw new PluginException("Error applying purge rule!!", e); } } + /** + * Takes the purgeKeys, looks up the associated purge rule, and applies it + * to the data matched by purgeKeys. + * + * @param pluginDao + * @param ruleSet + * @param purgeKeys + * @return Number of records purged + * @throws DataAccessLayerException + */ + protected int purgeExpiredKey(PluginDao pluginDao, PurgeRuleSet ruleSet, + String[] purgeKeys) throws DataAccessLayerException { + PurgeRule rule = ruleSet.getRuleForKeys(purgeKeys); + + if (rule == null) { + PurgeLogger.logWarn( + "No rule found for purgeKeys: " + + Arrays.toString(purgeKeys), pluginName); + return 0; + } + + // Holds the times kept by this rule + List timesKeptByRule = new ArrayList(); + + Set roundedTimes = new HashSet(); + + // Holds the times to be purged by this rule + List timesPurgedByRule = new ArrayList(); + + /* + * This section applies the purge rule + */ + String[][] productKeys = null; + if (purgeKeys != null) { + productKeys = new String[purgeKeys.length][]; + Iterator iter = ruleSet.getKeys().iterator(); + int index = 0; + for (String purgeKey : purgeKeys) { + productKeys[index] = new String[2]; + productKeys[index][0] = iter.next(); + productKeys[index++][1] = purgeKey; + } + } + + List refTimesForKey = pluginDao + .getRefTimesForCriteria(productKeys); + String productKeyString = null; + if (productKeys != null) { + StringBuilder productKeyBuilder = new StringBuilder(); + for (String[] pKey : productKeys) { + productKeyBuilder.append(Arrays.toString(pKey)); + } + productKeyString = productKeyBuilder.toString(); + } + + if (rule.isModTimeToWaitSpecified()) { + Date maxInsertTime = pluginDao.getMaxInsertTime(productKeys); + if (maxInsertTime != null) { + long lastInsertTime = maxInsertTime.getTime(); + long currentTime = System.currentTimeMillis(); + if ((currentTime - lastInsertTime) < rule + .getModTimeToWaitInMillis()) { + PurgeLogger + .logInfo( + "For procuct key, " + + productKeyString + + ", the most recent version is less than " + + rule.getModTimeToWaitDescription() + + " old. Increasing versions to keep for this key.", + pluginName); + rule.setVersionsToKeep(rule.getVersionsToKeep() + 1); + } + } + } + + // Calculate the period cutoff time if necessary + Date periodCutoffTime = new Date(); + if (rule.isPeriodSpecified()) { + if (rule.isPeriodBasedOnLatestTime()) { + Date maxRefTime = pluginDao.getMaxRefTime(productKeys); + if (maxRefTime == null) { + PurgeLogger.logInfo("No data available to purge", + pluginName); + return 0; + } else { + periodCutoffTime = new Date(maxRefTime.getTime() + - rule.getPeriodInMillis()); + } + } else { + periodCutoffTime = new Date(System.currentTimeMillis() + - rule.getPeriodInMillis()); + } + } + + // Filter the keepers by the delta time specified + if (rule.isDeltaSpecified()) { + for (Date refTime : refTimesForKey) { + Date timeToCompare = rule.getRoundedDate(refTime)[1]; + long delta = rule.getDeltaTimeInMillis(); + long dateTimeAsLong = timeToCompare.getTime(); + + if (rule.isDeltaTimeMultiple()) { + if (dateTimeAsLong % delta == 0) { + // If the versions to keep is zero we keep it if + // it does not exceed the period specified, if + // any + if (rule.getVersionsToKeep() == 0) { + if (rule.isPeriodSpecified() + && refTime.before(periodCutoffTime)) { + timesPurgedByRule.add(refTime); + + } else { + timesKeptByRule.add(refTime); + } + } + + // If the versions to keep is not zero and + // adding this will not exceed the specified + // number of versions to keep and it does not + // exceed the period specified, the time is kept + else if (rule.getVersionsToKeep() > 0) { + if (rule.isRoundSpecified()) { + if (roundedTimes.size() < rule + .getVersionsToKeep()) { + roundedTimes.add(timeToCompare); + timesKeptByRule.add(refTime); + } else { + timesPurgedByRule.add(refTime); + } + } else { + if (timesKeptByRule.size() < rule + .getVersionsToKeep()) { + if (rule.isPeriodSpecified() + && refTime.before(periodCutoffTime)) { + timesPurgedByRule.add(refTime); + } else { + timesKeptByRule.add(refTime); + } + } + } + + } + } else { + timesPurgedByRule.add(refTime); + } + } + } + } + + /* + * If a versions to keep is specified, determine the versions to keep. + * If a delta is specified for this rule, then the versions have already + * been calculated based on the delta time. This section is used only if + * a delta time is not used + */ + else if (!rule.isDeltaSpecified() && rule.isVersionsToKeepSpecified()) { + Date currentRefTime = null; + for (int i = 0; i < refTimesForKey.size(); i++) { + currentRefTime = refTimesForKey.get(i); + if (i < rule.getVersionsToKeep()) { + if (rule.isPeriodSpecified() + && currentRefTime.before(periodCutoffTime)) { + timesPurgedByRule.add(currentRefTime); + } else { + timesKeptByRule.add(currentRefTime); + } + timesKeptByRule.add(currentRefTime); + } else { + timesPurgedByRule.add(currentRefTime); + } + + } + /* + * This rule only specifies a time cutoff + */ + } else if (!rule.isDeltaSpecified() + && !rule.isVersionsToKeepSpecified() + && rule.isPeriodSpecified()) { + for (Date currentRefTime : refTimesForKey) { + if (currentRefTime.before(periodCutoffTime)) { + timesPurgedByRule.add(currentRefTime); + } else { + timesKeptByRule.add(currentRefTime); + } + } + /* + * This rule has been so poorly written that it does nothing + */ + } else { + PurgeLogger + .logInfo( + "Purge rule does not specify a delta, period, or versions to keep.", + pluginName); + } + + /* + * If log only is specified, log the results but purge nothing + */ + if (rule.isLogOnly()) { + PurgeLogger.logInfo("Rule is configured to log only", pluginName); + PurgeLogger.logInfo("These version would be removed by the rule:", + pluginName); + Collections.sort(timesPurgedByRule); + Collections.sort(timesKeptByRule); + for (Date d : timesPurgedByRule) { + PurgeLogger.logInfo(d.toString(), pluginName); + } + PurgeLogger.logInfo( + "These versions would have been retained by the rule:", + pluginName); + for (Date d : timesKeptByRule) { + PurgeLogger.logInfo(d.toString(), pluginName); + } + + return 0; + } + + // We must remove the keep times from the purge list. This + // ensures that if the time passes at least one time constraint, + // then it will be retained + timesPurgedByRule.removeAll(timesKeptByRule); + + int itemsDeletedForKey = 0; + for (Date deleteDate : timesPurgedByRule) { + + // Delete the data in the database + int itemsDeletedForTime = pluginDao.purgeDataByRefTime(deleteDate, + productKeys); + + itemsDeletedForKey += itemsDeletedForTime; + } + if (itemsDeletedForKey > 0) { + StringBuilder messageBuffer = new StringBuilder(); + messageBuffer.append("Purged ").append(itemsDeletedForKey) + .append(" item"); + if (itemsDeletedForKey != 1) { + messageBuffer.append("s"); + } + messageBuffer.append(" for key ").append(productKeyString); + PurgeLogger.logInfo(messageBuffer.toString(), pluginName); + } + + // Debug output to see which times were retained + if (PurgeLogger.isDebugEnabled()) { + if (!timesKeptByRule.isEmpty()) { + StringBuilder builder = new StringBuilder(); + Collections.sort(timesKeptByRule); + builder.append("The following times were retained"); + builder.append(" for key ").append(productKeyString) + .append(":"); + + for (Date keepDate : timesKeptByRule) { + builder.append("[").append(keepDate).append("]") + .append(" "); + } + PurgeLogger.logDebug(builder.toString(), pluginName); + } + } + + return itemsDeletedForKey; + } + /** * Gets the data store for the given object * @@ -933,36 +835,41 @@ public abstract class PluginDao extends CoreDao { * If errors occur while querying for the data */ @SuppressWarnings("unchecked") - public Set getDistinctProductKeys() throws DataAccessLayerException { - Set distinctKeys = new HashSet(); - List keyFields = this.pathProvider.getKeyNames(pluginName); - if (!keyFields.isEmpty()) { + public String[][] getDistinctProductKeys(List keys) + throws DataAccessLayerException { + String[][] distinctKeys = null; + if ((keys != null) && !keys.isEmpty()) { DatabaseQuery query = new DatabaseQuery(this.daoClass); - for (int i = 0; i < keyFields.size(); i++) { + for (int i = 0; i < keys.size(); i++) { if (i == 0) { - query.addDistinctParameter(keyFields.get(i)); + query.addDistinctParameter(keys.get(i)); } else { - query.addReturnedField(keyFields.get(i)); + query.addReturnedField(keys.get(i)); } } - if (keyFields.size() == 1) { + if (keys.size() == 1) { List results = this.queryByCriteria(query); - for (int i = 0; i < results.size(); i++) { - distinctKeys.add(keyFields.get(0) + "=" - + results.get(i).toString()); + distinctKeys = new String[results.size()][]; + int index = 0; + for (Object obj : results) { + distinctKeys[index] = new String[1]; + distinctKeys[index++][0] = String.valueOf(obj); } } else { List results = (List) this .queryByCriteria(query); + distinctKeys = new String[results.size()][]; + int rIndex = 0; + for (Object[] result : results) { - StringBuilder newKey = new StringBuilder(); - for (int i = 0; i < result.length; i++) { - newKey.append(keyFields.get(i) + "=" + result[i]); - if (i != result.length - 1) { - newKey.append(";"); - } + distinctKeys[rIndex] = new String[result.length]; + int cIndex = 0; + + for (Object obj : result) { + distinctKeys[rIndex][cIndex++] = String.valueOf(obj); } - distinctKeys.add(newKey.toString()); + + rIndex++; } } } @@ -989,19 +896,23 @@ public abstract class PluginDao extends CoreDao { /** * Gets all distinct reference times for the given productKey * - * @param productKey - * The product key to get the list of reference times for + * @param productKeys + * The product keys to get the list of reference times for. + * Should be in key value pairs. * @return A list of distinct reference times for the given productKey * @throws DataAccessLayerException */ @SuppressWarnings("unchecked") - public List getRefTimesForCriteria(String productKey) + public List getRefTimesForCriteria(String[][] productKeys) throws DataAccessLayerException { DatabaseQuery query = new DatabaseQuery(this.daoClass); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addDistinctParameter(PURGE_VERSION_FIELD); query.addOrder(PURGE_VERSION_FIELD, false); List times = (List) this.queryByCriteria(query); @@ -1010,25 +921,32 @@ public abstract class PluginDao extends CoreDao { /** * Purges data from the database for this plugin with the given reference - * time matching the given productKy + * time matching the given productKeys. If refTime is null, will purge all + * data associated with the productKeys. * * @param refTime - * The reftime to delete data for - * @param productKey - * The key to use as a constraint for deletions + * The reftime to delete data for. A null will purge all data for + * the productKeys. + * @param productKeys + * The keys to use as a constraint for deletions * @return * @throws DataAccessLayerException */ @SuppressWarnings("unchecked") - public int purgeDataByRefTime(Date refTime, String productKey) + public int purgeDataByRefTime(Date refTime, String[][] productKeys) throws DataAccessLayerException { int results = 0; DatabaseQuery dataQuery = new DatabaseQuery(this.daoClass); - dataQuery.addQueryParam(PURGE_VERSION_FIELD, refTime); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - dataQuery.addQueryParam(key[0], key[1]); + + if (refTime != null) { + dataQuery.addQueryParam(PURGE_VERSION_FIELD, refTime); + } + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + dataQuery.addQueryParam(key[0], key[1]); + } } List idList = null; @@ -1036,6 +954,72 @@ public abstract class PluginDao extends CoreDao { dataQuery.addReturnedField("id"); dataQuery.setMaxResults(500); + + boolean purgeHDF5Data = false; + boolean optimizedPurge = false; + + try { + // Determine if this plugin uses HDF5 to store data + purgeHDF5Data = (PluginFactory.getInstance() + .getPluginRecordClass(pluginName).newInstance() instanceof IPersistable); + } catch (Exception e) { + PurgeLogger.logError( + "Unabled to determine if plugin has HDF5 data to purge", + this.pluginName, e); + } + + // determine if hdf5 purge can be optimized + if (purgeHDF5Data) { + // check how the path keys line up to purge keys + List pathKeys = pathProvider.getKeyNames(this.pluginName); + boolean pathKeysEmpty = (pathKeys == null) || pathKeys.isEmpty(); + boolean productKeysEmpty = (productKeys == null) + || (productKeys.length == 0); + + // determine if hdf5 purge can be optimized + if (!pathKeysEmpty) { + if (productKeysEmpty) { + // Purging on higher magnitude that path, only need to track + // file + optimizedPurge = true; + } else if (pathKeys.size() < productKeys.length) { + // there are more purge keys than path keys, cannot optimize + // hdf5 purge + optimizedPurge = false; + } else { + // need to compare each key to check for optimized purge, + // all + // productKeys must be a pathKey for optimized purge, both + // key lists should be small 3 or less, no need to optimize + // list + // look ups + optimizedPurge = true; + for (String[] productKey : productKeys) { + boolean keyMatch = false; + for (String pathKey : pathKeys) { + if (pathKey.equals(productKey[0])) { + keyMatch = true; + break; + } + } + + if (!keyMatch) { + optimizedPurge = false; + break; + } + } + } + } else { + // if purge is same level as path, optimize + optimizedPurge = productKeysEmpty; + } + } + + // fields for hdf5 purge + String previousFile = null; + StringBuilder pathBuilder = new StringBuilder(); + Map> fileToUriMap = new HashMap>(); + do { idList = (List) this.queryByCriteria(dataQuery); if (!idList.isEmpty()) { @@ -1044,11 +1028,63 @@ public abstract class PluginDao extends CoreDao { List pdos = (List) this .queryByCriteria(idQuery); this.delete(pdos); + + if (purgeHDF5Data) { + for (PluginDataObject pdo : pdos) { + pathBuilder.setLength(0); + IPersistable persist = (IPersistable) pdo; + pathBuilder + .append(pathProvider.getHDFPath( + this.pluginName, persist)) + .append(File.separatorChar) + .append(pathProvider.getHDFFileName( + this.pluginName, persist)); + String file = pathBuilder.toString(); + + if (optimizedPurge) { + // only need to track file, tracking last file + // instead of constantly indexing hashMap + if (!file.equals(previousFile)) { + fileToUriMap.put(file, null); + previousFile = file; + } + } else { + List uriList = fileToUriMap.get(file); + if (uriList == null) { + // sizing to 50 as most data types have numerous + // entries in a file + uriList = new ArrayList(50); + fileToUriMap.put(file, uriList); + } + uriList.add(file); + } + } + } + results += pdos.size(); } } while ((idList != null) && !idList.isEmpty()); + if (purgeHDF5Data) { + for (Map.Entry> hdf5Entry : fileToUriMap + .entrySet()) { + try { + IDataStore ds = DataStoreFactory.getDataStore(new File( + hdf5Entry.getKey())); + List uris = hdf5Entry.getValue(); + if (uris == null) { + ds.deleteFiles(null); + } else { + ds.delete(uris.toArray(new String[uris.size()])); + } + } catch (Exception e) { + PurgeLogger.logError("Error occurred purging file: " + + hdf5Entry.getKey(), this.pluginName, e); + } + } + } + return results; } @@ -1060,7 +1096,7 @@ public abstract class PluginDao extends CoreDao { * @param productKey * The key to delete */ - public void purgeHDF5DataByRefTime(Date refTime, String productKey) + protected void purgeHDF5DataByRefTime(Date refTime, String productKey) throws DataAccessLayerException { IDataStore dataStore = DataStoreFactory.getDataStore(new File(this .getHDF5Path(productKey))); @@ -1077,21 +1113,25 @@ public abstract class PluginDao extends CoreDao { * Gets the maximum reference time contained in the database for the given * key. The key corresponds to the productKey field in the data object. * - * @param productKey - * The key for which to get the maximum reference time + * @param productKeys + * The product keys to get the maximum reference time for. Should + * be in key value pairs. * @return Null if this key was not found, else the maximum reference time * @throws DataAccessLayerException * If errors occur while querying the database */ @SuppressWarnings("unchecked") - public Date getMaxRefTime(String productKey) + public Date getMaxRefTime(String[][] productKeys) throws DataAccessLayerException { DatabaseQuery query = new DatabaseQuery(this.daoClass); query.addDistinctParameter(PURGE_VERSION_FIELD); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addOrder(PURGE_VERSION_FIELD, false); query.setMaxResults(1); List result = (List) this.queryByCriteria(query); @@ -1113,15 +1153,17 @@ public abstract class PluginDao extends CoreDao { * If errors occur while querying the database */ @SuppressWarnings("unchecked") - public Date getMaxInsertTime(String productKey) + public Date getMaxInsertTime(String[][] productKeys) throws DataAccessLayerException { DatabaseQuery query = new DatabaseQuery(this.daoClass); // doing distinct is wasted with a ordered max // query.addDistinctParameter("insertTime"); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addReturnedField("insertTime"); query.addOrder("insertTime", false); query.setMaxResults(1); @@ -1134,25 +1176,29 @@ public abstract class PluginDao extends CoreDao { } /** - * Gets the minimum insert time contained in the database for the given key. - * The key corresponds to the productKey field in the data object. + * Gets the minimum insert time contained in the database for the given + * keys. The keys corresponds to the productKey fields in the data object. * - * @param productKey - * The key for which to get the minimum reference time - * @return Null if this key was not found, else the minimum reference time + * @param productKeys + * The product keys to get the minimum insert time for. Should be + * in key value pairs. + * @return Null if this key was not found, else the minimum insert time * @throws DataAccessLayerException * If errors occur while querying the database */ @SuppressWarnings("unchecked") - public Date getMinInsertTime(String productKey) + public Date getMinInsertTime(String[][] productKeys) throws DataAccessLayerException { DatabaseQuery query = new DatabaseQuery(this.daoClass); // doing distinct is wasted with a ordered max // query.addDistinctParameter("insertTime"); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addReturnedField("insertTime"); query.addOrder("insertTime", true); query.setMaxResults(1); @@ -1168,21 +1214,25 @@ public abstract class PluginDao extends CoreDao { * Gets the minimum reference time contained in the database for the given * key. The key corresponds to the productKey field in the data object. * - * @param productKey - * The key for which to get the minimum reference time + * @param productKeys + * The product keys to get the minimum reference times for. + * Should be in key value pairs. * @return Null if this key was not found, else the minimum reference time * @throws DataAccessLayerException * If errors occur while querying the database */ @SuppressWarnings("unchecked") - public Date getMinRefTime(String productKey) + public Date getMinRefTime(String[][] productKeys) throws DataAccessLayerException { DatabaseQuery query = new DatabaseQuery(this.daoClass); query.addDistinctParameter(PURGE_VERSION_FIELD); - List keys = this.getProductKeyParameters(productKey); - for (String[] key : keys) { - query.addQueryParam(key[0], key[1]); + + if ((productKeys != null) && (productKeys.length > 0)) { + for (String[] key : productKeys) { + query.addQueryParam(key[0], key[1]); + } } + query.addOrder(PURGE_VERSION_FIELD, true); query.setMaxResults(1); List result = (List) this.queryByCriteria(query); @@ -1234,27 +1284,6 @@ public abstract class PluginDao extends CoreDao { return pathBuilder.toString(); } - /** - * Checks to see if a rule is valid. A rule is valid if the keys used in - * this rule are listed in the pathKey.xml file for this plugin. - * - * @param rule - * The rule to check - * @return True if the rule is valid. False if the rule is invalid - */ - private boolean isRuleValid(PurgeRule rule) { - boolean retVal = true; - List keyParams = getProductKeyParameters(rule.getId() - .getKey()); - List keyNames = this.pathProvider.getKeyNames(pluginName); - for (String[] param : keyParams) { - if (!keyNames.contains(param[0])) { - retVal = false; - } - } - return retVal; - } - private Date roundDateToHour(Date dateToRound) { return new Date(dateToRound.getTime() - dateToRound.getTime() % 3600000); } @@ -1274,7 +1303,7 @@ public abstract class PluginDao extends CoreDao { }); } - public static List getPurgeRulesForPlugin(String pluginName) { + public static PurgeRuleSet getPurgeRulesForPlugin(String pluginName) { IPathManager pathMgr = PathManagerFactory.getPathManager(); Map tieredFile = pathMgr .getTieredLocalizationFile(LocalizationType.COMMON_STATIC, @@ -1291,18 +1320,29 @@ public abstract class PluginDao extends CoreDao { } if (rulesFile != null) { - try { - PurgeRuleSet purgeRules = (PurgeRuleSet) SerializationUtil - .jaxbUnmarshalFromXmlFile(rulesFile); - return purgeRules.getRules(); - } catch (SerializationException e) { - PurgeLogger - .logError( - "Error deserializing purge rules! Data will not be purged. Please define rules.", - pluginName); + // allow zero length file to disable purge for this plugin + if (rulesFile.length() > 0) { + try { + PurgeRuleSet purgeRules = (PurgeRuleSet) SerializationUtil + .jaxbUnmarshalFromXmlFile(rulesFile); + + // ensure there's a default rule + if (purgeRules.getDefaultRule() == null) { + purgeRules.setDefaultRule(loadDefaultPurgeRule()); + } + return purgeRules; + } catch (SerializationException e) { + PurgeLogger + .logError( + "Error deserializing purge rules! Data will not be purged. Please define rules.", + pluginName, e); + } } + } else if (!"default".equals(pluginName)) { + // no purge rule for this plugin, check base purge rule + return getPurgeRulesForPlugin("default"); } - return Collections.emptyList(); + return null; } public static PurgeRule loadDefaultPurgeRule() { @@ -1317,7 +1357,9 @@ public abstract class PluginDao extends CoreDao { try { PurgeRuleSet purgeRules = (PurgeRuleSet) SerializationUtil .jaxbUnmarshalFromXmlFile(defaultRule); - return purgeRules.getRules().get(0); + System.out.println("Default file has default rule: " + + (purgeRules.getDefaultRule() != null)); + return purgeRules.getDefaultRule(); } catch (SerializationException e) { PurgeLogger.logError("Error deserializing default purge rule!", "DEFAULT"); diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginFactory.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginFactory.java index 0cabde46ac..86ac81cb0c 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginFactory.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginFactory.java @@ -54,7 +54,7 @@ import com.raytheon.uf.edex.core.dataplugin.PluginRegistry; public class PluginFactory { /** The instance of the PluginFactory class */ - private static PluginFactory instance; + private static final PluginFactory instance = new PluginFactory(); /** * Gets the singleton instance of the PluginFactory @@ -64,10 +64,7 @@ public class PluginFactory { * If errors occur during instantiation of the singleton * instance */ - public static synchronized PluginFactory getInstance() { - if (instance == null) { - instance = new PluginFactory(); - } + public static PluginFactory getInstance() { return instance; } diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRule.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRule.java index 2a76b3f2d8..d948294024 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRule.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRule.java @@ -20,19 +20,17 @@ package com.raytheon.uf.edex.database.purge; -import java.io.Serializable; import java.util.Date; +import java.util.Iterator; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlElements; -import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject; -import com.raytheon.uf.common.serialization.ISerializableObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -55,11 +53,8 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * @author bphillip * @version 1 */ -@XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public class PurgeRule implements IPersistableDataObject, Serializable, - ISerializableObject, Cloneable, Comparable { +public class PurgeRule { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(PurgeRule.class); @@ -81,12 +76,12 @@ public class PurgeRule implements IPersistableDataObject, Serializable, .compile(TIME_PATTERN_STRING); /** - * The primary key for this rule. The primary key consists of the plugin - * name and a key used for purging + * The keys this rule is to match. Should be equal to a value based on the + * key fields of the record specified in the PurgeRuleSet. Special cases are + * made for keyMatch of value default. */ - @XmlElement - @DynamicSerializeElement - private PurgeRulePK id; + @XmlElements({ @XmlElement(name = "keyValue", type = String.class) }) + private List keyValues; /** The number of versions to keep */ @XmlElement @@ -154,25 +149,21 @@ public class PurgeRule implements IPersistableDataObject, Serializable, } /** - * Creates a new PurgeRule with the given key + * Gets the key values associated with the PurgeRuleSet keys. * - * @param pk - * The key + * @return */ - public PurgeRule(PurgeRulePK pk) { - this.id = pk; + public List getKeyValues() { + return keyValues; } /** - * Creates a new PurgeRule with the given key elements + * Sets the key values associated with the PurgeRuleSet keys. * - * @param pluginName - * The plugin name to be used in the PurgeKeyPK - * @param key - * The key to be used in the PurgeKeyPK + * @param keyValues */ - public PurgeRule(String pluginName, String key) { - this(new PurgeRulePK(pluginName, key)); + public void setKeyValues(List keyValues) { + this.keyValues = keyValues; } /** @@ -341,11 +332,15 @@ public class PurgeRule implements IPersistableDataObject, Serializable, return new Date[] { refTime, timeToCompare }; } + @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("["); - builder.append("Plugin: ").append(id.getPluginName()).append(" "); - builder.append("Key: ").append(id.getKey()).append(" "); + + for (String kv : keyValues) { + builder.append("KeyValue: ").append(kv).append(" "); + } + builder.append("VersionToKeep: ").append(this.versionsToKeep) .append(" "); builder.append("Period: ").append(this.period).append(" "); @@ -361,48 +356,45 @@ public class PurgeRule implements IPersistableDataObject, Serializable, * * @return The human readable description of this rule */ - public String getRuleDescription() { + public String getRuleDescription(List keys) { if (this.ruleDescription == null) { StringBuilder builder = new StringBuilder(); - if (this.id.getKey().equals("custom")) { - builder.append("The ") - .append(this.id.getPluginName()) - .append(" plugin implements a customized purge routine."); + if ((keys == null) || keys.isEmpty() || (keyValues == null) + || keyValues.isEmpty()) { + builder.append("Default rule, "); } else { - if (id.getKey().isEmpty()) { - builder.append("For ").append(id.getPluginName()) - .append(" data, "); - } else { - builder.append("For ").append(id.getPluginName()) - .append(" data matching ").append(id.getKey()) - .append(", "); + builder.append("For data matching "); + Iterator keyIter = keys.iterator(); + Iterator valueIter = keyValues.iterator(); + while (keyIter.hasNext() && valueIter.hasNext()) { + builder.append(keyIter.next()).append("=") + .append(valueIter.next()).append(", "); } + } - if (isDeltaSpecified()) { - getVersionsClause(builder); - builder.append("at ") - .append(this.getTimeDescription(delta)) - .append("intervals "); - getRoundClause(builder); - getPeriodClause(builder); - } else if (!isDeltaSpecified() && isVersionsToKeepSpecified()) { - getVersionsClause(builder); - getPeriodClause(builder); - } else if (!isDeltaSpecified() && !isVersionsToKeepSpecified() - && isPeriodSpecified()) { - getVersionsClause(builder); - getPeriodClause(builder); - } else { - builder.append("keep all data."); - } - if (isModTimeToWaitSpecified()) { - builder.append( - " Do not purge if most recent version has been modified in the last ") - .append(this.getModTimeToWaitDescription()); - } + if (isDeltaSpecified()) { + getVersionsClause(builder); + builder.append("at ").append(this.getTimeDescription(delta)) + .append("intervals "); + getRoundClause(builder); + getPeriodClause(builder); + } else if (!isDeltaSpecified() && isVersionsToKeepSpecified()) { + getVersionsClause(builder); + getPeriodClause(builder); + } else if (!isDeltaSpecified() && !isVersionsToKeepSpecified() + && isPeriodSpecified()) { + getVersionsClause(builder); + getPeriodClause(builder); + } else { + builder.append("keep all data."); + } + if (isModTimeToWaitSpecified()) { + builder.append( + " Do not purge if most recent version has been modified in the last ") + .append(this.getModTimeToWaitDescription()); } ruleDescription = builder.toString(); } @@ -578,26 +570,6 @@ public class PurgeRule implements IPersistableDataObject, Serializable, return builder.toString(); } - @Override - public Object getIdentifier() { - return id; - } - - /** - * @return the id - */ - public PurgeRulePK getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(PurgeRulePK id) { - this.id = id; - } - /** * @return the versionsToKeep */ @@ -687,40 +659,4 @@ public class PurgeRule implements IPersistableDataObject, Serializable, public void setLogOnly(boolean logOnly) { this.logOnly = logOnly; } - - public Object clone() { - PurgeRule rval = new PurgeRule(); - rval.id = (PurgeRulePK) id.clone(); - rval.delta = delta; - rval.logOnly = logOnly; - rval.period = period; - rval.round = round; - rval.versionsToKeep = versionsToKeep; - - return rval; - } - - public boolean equals(Object obj) { - - if (!(obj instanceof PurgeRule)) { - return false; - } - PurgeRule rhs = (PurgeRule) obj; - return this.id.equals(rhs.getId()) && this.delta.equals(rhs.getDelta()) - && this.logOnly == rhs.isLogOnly() - && this.period.equals(rhs.getPeriod()) - && this.round.equals(rhs.getRound()) - && this.versionsToKeep == rhs.getVersionsToKeep(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Comparable#compareTo(java.lang.Object) - */ - @Override - public int compareTo(PurgeRule o) { - return this.id.getPluginName().compareTo(o.getId().getPluginName()); - } - } diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRulePK.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRulePK.java deleted file mode 100644 index c1f83c9443..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRulePK.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.uf.edex.database.purge; - -import java.io.Serializable; - -import javax.persistence.Embeddable; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import org.apache.commons.lang.builder.HashCodeBuilder; - -import com.raytheon.uf.common.serialization.ISerializableObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * This class defines the primary key for data purge rules stored in the - * database. This key consists of a sequence number, the pluginName to which - * this rule applies and the key to which this rule applies. - *

- * The sequence number is a number obtained from the hibernate_sequence on the - * database. This number has no significance other than to distinguish two rules - * which may have the the same pluginName and same key values. The pluginName is - * the plugin to which this purge rule applies. The key servers as a filter for - * purging. The key value corresponds to the productKey field in the plugin data - * object. - * - * - *

- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 2/15/11      #2469       bphillip    Initial creation
- * 
- * 
- * - * @author bphillip - * @version 1 - */ -@Embeddable -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public class PurgeRulePK implements ISerializableObject, Serializable, - Cloneable { - - /** The serial number */ - private static final long serialVersionUID = 3400703274820497880L; - - /** - * A sequence number defined by the database for uniquely identifying this - * rule - */ - @XmlElement - @DynamicSerializeElement - private Long id; - - /** The plugin associated with this rule */ - @XmlElement - @DynamicSerializeElement - private String pluginName; - - /** The key used by this rule for purging */ - @XmlElement - @DynamicSerializeElement - private String key; - - /** - * Creates a new PurgeRulePK object - */ - public PurgeRulePK() { - } - - /** - * Creates a new plugin rule with the given plugin name and an empty key. - * - * @param pluginName - * The plugin to which this purge rule applies - */ - public PurgeRulePK(String pluginName) { - this.pluginName = pluginName; - this.key = ""; - } - - /** - * Creates a new plugin rule with the given plugin name and key - * - * @param pluginName - * The plugin to which this purge rule applies - * @param key - * The key to use when applying this rule - */ - public PurgeRulePK(String pluginName, String key) { - this(pluginName); - this.key = key; - } - - /** - * Creates a new plugin rule with the given plugin name key, and id value - * - * @param pluginName - * The plugin to which this purge rule applies - * @param key - * The key to use when applying this rule - * @param id - * An identifying number - */ - public PurgeRulePK(String pluginName, String key, long id) { - this(pluginName, key); - this.id = id; - } - - public String toString() { - return "Plugin:" + pluginName + " Key:" + key; - } - - public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - builder.append(pluginName); - builder.append(key); - return builder.toHashCode(); - } - - public boolean equals(Object rval) { - if (!(rval instanceof PurgeRulePK)) { - return false; - } - PurgeRulePK rhs = (PurgeRulePK) rval; - - return this.pluginName.equals(rhs.getPluginName()) - && this.key.equals(rhs.getKey()); - - } - - /** - * @return the pluginName - */ - public String getPluginName() { - return pluginName; - } - - /** - * @param pluginName - * the pluginName to set - */ - public void setPluginName(String pluginName) { - this.pluginName = pluginName; - } - - /** - * @return the key - */ - public String getKey() { - return key; - } - - /** - * @param key - * the key to set - */ - public void setKey(String key) { - this.key = key; - } - - public Object clone() { - PurgeRulePK rval = new PurgeRulePK(this.pluginName, this.key); - rval.setId(this.id); - return rval; - } - - /** - * @return the id - */ - public Long getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(Long id) { - this.id = id; - } - -} diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleSet.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleSet.java index f2a72131a2..b1b6532c25 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleSet.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleSet.java @@ -21,7 +21,7 @@ package com.raytheon.uf.edex.database.purge; import java.util.ArrayList; -import java.util.Collection; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -33,8 +33,8 @@ import com.raytheon.uf.common.serialization.ISerializableObject; /** * A container class used for unmarshalling purge rules. The purge rules are - * stored in xml files in the edex_static/base/purge directory. The rules are - * unmarshalled into this object before being persisted to the database. + * stored in xml files in the common_static/base/purge directory. The rules are + * then organized into a tree for easy look up of closest matching rule. * *
  * 
@@ -52,14 +52,35 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
 @XmlRootElement(name = "purgeRuleSet")
 @XmlAccessorType(XmlAccessType.NONE)
 public class PurgeRuleSet implements ISerializableObject {
+
+    @XmlElements({ @XmlElement(name = "key", type = String.class) })
+    private List keys;
+
+    @XmlElement
+    private PurgeRule defaultRule;
+
     /**
      * List of purge rules for/from the XML.
      */
     @XmlElements({ @XmlElement(name = "rule", type = PurgeRule.class) })
     private ArrayList rules;
 
+    private PurgeRuleTree purgeTree = null;
+
     public PurgeRuleSet() {
-        rules = new ArrayList();
+    }
+
+    /**
+     * Returns the default rule.
+     * 
+     * @return
+     */
+    public PurgeRule getDefaultRule() {
+        return defaultRule;
+    }
+
+    public void setDefaultRule(PurgeRule defaultRule) {
+        this.defaultRule = defaultRule;
     }
 
     /**
@@ -71,32 +92,36 @@ public class PurgeRuleSet implements ISerializableObject {
         return rules;
     }
 
-    /**
-     * Set the list of purge rules.
-     * 
-     * @param models
-     */
-    public void setModels(ArrayList rules) {
+    public void setRules(ArrayList rules) {
         this.rules = rules;
     }
 
     /**
-     * Add a purge rule to this set
+     * Returns the list of purge keys.
      * 
-     * @param rule
-     *            The rule to add
+     * @return
      */
-    public void addRule(PurgeRule rule) {
-        this.rules.add(rule);
+    public List getKeys() {
+        return keys;
+    }
+
+    public void setKeys(List keys) {
+        this.keys = keys;
     }
 
     /**
-     * Adds purge rules to this set
+     * Returns the purge rule associated with the passed key values.
      * 
-     * @param rules
-     *            The rules to add
+     * @param keyValues
+     *            The values associated with the plugin purge keys to check for
+     *            a purge rule for.
+     * @return
      */
-    public void addRules(Collection rules) {
-        this.rules.addAll(rules);
+    public PurgeRule getRuleForKeys(String[] keyValues) {
+        if (purgeTree == null) {
+            purgeTree = new PurgeRuleTree(this);
+        }
+
+        return purgeTree.getRuleForKeys(keyValues);
     }
 }
diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleTree.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleTree.java
new file mode 100644
index 0000000000..caadc1ee75
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeRuleTree.java
@@ -0,0 +1,132 @@
+/**
+ * This software was developed and / or modified by Raytheon Company,
+ * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
+ * 
+ * U.S. EXPORT CONTROLLED TECHNICAL DATA
+ * This software product contains export-restricted data whose
+ * export/transfer/disclosure is restricted by U.S. law. Dissemination
+ * to non-U.S. persons whether in the United States or abroad requires
+ * an export license or other authorization.
+ * 
+ * Contractor Name:        Raytheon Company
+ * Contractor Address:     6825 Pine Street, Suite 340
+ *                         Mail Stop B8
+ *                         Omaha, NE 68106
+ *                         402.291.0100
+ * 
+ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
+ * further licensing information.
+ */
+package com.raytheon.uf.edex.database.purge;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Tree representation of the purge rules. Each Node can contain a PurgeRule as
+ * well as a collection of other Nodes. Each Node should be a specific purge key
+ * value based on the PurgeRuleSet keys. A given set of key/value pairs will
+ * return the most significant purge key that matches.
+ * 
+ * 
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Oct 29, 2012            rjpeter     Initial creation
+ * 
+ * 
+ * + * @author rjpeter + * @version 1.0 + */ +public class PurgeRuleTree { + private final PurgeNode root; + + public PurgeRuleTree(PurgeRuleSet ruleSet) { + root = new PurgeNode(); + root.setRule(ruleSet.getDefaultRule()); + ArrayList rules = ruleSet.getRules(); + if (rules != null) { + for (PurgeRule rule : rules) { + PurgeNode curNode = root; + List values = rule.getKeyValues(); + if (values != null) { + // descend purge tree + for (String val : values) { + Map childNodes = curNode + .getChildNodes(); + curNode = childNodes.get(val); + if (curNode == null) { + curNode = new PurgeNode(); + childNodes.put(val, curNode); + } + } + + // set the rule on the leaf node defined by key values + curNode.setRule(rule); + } + } + } + } + + /** + * Returns the purge rule associated with the given key value list. + * + * @param keyValues + * @return + */ + public PurgeRule getRuleForKeys(String[] keyValues) { + // default rule is initial closest rule + PurgeRule closestRule = root.getRule(); + PurgeNode currentNode = root; + + if ((keyValues != null) && (keyValues.length > 0)) { + // iterate over key values, descending tree as far as possible, + // keeping track of closest matching rule. + for (String value : keyValues) { + currentNode = currentNode.getChildNode(value); + + // descend node + if (currentNode != null) { + // check node for rule + PurgeRule rule = currentNode.getRule(); + + if (rule != null) { + // current closest rule + closestRule = rule; + } + } else { + break; + } + } + } + + return closestRule; + } + + private class PurgeNode { + private PurgeRule rule; + + private final Map childNodes = new HashMap(); + + public void setRule(PurgeRule rule) { + this.rule = rule; + } + + public PurgeRule getRule() { + return rule; + } + + public Map getChildNodes() { + return childNodes; + } + + public PurgeNode getChildNode(String keyValue) { + return childNodes.get(keyValue); + } + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.database/utility/common_static/base/purge/defaultPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.database/utility/common_static/base/purge/defaultPurgeRules.xml index de1d772210..d8401ec954 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/utility/common_static/base/purge/defaultPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.database/utility/common_static/base/purge/defaultPurgeRules.xml @@ -1,10 +1,6 @@ - - - - default - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DatabaseArchiver.java b/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DatabaseArchiver.java index 40ef7b79c6..eab3c16fff 100644 --- a/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DatabaseArchiver.java +++ b/edexOsgi/com.raytheon.uf.edex.maintenance/src/com/raytheon/uf/edex/maintenance/archive/DatabaseArchiver.java @@ -111,8 +111,8 @@ public class DatabaseArchiver implements IPluginArchiver { DataArchiveConfig conf) { PluginProperties props = PluginRegistry.getInstance() .getRegisteredObject(pluginName); - if (props != null && props.getRecord() != null - && props.getDao() != null) { + if ((props != null) && (props.getRecord() != null) + && (props.getDao() != null)) { Class recordClass = props.getRecord(); if (recordClass != null) { try { @@ -174,19 +174,19 @@ public class DatabaseArchiver implements IPluginArchiver { archiveFormatter = pluginArchiveFormatters.get("default"); } - while (startTime != null && endTime != null) { + while ((startTime != null) && (endTime != null)) { Map> pdosToSave = archiveFormatter .getPdosByFile(pluginName, dao, pdoMap, startTime, endTime); - if (pdosToSave != null && !pdosToSave.isEmpty()) { + if ((pdosToSave != null) && !pdosToSave.isEmpty()) { recordCount += savePdoMap(pluginName, archivePath, pdosToSave, conf.getCompressionEnabled()); for (Map.Entry> entry : pdosToSave .entrySet()) { List pdoList = entry.getValue(); - if (pdoList != null && !pdoList.isEmpty() - && pdoList.get(0) instanceof IPersistable) { + if ((pdoList != null) && !pdoList.isEmpty() + && (pdoList.get(0) instanceof IPersistable)) { datastoreFilesToArchive.add(entry.getKey()); } } @@ -196,7 +196,7 @@ public class DatabaseArchiver implements IPluginArchiver { endTime = determineEndTime(startTime, runTime); } - if (pdoMap != null && !pdoMap.isEmpty()) { + if ((pdoMap != null) && !pdoMap.isEmpty()) { recordCount += savePdoMap(pluginName, archivePath, pdoMap, conf.getCompressionEnabled()); // don't forget to archive the HDF5 for the records that weren't @@ -204,8 +204,8 @@ public class DatabaseArchiver implements IPluginArchiver { for (Map.Entry> entry : pdoMap .entrySet()) { List pdoList = entry.getValue(); - if (pdoList != null && !pdoList.isEmpty() - && pdoList.get(0) instanceof IPersistable) { + if ((pdoList != null) && !pdoList.isEmpty() + && (pdoList.get(0) instanceof IPersistable)) { datastoreFilesToArchive.add(entry.getKey()); } } @@ -217,7 +217,7 @@ public class DatabaseArchiver implements IPluginArchiver { PluginProperties props = PluginRegistry.getInstance() .getRegisteredObject(pluginName); - if (props != null && props.getCompression() != null) { + if ((props != null) && (props.getCompression() != null)) { if (compRequired.equals(Compression.valueOf(props .getCompression()))) { // if plugin is already compressed to the correct level, @@ -378,7 +378,7 @@ public class DatabaseArchiver implements IPluginArchiver { Calendar startTime = null; // get previous run time - if (extraInfo != null && !extraInfo.isEmpty()) { + if ((extraInfo != null) && !extraInfo.isEmpty()) { try { Date prevDate = DATE_FORMAT.parse(extraInfo); @@ -404,7 +404,7 @@ public class DatabaseArchiver implements IPluginArchiver { } } else { // startTime has never been set lookup earliest start time - Date minInsert = dao.getMinInsertTime(""); + Date minInsert = dao.getMinInsertTime(null); if (minInsert != null) { startTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); startTime.setTimeInMillis(minInsert.getTime()); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acars/utility/common_static/base/purge/acarsPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acars/utility/common_static/base/purge/acarsPurgeRules.xml index 563658ca3e..1182b36c71 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acars/utility/common_static/base/purge/acarsPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acars/utility/common_static/base/purge/acarsPurgeRules.xml @@ -1,12 +1,8 @@ - - - - acars - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/utility/common_static/base/purge/acarssoundingPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/utility/common_static/base/purge/acarssoundingPurgeRules.xml index f8b4e104f8..1182b36c71 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/utility/common_static/base/purge/acarssoundingPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/utility/common_static/base/purge/acarssoundingPurgeRules.xml @@ -1,12 +1,8 @@ - - - - acarssounding - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/utility/common_static/base/purge/bufrascatPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/utility/common_static/base/purge/bufrascatPurgeRules.xml index 0f7aece859..c2cb1258f6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/utility/common_static/base/purge/bufrascatPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/utility/common_static/base/purge/bufrascatPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrascat - default - + + 12 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/utility/common_static/base/purge/bufrhdwPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/utility/common_static/base/purge/bufrhdwPurgeRules.xml index d5023614d0..ef0c05b8b0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/utility/common_static/base/purge/bufrhdwPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/utility/common_static/base/purge/bufrhdwPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrhdw - default - + + 33 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/utility/common_static/base/purge/bufrmthdwPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/utility/common_static/base/purge/bufrmthdwPurgeRules.xml index 23c1b31e22..ef0c05b8b0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/utility/common_static/base/purge/bufrmthdwPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/utility/common_static/base/purge/bufrmthdwPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrmthdw - default - + + 33 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/utility/common_static/base/purge/bufrncwfPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/utility/common_static/base/purge/bufrncwfPurgeRules.xml index 85aea14b86..3ac68c13cc 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/utility/common_static/base/purge/bufrncwfPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/utility/common_static/base/purge/bufrncwfPurgeRules.xml @@ -1,10 +1,6 @@ - - - - bufrncwf - default - + + 288 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/utility/common_static/base/purge/bufrquikscatPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/utility/common_static/base/purge/bufrquikscatPurgeRules.xml index 20b982522d..c2cb1258f6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/utility/common_static/base/purge/bufrquikscatPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/utility/common_static/base/purge/bufrquikscatPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrquikscat - default - + + 12 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/utility/common_static/base/purge/bufrsigwxPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/utility/common_static/base/purge/bufrsigwxPurgeRules.xml index de777155d5..403be907bf 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/utility/common_static/base/purge/bufrsigwxPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/utility/common_static/base/purge/bufrsigwxPurgeRules.xml @@ -1,31 +1,21 @@ - + + wxLayer + + 12 + =00-01:00:00 + 00-01:00:00 + - - bufrsigwx - default - + SWM 12 =00-01:00:00 00-01:00:00 - - bufrsigwx - wxLayer=SWM - + SWH 12 =00-01:00:00 00-01:00:00 - - - bufrsigwx - wxLayer=SWH - - 12 - =00-01:00:00 - 00-01:00:00 - - - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/utility/common_static/base/purge/bufrssmiPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/utility/common_static/base/purge/bufrssmiPurgeRules.xml index 38f77f6389..ef0c05b8b0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/utility/common_static/base/purge/bufrssmiPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/utility/common_static/base/purge/bufrssmiPurgeRules.xml @@ -1,12 +1,8 @@ - - - - bufrssmi - default - + + 33 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/utility/common_static/base/purge/cwaPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/utility/common_static/base/purge/cwaPurgeRules.xml index 6e5e60796b..d8401ec954 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/utility/common_static/base/purge/cwaPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/utility/common_static/base/purge/cwaPurgeRules.xml @@ -1,10 +1,6 @@ - - - - cwa - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/utility/common_static/base/purge/cwatPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/utility/common_static/base/purge/cwatPurgeRules.xml index 242f40d34e..d8401ec954 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/utility/common_static/base/purge/cwatPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/utility/common_static/base/purge/cwatPurgeRules.xml @@ -1,10 +1,6 @@ - - - - cwat - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/purge/ffmpPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/purge/ffmpPurgeRules.xml index 6afca3c99d..93012e61e6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/purge/ffmpPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/utility/common_static/base/purge/ffmpPurgeRules.xml @@ -4,12 +4,8 @@ period tag is where you change the time: ex. 01-00:00:00 is one day or 24 hours of retention ex. 00-12:00:00 is 12 hours --> - - - - ffmp - default - + + 01-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grid/utility/common_static/base/purge/gridPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.grid/utility/common_static/base/purge/gridPurgeRules.xml index 94ca1d220a..603623b255 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grid/utility/common_static/base/purge/gridPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grid/utility/common_static/base/purge/gridPurgeRules.xml @@ -1,1245 +1,722 @@ - - + + info.datasetId - - - grid - default - + 2 - - - + - - grid - info.datasetId=ETA - + ETA 2 - - - grid - info.datasetId=RUC - + RUC 8 - - - grid - info.datasetId=AVN - + AVN 2 - - - grid - info.datasetId=LAPS - + LAPS 30 - - - grid - info.datasetId=NGM - + NGM 2 - - - grid - info.datasetId=MRF - + MRF 2 - - - grid - info.datasetId=MSAS - + MSAS 24 - - - grid - info.datasetId=GFS201 - + GFS201 2 - - - grid - info.datasetId=mrfNH - + mrfNH 2 - - - grid - info.datasetId=GFS213 - + GFS213 2 - - - grid - info.datasetId=NGM213 - + NGM213 1 00-00:15:00 - - - grid - info.datasetId=NGM202 - + NGM202 2 - - - grid - info.datasetId=AVN211 - + AVN211 2 - - - grid - info.datasetId=mesoEta212 - + mesoEta212 2 00-00:15:00 - - - grid - info.datasetId=mesoEta215 - + mesoEta215 2 00-00:15:00 - - - grid - info.datasetId=ENSEMBLE - + ENSEMBLE 2 - - grid - info.datasetId=ENSEMBLE37 - + ENSEMBLE37 2 - - grid - info.datasetId=ENSEMBLE38 - + ENSEMBLE38 2 - - grid - info.datasetId=ENSEMBLE39 - + ENSEMBLE39 2 - - grid - info.datasetId=ENSEMBLE40 - + ENSEMBLE40 2 - - grid - info.datasetId=ENSEMBLE41 - + ENSEMBLE41 2 - - grid - info.datasetId=ENSEMBLE42 - + ENSEMBLE42 2 - - grid - info.datasetId=ENSEMBLE43 - + ENSEMBLE43 2 - - grid - info.datasetId=ENSEMBLE44 - + ENSEMBLE44 2 - - - grid - info.datasetId=ETA212 - + ETA212 1 00-00:15:00 - - - grid - info.datasetId=MRF203 - + MRF203 3 - - - grid - info.datasetId=AVN203 - + AVN203 3 - - - grid - info.datasetId=MRF204 - + MRF204 3 - - - grid - info.datasetId=MRF205 - + MRF205 3 - - - grid - info.datasetId=NGM207 - + NGM207 3 - - - grid - info.datasetId=NAM207 - + NAM207 3 - - - grid - info.datasetId=ECMF-NorthernHemisphere - + ECMF-NorthernHemisphere 2 - - grid - info.datasetId=ECMF1 - + ECMF1 2 - - grid - info.datasetId=ECMF2 - + ECMF2 2 - - grid - info.datasetId=ECMF3 - + ECMF3 2 - - grid - info.datasetId=ECMF4 - + ECMF4 2 - - grid - info.datasetId=ECMF5 - + ECMF5 2 - - grid - info.datasetId=ECMF6 - + ECMF6 2 - - grid - info.datasetId=ECMF7 - + ECMF7 2 - - grid - info.datasetId=ECMF8 - + ECMF8 2 - - grid - info.datasetId=ECMF9 - + ECMF9 2 - - grid - info.datasetId=ECMF10 - + ECMF10 2 - - grid - info.datasetId=ECMF11 - + ECMF11 2 - - grid - info.datasetId=ECMF12 - + ECMF12 2 - - - grid - info.datasetId=UKMET-NorthernHemisphere - + UKMET-NorthernHemisphere 2 - - grid - info.datasetId=UKMET37 - + UKMET37 2 - - grid - info.datasetId=UKMET38 - + UKMET38 2 - - grid - info.datasetId=UKMET39 - + UKMET39 2 - - grid - info.datasetId=UKMET40 - + UKMET40 2 - - grid - info.datasetId=UKMET41 - + UKMET41 2 - - grid - info.datasetId=UKMET42 - + UKMET42 2 - - grid - info.datasetId=UKMET43 - + UKMET43 2 - - grid - info.datasetId=UKMET44 - + UKMET44 2 - - - grid - info.datasetId=AVN-NorthernHemisphere - + AVN-NorthernHemisphere 2 - - grid - info.datasetId=AVN37 - + AVN37 2 - - grid - info.datasetId=AVN38 - + AVN38 2 - - grid - info.datasetId=AVN39 - + AVN39 2 - - grid - info.datasetId=AVN40 - + AVN40 2 - - grid - info.datasetId=AVN41 - + AVN41 2 - - grid - info.datasetId=AVN42 - + AVN42 2 - - grid - info.datasetId=AVN43 - + AVN43 2 - - grid - info.datasetId=AVN44 - + AVN44 2 - - - grid - info.datasetId=GWW233 - + GWW233 1 00-00:15:00 - - - grid - info.datasetId=RFCqpf - + RFCqpf 5 - - - grid - info.datasetId=RUC236 - + RUC236 8 - - - grid - info.datasetId=AVN225 - + AVN225 3 - - - grid - info.datasetId=WNAWAVE238 - + WNAWAVE238 1 00-00:15:00 - - - grid - info.datasetId=mesoEta216 - + mesoEta216 1 00-00:15:00 - - - grid - info.datasetId=mesoEta217 - + mesoEta217 1 00-00:15:00 - - - grid - info.datasetId=ETA218 - + ETA218 1 00-00:15:00 - - - grid - info.datasetId=ETA242 - + ETA242 1 00-00:15:00 - - - grid - info.datasetId=HPCqpf - + HPCqpf 5 - - - grid - info.datasetId=ENPWAVE253 - + ENPWAVE253 1 00-00:15:00 - - - grid - info.datasetId=HPCdelta - + HPCdelta 4 - - - grid - info.datasetId=HurWind226 - + HurWind226 4 - - - grid - info.datasetId=CPCoutlook211 - + CPCoutlook211 14 - - - grid - info.datasetId=RTGSSTHR - + RTGSSTHR 2 - - - grid - info.datasetId=NICICE - + NICICE 2 - - - grid - info.datasetId=DGEX185 - + DGEX185 2 00-00:15:00 - - - grid - info.datasetId=HPCGuide - + HPCGuide 2 00-00:15:00 - - - grid - info.datasetId=GFSGuide - + GFSGuide 8 00-00:15:00 - - - grid - info.datasetId=GFS212 - + GFS212 1 00-00:15:00 - - - grid - info.datasetId=GFS160 - + GFS160 1 00-00:15:00 - - - grid - info.datasetId=GFS254 - + GFS254 1 00-00:15:00 - - - grid - info.datasetId=GFS161 - + GFS161 1 00-00:15:00 - - - grid - info.datasetId=MPE-Local - + MPE-Local 72 - - - grid - info.datasetId=TPCWindProb - + TPCWindProb 8 00-00:15:00 - - - grid - info.datasetId=MOSGuide - + MOSGuide 2 00-00:15:00 - - - grid - info.datasetId=QPE - + QPE 72 - - grid - info.datasetId=QPE-TUA - + QPE-TUA 72 - - grid - info.datasetId=QPE-ACR - + QPE-ACR 72 - - grid - info.datasetId=QPE-STR - + QPE-STR 72 - - grid - info.datasetId=QPE-RSA - + QPE-RSA 72 - - grid - info.datasetId=QPE-ORN - + QPE-ORN 72 - - grid - info.datasetId=QPE-RHA - + QPE-RHA 72 - - grid - info.datasetId=QPE-KRF - + QPE-KRF 72 - - grid - info.datasetId=QPE-MSR - + QPE-MSR 72 - - grid - info.datasetId=QPE-TAR - + QPE-TAR 72 - - grid - info.datasetId=QPE-PTR - + QPE-PTR 72 - - grid - info.datasetId=QPE-TIR - + QPE-TIR 72 - - grid - info.datasetId=QPE-ALR - + QPE-ALR 72 - - grid - info.datasetId=QPE-FWR - + QPE-FWR 72 - - - - grid - info.datasetId=OPCWave180 - + OPCWave180 8 00-00:15:00 - - - grid - info.datasetId=OPCWave181 - + OPCWave181 8 00-00:15:00 - - - grid - info.datasetId=OPCWave182 - + OPCWave182 8 00-00:15:00 - - - grid - info.datasetId=RTMA - + RTMA 24 00-00:15:00 - - - grid - info.datasetId=SREF212 - + SREF212 2 00-00:15:00 - - - grid - info.datasetId=RTGSST - + RTGSST 2 00-00:15:00 - - - grid - info.datasetId=GFSLAMPTstorm - + GFSLAMPTstorm 24 00-00:15:00 - - - grid - info.datasetId=ECMWF-HiRes - + ECMWF-HiRes 2 00-00:15:00 - - - grid - info.datasetId=HPCqpfNDFD - + HPCqpfNDFD 42 00-00:15:00 - - - grid - info.datasetId=NamDNG5 - + NamDNG5 2 00-00:15:00 - - - grid - info.datasetId=TPCSurgeProb - + TPCSurgeProb 3 00-00:15:00 - - - grid - info.datasetId=HPE - + HPE 00-12:00:00 00-00:15:00 - - - grid - info.datasetId=BHPE - + BHPE 00-12:00:00 00-00:15:00 - - - grid - info.datasetId=GlobalWave - + GlobalWave 1 00-00:15:00 - - - grid - info.datasetId=AKWave10 - + AKWave10 1 00-00:15:00 - - - grid - info.datasetId=AKWave4 - + AKWave4 1 00-00:15:00 - - - grid - info.datasetId=EPWave10 - + EPWave10 1 00-00:15:00 - - - grid - info.datasetId=WCWave10 - + WCWave10 1 00-00:15:00 - - - grid - info.datasetId=WCWave4 - + WCWave4 1 00-00:15:00 - - - grid - info.datasetId=WNAWave10 - + WNAWave10 1 00-00:15:00 - - - grid - info.datasetId=WNAWave4 - + WNAWave4 1 00-00:15:00 - - - grid - info.datasetId=MOSGuide-AK - + MOSGuide-AK 2 00-00:15:00 - - - grid - info.datasetId=HI_RTMA - + HI_RTMA 24 - - - grid - info.datasetId=HiRes-ARW-East - + HiRes-ARW-East 2 00-00:15:00 - - - grid - info.datasetId=HiRes-ARW-West - + HiRes-ARW-West 1 00-00:15:00 - - - grid - info.datasetId=HiRes-ARW-AK - + HiRes-ARW-AK 1 00-00:15:00 - - - grid - info.datasetId=HiRes-ARW-HI - + HiRes-ARW-HI 2 00-00:15:00 - - - grid - info.datasetId=HiRes-ARW-SJU - + HiRes-ARW-SJU 1 00-00:15:00 - - - - - grid - info.datasetId=HiRes-NMM-East - + HiRes-NMM-East 2 00-00:15:00 - - - grid - info.datasetId=HiRes-NMM-West - + HiRes-NMM-West 1 00-00:15:00 - - - grid - info.datasetId=HiRes-NMM-AK - + HiRes-NMM-AK 1 00-00:15:00 - - - grid - info.datasetId=HiRes-NMM-HI - + HiRes-NMM-HI 2 00-00:15:00 - - - grid - info.datasetId=HiRes-NMM-SJU - + HiRes-NMM-SJU 1 00-00:15:00 - - - grid - info.datasetId=GRLKwave - + GRLKwave 1 00-00:15:00 - - - grid - info.datasetId=CPCoutlook-Short - + CPCoutlook-Short 5 00-00:15:00 - - - grid - info.datasetId=CPCoutlook-Medium - + CPCoutlook-Medium 7 00-00:15:00 - - - grid - info.datasetId=CPCoutlook-Short-AK - + CPCoutlook-Short-AK 5 00-00:15:00 - - - grid - info.datasetId=CPCoutlook-Medium-AK - + CPCoutlook-Medium-AK 7 00-00:15:00 - - - grid - info.datasetId=SPCGuide - + SPCGuide 5 00-00:15:00 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/utility/common_static/base/purge/ldadmesonetPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/utility/common_static/base/purge/ldadmesonetPurgeRules.xml index 6ac3acf853..1182b36c71 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/utility/common_static/base/purge/ldadmesonetPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/utility/common_static/base/purge/ldadmesonetPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ldadmesonet - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/utility/common_static/base/purge/lsrPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/utility/common_static/base/purge/lsrPurgeRules.xml index 8912fce977..4ca274e6cb 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/utility/common_static/base/purge/lsrPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/utility/common_static/base/purge/lsrPurgeRules.xml @@ -1,10 +1,6 @@ - - - - lsr - default - + + 14-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeRequest.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeRequest.java index ea73fda41b..da7994a61d 100644 --- a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeRequest.java @@ -31,6 +31,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.database.plugin.PluginDao; import com.raytheon.uf.edex.database.plugin.PluginVersionDao; import com.raytheon.uf.edex.database.purge.PurgeRule; +import com.raytheon.uf.edex.database.purge.PurgeRuleSet; /** * This class is used to route messages intended for the purge service to the @@ -70,20 +71,30 @@ public class PurgeRequest { List retVal = new ArrayList(); List plugins = getAvailablePlugins(); - for (int i = 0; i < plugins.size(); i++) { - List rules = PluginDao.getPurgeRulesForPlugin(plugins - .get(i)); - if (rules.isEmpty()) { - retVal.add(plugins.get(i)); + for (String plugin : plugins) { + PurgeRuleSet rules = PluginDao.getPurgeRulesForPlugin(plugin); + + PurgeRule defRule = rules.getDefaultRule(); + List ruleList = rules.getRules(); + List purgeKeys = rules.getKeys(); + if ((defRule == null) + && ((ruleList == null) || ruleList.isEmpty())) { + retVal.add(plugin); retVal.add("No Rules Specified. Using default."); - }else{ - for (PurgeRule rule : rules) { - retVal.add(rule.getId().getPluginName()); - retVal.add(rule.getRuleDescription()); + } else { + if (defRule != null) { + retVal.add(plugin); + retVal.add(defRule.getRuleDescription(purgeKeys)); + } + if (ruleList != null) { + for (PurgeRule rule : ruleList) { + retVal.add(plugin); + retVal.add(rule.getRuleDescription(purgeKeys)); + } } } } - return retVal.toArray(new String[] {}); + return retVal.toArray(new String[retVal.size()]); } catch (Exception e) { throw new EdexException("Error getting plugin purge info", e); } diff --git a/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/aggregatePurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/aggregatePurgeRules.xml index 6b685c9e50..71320c1422 100644 --- a/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/aggregatePurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/aggregatePurgeRules.xml @@ -1,10 +1,6 @@ - - - - aggregate - default - + + 30-00:00:00 - - \ No newline at end of file + + diff --git a/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/statsPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/statsPurgeRules.xml index 79da93bde2..24714caf46 100644 --- a/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/statsPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.stats/utility/common_static/base/purge/statsPurgeRules.xml @@ -1,10 +1,6 @@ - - - - stats - default - + + 00-24:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/common_static/base/purge/airmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/common_static/base/purge/airmetPurgeRules.xml index 231d8d228d..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/common_static/base/purge/airmetPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/common_static/base/purge/airmetPurgeRules.xml @@ -1,10 +1,6 @@ - - - - airmet - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/utility/common_static/base/purge/atcfPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/utility/common_static/base/purge/atcfPurgeRules.xml index 7233168ff6..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/utility/common_static/base/purge/atcfPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/utility/common_static/base/purge/atcfPurgeRules.xml @@ -1,10 +1,6 @@ - - - - atcf - default - + + 02-00:00:00 - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/utility/common_static/base/purge/awwPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/utility/common_static/base/purge/awwPurgeRules.xml index 18246e2fee..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/utility/common_static/base/purge/awwPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/utility/common_static/base/purge/awwPurgeRules.xml @@ -1,10 +1,6 @@ - - - - aww - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/common_static/base/purge/convsigmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/common_static/base/purge/convsigmetPurgeRules.xml index 607053c111..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/common_static/base/purge/convsigmetPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/common_static/base/purge/convsigmetPurgeRules.xml @@ -1,10 +1,6 @@ - - - - convsigmet - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/utility/common_static/base/purge/ffgPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/utility/common_static/base/purge/ffgPurgeRules.xml index ef81f2842c..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/utility/common_static/base/purge/ffgPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/utility/common_static/base/purge/ffgPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ffg - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/utility/common_static/base/purge/idftPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/utility/common_static/base/purge/idftPurgeRules.xml index 1fea1f8e9a..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/utility/common_static/base/purge/idftPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/utility/common_static/base/purge/idftPurgeRules.xml @@ -1,10 +1,6 @@ - - - - idft - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/utility/common_static/base/purge/intlsigmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/utility/common_static/base/purge/intlsigmetPurgeRules.xml index ec52166237..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/utility/common_static/base/purge/intlsigmetPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/utility/common_static/base/purge/intlsigmetPurgeRules.xml @@ -1,10 +1,6 @@ - - - - intlsigmet - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/utility/common_static/base/purge/mcidasPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/utility/common_static/base/purge/mcidasPurgeRules.xml index 826cd1c2f9..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/utility/common_static/base/purge/mcidasPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/utility/common_static/base/purge/mcidasPurgeRules.xml @@ -1,10 +1,6 @@ - - - - mcidas - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/utility/common_static/base/purge/mosaicPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/utility/common_static/base/purge/mosaicPurgeRules.xml index 4b3fbc3ad3..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/utility/common_static/base/purge/mosaicPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/utility/common_static/base/purge/mosaicPurgeRules.xml @@ -1,10 +1,6 @@ - - - - mosaic - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/utility/common_static/base/purge/ncairepPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/utility/common_static/base/purge/ncairepPurgeRules.xml index c46545c6f1..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/utility/common_static/base/purge/ncairepPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/utility/common_static/base/purge/ncairepPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncairep - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/utility/common_static/base/purge/ncccfpPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/utility/common_static/base/purge/ncccfpPurgeRules.xml index b5df5f2bf5..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/utility/common_static/base/purge/ncccfpPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/utility/common_static/base/purge/ncccfpPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncccfp - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/purge/ncgribPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/purge/ncgribPurgeRules.xml index fc4036ff66..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/purge/ncgribPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/purge/ncgribPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncgrib - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/utility/common_static/base/purge/ncpafmPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/utility/common_static/base/purge/ncpafmPurgeRules.xml index 7dbdccaa38..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/utility/common_static/base/purge/ncpafmPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/utility/common_static/base/purge/ncpafmPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncpafm - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/utility/common_static/base/purge/ncpirepPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/utility/common_static/base/purge/ncpirepPurgeRules.xml index 7688e13c5a..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/utility/common_static/base/purge/ncpirepPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/utility/common_static/base/purge/ncpirepPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncpirep - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/utility/common_static/base/purge/ncscatPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/utility/common_static/base/purge/ncscatPurgeRules.xml index 35e8b4f8b3..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/utility/common_static/base/purge/ncscatPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/utility/common_static/base/purge/ncscatPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncscat - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/utility/common_static/base/purge/ncscdPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/utility/common_static/base/purge/ncscdPurgeRules.xml index f1d6e14871..1182b36c71 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/utility/common_static/base/purge/ncscdPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/utility/common_static/base/purge/ncscdPurgeRules.xml @@ -1,12 +1,8 @@ - - - - ncscd - default - + + 24 =00-01:00:00 00-01:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/utility/common_static/base/purge/nctafPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/utility/common_static/base/purge/nctafPurgeRules.xml index 22b03c216c..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/utility/common_static/base/purge/nctafPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/utility/common_static/base/purge/nctafPurgeRules.xml @@ -1,10 +1,6 @@ - - - - nctaf - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/utility/common_static/base/purge/ncuairPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/utility/common_static/base/purge/ncuairPurgeRules.xml index 29ca43c402..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/utility/common_static/base/purge/ncuairPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/utility/common_static/base/purge/ncuairPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ncuair - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/utility/common_static/base/purge/nonconvsigmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/utility/common_static/base/purge/nonconvsigmetPurgeRules.xml index d59b31d88b..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/utility/common_static/base/purge/nonconvsigmetPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/utility/common_static/base/purge/nonconvsigmetPurgeRules.xml @@ -1,10 +1,6 @@ - - - - nonconvsigmet - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/utility/common_static/base/purge/sgwhPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/utility/common_static/base/purge/sgwhPurgeRules.xml index 6326568e5c..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/utility/common_static/base/purge/sgwhPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/utility/common_static/base/purge/sgwhPurgeRules.xml @@ -1,10 +1,6 @@ - - - - sgwh - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/utility/common_static/base/purge/sgwhvPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/utility/common_static/base/purge/sgwhvPurgeRules.xml index 71a920d434..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/utility/common_static/base/purge/sgwhvPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/utility/common_static/base/purge/sgwhvPurgeRules.xml @@ -1,10 +1,6 @@ - - - - sgwhv - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/utility/common_static/base/purge/sshaPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/utility/common_static/base/purge/sshaPurgeRules.xml index 65d1c786b5..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/utility/common_static/base/purge/sshaPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/utility/common_static/base/purge/sshaPurgeRules.xml @@ -1,10 +1,6 @@ - - - - ssha - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/utility/common_static/base/purge/stormTrackPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/utility/common_static/base/purge/stormTrackPurgeRules.xml index 250c5b6974..62b81678f1 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/utility/common_static/base/purge/stormTrackPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/utility/common_static/base/purge/stormTrackPurgeRules.xml @@ -1,10 +1,6 @@ - - - - stormtrack - default - + + 99-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/utility/common_static/base/purge/tcmPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/utility/common_static/base/purge/tcmPurgeRules.xml index 3e048a6272..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/utility/common_static/base/purge/tcmPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/utility/common_static/base/purge/tcmPurgeRules.xml @@ -1,10 +1,6 @@ - - - - tcm - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/utility/common_static/base/purge/wcpPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/utility/common_static/base/purge/wcpPurgeRules.xml index 91b796c037..8ec526365d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/utility/common_static/base/purge/wcpPurgeRules.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/utility/common_static/base/purge/wcpPurgeRules.xml @@ -1,10 +1,6 @@ - - - - wcp - default - + + 02-00:00:00 - - \ No newline at end of file + + diff --git a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/base/purge/regionalsatPurgeRules.xml b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/base/purge/regionalsatPurgeRules.xml index fbed4d37d9..b77fc3adbb 100644 --- a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/base/purge/regionalsatPurgeRules.xml +++ b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/base/purge/regionalsatPurgeRules.xml @@ -1,164 +1,118 @@ - - - - satellite - default - + + creatingEntity + physicalElement + 24 - + - - satellite - creatingEntity=HRPT;physicalElement=Imager 11 micron IR - + HRPT + Imager 11 micron IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager Channel 4-5 IR - - 48 - - - - satellite - creatingEntity=HRPT;physicalElement=Imager 3.9 micron IR - + HRPT + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager 3 Channel Diff - + HRPT + Imager 3.9 micron IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager Visible - + HRPT + Imager 3 Channel Diff 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager 11 micron IR - + HRPT + Imager Visible 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager Visible - + MTSAT + Imager 11 micron IR 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager Channel 4-5 IR - + MTSAT + Imager Visible 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 11 micron IR - + MTSAT + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 3.9 micron IR - + GVAR + Imager 11 micron IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager Visible - + GVAR + Imager 3.9 micron IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 6.7-6.5 micron IR (WV) - + GVAR + Imager Visible 48 - - satellite - creatingEntity=DMSP;physicalElement=Imager Visible - + GVAR + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - creatingEntity=DMSP;physicalElement=Imager 11 micron IR - + DMSP + Imager Visible 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager 11 micron IR - + DMSP + Imager 11 micron IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager Channel 4-5 IR - + FY1C + Imager 11 micron IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager 3 Channel Diff - + FY1C + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager Visible - + FY1C + Imager 3 Channel Diff 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager 11 micron IR - + FY1C + Imager Visible 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager Channel 4-5 IR - + FY3C + Imager 11 micron IR 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager 3 Channel Diff - + FY3C + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager Visible - + FY3C + Imager 3 Channel Diff 48 - + + + FY3C + Imager Visible + 48 + diff --git a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/site/AFC/purge/regionalsatPurgeRules.xml b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/site/AFC/purge/regionalsatPurgeRules.xml index fbed4d37d9..b77fc3adbb 100644 --- a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/site/AFC/purge/regionalsatPurgeRules.xml +++ b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/utility/common_static/site/AFC/purge/regionalsatPurgeRules.xml @@ -1,164 +1,118 @@ - - - - satellite - default - + + creatingEntity + physicalElement + 24 - + - - satellite - creatingEntity=HRPT;physicalElement=Imager 11 micron IR - + HRPT + Imager 11 micron IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager Channel 4-5 IR - - 48 - - - - satellite - creatingEntity=HRPT;physicalElement=Imager 3.9 micron IR - + HRPT + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager 3 Channel Diff - + HRPT + Imager 3.9 micron IR 48 - - satellite - creatingEntity=HRPT;physicalElement=Imager Visible - + HRPT + Imager 3 Channel Diff 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager 11 micron IR - + HRPT + Imager Visible 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager Visible - + MTSAT + Imager 11 micron IR 48 - - satellite - creatingEntity=MTSAT;physicalElement=Imager Channel 4-5 IR - + MTSAT + Imager Visible 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 11 micron IR - + MTSAT + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 3.9 micron IR - + GVAR + Imager 11 micron IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager Visible - + GVAR + Imager 3.9 micron IR 48 - - satellite - creatingEntity=GVAR;physicalElement=Imager 6.7-6.5 micron IR (WV) - + GVAR + Imager Visible 48 - - satellite - creatingEntity=DMSP;physicalElement=Imager Visible - + GVAR + Imager 6.7-6.5 micron IR (WV) 48 - - satellite - creatingEntity=DMSP;physicalElement=Imager 11 micron IR - + DMSP + Imager Visible 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager 11 micron IR - + DMSP + Imager 11 micron IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager Channel 4-5 IR - + FY1C + Imager 11 micron IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager 3 Channel Diff - + FY1C + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=FY1C;physicalElement=Imager Visible - + FY1C + Imager 3 Channel Diff 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager 11 micron IR - + FY1C + Imager Visible 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager Channel 4-5 IR - + FY3C + Imager 11 micron IR 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager 3 Channel Diff - + FY3C + Imager Channel 4-5 IR 48 - - satellite - creatingEntity=FY3C;physicalElement=Imager Visible - + FY3C + Imager 3 Channel Diff 48 - + + + FY3C + Imager Visible + 48 +