diff --git a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/data/SizeJob.java b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/data/SizeJob.java index a9735621ce..c73e9d5910 100644 --- a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/data/SizeJob.java +++ b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/data/SizeJob.java @@ -53,6 +53,7 @@ import com.raytheon.uf.common.time.util.TimeUtil; * Dec 11, 2013 #2624 rferrel Clear display variables when recomputing sizes. * Mar 27, 2014 #2879 rferrel Loading Case no longer changes Start/End times. * Apr 23, 2014 #3045 rferrel Changes to prevent race condition while getting labels. + * Aug 26, 2014 #3553 rferrel Option to force update of table's display data. * * * @@ -157,7 +158,7 @@ public class SizeJob extends Job { private boolean stopComputeSize; /** - * Priority queue for getting display data all archive/category tables. + * Priority queue for getting display data for all archive/category tables. */ // Do not use a PriorityBlockingQueue since the load select and change // display methods need to be notified when the display data is available. @@ -473,11 +474,11 @@ public class SizeJob extends Job { * @return displayData */ public List changeDisplay(String archiveName, - String categoryName, AtomicBoolean shutdown) { + String categoryName, AtomicBoolean shutdown, boolean forceUpdate) { List displayDatas = null; // Only get data when the display really needs to be changed. - if (!archiveName.equals(displayArchive) + if (forceUpdate || !archiveName.equals(displayArchive) || !categoryName.equals(displayCategory)) { // Update visible status of current display. diff --git a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/AbstractArchiveDlg.java b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/AbstractArchiveDlg.java index a095803415..1b2c576996 100644 --- a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/AbstractArchiveDlg.java +++ b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/AbstractArchiveDlg.java @@ -82,6 +82,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * Apr 15, 2014 3034 lvenable Added dispose checks in runAsync calls. * Apr 10, 2014 3023 rferrel Added setTotalSelectedSize method. * Apr 23, 2014 3045 rferrel Changes to prevent race condition while getting labels. + * Aug 26, 2014 3553 rferrel Force redisplay of table after getting all display labels. * * * @@ -146,6 +147,9 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements /** Job running to populate the currently selected archive/category. */ private Job populateTableJob = null; + /** Flag to indicate all labels for all tables are loaded. */ + protected volatile boolean haveAllLabels = false; + /** * @param parentShell */ @@ -360,6 +364,9 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements */ protected void createTable() { tableComp = new ArchiveTableComp(shell, type, this, sizeJob); + // Indicate loading the table labels. + tableComp + .setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); sizeJob.addUpdateListener(this); } @@ -491,6 +498,13 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements * adjust sizes on the display table. */ protected void populateTableComp() { + populateTableComp(false); + } + + /** + * @param forceUpdate + */ + protected void populateTableComp(final boolean forceUpdate) { final String archiveName = getSelectedArchiveName(); final String categoryName = getSelectedCategoryName(); @@ -508,7 +522,8 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements @Override protected IStatus run(IProgressMonitor monitor) { - getCategoryTableData(archiveName, categoryName, shutdown); + getCategoryTableData(archiveName, categoryName, shutdown, + forceUpdate); // Just populated the current table update cursor. if (!shutdown.get()) { @@ -543,7 +558,8 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements * @param shutdown */ private void getCategoryTableData(final String archiveName, - final String categoryName, final AtomicBoolean shutdown) { + final String categoryName, final AtomicBoolean shutdown, + boolean forceUpdate) { if (!sizeJob.isCurrentDisplay(archiveName, categoryName)) { VizApp.runAsync(new Runnable() { @@ -558,7 +574,7 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements } final List displayDatas = sizeJob.changeDisplay( - archiveName, categoryName, shutdown); + archiveName, categoryName, shutdown, forceUpdate); VizApp.runAsync(new Runnable() { @@ -695,6 +711,8 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements .setToolTipText("Change display to show all case selections"); } } + } else { + showingSelected = false; } } @@ -838,9 +856,23 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements } /** - * Allows sub-class to perform updates once all the display data is loaded. + * Perform updates once all the display data is loaded. */ - abstract public void loadedAllDisplayData(); + public void loadedAllDisplayData() { + VizApp.runAsync(new Runnable() { + + @Override + public void run() { + haveAllLabels = true; + if (showingSelected) { + populateSelectAllTable(); + } else { + populateTableComp(true); + } + tableComp.setCursor(null); + } + }); + } /** * When unsaved modifications this asks the user to verify the close. diff --git a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveRetentionDlg.java b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveRetentionDlg.java index 1428d288a7..ef01525674 100644 --- a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveRetentionDlg.java +++ b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveRetentionDlg.java @@ -58,6 +58,8 @@ import com.raytheon.uf.common.time.util.TimeUtil; * Oct 07, 2013 #2438 rferrel Properly save and load retention times. * Apr 14, 2014 #3023 rferrel Code clean up. * Apr 24, 2014 #3045 rferrel Implement loadedAllDsipalyData. + * May 28, 2014 #3171 rferrel Change retention labels. + * Aug 26, 2014 #3553 rferrel No longer need to override loadedAllDisplayData. * * * @@ -416,9 +418,4 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg { archiveComboSelection(); categoryComboSelection(); } - - @Override - public void loadedAllDisplayData() { - // nothing to update. - } } diff --git a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/CaseCreationDlg.java b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/CaseCreationDlg.java index 1c004c919d..b480732502 100644 --- a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/CaseCreationDlg.java +++ b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/CaseCreationDlg.java @@ -78,6 +78,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * Apr 11, 2014 #3023 rferrel Configurable Threshold options. * Apr 23, 2014 #3045 rferrel To prevent race condition only allow a case * load after all labels are loaded. + * Aug 26, 2014 #3553 rferrel loadedAllDisplayData must now call its super. * * * @@ -171,9 +172,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg { /** Manager for configurable values for the dialog. */ private final CaseCreationManager ccManager; - /** Flag to indicate all labels for all tables are loaded. */ - private volatile boolean haveAllLabels = false; - /** * Constructor. * @@ -1112,8 +1110,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg { */ @Override public void loadedAllDisplayData() { - haveAllLabels = true; - /* * Restore the buttons' default background color and tooltip text. The * buttons color is not the system standard and the tool tip text @@ -1133,6 +1129,7 @@ public class CaseCreationDlg extends AbstractArchiveDlg { } } }); + super.loadedAllDisplayData(); } @Override diff --git a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/Cities.xml b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/Cities.xml index a6c0b21089..525d44f264 100644 --- a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/Cities.xml +++ b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/Cities.xml @@ -2,19 +2,19 @@ @@ -26,50 +26,20 @@ - - - - + + PLAN_VIEW - - - - - - - - - PLAN_VIEW - - - - - - cities.lpi - Cities - - + + + + + prog_disc + mapdata.city
Cities - - - - - - outlineWidth="1" /> - - PLAN_VIEW - - - - - - mapdata.city
- Cities -
-
diff --git a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Airports.xml b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Airports.xml index f76d3207ae..579e5ccbcc 100644 --- a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Airports.xml +++ b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Airports.xml @@ -22,35 +22,6 @@ - - - - - - - PLAN_VIEW - - - - - - - - - - - PLAN_VIEW - - - - - - mapdata.airport
- Airports -
-
@@ -66,9 +37,6 @@ airport.lpi Airports - - - Airports
diff --git a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Fix.xml b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Fix.xml index b4cab44690..9db555024b 100644 --- a/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Fix.xml +++ b/cave/com.raytheon.uf.viz.core.maps/localization/bundles/maps/FAA/Fix.xml @@ -22,37 +22,6 @@ - - - - - - - PLAN_VIEW - - - - - - - - - - - - PLAN_VIEW - - - - - - mapdata.fix
- Fixes/Intersections - type != 'NU' -
-
@@ -70,9 +39,6 @@ Fixes/Intersections
- Fixes/Intersections -
- diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleLoaderGetter.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleLoaderGetter.java deleted file mode 100644 index 74d9c3df01..0000000000 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleLoaderGetter.java +++ /dev/null @@ -1,83 +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.viz.core.reflect; - -import org.eclipse.osgi.framework.internal.core.AbstractBundle; -import org.eclipse.osgi.framework.internal.core.BundleHost; -import org.eclipse.osgi.internal.loader.BundleLoader; -import org.eclipse.osgi.internal.loader.BundleLoaderProxy; -import org.eclipse.osgi.service.resolver.BundleDescription; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleReference; - -/** - * Utility class to get the BundleLoader object associated with a Bundle, to - * potentially synchronize against that object. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 13, 2014 3500       bclement     Initial creation
- * 
- * 
- * - * @author bclement - * @version 1.0 - * @see BundleSynchronizer - */ -public class BundleLoaderGetter { - - private BundleLoaderGetter() { - } - - /** - * Attempts to retrieve the BundleLoader associated with the bundle. Returns - * the BundleLoader or null if it could not be retrieved. - * - * @param bundle - * the bundle to retrieve the associated BundleLoader for - * @return the BundleLoader or null - */ - @SuppressWarnings("restriction") - protected static BundleLoader getBundleLoader(Bundle bundle) { - BundleLoader rval = null; - if (bundle instanceof AbstractBundle) { - BundleDescription bundleDesc = ((AbstractBundle) bundle) - .getBundleDescription(); - if (bundleDesc != null) { - Object o = bundleDesc.getUserObject(); - if (!(o instanceof BundleLoaderProxy)) { - if (o instanceof BundleReference) - o = ((BundleReference) o).getBundle(); - if (o instanceof BundleHost) - o = ((BundleHost) o).getLoaderProxy(); - } - if (o instanceof BundleLoaderProxy) { - rval = ((BundleLoaderProxy) o).getBundleLoader(); - } - } - } - return rval; - } - -} diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleReflections.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleReflections.java index a39a53ddad..d965f88f5b 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleReflections.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleReflections.java @@ -49,6 +49,7 @@ import org.reflections.util.ConfigurationBuilder; * Jan 22, 2014 2062 bsteffen Handle bundles with no wiring. * Apr 16, 2014 3018 njensen Synchronize against BundleRepository * Aug 13, 2014 3500 bclement uses BundleSynchronizer + * Aug 22, 2014 3500 bclement removed sync on OSGi internals * * * @@ -61,17 +62,11 @@ public class BundleReflections { private final Reflections reflections; public BundleReflections(Bundle bundle, Scanner scanner) throws IOException { - final ConfigurationBuilder cb = new ConfigurationBuilder(); - final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); + ConfigurationBuilder cb = new ConfigurationBuilder(); + BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); if (bundleWiring != null) { - BundleSynchronizer.runSynchedWithBundle(new Runnable() { - @Override - public void run() { - cb.addClassLoader(bundleWiring.getClassLoader()); - - } - }, bundle); + cb.addClassLoader(bundleWiring.getClassLoader()); cb.addUrls(FileLocator.getBundleFile(bundle).toURI().toURL()); cb.setScanners(scanner); diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleRepositoryGetter.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleRepositoryGetter.java deleted file mode 100644 index 36262c6311..0000000000 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleRepositoryGetter.java +++ /dev/null @@ -1,83 +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.viz.core.reflect; - -import java.lang.reflect.Field; - -import org.eclipse.osgi.framework.internal.core.AbstractBundle; -import org.eclipse.osgi.framework.internal.core.BundleRepository; -import org.eclipse.osgi.framework.internal.core.Framework; -import org.osgi.framework.Bundle; - -/** - * Utility class to get the BundleRepository object associated with a Bundle, to - * potentially synchronize against that object. - * - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 17, 2014            njensen     Initial creation
- * Aug 13, 2014 3500       bclement    moved documentation over to BundleSynchronizer
- * 
- * 
- * - * @author njensen - * @version 1.0 - * @see BundleSynchronizer - */ -public class BundleRepositoryGetter { - - private BundleRepositoryGetter() { - - } - - /** - * Attempts to retrieve the BundleRepository associated with the bundle's - * framework. Returns the BundleRepository or null if it could not be - * retrieved. - * - * @param bundle - * the bundle to retrieve the associated BundleRepository for - * @return the BundleRepository or null - */ - @SuppressWarnings("restriction") - protected static BundleRepository getFrameworkBundleRepository(Bundle bundle) { - BundleRepository bundleRepo = null; - if (bundle instanceof AbstractBundle) { - try { - AbstractBundle ab = (AbstractBundle) bundle; - Field bundleRepoField = Framework.getField(Framework.class, - BundleRepository.class, true); - bundleRepo = (BundleRepository) bundleRepoField.get(ab - .getFramework()); - } catch (Throwable t) { - // intentionally log to console and proceed anyway - t.printStackTrace(); - } - } - - return bundleRepo; - } - -} diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleSynchronizer.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleSynchronizer.java deleted file mode 100644 index 9f1db071c0..0000000000 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/BundleSynchronizer.java +++ /dev/null @@ -1,96 +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.viz.core.reflect; - -import org.eclipse.osgi.framework.internal.core.BundleRepository; -import org.eclipse.osgi.internal.loader.BundleLoader; -import org.osgi.framework.Bundle; - -/** - * If a call to BundleWiring.getClassLoader() is invoked on a thread other than - * main/UI thread, then there is a possible deadlock if the application shuts - * down while the BundleWiring.getClassLoader() call is still going. The - * BundleLoader and BundleRepository of the Framework are the primary resources - * that are in contention in this deadlock scenario, due to the BundleRepository - * being used as a synchronization lock both deep in - * bundleWiring.getClassloader() and in Framework shutdown code. The other - * resource used as a synchronization lock and causing the deadlock is the - * BundleLoader associated with the bundle. When BundleLoader.findClass() is - * called, it results in a lock on the BundleLoader and then a lock on the - * BundleRepository. This happens when the DefaultClassLoader loads a class. - * - * Therefore to avoid this deadlock, if you are going to call - * BundleWiring.getClassLoader() you should attempt synchronize against the - * BundleLoader and the BundleRepository. This will ensure the call to - * getClassLoader() can finish and then release synchronization locks of both - * the BundleRepository and BundleLoader. - * - * If we fail to get the BundleLoader or BundleRepository, then you should - * proceed onwards anyway because the odds of the application shutting down at - * the same time as the call to BundleWiring.getClassLoader() is still running - * is low. Even if that occurs, the odds are further reduced that the two - * threads will synchronize against the BundleLoader and the BundleRepository at - * the same time and deadlock. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 13, 2014 3500       bclement     Initial creation
- * 
- * 
- * - * @author bclement - * @version 1.0 - */ -public class BundleSynchronizer { - - private BundleSynchronizer() { - } - - /** - * Attempts to synchronize with the bundle's BundleLoader and - * BundleRepository objects before running the runner. If either the - * BundleLoader or the BundleRepository are unable to be retrieved from the - * bundle, the runner is ran anyway since the likelihood of a deadlock is - * relatively small. - * - * @param runner - * @param bundle - * @see BundleLoaderGetter#getBundleLoader(Bundle) - * @see BundleRepositoryGetter#getFrameworkBundleRepository(Bundle) - */ - protected static void runSynchedWithBundle(Runnable runner, Bundle bundle) { - BundleRepository repo = BundleRepositoryGetter - .getFrameworkBundleRepository(bundle); - BundleLoader loader = BundleLoaderGetter.getBundleLoader(bundle); - if (repo != null && loader != null) { - synchronized (loader) { - synchronized (repo) { - runner.run(); - } - } - } else { - runner.run(); - } - } -} diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/SubClassLocator.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/SubClassLocator.java index a6c40caf79..e02f2dad87 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/SubClassLocator.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/reflect/SubClassLocator.java @@ -58,6 +58,7 @@ import com.raytheon.uf.viz.core.Activator; * Feb 03, 2013 2764 bsteffen Use OSGi API to get dependencies. * Apr 17, 2014 3018 njensen Synchronize against BundleRepository * Aug 13, 2014 3500 bclement uses BundleSynchronizer + * Aug 22, 2014 3500 bclement removed sync on OSGi internals * * * @@ -265,20 +266,12 @@ public class SubClassLocator implements ISubClassLocator { */ private Set> loadClassesFromCache(Bundle bundle, Collection classNames) { - final BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); + BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); if (bundleWiring == null) { return Collections.emptySet(); } - final ClassLoader[] loaderHolder = new ClassLoader[1]; - BundleSynchronizer.runSynchedWithBundle(new Runnable() { - @Override - public void run() { - loaderHolder[0] = bundleWiring.getClassLoader(); - } - }, bundle); - - ClassLoader loader = loaderHolder[0]; + ClassLoader loader = bundleWiring.getClassLoader(); if (loader == null) { return Collections.emptySet(); } diff --git a/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/bundles/ncepHydro/ConvectiveWatchPlot.xml b/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/bundles/ncepHydro/ConvectiveWatchPlot.xml new file mode 100644 index 0000000000..01d6f48442 --- /dev/null +++ b/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/bundles/ncepHydro/ConvectiveWatchPlot.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/menus/ncepHydro/spc/baseSPC.xml b/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/menus/ncepHydro/spc/baseSPC.xml index 9344f90add..27a27e3095 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/menus/ncepHydro/spc/baseSPC.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui.ncephydro/localization/menus/ncepHydro/spc/baseSPC.xml @@ -20,8 +20,8 @@ --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/BLI.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/BLI.xml new file mode 100644 index 0000000000..c4a6710c1a --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/BLI.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/LTNG.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/LTNG.xml new file mode 100644 index 0000000000..ee4144d376 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/LTNG.xml @@ -0,0 +1,22 @@ + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXDVV.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXDVV.xml new file mode 100644 index 0000000000..cdd0fb9419 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXDVV.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXUVV.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXUVV.xml new file mode 100644 index 0000000000..431f6e2fc2 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MAXUVV.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXREF.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXREF.xml new file mode 100644 index 0000000000..b0d7bcd510 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXREF.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXUPHL.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXUPHL.xml new file mode 100644 index 0000000000..fc076df656 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MXUPHL.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MaxWHRRR.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MaxWHRRR.xml new file mode 100644 index 0000000000..2c6594b32e --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MaxWHRRR.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WGS1hr.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WGS1hr.xml new file mode 100644 index 0000000000..c86c8edbb4 --- /dev/null +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WGS1hr.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/MenuItemComposite.java b/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/MenuItemComposite.java index 92be15d958..67023189b5 100644 --- a/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/MenuItemComposite.java +++ b/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/MenuItemComposite.java @@ -68,6 +68,8 @@ import com.raytheon.viz.core.mode.CAVEMode; * Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches. * Feb 26, 2014 2842 mpduff Utilize the command listener. * Apr 10, 2014 2241 mnash Fix in practice mode, fixed the new month, Jev + * Jev 26, 2014 2842 mpduff Utilize the command listener. + * Aug 21, 2014 15664 snaples Updated dispose method to fix issue when closing perspecitive with tear offs open. * * * @@ -563,27 +565,27 @@ public class MenuItemComposite extends Composite { highlightedArrow.dispose(); } - if (item != null) { - if (updateListener != null && !item.isDisposed()) { + if (item != null && !item.isDisposed()) { + if (updateListener != null) { item.removeListener(SWT.Modify, updateListener); } - if (radioListener != null && !item.isDisposed()) { + if (radioListener != null) { item.removeSelectionListener(radioListener); } - } - if (item.getData() instanceof CommandContributionItem) { - ICommandService service = (ICommandService) PlatformUI - .getWorkbench().getService(ICommandService.class); - Command c = service.getCommand(((CommandContributionItem) item - .getData()).getCommand().getId()); - c.removeCommandListener(commandListener); + if (item.getData() instanceof CommandContributionItem) { + ICommandService service = (ICommandService) PlatformUI + .getWorkbench().getService(ICommandService.class); + Command c = service.getCommand(((CommandContributionItem) item + .getData()).getCommand().getId()); + c.removeCommandListener(commandListener); + } } - super.dispose(); } + public void setSelection(boolean selection) { if (firstItem instanceof Button) { ((Button) firstItem).setSelection(selection); @@ -628,4 +630,4 @@ public class MenuItemComposite extends Composite { public void reconnect() { getItemIfAvailable(); } -} \ No newline at end of file +} diff --git a/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/TearOffMenuDialog.java b/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/TearOffMenuDialog.java index 11a49f7f63..9f77b981bc 100644 --- a/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/TearOffMenuDialog.java +++ b/cave/com.raytheon.uf.viz.ui.menus/src/com/raytheon/uf/viz/ui/menus/widgets/tearoff/TearOffMenuDialog.java @@ -60,6 +60,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * Sep 14, 2011 mnash Initial creation * Jan 09, 2013 1442 rferrel Add Simulated Time Change Listener. * Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches. + * Aug 21, 2014 15664 snaples Updated dispose method to fix issue when closing perspecitive with tear offs open. * * * @@ -215,7 +216,9 @@ public class TearOffMenuDialog extends CaveSWTDialog { } shell.removeListener(SWT.Show, swtListener); - menu.removeListener(SWT.Show, swtListener); + if (!menu.isDisposed()) { + menu.removeListener(SWT.Show, swtListener); + } super.disposed(); } diff --git a/cave/com.raytheon.viz.gfe/python/query/DBSSClient.py b/cave/com.raytheon.viz.gfe/python/query/DBSSClient.py index fa95809a08..e0a161ce84 100644 --- a/cave/com.raytheon.viz.gfe/python/query/DBSSClient.py +++ b/cave/com.raytheon.viz.gfe/python/query/DBSSClient.py @@ -17,6 +17,14 @@ # See the AWIPS II Master Rights File ("Master Rights File.pdf") for # further licensing information. ## +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# Sep 01, 2014 3572 randerso Fix getTopo +# +######################################################################## import DatabaseID, AbsTime, JUtil from com.raytheon.uf.common.dataplugin.gfe.db.objects import DatabaseID as JavaDatabaseID @@ -116,4 +124,4 @@ class DBSSClient: return self._dataMgr.getOpMode().name() def getTopo(self): - return self._tmgr.getCompositeTopo().getScalarGrid().__numpy__[0] + return self._tmgr.getCompositeTopo().__numpy__[0] diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/GfeClient.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/GfeClient.java index a5f28611f8..d3e8d11c10 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/GfeClient.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/GfeClient.java @@ -62,6 +62,9 @@ import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent; * which was adding an empty string into the * python path causing python to look in user's * current default directory for modules. + * Aug 22, 2014 3500 bclement override postStartupActions() + * Aug 29, 2014 3500 bclement removed override of postStartupActions() + * since ProcedureXMLManager startup was moved to the CAVE subclass * * * @@ -196,4 +199,5 @@ public class GfeClient extends AbstractCAVEComponent { return new HashSet(Arrays.asList("-site", "-server", "-mode", "-time")); } + } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/IISCDataAccess.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/IISCDataAccess.java index e12fc8541b..1accb9e486 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/IISCDataAccess.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/IISCDataAccess.java @@ -44,6 +44,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 07/14/09 1995 bphillip Initial release + * 09/01/2014 3572 randerso Removed unused inOurSite method * * * @@ -98,20 +99,6 @@ public interface IISCDataAccess { */ public String getISCSite(Point coord, GridID gid); - /** - * Returns true if the coordinate (and grid id) is in our own domain. The - * officeType for the parm and our officeType must be the same to be - * considered "inOurSite". - * - * @param loc - * The coordinate to check - * @param gid - * The gridID associated with the coordinate - * @return true if coordinate is in our domain and the parm and office type - * match - */ - public boolean inOurSite(Point loc, GridID gid); - /** * Returns the data point for the gridid. Will return either the data point * from the specified grid, or its corresponding isc grid, depending upon diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java index e1104df6bf..b35c715a6a 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java @@ -36,7 +36,6 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2D; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; -import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBoolean; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DByte; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat; import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData; @@ -75,6 +74,8 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * 07/14/09 1995 bphillip Initial release * 10/31/2013 2508 randerso Change to use DiscreteGridSlice.getKeys() + * 09/01/2014 3572 randerso Removed ourSiteMap as it was unused and the only + * thing that used Grid2DBoolean * * * @@ -90,10 +91,6 @@ public class ISCDataAccess implements IISCDataAccess { private Map> siteGridMap; - // private Map> siteIdentifiers; - - private Grid2DBoolean ourSiteMap; - /** * Constructs a new ISCDataAccess object * @@ -207,21 +204,6 @@ public class ISCDataAccess implements IISCDataAccess { } } - @Override - public boolean inOurSite(Point loc, GridID gid) { - // must be our office type to be inOurSite - if (!dataMgr.getOfficeType().equals(gid.getParm().getOfficeType())) { - return false; - } - - if (this.ourSiteMap.isValid(loc.x, loc.y)) { - return this.ourSiteMap.get(loc.x, loc.y); - } else { - return false; - } - - } - @Override public WxValue getDataPoint(GridID gridID, Coordinate worldLoc) throws GFEServerException { @@ -511,7 +493,7 @@ public class ISCDataAccess implements IISCDataAccess { "getCompositeGrid called on non-discrete parm"); slice.setDiscreteGrid(new Grid2DByte()); - slice.setKey(new DiscreteKey[0]); + slice.setKeys(new DiscreteKey[0]); return new Grid2DBit(); } @@ -519,7 +501,7 @@ public class ISCDataAccess implements IISCDataAccess { Grid2DBit ourSiteMask = null; if (primary == null) { slice.setDiscreteGrid(new Grid2DByte(nx, ny)); - slice.setKey(new DiscreteKey[0]); + slice.setKeys(new DiscreteKey[0]); primary = new DiscreteGridData(gid.getParm(), slice); ourSiteMask = new Grid2DBit(nx, ny); } else { @@ -536,7 +518,7 @@ public class ISCDataAccess implements IISCDataAccess { keys[i] = new DiscreteKey(primary.getDiscreteSlice().getKeys()[i]); } - slice.setKey(keys); + slice.setKeys(keys); keys = null; // don't use this copy any more // isc grid @@ -580,7 +562,7 @@ public class ISCDataAccess implements IISCDataAccess { newKeyList[key.getValue().intValue()] = key.getKey(); } - slice.setKey(newKeyList); + slice.setKeys(newKeyList); return siteMask.or(ourSiteMask); } @@ -590,10 +572,6 @@ public class ISCDataAccess implements IISCDataAccess { protected void createSiteMask() { GridLocation gloc = dataMgr.getParmManager().compositeGridLocation(); - // reinitialize data to empty - ourSiteMap = new Grid2DBoolean(gloc.gridSize().x, gloc.gridSize().y); - // siteIdentifiers = new HashMap>(); - siteGridMap = new HashMap>(); // get list of known sites from server -- ignore any errors @@ -624,7 +602,6 @@ public class ISCDataAccess implements IISCDataAccess { // point. Grid2D sites = new Grid2D(gloc.gridSize().x, gloc.gridSize().y); - // List siteIdentifiers = new ArrayList(); for (String iscea : iscEAs) { @@ -642,7 +619,6 @@ public class ISCDataAccess implements IISCDataAccess { Grid2DBit bits = refDat.getGrid(); if (bits.isAnyBitsSet()) { - // siteIdentifiers.add(iscea); for (int y = 0; y < bits.getYdim(); y++) { for (int x = 0; x < bits.getXdim(); x++) { @@ -652,22 +628,9 @@ public class ISCDataAccess implements IISCDataAccess { } } } - - // special mapping for our site map - if (iscea.equals(dataMgr.getSiteID())) { - for (int y = 0; y < bits.getYdim(); y++) { - for (int x = 0; x < bits.getXdim(); x++) { - if (bits.get(x, y) > 0) { - ourSiteMap.set(x, y, true); - } - } - } - } - } // store result in maps - // this.siteIdentifiers.put(officeType, siteIdentifiers); this.siteGridMap.put(officeType, sites); } } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java index adb13351c5..aeea6dbde8 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java @@ -455,12 +455,9 @@ public class OtherPrecipOptions { // // do nothing // } - if (clientdata == 1) { - // do nothing - } - + /* Rendering the grids and MAPs. */ - else if (clientdata == 0) { + if (clientdata == 0) { BadValues bv = new BadValues(); bv.update_bad_values(DailyQcUtils.pcpn_day); @@ -472,16 +469,18 @@ public class OtherPrecipOptions { if (DailyQcUtils.pcpn_day == 0 && (DailyQcUtils.curHr00_06 == 1 || DailyQcUtils.curHr06_12 == 1 || DailyQcUtils.curHr18_00 == 1)) { + System.out.println("Not estimating partial point or daily stations."); // don't estimate } else { EstDailyStations ed = new EstDailyStations(); ed.estimate_daily_stations(DailyQcUtils.pcpn_day, DailyQcUtils.precip_stations, num_stations); - + System.out.println("Estimating daily stations."); EstPartStations ep = new EstPartStations(); ep.estimate_partial_stations(DailyQcUtils.pcpn_day, DailyQcUtils.precip_stations, num_stations); + System.out.println("Estimating partial stations."); } QCStations qs = new QCStations(); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java index 20bae8b075..996d988f80 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java @@ -64,6 +64,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor; * Sep 23, 2008 randerso Initial creation * Apr 30, 2013 lbousaidi made seconds in the date/Time * fields visible. + * Aug 26, 2014 14578 snaples Added Ending Hydrologic Date selection. * * * @author randerso @@ -79,8 +80,12 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { } private Calendar cal; + + private Calendar hydroCal; public static Date prevDate; + + public static Date prevHydDate; public static String prevArea; @@ -93,6 +98,12 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { private Spinner hourSpinner; private Spinner daysSpinner; + + private Text hydyearText; + + private Text hydmonthText; + + private Spinner hyddaySpinner; private Map dateMap; @@ -118,6 +129,8 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { private Combo areaCombo; + private static Date currentHydroEndingDate; + public ChooseDataPeriodDialog(Shell parentShell) { super(parentShell); setBlockOnOpen(false); @@ -144,8 +157,13 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { dateMap = dataMgr.getDateMap(false); qcEnable = MPEDisplayManager.isMpeQcOptionEnabled(); cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); + hydroCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); prevDate = displayMgr.getCurrentEditDate(); cal.setTime(prevDate); + if(prevHydDate == null){ + prevHydDate = prevDate; + } + hydroCal.setTime(prevHydDate); } /* @@ -313,8 +331,59 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { gageOptionsGroup.setLayout(layout); gageOptionsGroup.setText("6/24 hr gage edit options"); - new Label(gageOptionsGroup, SWT.NONE); + // create ending hydro date area + + Label hydrodateLabel = new Label(gageOptionsGroup, SWT.NONE); + hydrodateLabel.setText("Ending Hydrologic Date: "); + new Label(gageOptionsGroup, SWT.None); + Composite hydrodateComp = new Composite(gageOptionsGroup, SWT.NONE); + GridData hydrodata = new GridData(SWT.FILL, SWT.DEFAULT, true, false); + hydrodateComp.setLayoutData(hydrodata); + GridLayout hydlayout = new GridLayout(3, false); + hydrodateComp.setLayout(hydlayout); + + Label hydyearLabel = new Label(hydrodateComp, SWT.NONE); + hydyearLabel.setText("Ending Year"); + + Label hydmonthLabel = new Label(hydrodateComp, SWT.NONE); + hydmonthLabel.setText("Month"); + + Label hyddayLabel = new Label(hydrodateComp, SWT.NONE); + hyddayLabel.setText("Day"); + + hydyearText = new Text(hydrodateComp, SWT.BORDER | SWT.READ_ONLY); + hydrodata = new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false); + hydrodata.widthHint = 100; + hydyearText.setLayoutData(hydrodata); + + hydmonthText = new Text(hydrodateComp, SWT.BORDER | SWT.READ_ONLY); + hydrodata = new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false); + hydrodata.widthHint = 50; + hydmonthText.setLayoutData(hydrodata); + + hyddaySpinner = new Spinner(hydrodateComp, SWT.BORDER | SWT.READ_ONLY); + hydrodata = new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false); + hydrodata.widthHint = 50; + hyddaySpinner.setLayoutData(data); + hyddaySpinner.setMinimum(0); + hyddaySpinner.setMaximum(32); + hyddaySpinner.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + int day = hyddaySpinner.getSelection(); + + hydroCal.set(Calendar.DAY_OF_MONTH, day); + + updateTimeControls(); + } + + }); + + + new Label(gageOptionsGroup, SWT.None); + new Label(gageOptionsGroup, SWT.None); Label selectAreaLabel = new Label(gageOptionsGroup, SWT.NONE); selectAreaLabel.setText("Select Area"); data = new GridData(SWT.CENTER, SWT.DEFAULT, false, false); @@ -373,6 +442,8 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { public void widgetSelected(SelectionEvent e) { displayMgr.setDqcDays(daysSpinner.getSelection()); prevArea = areaCombo.getItem(areaCombo.getSelectionIndex()); + setCurrentHydroEditDate(getHydroTime()); + if (QcPrecipOptionsDialog.isFinished() == false) { QcPrecipOptionsDialog.destroy(false); } @@ -400,6 +471,8 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { public void widgetSelected(SelectionEvent e) { displayMgr.setDqcDays(daysSpinner.getSelection()); prevArea = areaCombo.getItem(areaCombo.getSelectionIndex()); + setCurrentHydroEditDate(getHydroTime()); + if (QcTempOptionsDialog.isFinished() == false) { QcTempOptionsDialog.destroy(false); } @@ -427,6 +500,8 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { public void widgetSelected(SelectionEvent e) { displayMgr.setDqcDays(daysSpinner.getSelection()); prevArea = areaCombo.getItem(areaCombo.getSelectionIndex()); + setCurrentHydroEditDate(getHydroTime()); + if (QcFreezeOptionsDialog.isFinished() == false) { QcFreezeOptionsDialog.destroy(false); } @@ -454,13 +529,19 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { if (cal.getTime().before(dataMgr.getEarliestDate()) || cal.getTime().after(dataMgr.getLatestDate())) { cal.setTime(prevDate); + hydroCal.setTime(prevHydDate); } prevDate = cal.getTime(); + prevHydDate = hydroCal.getTime(); yearText.setText(Integer.toString(cal.get(Calendar.YEAR))); monthText.setText(Integer.toString(cal.get(Calendar.MONTH) + 1)); daySpinner.setSelection(cal.get(Calendar.DAY_OF_MONTH)); - + + hydyearText.setText(Integer.toString(hydroCal.get(Calendar.YEAR))); + hydmonthText.setText(Integer.toString(hydroCal.get(Calendar.MONTH) + 1)); + hyddaySpinner.setSelection(hydroCal.get(Calendar.DAY_OF_MONTH)); + hourSpinner.setSelection(cal.get(Calendar.HOUR_OF_DAY)); if (dateMap.containsKey(cal.getTime()) == false) { @@ -502,6 +583,19 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { public Date getTime() { return cal.getTime(); } + + public Date getHydroTime(){ + return hydroCal.getTime(); + } + + private void setCurrentHydroEditDate(Date hydroTime) { + currentHydroEndingDate = hydroTime; + } + + public static Date getCurrentHydroEditDate(){ + return currentHydroEndingDate; + } + /** * Get the selected year; diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcFreezeOptionsDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcFreezeOptionsDialog.java index 50408b17df..947e5bc9d7 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcFreezeOptionsDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcFreezeOptionsDialog.java @@ -67,6 +67,7 @@ import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; * ------------ ---------- ----------- -------------------------- * Jul, 7 2009 snaples Initial creation * Sep 11, 2013 #2353 lvenable Fixed cursor memory leak. + * Aug 26, 2014 14578 snaples Changed the way we get current data to use new ending hydologic date. * * * @@ -195,8 +196,8 @@ public class QcFreezeOptionsDialog extends AbstractMPEDialog { Shell parent = this.getParent(); Display display = parent.getDisplay(); MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent(); - Date prevDate = displayMgr.getCurrentEditDate(); - Date currDate = ChooseDataPeriodDialog.prevDate; + Date prevDate = ChooseDataPeriodDialog.getCurrentHydroEditDate(); + Date currDate = ChooseDataPeriodDialog.prevHydDate; String QcArea = ChooseDataPeriodDialog.prevArea; AppsDefaults appDefaults = AppsDefaults.getInstance(); DisplayFieldData df = displayMgr.getDisplayFieldType(); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcPrecipOptionsDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcPrecipOptionsDialog.java index fa30c3fbed..a5aa4a231e 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcPrecipOptionsDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcPrecipOptionsDialog.java @@ -67,6 +67,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Ts; * Mar 7, 2013 15657 lbousaidi fixed DQC slider and added listener to the Keys * when pressed. * Sep 11, 2013 #2353 lvenable Fixed cursor memory leak. + * Aug 26, 2014 14578 snaples Changed the way we get the date, to use new ending hydro date field. * * * @author snaples @@ -207,8 +208,8 @@ public class QcPrecipOptionsDialog extends AbstractMPEDialog { Shell parent = this.getParent(); Display display = parent.getDisplay(); MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent(); - Date prevDate = displayMgr.getCurrentEditDate(); - Date currDate = ChooseDataPeriodDialog.prevDate; + Date prevDate = ChooseDataPeriodDialog.getCurrentHydroEditDate(); + Date currDate = ChooseDataPeriodDialog.prevHydDate; String QcArea = ChooseDataPeriodDialog.prevArea; AppsDefaults appDefaults = AppsDefaults.getInstance(); DisplayFieldData df = displayMgr.getDisplayFieldType(); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcTempOptionsDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcTempOptionsDialog.java index 377555e8c0..7cab504bba 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcTempOptionsDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/QcTempOptionsDialog.java @@ -64,6 +64,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Ts; * ------------ ---------- ----------- -------------------------- * Nov 12, 2008 snaples Initial creation * Sep 11, 2013 #2353 lvenable Fixed cursor memory leak. + * Aug 26, 2014 14578 snaples Changed the way we get current data to use new ending hydologic date. * * * @@ -196,8 +197,8 @@ public class QcTempOptionsDialog extends AbstractMPEDialog { Shell parent = this.getParent(); Display display = parent.getDisplay(); MPEDisplayManager displayMgr = MPEDisplayManager.getCurrent(); - Date prevDate = displayMgr.getCurrentEditDate(); - Date currDate = ChooseDataPeriodDialog.prevDate; + Date prevDate = ChooseDataPeriodDialog.getCurrentHydroEditDate(); + Date currDate = ChooseDataPeriodDialog.prevHydDate; String QcArea = ChooseDataPeriodDialog.prevArea; AppsDefaults appDefaults = AppsDefaults.getInstance(); DisplayFieldData df = displayMgr.getDisplayFieldType(); diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/InitPrecipClimo.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/InitPrecipClimo.java index f5ac2a8d74..87e8e69b6b 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/InitPrecipClimo.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/InitPrecipClimo.java @@ -184,8 +184,8 @@ public class InitPrecipClimo { precip_stations.set(index, nstation); nstation = null; } - ++index; } + ++index; } in.close(); diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadPrecipA.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadPrecipA.java index 5403010be7..e576ae8800 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadPrecipA.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadPrecipA.java @@ -84,6 +84,7 @@ public class ReadPrecipA { try { in = new BufferedReader(new FileReader(preca)); + System.out.println("Reading point file: " + preca); for (j = 0; j < 5; j++) { number_found[j] = 0; diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadSnowData.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadSnowData.java index f37a617a7f..de3ced14f1 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadSnowData.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/ReadSnowData.java @@ -38,7 +38,8 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Mar 5, 2009 snaples Initial creation - * + * Aug 20, 2014 17094 snaples Fixed issue when reading snow data file, did not parse properly. + * * * * @author snaples @@ -49,19 +50,19 @@ public class ReadSnowData { int j, k, ier, m, qual; - char cbuf[] = new char[100]; + String cbuf = ""; char p, q; - char buf[] = new char[100]; + String buf = ""; String hb5 = ""; char pc; - char datbuf[] = new char[50]; + String datbuf = ""; - char parmbuf[] = new char[50]; + String parmbuf = ""; int maxk, startk; @@ -73,6 +74,8 @@ public class ReadSnowData { try { + in = new BufferedReader(new FileReader(prece)); + for (k = 0; k < numPstations; k++) { for (int m = 0; m < 5; m++) { pdata[i].stn[k].srain[m].data = -99; @@ -80,16 +83,15 @@ public class ReadSnowData { pdata[i].stn[k].sflag[m] = -1; } } - in = new BufferedReader(new FileReader(prece)); + bad: while (in.ready()) { - int p = 1; - String sn = cbuf.toString(); - Scanner s = new Scanner(sn); - bad: while (p != -1) { + cbuf = in.readLine().trim(); + if (cbuf.length() < 1) { + break; + } + Scanner s = new Scanner(cbuf); - in.read(cbuf, 0, 100); - - if (cbuf[0] == ':') { + if (cbuf.charAt(0) == ':') { continue; } @@ -97,19 +99,20 @@ public class ReadSnowData { if (s.hasNext() == false) { continue; } + s.next(); hb5 = s.next(); - datbuf = s.next().toCharArray(); - parmbuf = s.next().toCharArray(); + datbuf = s.next(); + parmbuf = s.next(); int q = parmbuf.toString().indexOf('/'); char c = ' '; if (q >= 0) { - c = parmbuf[q]; + c = parmbuf.charAt(q); } if (c < 0) { continue; } - char pc = parmbuf[q + 5]; + char pc = parmbuf.charAt(q + 5); for (j = 0; j < numPstations; j++) { if ((precip_stations.get(j).hb5.equals(hb5) && (pc == precip_stations @@ -120,12 +123,12 @@ public class ReadSnowData { if (j == numPstations) { continue; } - int u = cbuf.toString().indexOf('/'); + int u = cbuf.indexOf('/'); if (u < 0) { continue; } - q = cbuf.toString().indexOf(' ', u); + q = cbuf.indexOf(' ', u); if (q < 0) { continue; } @@ -135,19 +138,19 @@ public class ReadSnowData { pdata[i].stn[j].srain[k].qual = 0; - if ((cbuf.toString().indexOf('/', q)) < 0 - && (cbuf.toString().indexOf('\n', q)) < 0) { + if ((cbuf.indexOf('/', q)) < 0 + && (cbuf.indexOf('\n', q)) < 0) { continue bad; } u = 0; - buf = cbuf.toString().substring(q).toCharArray(); + buf = cbuf.substring(q); - if ((buf.toString().indexOf('.')) < 0) { + if ((buf.indexOf('.')) < 0) { - if ((buf.toString().indexOf('m')) < 0 - && (buf.toString().indexOf('M')) < 0) { + if ((buf.indexOf('m')) < 0 + && (buf.indexOf('M')) < 0) { pdata[i].stn[j].srain[k].data = -1; pdata[i].stn[j].srain[k].qual = -1; @@ -166,9 +169,8 @@ public class ReadSnowData { } } - + s.close(); } - in.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/RadarHelper.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/RadarHelper.java index ce855b9a2d..3709a28510 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/RadarHelper.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/RadarHelper.java @@ -71,7 +71,9 @@ import com.raytheon.viz.awipstools.common.StormTrackData; * Feb 16, 2009 mnash Initial creation * 03/07/2012 DR 14660 D. Friedman Added time-based getSTIData* functions. * 03/01/2013 DR 15496 zwang Handle the expanded GSM - * Correct some status according to B14 ICD + * Correct some status according to B14 ICD + * 08/20/2014 DR17214 zwang Report more status for VCP supplemental Info + * according to RPG B16 ICD * * * @@ -178,7 +180,7 @@ public class RadarHelper { "RDA 1", "RDA 2" }; public static final String[] vcpInfoStr = { "AVSET", - "SAILS", "Site-Specific VCP" }; + " SAILS", " Site-Specific VCP", " RxRN", " CBT" }; /** * The default maximimum difference in time used when retrieving STI data (15 minutes.) diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsDisplay.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsDisplay.java index 9720be1fb6..8551ccac1c 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsDisplay.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsDisplay.java @@ -38,7 +38,6 @@ import org.opengis.referencing.crs.ProjectedCRS; import com.raytheon.uf.common.dataplugin.HDF5Util; import com.raytheon.uf.common.dataplugin.radar.RadarDataKey; import com.raytheon.uf.common.dataplugin.radar.RadarDataPoint; -import com.raytheon.uf.common.dataplugin.radar.RadarDataPoint.RadarProductType; import com.raytheon.uf.common.dataplugin.radar.RadarRecord; import com.raytheon.uf.common.dataplugin.radar.level3.GraphicBlock; import com.raytheon.uf.common.dataplugin.radar.level3.Layer; @@ -70,6 +69,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * Jan 13, 2009 chammack Initial creation * 03/04/2013 DCS51 zwang Handle GFM product + * Sep 03, 2014 3574 njensen Properly dispose objects * * * @@ -79,11 +79,11 @@ import com.vividsolutions.jts.geom.Coordinate; public class RadarGraphicsDisplay implements IRenderable { - private Map pageMap; + private final Map pageMap; - private ArrayList symbologyPages; + private final ArrayList symbologyPages; - private Map symbologyData; + private final Map symbologyData; private int currentPage; @@ -108,9 +108,9 @@ public class RadarGraphicsDisplay implements IRenderable { this.currentPage = 0; // Only retrieve if this record has not been retrieved. - if ((radarRecord.getSymbologyData() == null || radarRecord + if (((radarRecord.getSymbologyData() == null) || radarRecord .getSymbologyData().isEmpty()) - && radarRecord.getGraphicBlock() == null) { + && (radarRecord.getGraphicBlock() == null)) { File loc = HDF5Util.findHDF5Location(radarRecord); IDataStore dataStore = DataStoreFactory.getDataStore(loc); @@ -135,9 +135,10 @@ public class RadarGraphicsDisplay implements IRenderable { new GeneralGridEnvelope(new int[] { 0, 0 }, new int[] { 4096, 4096 }, false), generalEnvelope); IWireframeShape ws = target.createWireframeShape(true, mapDescriptor); - + // Used for GFM forecast positions - IWireframeShape gfmWs = target.createWireframeShape(true, mapDescriptor); + IWireframeShape gfmWs = target + .createWireframeShape(true, mapDescriptor); symbologyData = radarRecord.getSymbologyData(); if (symbologyData != null) { @@ -162,8 +163,8 @@ public class RadarGraphicsDisplay implements IRenderable { // logic in createSymbologyImages() rgp.addImages(currStorm, CoordinateSystem.LOCAL); - //Handle DMD table data - if (radarRecord.getProductCode() == 149) { + // Handle DMD table data + if (radarRecord.getProductCode() == 149) { // Handle the tabular display data in the Generic Packet String data = GraphicDataUtil.getDMDGraphicDataValue( tableModifier, radarRecord, @@ -175,7 +176,7 @@ public class RadarGraphicsDisplay implements IRenderable { addTableRow(tableData, featureData); processTableData = true; } - + } } @@ -211,7 +212,7 @@ public class RadarGraphicsDisplay implements IRenderable { } // handle GFM product else { - this.currentPage = pageNum; + this.currentPage = pageNum; RadarGraphicsPage gab = this.pageMap.get(pageNum); if (gab == null) { @@ -223,7 +224,7 @@ public class RadarGraphicsDisplay implements IRenderable { this.currentPage = 0; } - + // Graphic block is organized into pages for display. The data for each // page is contained in packets. GraphicBlock gb = radarRecord.getGraphicBlock(); @@ -249,7 +250,8 @@ public class RadarGraphicsDisplay implements IRenderable { } } - if ((symbologyData == null || symbologyData.isEmpty()) && gb == null) { + if (((symbologyData == null) || symbologyData.isEmpty()) + && (gb == null)) { String nullLegend = null; switch (radarRecord.getProductCode()) { case 139: @@ -295,7 +297,7 @@ public class RadarGraphicsDisplay implements IRenderable { String[] values = sortValues.trim().split("\\s+"); - if (values.length > 0 && values[0].length() > 1) { + if ((values.length > 0) && (values[0].length() > 1)) { try { strengthRank = Integer.parseInt(values[0].substring(1, values[0].length())); @@ -340,11 +342,15 @@ public class RadarGraphicsDisplay implements IRenderable { } public void setMagnification(double magnification) { - for (RadarGraphicsPage page : symbologyPages) { - page.setMagnification(magnification); + synchronized (symbologyPages) { + for (RadarGraphicsPage page : symbologyPages) { + page.setMagnification(magnification); + } } - for (RadarGraphicsPage page : pageMap.values()) { - page.setMagnification(magnification); + synchronized (pageMap) { + for (RadarGraphicsPage page : pageMap.values()) { + page.setMagnification(magnification); + } } } @@ -358,32 +364,49 @@ public class RadarGraphicsDisplay implements IRenderable { @Override public void paint(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - if (currentPage < 0 || currentPage >= this.pageMap.size()) { - return; - } - - RadarGraphicsPage page = pageMap.get(currentPage); - if (page == null) { - return; - } - page.paint(target, paintProps); - - for (RadarGraphicsPage currPage : symbologyPages) { - if (currPage == null) { + synchronized (pageMap) { + if ((currentPage < 0) || (currentPage >= this.pageMap.size())) { return; } - currPage.paint(target, paintProps); + RadarGraphicsPage page = pageMap.get(currentPage); + if (page == null) { + return; + } + + page.paint(target, paintProps); + } + + synchronized (symbologyPages) { + for (RadarGraphicsPage currPage : symbologyPages) { + if (currPage == null) { + return; + } + + currPage.paint(target, paintProps); + } } } public int getNumPages() { - return this.pageMap.size() > 0 ? this.pageMap.size() : 1; + synchronized (pageMap) { + return this.pageMap.size() > 0 ? this.pageMap.size() : 1; + } } public void dispose() { - for (RadarGraphicsPage page : pageMap.values()) { - page.dispose(); + synchronized (pageMap) { + for (RadarGraphicsPage page : pageMap.values()) { + page.dispose(); + } + pageMap.clear(); + } + + synchronized (symbologyPages) { + for (RadarGraphicsPage page : symbologyPages) { + page.dispose(); + } + symbologyPages.clear(); } } diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsPage.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsPage.java index 364bf592ec..d6e0e0f361 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsPage.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/graphic/RadarGraphicsPage.java @@ -120,6 +120,7 @@ import com.vividsolutions.jts.geom.LineString; * 03/05/2013 DCS51 zwang Handle GFM product * 06/24/2013 DR16162 zwang Remove "wind behind" * 11/20/2013 2488 randerso Removed use of VeraMono font file + * Sep 03, 2014 3574 njensen Properly dispose objects * * * @@ -1456,6 +1457,21 @@ public class RadarGraphicsPage implements IRenderable { this.wireframeShape = null; } + if (this.gfmFcstWireframeShape != null) { + this.gfmFcstWireframeShape.dispose(); + this.gfmFcstWireframeShape = null; + } + + if (plotObjects != null) { + for (PlotObject po : plotObjects) { + if (po != null) { + po.image.dispose(); + po.image = null; + } + } + plotObjects.clear(); + } + if (this.font != null) { this.font.dispose(); } diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/ui/xy/RadarGSMResource.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/ui/xy/RadarGSMResource.java index f36e4ca821..11208779f9 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/ui/xy/RadarGSMResource.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/ui/xy/RadarGSMResource.java @@ -54,7 +54,8 @@ import com.raytheon.viz.radar.rsc.RadarResourceData; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 13, 2010 mnash Initial creation - * 03/01/2013 DR 15496 zwang Handled expanded GSM, display more status + * 03/01/2013 DR 15496 zwang Handled expanded GSM, display more status + * 07/16/2014 DR 17214 zwang Handled B15 GSM change about super res flag * * * @@ -282,49 +283,75 @@ public class RadarGSMResource extends AbstractRadarResource { } // Plot elevations - double[] elevations = message.getElevation().clone(); + double[] elev = message.getElevation().clone(); char[] charArray = Integer.toBinaryString( message.getSuperResolutionCuts()).toCharArray(); - elevations = Arrays.copyOf(elevations, message.getNumCuts()); - Arrays.sort(elevations); + // Find the index of the SAILS elevation + int sailsIndex = -1; + for (int i = 1; i < elev.length; i++) { + if (elev[i] == elev[0]) { + sailsIndex = i; + break; + } + } + + //Ignore the super res flag for SAILS + if (sailsIndex != -1 && sailsIndex < charArray.length) { + charArray[charArray.length - sailsIndex - 1] = '0'; + } + + // Remove elevation 0 and duplicate elevations + Arrays.sort(elev); + int j = 0; + int k = 1; + while (k < elev.length){ + if (elev[j] == 0) { + elev[j] = elev[k]; + k++; + } + else if (elev[k] == elev[j]) { + k++; + } + else { + j++; + elev[j] = elev[k]; + k++; + } + } + + double[] elevations = Arrays.copyOf(elev, j+1); + for (int left = 0, right = elevations.length - 1; left < right; left++, right--) { double tmp = elevations[left]; elevations[left] = elevations[right]; elevations[right] = tmp; } - int count = 0; - for (int i = 0; i < elevations.length; i++) { - if (elevations[i] == 0) { - count++; - } - } - + // Handle the super res flag boolean[] superResElev = new boolean[elevations.length]; + // Initiate all flags to non super res + for (int i = 0; i < elevations.length; i++) { + superResElev[i] = false; + } + + // Ignore the flag for SAILS for (int i = 0; i < charArray.length; i++) { - if (charArray[i] == '1') { - superResElev[i] = true; - } else { - superResElev[i] = false; - } + if (charArray[charArray.length - i - 1] == '1') { + superResElev[elevations.length - i - 1] = true; + } } List theTemp = new ArrayList(); for (int i = 0; i < elevations.length; i++) { - if (elevations[i] != 0) { - String s = ""; - if (superResElev[elevations.length - i - count - 1] == true) { - s = "S"; - } else { - s = ""; - } - theTemp.add(Double.toString(elevations[i] / 10) + " " - + s); + + String s = ""; + if (superResElev[i] == true) { + s = "S"; } else { - theTemp.add(Double.toString(elevations[i] / 10)); - break; + s = ""; } + theTemp.add(Double.toString(elevations[i] / 10) + " " + s); } int height = 780; diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java index c1333b969f..a0cf68cd3f 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java @@ -4398,7 +4398,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, .getProductCategory(token) + tdm.getProductDesignator(token); // Set the header text field. - if (bbbid.equals("NOR") || tdm.getAfosPil(token) != null) { + if (bbbid.equals("NOR") || (bbbid.isEmpty() && tdm.getAfosPil(token) != null)) { String wmoId = tdm.getWmoId(token); wmoId = (wmoId.length() > 0 ? wmoId : "-"); String siteId = tdm.getSiteId(token); diff --git a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java index c52c9f472b..009ebe69eb 100644 --- a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java +++ b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/AbstractCAVEComponent.java @@ -58,7 +58,6 @@ import com.raytheon.uf.viz.core.localization.LocalizationConstants; import com.raytheon.uf.viz.core.localization.LocalizationInitializer; import com.raytheon.uf.viz.core.localization.LocalizationManager; import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob; -import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager; import com.raytheon.uf.viz.core.status.VizStatusHandlerFactory; import com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor; import com.raytheon.viz.alerts.jobs.AutoUpdater; @@ -99,6 +98,8 @@ import com.raytheon.viz.core.units.UnitRegistrar; * startup * Dec 10, 2013 2602 bsteffen Start loading ProcedureXmlManager in * startComponent. + * Aug 22, 2014 3500 bclement moved ProcedureXMLManager initialization to postStartupActions() + * Aug 29, 2014 3500 bclement moved ProcedureXMLManager initialization to CAVE subclass * * * @@ -259,7 +260,7 @@ public abstract class AbstractCAVEComponent implements IStandaloneComponent { startInternal(componentName); } - ProcedureXmlManager.inititializeAsync(); + postStartupActions(); if (workbenchAdvisor != null) { returnCode = PlatformUI.createAndRunWorkbench(display, @@ -303,6 +304,13 @@ public abstract class AbstractCAVEComponent implements IStandaloneComponent { return IApplication.EXIT_OK; } + /** + * perform any additional initialization after the component has been + * started + */ + protected void postStartupActions() { + } + /** * Get the workbench advisor for the application * diff --git a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/CAVE.java b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/CAVE.java index 486dfa997d..29a424927c 100644 --- a/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/CAVE.java +++ b/cave/com.raytheon.viz.ui.personalities.awips/src/com/raytheon/viz/ui/personalities/awips/CAVE.java @@ -19,6 +19,8 @@ **/ package com.raytheon.viz.ui.personalities.awips; +import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager; + /** * This is the default component for CAVE that is the standard workbench with * all the perspectives. @@ -31,6 +33,7 @@ package com.raytheon.viz.ui.personalities.awips; * Aug 09, 2010 mschenke Initial creation * Jul 01, 2013 2139 jsanchez Loaded map tree at cave start up. * Oct 22, 2013 2361 njensen Undid 2139 fix since 2158 fixes it more efficiently + * Aug 29, 2014 3500 bclement added postStartupActions() * * * @@ -56,4 +59,9 @@ public class CAVE extends AbstractCAVEComponent { } + @Override + protected void postStartupActions() { + ProcedureXmlManager.inititializeAsync(); + } + } diff --git a/cave/com.raytheon.viz.volumebrowser/localization/bundles/volume/HRRR.xml b/cave/com.raytheon.viz.volumebrowser/localization/bundles/volume/HRRR.xml new file mode 100644 index 0000000000..ef77757169 --- /dev/null +++ b/cave/com.raytheon.viz.volumebrowser/localization/bundles/volume/HRRR.xml @@ -0,0 +1,260 @@ + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseFamilies.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseFamilies.xml index 7a33e15b3c..c494620049 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseFamilies.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseFamilies.xml @@ -69,6 +69,12 @@ + + + + + diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseSurfaceFamilies.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseSurfaceFamilies.xml index 9a819801e3..2e68e932cc 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseSurfaceFamilies.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/baseSurfaceFamilies.xml @@ -44,6 +44,12 @@ + + + + + diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml index 5e5b239138..fe1125244c 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml @@ -112,6 +112,8 @@ indentText="false" /> + + + + + + @@ -1380,6 +1392,14 @@ key="VILIQ" indentText="true" /> + + + + + + + MaxWHRRR + + + kts + + 10 + + + + + + HRRR + CPOFP + + + % + + 0 10 20 30 40 50 60 70 80 90 100 + + + + + + + MaxWHRRR + + + kts + Grid/gridded data + + + + + HRRR + CPOFP + + + false + % + + -50 + 100 + + Grid/gridded data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml index 2c0833dbc7..3fcf06b9d1 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml @@ -54,6 +54,7 @@ + @@ -398,4 +399,4 @@ - \ No newline at end of file + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/WarngenConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/WarngenConfiguration.java index b6c6aff962..8259893bc7 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/WarngenConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/WarngenConfiguration.java @@ -61,6 +61,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * Apr 24, 2013 1943 jsanchez Marked areaConfig as Deprecated. * Oct 22, 2013 2361 njensen Removed ISerializableObject * Apr 28, 2014 3033 jsanchez Properly handled back up configuration (*.xml) files. + * Aug 28, 2014 ASM #15658 D. Friedman Add marine zone watch wording option. * * * @author chammack @@ -103,6 +104,9 @@ public class WarngenConfiguration { @XmlElement(name = "includedWatch") private String[] includedWatches; + @XmlElement + private boolean includeMarineAreasInWatches; + @XmlElementWrapper(name = "durations") @XmlElement(name = "duration") private int[] durations; @@ -392,6 +396,14 @@ public class WarngenConfiguration { return includedWatches; } + public boolean isIncludeMarineAreasInWatches() { + return includeMarineAreasInWatches; + } + + public void setIncludeMarineAreasInWatches(boolean includeMarineAreasInWatches) { + this.includeMarineAreasInWatches = includeMarineAreasInWatches; + } + public boolean getEnableRestart() { return enableRestart; } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm index 370ca5642e..baed0cfbbd 100755 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/VM_global_library.vm @@ -11,7 +11,9 @@ ##### Evan Bookbinder 05-05-2013 handleClosesPoints and 3rd bullet changes (OVER & now) ##### Evan Bookbinder 09-20-2013 Fixed rural area otherPoints in pathcast section, added rural phrase ##### Qinglu Lin 03-17-2014 DR 16309. Updated inserttorwatches and insertsvrwatches. -##### Qinglu Lin 05-21-2014 DR 16309. Updated inserttorwatches and insertsvrwatches by changing 'FOR##' to 'FOR ##'. +##### Qinglu Lin 05-21-2014 DR 16309. Updated inserttorwatches and insertsvrwatches by changing 'FOR##' to 'FOR ##'. +##### D. Friedman 08-28-2014 ASM #15658. Add marine watch wording. +##### Qinglu Lin 08-29-2014 ASM #15551. Overhauled inserttorwatches and insertsvrwatches. #################################################################################################### #* Mile Marker Test Code @@ -189,94 +191,111 @@ ${drainage.name}## ########END MACRO #macro(inserttorwatches $watches $list $secondtimezone $dateUtil $timeFormat) -#set($keys = []) -#set($mymap = {}) +#set($tornadoWatches = []) +#set($ALSO = "") + #foreach(${watch} in ${watches}) #if(${watch.getPhenSig()} == 'TO.A') -#set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime}) -#if (${list.contains(${keys}, $key)}) -#set($value = ${mymap.get($key)}) +#set($success = $tornadoWatches.add($watch)) +#end +#end + +#set($lastEtn = "") +#set($lastEndTime = "") +#foreach(${watch} in ${tornadoWatches}) +#if($lastEtn != "" && ${watch.etn} != ${lastEtn}) +. ## +#end +#set($endTime = ${watch.endTime}) +#if(${watch.etn} == ${lastEtn}) +#if(${endTime} == ${lastEndTime}) +...## #else -#set($value = []) -#set($success = $keys.add($key)) +...UNTIL ${dateUtil.format(${endTime}, ${timeFormat.plain}, 15, ${localtimezone})} FOR ## #end -#set($success = $value.add($watch)) -#set($success = ${mymap.put($key,$value)}) +#else +A TORNADO WATCH${ALSO} REMAINS IN EFFECT UNTIL ${dateUtil.format(${endTime}, ${timeFormat.plain}, 15, ${localtimezone})} FOR ## +#set($ALSO = " ALSO") #end -#end -#set($torWatchAlso = "") -#foreach(${key} in ${keys}) -#set($tornadoWatches = ${mymap.get($key)}) -#set($tornadoWatch = ${tornadoWatches.get(0)}) -A TORNADO WATCH ${torWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${tornadoWatch.endTime}, ${timeFormat.plain}, 15, ${localtimezone})}## -${dateUtil.period(${tornadoWatch.endTime},${timeFormat.plain}, 15, ${localtimezone})}## #if(${secondtimezone}) /${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/## #end - FOR ## -#set($numPortions = ${list.size(${tornadoWatches})}) -#set($count = 0) -#foreach(${watch} in ${tornadoWatches}) -#set($count = $count + 1) +#if(!${watch.marineAreas}) #areaFormat(${watch.partOfState} true false true)${watch.state}## -#if($count == $numPortions - 1) - AND ## -#elseif($count < $numPortions) -...## +#else +#formatMarineAreas(${watch.marineAreas}) #end +#set($lastEtn = ${watch.etn}) +#set($lastEndTime = ${watch.endTime}) #end -#set($torWatchAlso = "ALSO ") -. ## +#if(${lastEtn} != "") +. #end - - #end ########END MACRO #macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat) -#set($keys = []) -#set($mymap = {}) +#set($svrWatches = []) +#set($ALSO = "") + #foreach(${watch} in ${watches}) #if(${watch.getPhenSig()} == 'SV.A') -#set($key = ${watch.action} + ${watch.etn} + ${watch.startTime} + ${watch.endTime}) -#if (${list.contains(${keys}, $key)}) -#set($value = ${mymap.get($key)}) +#set($success = $svrWatches.add($watch)) +#end +#end + +#set($lastEtn = "") +#set($lastEndTime = "") +#foreach(${watch} in ${svrWatches}) +#if($lastEtn != "" && ${watch.etn} != ${lastEtn}) +. ## +#end +#set($endTime = ${watch.endTime}) +#if(${watch.etn} == ${lastEtn}) +#if(${endTime} == ${lastEndTime}) +...## #else -#set($value = []) -#set($success = $keys.add($key)) +...UNTIL ${dateUtil.format(${endTime}, ${timeFormat.plain}, 15, ${localtimezone})} FOR ## #end -#set($success = $value.add($watch)) -#set($success = ${mymap.put($key,$value)}) +#else +A SEVERE THUNDERSTORM WATCH${ALSO} REMAINS IN EFFECT UNTIL ${dateUtil.format(${endTime}, ${timeFormat.plain}, 15, ${localtimezone})} FOR ## +#set($ALSO = " ALSO") #end -#end -#set($svrWatchAlso = "") -#foreach(${key} in ${keys}) -#set($severeWatches = ${mymap.get($key)}) -#set($svrWatch = ${severeWatches.get(0)}) -A SEVERE THUNDERSTORM WATCH ${svrWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${svrWatch.endTime}, ${timeFormat.plain}, 15, ${localtimezone})}## -${dateUtil.period(${svrWatch.endTime},${timeFormat.plain}, 15, ${localtimezone})}## #if(${secondtimezone}) /${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/## #end - FOR ## -#set($numPortions = ${list.size(${severeWatches})}) -#set($count = 0) -#foreach(${watch} in ${severeWatches}) -#set($count = $count + 1) +#if(!${watch.marineAreas}) #areaFormat(${watch.partOfState} true false true)${watch.state}## -#if($count == $numPortions - 1) +#else +#formatMarineAreas(${watch.marineAreas}) +#end +#set($lastEtn = ${watch.etn}) +#set($lastEndTime = ${watch.endTime}) +#end +#if(${lastEtn} != "") +. +#end +#end +########END MACRO + +#macro(formatMarineAreas $marineAreas) +#set($macount = 0) +#set($numMarineAreas = ${list.size(${marineAreas})}) +#foreach(${marineArea} in ${marineAreas}) +#set($macount = $macount + 1) +#if(${marineArea}=="THE ADJACENT COASTAL WATERS" && $macount > 1) +OTHER ADJACENT COASTAL WATERS## +#else +${marineArea}## +#end +#if($macount == $numMarineAreas - 1) AND ## -#elseif($count < $numPortions) +#elseif($macount < $numMarineAreas) ...## #end #end -#set($svrWatchAlso = "ALSO ") -. ## #end - - -#end -########END +########END MACRO #macro(printcoords $coordinates $list) #set($count = 0) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineWeatherStatement.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineWeatherStatement.xml index eea038e07c..ef2baf8d7d 100755 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineWeatherStatement.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineWeatherStatement.xml @@ -58,6 +58,9 @@ turned on unless the corresponding .vm file is turned on in a given template's . SV.A + + true + 60 diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineZoneWording.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineZoneWording.xml new file mode 100644 index 0000000000..a61fd52788 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/marineZoneWording.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarning.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarning.xml index a34a8dfd89..fd651f94e2 100755 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarning.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarning.xml @@ -61,6 +61,9 @@ turned on unless the corresponding .vm file is turned on in a given template's . SV.A + + true + 30 diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarningFollowup.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarningFollowup.xml index cffaf9a764..dc4c01d0cd 100755 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarningFollowup.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/specialMarineWarningFollowup.xml @@ -63,6 +63,9 @@ turned on unless the corresponding .vm file is turned on in a given template's . SV.A + + true + 30 diff --git a/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/TP.xml b/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/TP.xml index 40a84f773b..d1931e999e 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/TP.xml +++ b/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/TP.xml @@ -35,7 +35,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.archive/utility/common_static/base/archiver/purger/RAW_DATA.xml b/edexOsgi/com.raytheon.uf.edex.archive/utility/common_static/base/archiver/purger/RAW_DATA.xml index c4d5c145f8..c5a7c71224 100644 --- a/edexOsgi/com.raytheon.uf.edex.archive/utility/common_static/base/archiver/purger/RAW_DATA.xml +++ b/edexOsgi/com.raytheon.uf.edex.archive/utility/common_static/base/archiver/purger/RAW_DATA.xml @@ -28,6 +28,7 @@ * Oct 01, 2013 2147 rferrel Date time stamp no longer requires an hour field. * Dec 12, 2013 2624 rferrel Document Julian time stamp. * May 14, 2014 2881 rferrel Change retention times and data set modifications. + * Aug 25, 2014 3537 rferrel Fixed dirPattern in Category Local. * * @author rferrel * @version 1.0 @@ -142,7 +143,7 @@ Local 168 - (manual)/grib/(\d{4})(\d{2})(\d{2})/\d{2}/ + (manual)/grib/(\d{4})(\d{2})(\d{2})/(\d{2}) .*(LAPS|MSAS).* Date {1}-LAPS/MSAS diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/dao/ReplicationEventDao.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/dao/ReplicationEventDao.java index 05e5bfab7e..2d8d1f3b26 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/dao/ReplicationEventDao.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/dao/ReplicationEventDao.java @@ -37,6 +37,7 @@ import com.raytheon.uf.edex.datadelivery.registry.federation.ReplicationEvent; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 2/19/2014 2769 bphillip Initial Creation + * 8/27/2014 3560 bphillip Added query by event time method * * * @author bphillip @@ -45,7 +46,12 @@ import com.raytheon.uf.edex.datadelivery.registry.federation.ReplicationEvent; public class ReplicationEventDao extends SessionManagedDao { - private static final String GET_REPLICATION_EVENT_QUERY = "from ReplicationEvent event where (event.source is null or event.source != '%s') and (event.replicatedTo is null or event.replicatedTo not like '%%%s%%') order by event.eventTime asc"; + private static final String GET_REPLICATION_EVENT_QUERY = "from ReplicationEvent event " + + "where (event.source is null or event.source != :source) " + + "and (event.replicatedTo is null or event.replicatedTo not like :registry) " + + "order by event.eventTime asc"; + + private static final String GET_EVENTS_BY_TIME = "from ReplicationEvent event where event.eventTime < :eventTime"; @Override protected Class getEntityClass() { @@ -54,7 +60,11 @@ public class ReplicationEventDao extends @Transactional(propagation = Propagation.MANDATORY, readOnly = true) public List getReplicationEvents(String remoteRegistry, int batchSize) { - return this.executeHQLQuery(String.format(GET_REPLICATION_EVENT_QUERY, - remoteRegistry, remoteRegistry),batchSize); + return this.executeHQLQuery(GET_REPLICATION_EVENT_QUERY,batchSize, + "source", remoteRegistry, "registry", "%"+remoteRegistry+"%"); + } + + public List getEventsBeforeTime(String time){ + return this.executeHQLQuery(GET_EVENTS_BY_TIME, "eventTime", time); } } diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/federation/RegistryFederationManager.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/federation/RegistryFederationManager.java index 7a4021af70..dab22f60c3 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/federation/RegistryFederationManager.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.registry/src/com/raytheon/uf/edex/datadelivery/registry/federation/RegistryFederationManager.java @@ -93,6 +93,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.util.TimeUtil; +import com.raytheon.uf.common.util.ClusterIdUtil; import com.raytheon.uf.common.util.CollectionUtil; import com.raytheon.uf.common.util.StringUtil; import com.raytheon.uf.edex.core.EDEXUtil; @@ -157,6 +158,7 @@ import com.raytheon.uf.edex.registry.events.CreateAuditTrailEvent; * Mar 31, 2014 2889 dhladky Added username for notification center tracking. * 4/11/2014 3011 bphillip Removed automatic registry sync check on startup * 4/15/2014 3012 dhladky Merge fixes. + * 8/27/2014 3560 bphillip Added updateRegistryEvents method * * * @author bphillip @@ -536,6 +538,16 @@ public class RegistryFederationManager implements IRegistryFederationManager, } } + + @Transactional + @GET + @Path("updateRegistryEvents/{registryId}/{time}") + public void updateRegistryEvents(@PathParam("registryId") String registryId, @PathParam("time") String time) { + for(ReplicationEvent event: replicationEventDao.getEventsBeforeTime(time)){ + event.addReplicatedTo(registryId); + replicationEventDao.update(event); + } + } /** * Synchronizes this registry's data with the registry at the specified URL @@ -582,6 +594,9 @@ public class RegistryFederationManager implements IRegistryFederationManager, } federatedRegistryMonitor.updateTime(); StringBuilder syncMsg = new StringBuilder(); + + // Update the registry events table on the remote registry so duplicate data is not sent again + dataDeliveryRestClient.getRegistryFederationManager(remoteRegistryUrl).updateRegistryEvents(ClusterIdUtil.getId(), String.valueOf(start)); syncMsg.append("Registry synchronization using [") .append(remoteRegistryUrl) @@ -1258,5 +1273,4 @@ public class RegistryFederationManager implements IRegistryFederationManager, public NotificationServers getServers() { return servers; } - } diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/WfsConnectionUtil.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/WfsConnectionUtil.java index 88e242cb85..e7af257b4f 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/WfsConnectionUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/WfsConnectionUtil.java @@ -36,6 +36,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * Aug 06, 2013 2097 dhladky WFS 2.0 compliance upgrade and switched to POST * Nov 20, 2013 2554 dhladky Added GZIP capability to WFS requests. * Jan 13, 2014 2697 dhladky Added util to strip unique Id field from URL. + * Aub 20, 2014 3564 dhladky Allow for un-authenicated HTTPS * * * @@ -80,6 +81,7 @@ public class WfsConnectionUtil { ProviderCredentials creds = ProviderCredentialsUtil .retrieveCredentials(providerName); Connection localConnection = creds.getConnection(); + http.setHttpsConfiguration(new WfsHttpsConfiguration(uri)); if (localConnection != null && localConnection.getProviderKey() != null) { @@ -91,7 +93,6 @@ public class WfsConnectionUtil { String password = localConnection.getUnencryptedPassword(); http.setHandler(new WfsCredentialsHandler(userName, password)); - http.setHttpsConfiguration(new WfsHttpsConfiguration(uri)); http.setCredentials(uri.getHost(), uri.getPort(), providerName, userName, password); }