diff --git a/cave/build/static/common/cave/etc/gfe/userPython/utilities/CombinationsInterface.py b/cave/build/static/common/cave/etc/gfe/userPython/utilities/CombinationsInterface.py index fcc8c8ab4f..f7cebeb983 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/utilities/CombinationsInterface.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/utilities/CombinationsInterface.py @@ -28,24 +28,39 @@ # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 07/25/08 njensen Initial Creation. -# +# 09/05/13 #2329 randerso Added error handling # # -import sys +import sys, traceback, os, time, LogStream from java.util import ArrayList def getCombinations(comboName): - outercombos = ArrayList() - cmd = "md = __import__(\"" + comboName + "\")" - exec cmd - comList = md.Combinations - for i in comList: - combos = ArrayList() - innerList = i[0] - for zone in innerList: - combos.add(zone) - outercombos.add(combos) - return outercombos + try: + outercombos = ArrayList() + md = __import__(comboName) + comList = md.Combinations + for i in comList: + combos = ArrayList() + innerList = i[0] + for zone in innerList: + combos.add(zone) + outercombos.add(combos) + return outercombos + + except AttributeError as e: + filename = md.__file__ + if filename.endswith("pyc") or filename.endswith("pyo"): + filename = filename[:-1] + with open(filename,'r') as fd: + filecontents = fd.read() + + LogStream.logProblem("\nERROR loading combinations file: "+ comboName + + "\nmd.__file__: " + md.__file__ + + "\ndir(md): " + str(dir(md)) + + "\n" + md.__file__ + " last modified: " + time.strftime("%Y-%m-%d %H:%M:%S",time.gmtime(os.path.getmtime(md.__file__))) + + "\n" + filename + " last modified: " + time.strftime("%Y-%m-%d %H:%M:%S",time.gmtime(os.path.getmtime(filename))) + + "\nContents of " + filename + "\n" + filecontents) + raise e diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FFG_TIR_HIRES/FFG_TIR_HIRES.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FFG_TIR_HIRES/FFG_TIR_HIRES.xml index e054b089db..c2fcbc01d6 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FFG_TIR_HIRES/FFG_TIR_HIRES.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FFG_TIR_HIRES/FFG_TIR_HIRES.xml @@ -13,7 +13,7 @@ BasicWX_US pluginName=grid -GDFILE=FFG-TIR-HiRes +GDFILE=FFG-TIR true diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractAWTFont.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractAWTFont.java index 667e9374f4..699e3335f6 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractAWTFont.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractAWTFont.java @@ -34,6 +34,8 @@ import java.util.List; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 24, 2013 2189 mschenke Initial creation + * Sep 13, 2013 16581 kshrestha Variables scaleFont and smoothing + * initialized to true. * * * @@ -45,9 +47,9 @@ public abstract class AbstractAWTFont implements IFont { protected Font font; - protected boolean scaleFont; + protected boolean scaleFont = true; - protected boolean smoothing; + protected boolean smoothing = true; protected AbstractAWTFont(String fontName, float fontSize, Style[] styles) { this(new Font(fontName, toAwtStyle(styles), (int) fontSize)); diff --git a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/AbstractGriddedDisplay.java b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/AbstractGriddedDisplay.java index e1a0fe52f9..db50729cbe 100644 --- a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/AbstractGriddedDisplay.java +++ b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/AbstractGriddedDisplay.java @@ -68,6 +68,8 @@ import com.vividsolutions.jts.geom.Coordinate; * Aug 27, 2013 #2287 randerso Replaced hard coded constant with densityFactor * parameter to allow application specific density * scaling to better match A1 displays + * Sep 10, 2013 DR 16257 MPorricelli Fix so that wind for global grids displays on + * mercator maps. * * * @@ -215,14 +217,31 @@ public abstract class AbstractGriddedDisplay implements IRenderable { // space // Linear distance(between (0,0) and (0,1) makes more sense but // looks to sparse. - DirectPosition2D p1 = new DirectPosition2D(0, 0); - DirectPosition2D p2 = new DirectPosition2D(1, 1); - try { - grid2grid.transform(p1, p1); - grid2grid.transform(p2, p2); - } catch (TransformException e) { - throw new VizException(e); - } + DirectPosition2D p1 = new DirectPosition2D(); + DirectPosition2D p2 = new DirectPosition2D(); + + boolean doneTryingCoords = false; + int i = -1; + // starting with coords (0,0), (1,1), try until tranform succeeds, + // or until have gone through a set of diagonal coords + do { + try { + i++; + if (i + 1 < gridDims[0] && i + 1 < gridDims[1]) { + p1.x = p1.y = i; + p2.x = p2.y = i + 1; + grid2grid.transform(p1, p1); + grid2grid.transform(p2, p2); + doneTryingCoords = true; + } + } catch (TransformException e) { + if (i + 1 >= gridDims[0] || i + 1 >= gridDims[1]) { + doneTryingCoords = true; + throw new VizException(e); + } + } + } while (!doneTryingCoords); + pixelSize = p1.distance(p2); IExtent viewPixelExtent = paintProps.getView().getExtent(); diff --git a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/GriddedVectorDisplay.java b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/GriddedVectorDisplay.java index e906f0d79f..321186e971 100644 --- a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/GriddedVectorDisplay.java +++ b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/GriddedVectorDisplay.java @@ -61,6 +61,10 @@ import com.vividsolutions.jts.geom.Coordinate; * adjustment of density. * Added gridRelative flag to indicate whether direction * data is relative to grid or true north + * Sep 9, 2013 DR16257 MPorricelli When setDestinationGeographicPoint fails (which can + * happen for global lat/lon grid winds displayed on + * Equidistant Cylindrical map) try again with different + * pixel location. * * * @@ -157,7 +161,7 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay { if (Float.isNaN(spd) || Float.isNaN(dir)) { return; } - + int tryDiffPixLoc = 0; try { ReferencedCoordinate rCoord = new ReferencedCoordinate( gridGeometryOfGrid, ijcoord); @@ -169,12 +173,24 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay { if (stationPixelLocation != null) { stationPixelLocation[1]--; - double[] newWorldLocation = this.descriptor - .pixelToWorld(stationPixelLocation); - this.gc.setStartingGeographicPoint(stationLocation[0], - stationLocation[1]); - this.gc.setDestinationGeographicPoint(newWorldLocation[0], - newWorldLocation[1]); + do { + try { + double[] newWorldLocation = this.descriptor + .pixelToWorld(stationPixelLocation); + this.gc.setStartingGeographicPoint(stationLocation[0], + stationLocation[1]); + this.gc.setDestinationGeographicPoint( + newWorldLocation[0], newWorldLocation[1]); + tryDiffPixLoc = 2; // setting of pts succeeded; do not need to try again + + } catch (Exception e2) { + if (tryDiffPixLoc == 0) { // setting of points failed first time through + stationPixelLocation[1] += 2; // try pixel location in opposite dir of 1st try + tryDiffPixLoc++; + } else + throw new VizException(e2); // failed on second try; give up + } + } while (tryDiffPixLoc < 2); } if (gridRelative) { @@ -185,6 +201,7 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay { // rotate dir from true north to display up dir -= this.gc.getAzimuth(); + } catch (Exception e) { throw new VizException(e); } diff --git a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/PlotLocationCache.java b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/PlotLocationCache.java index b38f451b56..7495ed6b1e 100644 --- a/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/PlotLocationCache.java +++ b/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/PlotLocationCache.java @@ -44,6 +44,10 @@ import org.opengis.referencing.operation.TransformException; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 13, 2011 bsteffen Initial creation + * Sep 10, 2013 DR 16257 MPorricelli Eliminate values that + * fail to be tranformed,e.g. + * when too close to pole for + * mercator projections * * * @@ -146,7 +150,19 @@ public class PlotLocationCache { ConcatenatedTransform.create(grid2crs, crs2crs), crs2grid); - grid2grid.transform(result, 0, result, 0, xDim * yDim); + try { + grid2grid.transform(result, 0, result, 0, xDim * yDim); + } catch (TransformException e1) { + // Set values to NaN when fail transform + for (int i = 0; i < result.length; i += 2) { + try { + grid2grid.transform(result, i, result, i, 1); + } catch (TransformException e2) { + result[i] = Float.NaN; + result[i + 1] = Float.NaN; + } + } + } } catch (FactoryException e) { throw new RuntimeException(e); } catch (InvalidGridGeometryException e) { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java index e3cb55f14f..c7c33d3408 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductAreaComp.java @@ -61,6 +61,8 @@ import com.raytheon.viz.gfe.textformatter.TextProductManager; * 26 SEP 2012 15423 ryu Fix product correction in practice mode * 15 MAY 2013 1842 dgilling Change constructor signature to accept a * DataManager instance. + * 05 SEP 2013 2329 randerso Added call to ZoneCombinerComp.applyZoneCombo when + * when run formatter button is clicked. * * * @@ -386,12 +388,12 @@ public class ProductAreaComp extends Composite implements // use // it, else use the default String dbId = null; - // zoneCombinerComp.compactList(); + zoneCombiner.applyZoneCombo(); dbId = ((FormatterLauncherDialog) productTabCB) .getSelectedDataSource(productName); FormatterUtil.runFormatterScript(textProductMgr, - productName, zoneCombiner.getZoneGroupings(), - dbId, vtecMode, ProductAreaComp.this); + productName, dbId, vtecMode, + ProductAreaComp.this); } } }); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ZoneCombinerComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ZoneCombinerComp.java index fee0b61322..9adb3635b9 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ZoneCombinerComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ZoneCombinerComp.java @@ -22,16 +22,12 @@ package com.raytheon.viz.gfe.dialogs.formatterlauncher; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; -import java.io.FilenameFilter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.TreeSet; import java.util.regex.Matcher; import org.eclipse.jface.preference.IPreferenceStore; @@ -61,6 +57,7 @@ import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; +import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException; import com.raytheon.uf.common.localization.FileUpdatedMessage; import com.raytheon.uf.common.localization.FileUpdatedMessage.FileChangeType; import com.raytheon.uf.common.localization.ILocalizationFileObserver; @@ -70,21 +67,17 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException; 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.util.FileUtil; -import com.raytheon.uf.common.util.file.FilenameFilters; import com.raytheon.uf.viz.core.RGBColors; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.core.DataManagerUIFactory; -import com.raytheon.viz.gfe.textformatter.CombinationsFileGenerator; import com.raytheon.viz.gfe.textformatter.CombinationsFileUtil; import com.raytheon.viz.gfe.textformatter.TextProductManager; -import com.raytheon.viz.gfe.ui.AccessMgr; import com.raytheon.viz.gfe.ui.zoneselector.ZoneSelector; /** @@ -100,8 +93,9 @@ import com.raytheon.viz.gfe.ui.zoneselector.ZoneSelector; * Changes for non-blocking SaveDeleteComboDlg. * Changes for non-blocking ShuffleZoneGroupsDialog. * Changes for non-blocking ZoneColorEditorDlg. - * * Mar 14, 2013 1794 djohnson Consolidate common FilenameFilter implementations. + * Sep 05, 2013 2329 randerso Removed obsolete methods, added ApplyZoneCombo method + * * * * @author lvenable @@ -307,6 +301,8 @@ public class ZoneCombinerComp extends Composite implements createMapArea(theSaved); createBottomControls(); + + applyButtonState(false); } /** @@ -455,6 +451,7 @@ public class ZoneCombinerComp extends Composite implements @Override public void widgetSelected(SelectionEvent e) { zoneSelector.updateCombos(new HashMap()); + applyButtonState(false); } }); clearMI.setText("Clear"); @@ -731,14 +728,7 @@ public class ZoneCombinerComp extends Composite implements applyZoneComboBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - try { - CombinationsFileGenerator.generateAutoCombinationsFile( - zoneSelector.getZoneGroupings(), - getCombinationsFileName() + ".py"); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, "Unable to save " - + getCombinationsFileName(), e); - } + applyZoneCombo(); } }); Label label = new Label(controlComp, SWT.CENTER); @@ -754,6 +744,25 @@ public class ZoneCombinerComp extends Composite implements label.setAlignment(SWT.CENTER); } + /** + * Save zone combo + */ + public void applyZoneCombo() { + if (!buttonState()) { + return; + } + + try { + CombinationsFileUtil.generateAutoCombinationsFile( + zoneSelector.getZoneGroupings(), getCombinationsFileName() + + ".py"); + applyButtonState(false); + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, "Unable to save " + + getCombinationsFileName(), e); + } + } + /** * Display the Color Editor dialog. */ @@ -845,93 +854,6 @@ public class ZoneCombinerComp extends Composite implements return file; } - /** - * Get the names of the combo files at the given level. If level is null, - * get the names of the combo files at all levels. Otherwise, only get the - * names of the files at the given level. - * - * @param level - * @return the save combo files at the given level - */ - public String[] getSavedCombos(LocalizationLevel level) { - String comboDirName = "saved"; - String[] combos; - File localFile; - // Accept any file whose name ends with ".py". - FilenameFilter filter = FilenameFilters.byFileExtension(".py"); - - if (level == null) { - // Aggregate the filenames for all levels. - // Use a set to keep names unique. - Set comboSet = new TreeSet(); - LocalizationLevel[] levels = PathManagerFactory.getPathManager() - .getAvailableLevels(); - for (int i = levels.length - 1; i >= 0; --i) { - localFile = getLocalization(comboDirName, levels[i]); - if ((localFile != null) && localFile.exists()) { - comboSet.addAll(Arrays.asList(localFile.list(filter))); - } - } - - combos = comboSet.toArray(new String[0]); - } else { - // Get only the filenames for USER level. - localFile = getLocalization(comboDirName); - combos = localFile.list(filter); - } - return combos; - } - - /** - * Load the combinations file called filename if it is in list or - * filename.py is in list, and return the loaded file as a List of Lists of - * Strings. - * - * @param list - * The list of valid filenames - * @param filename - * The filename to load - * @return the contents of the file, as a List of Lists of Strings. - */ - // public List> findCombos(String[] list, String filename) { - // List> listOfCombos = null; - // for (int i = 0; i < list.length; i++) { - // if (list[i].equals(filename) || list[i].equals(filename + ".py")) { - // listOfCombos = loadCombinationsFile(filename); - // } - // } - // return listOfCombos; - // } - - /** - * Deletes the saved file chosen - * - * @param name - * the combo file name - * @throws LocalizationOpFailedException - * if the server copy of the file cannot be deleted - */ - public void deleteSavedCombos(String name) - throws LocalizationOpFailedException { - String searchName = FileUtil.join(CombinationsFileUtil.COMBO_DIR_PATH, - "saved", name + ".py"); - IPathManager pm = PathManagerFactory.getPathManager(); - LocalizationContext userContext = pm.getContext( - LocalizationType.CAVE_STATIC, LocalizationLevel.USER); - LocalizationFile userFile = pm.getLocalizationFile(userContext, - searchName); - - if (AccessMgr.verifyDelete(userFile.getName(), - LocalizationType.CAVE_STATIC, false)) { - if (userFile.isAvailableOnServer()) { - userFile.delete(); - } else if (userFile.exists()) { - File localFile = userFile.getFile(); - localFile.delete(); - } - } - } - /** * Returns the localization for the save and delete functions. This is a * wrapper around getLocalization(String, level). @@ -987,34 +909,40 @@ public class ZoneCombinerComp extends Composite implements } public Map loadCombinationsFile(String comboName) { - List> combolist = new ArrayList>(); - File localFile = PathManagerFactory.getPathManager().getStaticFile( - FileUtil.join(CombinationsFileUtil.COMBO_DIR_PATH, comboName - + ".py")); - if (localFile != null) { - combolist = CombinationsFileUtil.init(comboName); - } - - // reformat combinations into combo dictionary - Map d = new HashMap(); + Map dict = new HashMap(); try { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationContext ctx = pm.getContext( + LocalizationType.CAVE_STATIC, LocalizationLevel.SITE); + File localFile = pm.getFile(ctx, FileUtil.join( + CombinationsFileUtil.COMBO_DIR_PATH, comboName + ".py")); + + List> combolist = new ArrayList>(); + if (localFile != null && localFile.exists()) { + combolist = CombinationsFileUtil.init(comboName); + } else { + statusHandler.error("Combinations file does not found: " + + comboName); + } + + // reformat combinations into combo dictionary int group = 1; for (List zonelist : combolist) { for (String z : zonelist) { - d.put(z, group); + dict.put(z, group); } group += 1; } - } catch (Exception e) { - statusHandler.handle(Priority.SIGNIFICANT, - "Combo file is not in combo format: " + comboName); + } catch (GfeException e) { + statusHandler.handle(Priority.SIGNIFICANT, e.getLocalizedMessage(), + e); return new HashMap(); } currentComboFile = FileUtil.join(CombinationsFileUtil.COMBO_DIR_PATH, comboName + ".py"); - return d; + return dict; } /** @@ -1060,11 +988,12 @@ public class ZoneCombinerComp extends Composite implements && message.getFileName().equalsIgnoreCase(currentComboFile)) { File file = new File(message.getFileName()); String comboName = file.getName().replace(".py", ""); - if (file.getParent().endsWith("saved")) { - comboName = FileUtil.join("saved", comboName); - } + statusHandler + .info("Received FileUpdatedMessage for combinations file: " + + comboName); Map comboDict = loadCombinationsFile(comboName); this.zoneSelector.updateCombos(comboDict); + applyButtonState(false); } } @@ -1085,4 +1014,20 @@ public class ZoneCombinerComp extends Composite implements }); } } + + private boolean buttonState() { + final boolean[] state = { false }; + if (this.applyZoneComboBtn != null + && !this.applyZoneComboBtn.isDisposed()) { + VizApp.runSync(new Runnable() { + @Override + public void run() { + state[0] = ZoneCombinerComp.this.applyZoneComboBtn + .isEnabled(); + } + }); + } + + return state[0]; + } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java deleted file mode 100644 index d359ff50a8..0000000000 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileGenerator.java +++ /dev/null @@ -1,108 +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. - **/ - -/** - * Creating the combinations file for the TextFormatter - * - *
- *    
- * SOFTWARE HISTORY
- *    
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- *6/12/2008                 mnash       Initial creation
- *     
- * 
- * - * @author mnash - * @version 1 - */ -package com.raytheon.viz.gfe.textformatter; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest; -import com.raytheon.uf.common.localization.IPathManager; -import com.raytheon.uf.common.localization.LocalizationContext; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; -import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.util.FileUtil; -import com.raytheon.viz.gfe.core.DataManager; -import com.raytheon.viz.gfe.core.internal.IFPClient; - -public class CombinationsFileGenerator { - - /** - * Generates combinations files based on just running the formatter - * - * @param zoneGroupList - * @param filename - * @throws IOException - */ - public static void generateAutoCombinationsFile( - List> zoneGroupList, String filename) throws Exception { - generateCombinationsFile(zoneGroupList, filename, ""); - } - - /** - * Generates combinations files based on user wanting to save - * - * @param zoneGroupList - * @param filename - * @throws IOException - */ - public static void generateSavedCombinationsFile( - List> zoneGroupList, String filename) throws Exception { - - if (filename.endsWith(".py")) { - generateCombinationsFile(zoneGroupList, filename, "saved" - + File.separator); - } else { - generateCombinationsFile(zoneGroupList, filename + ".py", "saved" - + File.separator); - } - } - - /** - * Called by both auto and saved functions to actually write file - * - * @param zoneGroupList - * @param filename - * @param loc - * @throws Exception - */ - public static void generateCombinationsFile( - List> zoneGroupList, String filename, String loc) - throws Exception { - IFPClient ifpc = DataManager.getCurrentInstance().getClient(); - SaveCombinationsFileRequest req = new SaveCombinationsFileRequest(); - req.setFileName(FileUtil.join(loc, filename)); - req.setCombos(zoneGroupList); - ifpc.makeRequest(req); - - IPathManager pm = PathManagerFactory.getPathManager(); - LocalizationContext ctx = pm.getContext(LocalizationType.CAVE_STATIC, - LocalizationLevel.SITE); - pm.getFile(ctx, FileUtil.join("gfe", "combinations", filename)); - } -} diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java index cb47b506c8..aaea4f05be 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java @@ -20,6 +20,7 @@ package com.raytheon.viz.gfe.textformatter; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -33,7 +34,9 @@ import javax.xml.bind.annotation.XmlRootElement; import jep.JepException; +import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException; import com.raytheon.uf.common.dataplugin.gfe.python.GfePyIncludeUtil; +import com.raytheon.uf.common.dataplugin.gfe.request.SaveCombinationsFileRequest; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; @@ -49,8 +52,9 @@ import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; 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.util.FileUtil; +import com.raytheon.viz.gfe.core.DataManagerUIFactory; +import com.raytheon.viz.gfe.core.internal.IFPClient; import com.raytheon.viz.gfe.textformatter.CombinationsFileUtil.ComboData.Entry; /** @@ -60,7 +64,10 @@ import com.raytheon.viz.gfe.textformatter.CombinationsFileUtil.ComboData.Entry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jul 25, 2008 mnash Initial creation + * Jul 25, 2008 mnash Initial creation + * Sep 05, 2013 #2329 randerso Moved genereateAutoCombinationsFile here + * Cleaned up error handling + * * * * @author mnash @@ -200,7 +207,7 @@ public class CombinationsFileUtil { } @SuppressWarnings("unchecked") - public static List> init(String comboName) { + public static List> init(String comboName) throws GfeException { IPathManager pm = PathManagerFactory.getPathManager(); @@ -211,7 +218,6 @@ public class CombinationsFileUtil { File comboFile = new File(comboName); comboName = comboFile.getName(); - String comboPath = GfePyIncludeUtil.getCombinationsIncludePath(); String scriptPath = FileUtil.join( GfePyIncludeUtil.getUtilitiesLF(baseContext).getFile() .getPath(), "CombinationsInterface.py"); @@ -221,13 +227,15 @@ public class CombinationsFileUtil { map.put("comboName", comboName); PythonScript python = null; try { - python = new PythonScript(scriptPath, - PyUtil.buildJepIncludePath(comboPath)); + python = new PythonScript(scriptPath, PyUtil.buildJepIncludePath( + GfePyIncludeUtil.getCombinationsIncludePath(), + GfePyIncludeUtil.getCommonPythonIncludePath()), + CombinationsFileUtil.class.getClassLoader()); Object com = python.execute("getCombinations", map); combos = (List>) com; } catch (JepException e) { - statusHandler.handle(Priority.CRITICAL, - "Could not get combinations", e); + throw new GfeException("Error loading combinations file: " + + comboName, e); } finally { if (python != null) { python.dispose(); @@ -235,4 +243,30 @@ public class CombinationsFileUtil { } return combos; } + + /** + * Generates combinations files based on just running the formatter + * + * @param zoneGroupList + * @param filename + * @throws Exception + * @throws IOException + */ + public static void generateAutoCombinationsFile( + List> zoneGroupList, String filename) throws Exception { + IFPClient ifpc = DataManagerUIFactory.getCurrentInstance().getClient(); + SaveCombinationsFileRequest req = new SaveCombinationsFileRequest(); + req.setFileName(filename); + req.setCombos(zoneGroupList); + try { + statusHandler.info("Saving combinations file: " + filename); + ifpc.makeRequest(req); + statusHandler.info("Successfully saved combinations file: " + + filename); + } catch (Exception e) { + statusHandler.error("Error saving combinations file: " + filename, + e); + throw e; + } + } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java index 1e9df6ba3c..1d0915d84f 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/FormatterUtil.java @@ -20,7 +20,6 @@ package com.raytheon.viz.gfe.textformatter; import java.text.SimpleDateFormat; -import java.util.List; import java.util.TimeZone; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -40,8 +39,9 @@ import com.raytheon.viz.gfe.tasks.TaskManager; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Sep 8, 2008 njensen Initial creation - * Jan 15, 2010 3395 ryu Fix "issued by" functionality + * Sep 8, 2008 njensen Initial creation + * Jan 15, 2010 3395 ryu Fix "issued by" functionality + * Sep 05, 2013 2329 randerso Removed save of combinations file * * * @@ -63,21 +63,20 @@ public class FormatterUtil { * the formatter instance to use * @param productName * the name of the text product - * @param zoneList - * the list of zones to produce the product for + * @param dbId + * source database + * @param vtecMode + * VTEC mode * @param finish * listener to fire when formatter finishes generating product */ public static void runFormatterScript(TextProductManager productMgr, - String productName, List> zoneList, String dbId, - String vtecMode, TextProductFinishListener finish) { + String productName, String dbId, String vtecMode, + TextProductFinishListener finish) { try { String filename = productMgr.getCombinationsFileName(productName); boolean mapRequired = productMgr.mapRequired(productName); if (filename != null && mapRequired) { - String filenameExt = filename + ".py"; - CombinationsFileGenerator.generateAutoCombinationsFile( - zoneList, filenameExt); productMgr.reloadModule(filename); } } catch (Exception e) { diff --git a/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml b/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml index d57a5a8bd5..bf3fa18b8a 100644 --- a/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml +++ b/cave/com.raytheon.viz.hydro/localization/bundles/hydro/FFGLmosaic.xml @@ -47,7 +47,7 @@ - @@ -321,7 +321,7 @@ - + diff --git a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml index 32645f7fbf..af67408d8a 100644 --- a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml +++ b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseRFCffg.xml @@ -246,19 +246,19 @@ menuText="1hr FFG" id="OH1hrFFG"> /grib/%/FFG-TIR/FFG0124hr/% - + - /grib/%/FFG-TIR-HiRes/FFG0324hr/% + /grib/%/FFG-TIR/FFG0324hr/% - + - /grib/%/FFG-TIR-HiRes/FFG0624hr/% + /grib/%/FFG-TIR/FFG0624hr/% - + diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResource.java index 9ef86a4890..e1ee47e9e6 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResource.java @@ -76,7 +76,9 @@ import com.raytheon.viz.mpe.ui.rsc.MPEFieldResourceData.MPEFieldFrame; * Nov 29, 2012 mschenke Initial creation * May 28, 2013 15971 lbousaidi change the reading hour for SATPRE * since the start time in the file is one - * hour less than the file time stamp. + * hour less than the file time stamp. + * Sep 17, 2013 16563 snaples Updated createFrameImage to handle trace precip + * properly when mapping to screen. * * * @@ -148,6 +150,7 @@ public class MPEFieldResource extends * @param frame * @return */ + @SuppressWarnings("incomplete-switch") private short[] getEditedData(MPEFieldFrame frame) { short[] editedData = frame.getEditedData(); if (editedData != null) { @@ -413,16 +416,42 @@ public class MPEFieldResource extends .getColorMapParameters(); UnitConverter dataToImage = params.getDataToImageConverter(); short[] data = getEditedData(frame); + DisplayFieldData cvuse = resourceData.getFieldData(); int length = data.length; short[] imageData = new short[length]; - for (int i = 0; i < length; ++i) { - short value = data[i]; - if (value == MISSING_VALUE) { - imageData[i] = 0; - } else { - imageData[i] = (short) dataToImage.convert(value); + switch (cvuse) { + case Locbias: + case Height: + case Index: + case Locspan: + case mintempPrism: + case maxtempPrism: + for (int i = 0; i < length; ++i) { + short value = data[i]; + if (value == MISSING_VALUE) { + imageData[i] = 0; + } else { + imageData[i] = (short) dataToImage.convert(value); + } + } + break; + + default : + for (int i = 0; i < length; ++i) { + short value = data[i]; + if (value == MISSING_VALUE) { + imageData[i] = 0; + } else if(value <= 0){ + imageData[i] = 1; + } else if(value > 0 && value < 25){ + value = 10; + imageData[i] = (short) dataToImage.convert(value); + } else { + imageData[i] = (short) dataToImage.convert(value); + } + } + break; } - } return new GriddedImageDisplay2(ShortBuffer.wrap(imageData), gridGeometry, this); } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResourceData.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResourceData.java index e6cfaeaee9..65a9deaab5 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResourceData.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResourceData.java @@ -275,8 +275,9 @@ public class MPEFieldResourceData extends AbstractMPEGriddedResourceData { case mintempPrism: case maxtempPrism: return NonSI.FAHRENHEIT; + default: + return NonSI.INCH; } - return NonSI.INCH; } public static Unit getDataUnitsForField(DisplayFieldData fieldData) { @@ -293,7 +294,9 @@ public class MPEFieldResourceData extends AbstractMPEGriddedResourceData { case mintempPrism: case maxtempPrism: return NonSI.FAHRENHEIT.divide(10); + + default : + return SI.MILLIMETER.divide(100); } - return SI.MILLIMETER.divide(100); } } diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/EmergencyConfirmationMsg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/EmergencyConfirmationMsg.java index 52540b778c..84ea2d9712 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/EmergencyConfirmationMsg.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/EmergencyConfirmationMsg.java @@ -27,6 +27,7 @@ import com.raytheon.uf.common.activetable.ActiveTableMode; import com.raytheon.uf.common.activetable.ActiveTableRecord; import com.raytheon.uf.common.activetable.GetActiveTableRequest; import com.raytheon.uf.common.activetable.GetActiveTableResponse; +import com.raytheon.uf.common.dataplugin.warning.EmergencyType; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -48,6 +49,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 23, 2013 2176 jsanchez Initial creation + * Sep 4, 2013 2176 jsanchez Moved EmergencyType to a public class. * * * @@ -62,38 +64,6 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable { private String productMessage; - private static class EmergencyType { - - private static final EmergencyType TORNADO = new EmergencyType( - "TORNADO EMERGENCY", "TO.W"); - - private static final EmergencyType FLASH_FLOOD = new EmergencyType( - "FLASH FLOOD EMERGENCY", "FF.W"); - - private final String value; - - private final String phensig; - - private final static EmergencyType[] values = new EmergencyType[] { - TORNADO, FLASH_FLOOD }; - - private EmergencyType(String type, String phensig) { - this.value = type; - this.phensig = phensig; - } - - public static EmergencyType valueOf(String phensig) { - EmergencyType type = null; - for (EmergencyType t : values) { - if (t.phensig.equals(phensig)) { - type = t; - break; - } - } - return type; - } - }; - /** * Orders the ActiveTableRecord based on the issue time (ascending) */ @@ -126,11 +96,11 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable { // Check if the warning product is a valid EmergencyType. if (type != null) { - boolean currentEmergency = body.contains("EMERGENCY"); + boolean currentEmergency = EmergencyType.isEmergency(body); if (action == WarningAction.NEW && currentEmergency) { // Only occurs when the warning is first issued and not any // other action - productMessage = "This is a " + type.value; + productMessage = "This is a " + type.getValue(); } else if (action == WarningAction.CON || action == WarningAction.EXT || action == WarningAction.CANCON) { @@ -159,14 +129,14 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable { new ActiveTableRecordComparator()); ActiveTableRecord record = records .get(records.size() - 1); - boolean wasEmergency = record.getRawmessage().contains( - "EMERGENCY"); + boolean wasEmergency = EmergencyType.isEmergency(record + .getRawmessage()); if (!wasEmergency && currentEmergency) { productMessage = "This is an upgrade of a " - + type.value; + + type.getValue(); } else if (wasEmergency && !currentEmergency) { productMessage = "This is a downgrade of a " - + type.value; + + type.getValue(); } } } catch (VizException e) { 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 2d3bc8a005..f2ec58d204 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 @@ -328,9 +328,9 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox; * 25July2013 15733 GHull Read font and color prefs from TextEditorCfg. * 23Aug2013 DR 16514 D. Friedman Fix handling of completed product requests. Do not change * command history or close browser window for "update obs". + * 04Sep2013 2176 jsanchez Changed the order of the QC check dialogs. * 12Sep2013 DR 2249 rferrel Change Time stamp in file name created by warngen to use * simulated time. - * * * * @author lvenable @@ -4822,14 +4822,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, @Override public void dialogClosed(Object returnValue) { if (Boolean.TRUE.equals(returnValue)) { - checkEmergencyProduct(resend); + finishSendProduct(resend); } } }); wgcd.open(); } else { - checkEmergencyProduct(resend); + finishSendProduct(resend); } } else { finishSendProduct(resend); @@ -4879,7 +4879,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, @Override public void dialogClosed(Object returnValue) { if (Boolean.TRUE.equals(returnValue)) { - warngenCloseCallback(resend); + checkEmergencyProduct(resend); } } }); @@ -4907,14 +4907,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, @Override public void dialogClosed(Object returnValue) { if (Boolean.TRUE.equals(returnValue)) { - finishSendProduct(resend); + warngenCloseCallback(resend); } } }); wgcd.open(); } else { - finishSendProduct(resend); + warngenCloseCallback(resend); } } diff --git a/cave/com.raytheon.viz.warngen/plugin.xml b/cave/com.raytheon.viz.warngen/plugin.xml index 22ea540c16..c64627dc7c 100644 --- a/cave/com.raytheon.viz.warngen/plugin.xml +++ b/cave/com.raytheon.viz.warngen/plugin.xml @@ -48,7 +48,7 @@ + locationURI="toolbar:org.eclipse.ui.main.toolbar?after=d2d-3"> * @@ -58,6 +59,7 @@ import com.raytheon.viz.texteditor.util.SiteAbbreviationUtil; * 01Jun2010 2187 cjeanbap Added operational mode functionality * 02Aug2010 2187 cjeanbap Update variable/method signature to be consistent. * 04Oct2010 7193 cjeanbap Add time-to-live value to MessageProducer. + * Sep 13, 2013 2368 rjpeter Set delivery mode to PERSISTENT. * * * @author mschenke @@ -65,209 +67,208 @@ import com.raytheon.viz.texteditor.util.SiteAbbreviationUtil; */ public class WarningSender implements IWarngenObserver { - private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(WarningSender.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(WarningSender.class); - private String hostName = null; + private final String hostName = null; - private boolean notifyError; + private boolean notifyError; - private static final long MILLISECONDS_PER_SECOND = 1000; + private static final long MILLISECONDS_PER_SECOND = 1000; - private static final long SECONDS_PER_MINUTE = 60; + private static final long SECONDS_PER_MINUTE = 60; - private static final long TTL_MINUTES = 5; + private static final long TTL_MINUTES = 5; - private static Pattern PATTERN = Pattern.compile("(\\d{1,1})"); + private static Pattern PATTERN = Pattern.compile("(\\d{1,1})"); - private static final SimpleDateFormat sdf; + private static final SimpleDateFormat sdf; - static { - sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); - sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - } + static { + sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + } - /* - * (non-Javadoc) Incoming message was not a binary - * - * @see - * com.raytheon.viz.texteditor.msgs.IWarngenObserver#setTextWarngenDisplay - * (java.lang.String) - */ - @Override - public void setTextWarngenDisplay(String warning, boolean ne) { - this.notifyError = ne; + /* + * (non-Javadoc) Incoming message was not a binary + * + * @see + * com.raytheon.viz.texteditor.msgs.IWarngenObserver#setTextWarngenDisplay + * (java.lang.String) + */ + @Override + public void setTextWarngenDisplay(String warning, boolean ne) { + this.notifyError = ne; - String number = "0"; - String host = TextWorkstationConstants.getId(); - long t0 = System.currentTimeMillis(); - String siteNode = SiteAbbreviationUtil.getSiteNode(LocalizationManager - .getInstance().getCurrentSite()); - System.out.println("Get site node time: " - + (System.currentTimeMillis() - t0)); - if (host == null) { - statusHandler.handle(Priority.ERROR, - "Text Workstation host not set in preferences."); - } else { - Matcher m = PATTERN.matcher(host); - if (m.find()) { - number = m.group(); - } - } + String number = "0"; + String host = TextWorkstationConstants.getId(); + long t0 = System.currentTimeMillis(); + String siteNode = SiteAbbreviationUtil.getSiteNode(LocalizationManager + .getInstance().getCurrentSite()); + statusHandler.debug("Get site node time: " + + (System.currentTimeMillis() - t0)); + if (host == null) { + statusHandler.handle(Priority.ERROR, + "Text Workstation host not set in preferences."); + } else { + Matcher m = PATTERN.matcher(host); + if (m.find()) { + number = m.group(); + } + } - String id = siteNode + "WRKWG" + number; - boolean sentToTextDatabase = false; + String id = siteNode + "WRKWG" + number; + boolean sentToTextDatabase = false; - try { - boolean messageNotSent = true; - int connectCount = 0; - t0 = System.currentTimeMillis(); - byte[] data = SerializationUtil.transformToThrift(id + ":" - + warning); - while (messageNotSent && connectCount < 4) { - Session s = null; - MessageProducer mp = null; - Connection conn = null; - try { - conn = JMSConnection.getInstance().getFactory() - .createConnection(); - s = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); - mp = s.createProducer(s - .createQueue(TextWorkstationConstants - .getDestinationTextWorkstationQueueName())); - mp.setTimeToLive(TTL_MINUTES * SECONDS_PER_MINUTE - * MILLISECONDS_PER_SECOND); - BytesMessage m = s.createBytesMessage(); - m.writeBytes(data); - mp.send(m); - long t1 = System.currentTimeMillis(); - System.out.println(WarningSender.getCurTimeString() + ": " - + id + " sent to text workstation in " + (t1 - t0) - + "ms in " + (connectCount + 1) - + (connectCount > 0 ? " tries" : " try")); - messageNotSent = false; - } catch (JMSException e) { - if (notifyError) { - statusHandler - .handle(Priority.PROBLEM, - "Error trying to send product [" - + id - + "] to Text Workstation. Attempting to reconnect. ", - e); - notifyError = false; - } - } finally { - if (mp != null) { - try { - mp.close(); - mp = null; - } catch (Exception e) { - mp = null; - } - } - if (s != null) { - try { - s.close(); - s = null; - } catch (Exception e) { - s = null; - } - } - if (conn != null) { - try { - conn.close(); - conn = null; - } catch (Exception e) { - conn = null; - } - } - } - if (messageNotSent) { - if (!sentToTextDatabase) { - try { - sendToTextDatabase(id, warning); - sentToTextDatabase = true; - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "Error trying to save product [" + id - + "] to Text Database: ", e); - } - } + try { + boolean messageNotSent = true; + int connectCount = 0; + t0 = System.currentTimeMillis(); + byte[] data = SerializationUtil.transformToThrift(id + ":" + + warning); + while (messageNotSent && (connectCount < 4)) { + Session s = null; + MessageProducer mp = null; + Connection conn = null; + try { + conn = JMSConnection.getInstance().getFactory() + .createConnection(); + s = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); + mp = s.createProducer(s + .createQueue(TextWorkstationConstants + .getDestinationTextWorkstationQueueName())); + mp.setTimeToLive(TTL_MINUTES * SECONDS_PER_MINUTE + * MILLISECONDS_PER_SECOND); + BytesMessage m = s.createBytesMessage(); + m.writeBytes(data); + m.setJMSDeliveryMode(DeliveryMode.PERSISTENT); + mp.send(m); + long t1 = System.currentTimeMillis(); + statusHandler.debug(id + " sent to text workstation in " + + (t1 - t0) + "ms in " + (connectCount + 1) + + (connectCount > 0 ? " tries" : " try")); + messageNotSent = false; + } catch (JMSException e) { + if (notifyError) { + statusHandler + .handle(Priority.PROBLEM, + "Error trying to send product [" + + id + + "] to Text Workstation. Attempting to reconnect. ", + e); + notifyError = false; + } + } finally { + if (mp != null) { + try { + mp.close(); + mp = null; + } catch (Exception e) { + mp = null; + } + } + if (s != null) { + try { + s.close(); + s = null; + } catch (Exception e) { + s = null; + } + } + if (conn != null) { + try { + conn.close(); + conn = null; + } catch (Exception e) { + conn = null; + } + } + } + if (messageNotSent) { + if (!sentToTextDatabase) { + try { + sendToTextDatabase(id, warning); + sentToTextDatabase = true; + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, + "Error trying to save product [" + id + + "] to Text Database: ", e); + } + } - connectCount++; - switch (connectCount) { - case 1: - Thread.sleep(1000); - break; - case 2: - Thread.sleep(5 * 1000); - break; - case 3: - Thread.sleep(30 * 1000); - break; - case 4: - statusHandler.handle(Priority.PROBLEM, - "Could not reconnect (" + id - + ") after 3 tries: "); - break; - } - } - } + connectCount++; + switch (connectCount) { + case 1: + Thread.sleep(1000); + break; + case 2: + Thread.sleep(5 * 1000); + break; + case 3: + Thread.sleep(30 * 1000); + break; + case 4: + statusHandler.handle(Priority.PROBLEM, + "Could not reconnect (" + id + + ") after 3 tries: "); + break; + } + } + } - if (!sentToTextDatabase) { - try { - sendToTextDatabase(id, warning); - sentToTextDatabase = true; - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "Error trying to save product [" + id - + "] to Text Database: ", e); - } - } - } catch (UnknownHostException uhe) { - if (notifyError) { - statusHandler.handle(Priority.PROBLEM, - "unable to map hostname, " + hostName - + ", to an ip address", uhe); - notifyError = false; - } + if (!sentToTextDatabase) { + try { + sendToTextDatabase(id, warning); + sentToTextDatabase = true; + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, + "Error trying to save product [" + id + + "] to Text Database: ", e); + } + } + } catch (UnknownHostException uhe) { + if (notifyError) { + statusHandler.handle(Priority.PROBLEM, + "unable to map hostname, " + hostName + + ", to an ip address", uhe); + notifyError = false; + } - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "Error trying to send product [" + id - + "] to Text Workstation: ", e); - } + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, + "Error trying to send product [" + id + + "] to Text Workstation: ", e); + } - } + } - /** - * Saves a product to the text database. - * - * @param id - * @param warning - * @throws VizException - */ - public static void sendToTextDatabase(String id, String warning) - throws VizException { - CAVEMode mode = CAVEMode.getMode(); - boolean operationalMode = (CAVEMode.OPERATIONAL.equals(mode) - || CAVEMode.TEST.equals(mode) ? true : false); + /** + * Saves a product to the text database. + * + * @param id + * @param warning + * @throws VizException + */ + public static void sendToTextDatabase(String id, String warning) + throws VizException { + CAVEMode mode = CAVEMode.getMode(); + boolean operationalMode = (CAVEMode.OPERATIONAL.equals(mode) + || CAVEMode.TEST.equals(mode) ? true : false); - // Generate StdTextProduct and insert into db - long t0 = System.currentTimeMillis(); - ThriftClient.sendRequest(new InsertStdTextProductRequest(id, warning, - operationalMode)); + // Generate StdTextProduct and insert into db + long t0 = System.currentTimeMillis(); + ThriftClient.sendRequest(new InsertStdTextProductRequest(id, warning, + operationalMode)); - System.out.println(WarningSender.getCurTimeString() + ": " + id - + " saved to textdb in " + (System.currentTimeMillis() - t0) - + "ms"); - } + statusHandler.debug(id + " saved to textdb in " + + (System.currentTimeMillis() - t0) + "ms"); + } - public static String getCurTimeString() { - String rval = null; - synchronized (sdf) { - rval = sdf.format(new Date()); - } - return rval; - } + public static String getCurTimeString() { + String rval = null; + synchronized (sdf) { + rval = sdf.format(new Date()); + } + return rval; + } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/DbAreaSourceDataAdaptor.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/DbAreaSourceDataAdaptor.java index 3e9e82b24f..f9a16efd4c 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/DbAreaSourceDataAdaptor.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/DbAreaSourceDataAdaptor.java @@ -40,6 +40,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; * Mar 25, 2013 1605 jsanchez Set ClosestPoint's prepGeom. * Apr 24, 2013 1944 jsanchez Updated calculateLocationPortion visibility to public. * May 2, 2013 1963 jsanchez Referenced calculatePortion from GisUtil if intersection less than DEFAULT_PORTION_TOLERANCE. + * Sep 13, 2013 DR 16601 D. Friedman Fix from jsanchez: Allow cities outside the CWA. * * * @@ -156,8 +157,6 @@ public class DbAreaSourceDataAdaptor extends AbstractDbSourceDataAdaptor { filter = new HashMap(); } - filter.put(cwaField, new RequestConstraint(localizedSite)); - return filter; } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/CoverageConstants.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/CoverageConstants.java index f4bdae56b1..64789b2751 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/CoverageConstants.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/CoverageConstants.java @@ -29,6 +29,7 @@ package com.raytheon.viz.warngen.gis; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 5, 2013 2177 jsanchez Initial creation + * Sep 22, 2013 2177 jsanchez Updated EW_MASK. * * * @@ -156,7 +157,7 @@ public class CoverageConstants { EW_MASK[i] = XEAST | EAST; } else if (i < 106) { EW_MASK[i] = WEST; - } else if (i > 145) { + } else if (i > 148) { EW_MASK[i] = EAST; } else if (i < 118) { EW_MASK[i] = CENTRAL_EW | WEST; diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PortionsUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PortionsUtil.java index a5188b95d6..3c7b269a54 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PortionsUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PortionsUtil.java @@ -38,6 +38,7 @@ import com.vividsolutions.jts.geom.Geometry; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 5, 2013 2177 jsanchez Initial creation + * Sep 22, 2013 2177 jsanchez Updated logic. * * * @@ -71,9 +72,16 @@ public class PortionsUtil { countyOrZone.getUserData(); EntityData entityData = gridUtil.calculateGrids(countyOrZone, warnedArea); - EnumSet portions = getAreaDesc(entityData.getMeanMask(), - entityData.getCoverageMask(), entityData.getOctants(), - useExtreme); + EnumSet portions = null; + if (warnedArea.getArea() < countyOrZone.getArea() * .01) { + // this is for the case when only a "sliver" of the county or zone + // is warned + portions = getPointDesc(entityData.getMeanMask(), true); + } else { + portions = getAreaDesc(entityData.getMeanMask(), + entityData.getCoverageMask(), entityData.getOctants(), + useExtreme); + } return suppressPortions(entityID, portions); } @@ -127,6 +135,7 @@ public class PortionsUtil { // } // Test for central by not being near adjacent borders. + // Another possible case of a stripe across the middle. if (octants == 0 || ((octants & CoverageConstants.EXTREME_YES) == 0) && (meanMask & CoverageConstants.CENTER) == CoverageConstants.CENTER) { @@ -144,28 +153,28 @@ public class PortionsUtil { int nn, ss, ee, ww, ne, nw, se, sw; nn = ss = ee = ww = ne = nw = se = sw = 0; int omerge = xxoctant | xoctant | octants; - if ((omerge & (CoverageConstants.NNE | CoverageConstants.ENE)) > 0) { + if ((omerge & (CoverageConstants.NNE | CoverageConstants.ENE)) != 0) { ne = 1; } - if ((omerge & (CoverageConstants.SSE | CoverageConstants.ESE)) > 0) { + if ((omerge & (CoverageConstants.SSE | CoverageConstants.ESE)) != 0) { se = 1; } - if ((omerge & (CoverageConstants.NNW | CoverageConstants.WNW)) > 0) { + if ((omerge & (CoverageConstants.NNW | CoverageConstants.WNW)) != 0) { nw = 1; } - if ((omerge & (CoverageConstants.SSW | CoverageConstants.WSW)) > 0) { + if ((omerge & (CoverageConstants.SSW | CoverageConstants.WSW)) != 0) { sw = 1; } - if ((omerge & (CoverageConstants.NNE | CoverageConstants.NNW)) > 0) { + if ((omerge & (CoverageConstants.NNE | CoverageConstants.NNW)) != 0) { nn = 1; } - if ((omerge & (CoverageConstants.SSE | CoverageConstants.SSW)) > 0) { + if ((omerge & (CoverageConstants.SSE | CoverageConstants.SSW)) != 0) { ss = 1; } - if ((omerge & (CoverageConstants.WNW | CoverageConstants.WSW)) > 0) { + if ((omerge & (CoverageConstants.WNW | CoverageConstants.WSW)) != 0) { ww = 1; } - if ((omerge & (CoverageConstants.ENE | CoverageConstants.ESE)) > 0) { + if ((omerge & (CoverageConstants.ENE | CoverageConstants.ESE)) != 0) { ee = 1; } if ((areaMask & CoverageConstants.NORTH_SOUTH) == 0) { @@ -180,23 +189,23 @@ public class PortionsUtil { // Identify extremes in use. int nnx, ssx, eex, wwx; nnx = ssx = eex = wwx = 0; - if ((areaMask & CoverageConstants.XNORTH) > 0) { + if ((areaMask & CoverageConstants.XNORTH) != 0) { nnx = 1; } - if ((areaMask & CoverageConstants.XSOUTH) > 0) { + if ((areaMask & CoverageConstants.XSOUTH) != 0) { ssx = 1; } - if ((areaMask & CoverageConstants.XWEST) > 0) { + if ((areaMask & CoverageConstants.XWEST) != 0) { wwx = 1; } - if ((areaMask & CoverageConstants.XEAST) > 0) { + if ((areaMask & CoverageConstants.XEAST) != 0) { eex = 1; } int xxx = nnx + ssx + eex + wwx; // Modify masks based on whether we can use extreme. - if ((octants & CoverageConstants.EXTREME_NO) > 0 - && (areaMask & CoverageConstants.EXTREME) > 0) { + if ((octants & CoverageConstants.EXTREME_NO) != 0 + && (areaMask & CoverageConstants.EXTREME) != 0) { areaMask &= CoverageConstants.NOT_EXTREME; meanMask &= CoverageConstants.NOT_EXTREME; } @@ -220,12 +229,6 @@ public class PortionsUtil { meanMask &= CoverageConstants.NOT_CENTRAL; } - // Another possible case of a stripe across the middle. - if (q == 4 && (meanMask & CoverageConstants.CENTER) > 0) { - portions.add(Direction.CENTRAL); - return portions; - } - // All quadrants in use. if (q == 4 && qq == 4) { return EnumSet.noneOf(Direction.class); @@ -233,20 +236,6 @@ public class PortionsUtil { // Only one typical quadrant in use. if (q == 1) { - // if (ne == 1) { - // portions.add(Direction.NORTH); - // portions.add(Direction.EAST); - // } else if (nw == 1) { - // portions.add(Direction.NORTH); - // portions.add(Direction.WEST); - // } else if (se == 1) { - // portions.add(Direction.SOUTH); - // portions.add(Direction.EAST); - // } else if (sw == 1) { - // portions.add(Direction.SOUTH); - // portions.add(Direction.WEST); - // } - // return portions; return getPointDesc2(meanMask, exYes, nn, ss, ee, ww); } @@ -259,7 +248,7 @@ public class PortionsUtil { // No more than two quadrants of any kind in use, or all quadrants. if (q < 3 && qq < 3) { if (nnx != ssx && wwx != eex - || (meanMask & CoverageConstants.CENTRAL) > 0) { + || (meanMask & CoverageConstants.CENTRAL) != 0) { return getPointDesc2(meanMask, exYes, nn, ss, ee, ww); } else { @@ -273,28 +262,28 @@ public class PortionsUtil { if (ne == 0) { // The next line is the original port of A1 code but prevented // producing the correct result: - // if (ne == 0 && (xxoctant & (SSW | WSW)) > 0) { + // if (ne == 0 && (xxoctant & (SSW | WSW)) != 0) { portions.add(Direction.SOUTH); portions.add(Direction.WEST); } else if (se == 0) { // The next line is the original port of A1 code but prevented // producing the correct result: - // } else if (se == 0 && (xxoctant & (NNW | WNW)) > 0) { + // } else if (se == 0 && (xxoctant & (NNW | WNW)) != 0) { portions.add(Direction.NORTH); portions.add(Direction.WEST); } else if (nw == 0) { // The next line is the original port of A1 code but prevented // producing the correct result: - // } else if (nw == 0 && (xxoctant & (SSE | ESE)) > 0) { + // } else if (nw == 0 && (xxoctant & (SSE | ESE)) != 0) { portions.add(Direction.SOUTH); portions.add(Direction.EAST); } else if (sw == 0) { // The next line is the original port of A1 code but prevented // producing the correct result: - // } else if (sw == 0 && (xxoctant & (NNE | ENE)) > 0) { + // } else if (sw == 0 && (xxoctant & (NNE | ENE)) != 0) { portions.add(Direction.NORTH); portions.add(Direction.EAST); } @@ -318,7 +307,7 @@ public class PortionsUtil { // add extreme for three quadrant case. if (!portions.isEmpty()) { - if (exYes && ((areaMask & CoverageConstants.EXTREME)) > 0) { + if (exYes && ((areaMask & CoverageConstants.EXTREME)) != 0) { portions.add(Direction.EXTREME); } return portions; @@ -334,25 +323,25 @@ public class PortionsUtil { ss = areaMask & CoverageConstants.SOUTHERN; ee = areaMask & CoverageConstants.EASTERN; ww = areaMask & CoverageConstants.WESTERN; - if (ss > 0 && nn > 0 || q == 0) { - if (ee == 0 && ww > 0) { + if (ss != 0 && nn != 0 || q == 0) { + if (ee == 0 && ww != 0) { portions.add(Direction.WEST); } - if (ww == 0 && ee > 0) { + if (ww == 0 && ee != 0) { portions.add(Direction.EAST); } - } else if (ee > 0 && ww > 0 || q == 0) { - if (nn == 0 && ss > 0) { + } else if (ee != 0 && ww != 0 || q == 0) { + if (nn == 0 && ss != 0) { portions.add(Direction.SOUTH); } - if (ss == 0 && nn > 0) { + if (ss == 0 && nn != 0) { portions.add(Direction.NORTH); } } // add extreme for simple direction case. if (!portions.isEmpty()) { - if (exYes && ((areaMask & CoverageConstants.EXTREME)) > 0) { + if (exYes && ((areaMask & CoverageConstants.EXTREME)) != 0) { portions.add(Direction.EXTREME); } return portions; @@ -372,9 +361,6 @@ public class PortionsUtil { private static EnumSet getPointDesc(int mask, boolean exYes) { EnumSet portions = EnumSet.noneOf(Direction.class); - if (mask == 0) { - return portions; - } int cc = mask & CoverageConstants.CENTRAL; if (cc == CoverageConstants.CENTRAL) { @@ -406,7 +392,7 @@ public class PortionsUtil { portions.add(Direction.CENTRAL); } - if (exYes && ((int) (mask & CoverageConstants.EXTREME) > 0)) { + if (exYes && ((int) (mask & CoverageConstants.EXTREME) != 0)) { portions.add(Direction.EXTREME); } @@ -432,22 +418,22 @@ public class PortionsUtil { } int counter = 0; - if (nn > 0 && ss > 0) { + if (nn != 0 && ss != 0) { ; - } else if (ss > 0) { + } else if (ss != 0) { portions.add(Direction.SOUTH); counter++; - } else if (nn > 0) { + } else if (nn != 0) { portions.add(Direction.NORTH); counter++; } - if (ee > 0 && ww > 0) { + if (ee != 0 && ww != 0) { ; - } else if (ww > 0) { + } else if (ww != 0) { portions.add(Direction.WEST); counter++; - } else if (ee > 0) { + } else if (ee != 0) { portions.add(Direction.EAST); counter++; } @@ -462,7 +448,7 @@ public class PortionsUtil { portions.add(Direction.CENTRAL); } - if (exYes && ((int) (mask & CoverageConstants.EXTREME) > 0)) { + if (exYes && ((int) (mask & CoverageConstants.EXTREME) != 0)) { portions.add(Direction.EXTREME); } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java index c54a84d9aa..76729458ce 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java @@ -20,6 +20,7 @@ package com.raytheon.viz.warngen.gui; import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord; +import com.raytheon.uf.common.dataplugin.warning.EmergencyType; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; import com.raytheon.uf.common.time.SimulatedTime; import com.raytheon.uf.common.time.util.TimeUtil; @@ -39,6 +40,7 @@ import com.raytheon.uf.common.time.util.TimeUtil; * Aug 7, 2013 2243 jsanchez Set all the attributes of an AbstractWarningRecord and added an expiration string. Removed calendar object. * Aug 15,2013 2243 jsanchez Improved the expiration string off by one minute. Fixed for practice mode. * Aug 15,2013 2243 jsanchez Improved the expiration string off by one minute. + * Sep 4,2013 2176 jsanchez Used EmergencyType class to identify emergency products. * * * @author rferrel @@ -96,8 +98,8 @@ public class FollowupData extends AbstractWarningRecord { rval.append(buildExpStr(status, record)); } - if (record.getRawmessage().contains("EMERGENCY")) { - rval.append(" EMER"); + if (EmergencyType.isEmergency(record.getRawmessage())) { + rval.append(" " + EmergencyType.EMER); } equvialentString = rval.substring(0, record.getProductClass().equals("T") ? 20 : 18); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java index 6525feec70..76519127bc 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java @@ -148,6 +148,7 @@ import com.vividsolutions.jts.geom.Polygon; * Jul 29, 2013 DR 16352 D. Friedman Move 'result' to okPressed(). * Aug 6, 2013 2243 jsanchez Refreshed the follow up list every minute. * Aug 15, 2013 DR 16418 D. Friedman Make dialog visibility match editable state. + * Sep 17, 2013 DR 16496 D. Friedman Make editable state more consistent. * * * @author chammack @@ -1334,11 +1335,9 @@ public class WarngenDialog extends CaveSWTDialog implements * Box was selected, allow editing of box only */ private void boxSelected() { - boxEditable = !polygonLocked; - trackEditable = true; - warngenLayer.getStormTrackState().editable = trackEditable; - warngenLayer.setBoxEditable(boxEditable); - warngenLayer.issueRefresh(); + boxEditable = true; + trackEditable = false; + realizeEditableState(); } /** @@ -1347,20 +1346,16 @@ public class WarngenDialog extends CaveSWTDialog implements private void trackSelected() { boxEditable = false; trackEditable = true; - warngenLayer.getStormTrackState().editable = trackEditable; - warngenLayer.setBoxEditable(boxEditable); - warngenLayer.issueRefresh(); + realizeEditableState(); } /** * Box and track was selected, allow editing of both */ private void boxAndTrackSelected() { - boxEditable = !polygonLocked; + boxEditable = true; trackEditable = true; - warngenLayer.getStormTrackState().editable = trackEditable; - warngenLayer.setBoxEditable(boxEditable); - warngenLayer.issueRefresh(); + realizeEditableState(); } /** @@ -1615,7 +1610,6 @@ public class WarngenDialog extends CaveSWTDialog implements * item from update list selected */ public void updateListSelected() { - warngenLayer.setOldWarningPolygon(null); if (updateListCbo.getSelectionIndex() >= 0) { AbstractWarningRecord oldWarning = null; FollowupData data = (FollowupData) updateListCbo @@ -1666,6 +1660,7 @@ public class WarngenDialog extends CaveSWTDialog implements return; } + warngenLayer.setOldWarningPolygon(null); bulletList.setEnabled(true); durationList.setEnabled(true); totalSegments = 0; @@ -2461,4 +2456,12 @@ public class WarngenDialog extends CaveSWTDialog implements } } + public void realizeEditableState() { + boolean layerEditable = warngenLayer.isEditable(); + // TODO: Note there is no 'is track editing allowed' state yet. + warngenLayer.getStormTrackState().editable = layerEditable && trackEditable; + warngenLayer.setBoxEditable(layerEditable && boxEditable && !polygonLocked); + warngenLayer.issueRefresh(); + } + } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java index a7e1d400cb..7bef3b3064 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java @@ -188,6 +188,7 @@ import com.vividsolutions.jts.io.WKTReader; * updated AreaHatcher's run(). * 07/26/2013 DR 16450 D. Friedman Fix logic errors when frame count is one. * 08/19/2013 2177 jsanchez Set a GeneralGridGeometry object in the GeospatialDataList. + * 09/17/2013 DR 16496 D. Friedman Make editable state more consistent. * * * @author mschenke @@ -3010,10 +3011,7 @@ public class WarngenLayer extends AbstractStormTrackResource { final boolean editable = isEditable(); boxEditable = editable; displayState.editable = editable; - if (editable) { - boxEditable = dialog.boxEditable(); - displayState.editable = dialog.trackEditable(); - } + dialog.realizeEditableState(); final WarngenDialog dlg = dialog; dialog.getDisplay().asyncExec(new Runnable() { @Override diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWWAResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWWAResource.java index 34424f20bd..c796d18a46 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWWAResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWWAResource.java @@ -15,6 +15,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord; +import com.raytheon.uf.common.dataplugin.warning.EmergencyType; import com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; @@ -80,6 +81,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; * Remove frameAltered condition in matchesFrame. It prevented entries from being displayed. * Check if geometry is null when inspecting. * Jul 22, 2013 2176 jsanchez Updated the wire frame and text for EMERGENCY warnings. + * Sep 4, 2013 2176 jsanchez Made the polygon line width thicker and made regular text not bold. * * * @author jsanchez @@ -133,7 +135,9 @@ public abstract class AbstractWWAResource extends /** map of dataURI to a warning entry **/ protected Map entryMap; - protected IFont warningsFont; + protected IFont warningsFont = null; + + protected IFont emergencyFont = null; protected RGB color; @@ -368,8 +372,8 @@ public abstract class AbstractWWAResource extends int outlineWidth = getCapability(OutlineCapability.class) .getOutlineWidth(); // Make wire frame outline thicker for EMERGENCY warnings - if (record.getRawmessage().contains("EMERGENCY")) { - outlineWidth *= 2; + if (EmergencyType.isEmergency(record.getRawmessage())) { + outlineWidth *= 3; } target.drawWireframeShape( @@ -398,7 +402,10 @@ public abstract class AbstractWWAResource extends * paintProps.getZoomLevel() / 1000; String[] textToPrint = getText(record, mapWidth); if (warningsFont == null) { - warningsFont = target.getDefaultFont().deriveWithSize( + warningsFont = target.initializeFont(target + .getDefaultFont().getFontName(), 11, + new IFont.Style[0]); + emergencyFont = target.getDefaultFont().deriveWithSize( 11); } // DR14992: reverse the textToPrint array to plot the @@ -418,15 +425,24 @@ public abstract class AbstractWWAResource extends params.verticallAlignment = VerticalAlignment.BOTTOM; params.magnification = getCapability( MagnificationCapability.class).getMagnification(); - target.drawStrings(params); // Draws the string again to have it appear bolder - if (textToPrintReversed[2].endsWith("EMER")) { - params.setText(new String[] { "", "", "EMER", "" }, - color); - target.drawStrings(params); + if (EmergencyType.isEmergency(record.getRawmessage())) { + // moves over text to add EMER in a different font + textToPrintReversed[2] = String.format("%1$-21" + "s", + textToPrintReversed[2]); + params.setText(textToPrintReversed, color); + + DrawableString emergencyString = new DrawableString( + params); + emergencyString.font = emergencyFont; + emergencyString.setText(new String[] { "", "", + " " + EmergencyType.EMER, "" }, color); + target.drawStrings(emergencyString); } + target.drawStrings(params); + } } } @@ -598,12 +614,7 @@ public abstract class AbstractWWAResource extends textToPrint[0] += "." + vid; } textToPrint[0] += "." + record.getEtn(); - - if (record.getRawmessage().contains("EMERGENCY")) { - textToPrint[1] = record.getPil() + " EMER"; - } else { - textToPrint[1] = record.getPil(); - } + textToPrint[1] = record.getPil(); SimpleDateFormat startFormat = DEFAULT_FORMAT; SimpleDateFormat endFormat = DEFAULT_FORMAT; diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java index 206f92ce98..45a5567ffa 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java @@ -60,7 +60,8 @@ import com.vividsolutions.jts.geom.Geometry; * Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class. * Apr 18, 2013 1877 jsanchez Ordered the records the same for update and initial load. * Removed no longer needed frameAltered. Do not set wire frame for a CAN. - * Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning + * Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning + * Sep 5, 2013 2176 jsanchez Disposed the emergency font. * * * @author jsanchez @@ -143,6 +144,10 @@ public class WarningsResource extends AbstractWWAResource { if (warningsFont != null) { warningsFont.dispose(); } + + if (emergencyFont != null) { + emergencyFont.dispose(); + } } @Override @@ -234,7 +239,7 @@ public class WarningsResource extends AbstractWWAResource { for (AbstractWarningRecord warnrec : recordsToLoad) { WarningAction act = WarningAction.valueOf(warnrec.getAct()); if (act == WarningAction.CON || act == WarningAction.CAN - || act == WarningAction.EXT) { + || act == WarningAction.EXT) { AbstractWarningRecord createShape = null; for (String key : entryMap.keySet()) { WarningEntry entry = entryMap.get(key); diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java index 9580cfa9e6..6b4b755a75 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WatchesResource.java @@ -49,6 +49,7 @@ import com.vividsolutions.jts.geom.GeometryFactory; * Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class. * May 06, 2013 1930 bsteffen Check for null in WatchesResource. * May 10, 2013 1951 rjpeter Updated ugcZones references + * Sep 5, 2013 2176 jsanchez Disposed the emergency font. * * * @author jsanchez @@ -140,6 +141,10 @@ public class WatchesResource extends AbstractWWAResource { if (warningsFont != null) { warningsFont.dispose(); } + + if (emergencyFont != null) { + emergencyFont.dispose(); + } } @Override diff --git a/edexOsgi/build.edex/esb/bin/setup.env b/edexOsgi/build.edex/esb/bin/setup.env index 719bd3ce1c..3661f632b4 100644 --- a/edexOsgi/build.edex/esb/bin/setup.env +++ b/edexOsgi/build.edex/esb/bin/setup.env @@ -12,8 +12,8 @@ export IH_DB_NAME=hd_ob92oax ### flag to control grib deprecation ### if [ -z "$gribMode" ]; then # uncomment only one of the following two lines -export gribMode=deprecated -#export gribMode=future +#export gribMode=deprecated +export gribMode=future fi ## end of grib deprecation flag ### diff --git a/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar b/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar index 546a8e4c9b..f57bb629b5 100644 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar and b/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar b/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar index a4f58e7912..fda9a7c5bb 100644 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar and b/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar differ diff --git a/edexOsgi/build.edex/esb/conf/spring/edex.xml b/edexOsgi/build.edex/esb/conf/spring/edex.xml index 546d3abf49..275133fb82 100644 --- a/edexOsgi/build.edex/esb/conf/spring/edex.xml +++ b/edexOsgi/build.edex/esb/conf/spring/edex.xml @@ -40,8 +40,19 @@ + + + + + + factory-bean="jmsConfig" factory-method="copy"/> + + + + + @@ -71,6 +82,7 @@ + - + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/python/MasterInterface.py b/edexOsgi/build.edex/esb/data/utility/common_static/base/python/MasterInterface.py index 8710a976dc..86062f44ff 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/python/MasterInterface.py +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/python/MasterInterface.py @@ -140,10 +140,14 @@ class MasterInterface(object): def reloadModule(self, moduleName): if sys.modules.has_key(moduleName): - # because the user might have added or removed items - # from the module's dictionary, we cannot trust reload() here. - sys.modules.__delitem__(moduleName) - __import__(moduleName) - - - \ No newline at end of file + # Because the user might have removed items + # from the module's dictionary, we cannot trust reload() to + # remove old items. We will manually remove everything + # but built-ins to ensure everything gets re-initialized when + # reload() is called. + mod = sys.modules[moduleName] + modGlobalsToRemove = [k for k in mod.__dict__ if not k.startswith('_')] + for k in modGlobalsToRemove: + mod.__dict__.pop(k) + reload(mod) + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.vm index a4393346bd..fffa1b98a1 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.vm @@ -1,75 +1,73 @@ #* -CREATED 1-25-2012 BY MIKE DANGELO AND EVAN BOOKBINDER +UPDATED 9-16-2013 BY MIKE DANGELO AND EVAN BOOKBINDER -Here are some examples of very simple INTERSTATE output - (one line/sentence per interstate): +### THIS PLUG-IN VM FILE ALLOWS YOU TO CONSOLIDATE ALL YOUR MILEMARKER/EXIT/ROUTE +### OUTPUT INTO A SINGLE FUNCTION CALL -#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","MILE MARKER",false) -#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","MILE MARKER",true) -#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","",false) -#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","",true) -#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","",false) -#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","",true) -#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","MILE MARKER",false) -#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","MILE MARKER",true) - -Mile Marker Test Code +Mile Marker Macro macro "mmarkers" use (called out of VM_global_library.vm): -#mmarkers($name, $id, $type, $markers, $simplify) +#macro(mmarkers $markers $id $name $type $simplify) where the argument: +$markers is a string, and is the exact "variable" set in the XML "pointSource" tag for this road + - +$id is the sequential ID database field to determine logical breaks in the mile markers + set in the XML "pointSource" tag for this road + - $name is a string "OUTPUT TEXT" of the road name -$id is the sequential ID database field to determine logical breaks in the mile markers $type is a string which describes the type of "marker" - may be "MILE MARKER" or something similar, or blank "" - "" is for use when town names (CHARLESTON) or exit names (THE SUNSET EXIT) -$markers is a string, and is the exact "variable" set in the XML "pointSource" tag for this road - - $simplify is a boolean value (true or false) - true concatenates (FROM MM 2 to 4), - false is a big list (MM 2...3...AND 4) -From mileMarkers.xml -$databaseName is an array of pointSource objects containing the milemarker names -$databaseId is an array of pointSource objects containing the milemarker IDs -$specificName is an array of plain English names for the Interstates, Routes, etc.. -e.g. -#set ($databaseName = [${i435mm},${i70momm},${i35momm}]) -#set ($databaseId = [${i435mmid},${i70mommid},${i35mommid}]) -#set ($specificName = ['INTERSTATE 435','INTERSTATE 70','INTERSTATE 35']) +CONFIGURATION: +#COMMENT OUT LINES 59-62 BELOW AS NEEDED, REPLACING THE EXAMPLE WITH YOUR MILE MARKER/ROUTE ENTRIES +#EACH LINE CONTAINS A VARIABLE MM1,MM2,MM3,etc... REFERENCING AN ARRAY (LIST) OF DATA THAT +#WILL BE PASSED TO THE MMARKERS ROUTINE. -The following code makes upkeep of the mile marker files easier, and is - reccomended for use. -Substitute all your "INTERSTATE NAME(s)" into the array: $specificName -Likewise, -Substitute all your corresponding database table names (${tablename}) for those - interstates into the array: $databaseName -You may also use town names or exit names - in the "name" field of your database tables. +The items in the array are as follows: +1.) java Object - A pointSource object from mileMarkers.xml containing the milemarker names +2.) java Object - A pointSource object from mileMarkers.xml containing the milemarker IDs or index +3.) String - A plain English name for the Interstates, Routes, etc.. +4.) String - A plain English name describing the output (mile marker, exit, etc...) + Can be blank ''. Make sure the singular phrase is used (an "S" will be auto-applied for + plural values. e.g. MILE MARKERS 3 AND 10 +5.) Boolean - A true/false value telling the function whether to group the milemarkers where + possible, or list them individually. For mile markers that are text (such as exits or + intersections, false might be a better option) + +NOTE: PLEASE ENSURE PROPER SYNTAX. Java Objects are ${variable}, Text Strings are 'TEXT', and + Booleans are true/false (no quote) + ALSO ENSURE THAT EACH LINE CONTAINS A UNIQUE VARIABLE NAME: MM1, MM2, MM3, etc.. + + +HERE IS AN EXAMPLE: + e.g. + #set ($mm1 = [${i435mm},${i435mmid},'INTERSTATE 435','MILE MARKER',true]) + #set ($mm2 = [${i70momm},${i70mommid},'INTERSTATE 70 IN MISSOURI','MILE MARKER',true]) + #set ($mm3 = [${i35momm},${i35mommid},'INTERSTATE 70 IN KANSAS','MILE MARKER',true]) + +After creating these, we must create a list containing all of our variable names + e.g. + #set ($varList = [$mm1,$mm2,$mm3]) *# + #set($hits = 0) #set($bigList = '') -##set ($databaseName = [${i435mm},${i70momm},${i35momm}]) -##set ($databaseId = [${i435mmid},${i70mommid},${i35mommid}]) -##set ($specificName = ['INTERSTATE 435','INTERSTATE 70','INTERSTATE 35']) -#set ($itemCount = 0) -#foreach($specName in $specificName) -#set ($itemCount = $itemCount + 1) -#set ($itemCount2 = 0) -#foreach($dbName in $databaseName) -#set ($itemCount2 = $itemCount2 + 1) -#set ($itemCount3 = 0) -#foreach($dbId in $databaseId) -#set ($itemCount3 = $itemCount3 + 1) -#if ($itemCount3 == $itemCount2 && $itemCount2 == $itemCount) -#set ($checker = "#mmarkers(${dbName},${dbId},${specName},'MILE MARKER',true)") + +##set ($mm1 = [${i435mm},${i435mmid},'INTERSTATE 435','MILE MARKER',true]) +##set ($mm2 = [${i70momm},${i70mommid},'INTERSTATE 70 IN MISSOURI','MILE MARKER',true]) +##set ($mm3 = [${i35momm},${i35mommid},'INTERSTATE 70 IN KANSAS','MILE MARKER',true]) +##set ($varList = [$mm1,$mm2,$mm3]) + +#foreach ($var in $varList) +#set ($checker = "#mmarkers(${list.get(${var},0)},${list.get(${var},1)},${list.get(${var},2)},${list.get(${var},3)},${list.get(${var},4)})") #if ($checker.length() > 0) #set ($hits = $hits + 1) #set ($bigList = "$bigList $checker") #end #end -#end -#end -#end #if ($hits == 1) THIS INCLUDES$bigList #end diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.xml index ff97807137..818e2157d5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/mileMarkers.xml @@ -8,22 +8,52 @@ SHOULD BE MODIFIED. EXAMPLE FOR INTERSTATE 435 in the Kansas City Metro follows: - + + - i435mm + i435 NAME POINTS true 1000 100 + + gid + - i435mm + i435 GID POINTS true 1000 100 + + gid + - --> \ No newline at end of file + + i35mo + NAME + POINTS + true + 1000 + 100 + + gid + + + + i35mo + GID + POINTS + true + 1000 + 100 + + gid + + + --> + \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/milemarkers.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/milemarkers.vm deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/milemarkers.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/milemarkers.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/com.raytheon.edex.autobldsrv/res/spring/subscription-spring.xml b/edexOsgi/com.raytheon.edex.autobldsrv/res/spring/subscription-spring.xml index c7050e3009..cdf139c5bf 100644 --- a/edexOsgi/com.raytheon.edex.autobldsrv/res/spring/subscription-spring.xml +++ b/edexOsgi/com.raytheon.edex.autobldsrv/res/spring/subscription-spring.xml @@ -50,7 +50,7 @@ - + diff --git a/edexOsgi/com.raytheon.edex.ingestsrv/res/spring/persist-ingest.xml b/edexOsgi/com.raytheon.edex.ingestsrv/res/spring/persist-ingest.xml index ca32da1f75..23ffbb0dcc 100644 --- a/edexOsgi/com.raytheon.edex.ingestsrv/res/spring/persist-ingest.xml +++ b/edexOsgi/com.raytheon.edex.ingestsrv/res/spring/persist-ingest.xml @@ -76,7 +76,7 @@ - + diff --git a/edexOsgi/com.raytheon.edex.plugin.airep/res/spring/airep-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.airep/res/spring/airep-ingest.xml index 3fa5094f14..a757baaf8e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.airep/res/spring/airep-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.airep/res/spring/airep-ingest.xml @@ -12,7 +12,7 @@ - + airep - + --> - + airep diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning_ep-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning_ep-ingest.xml index 22f5fb05ea..0e28d3357b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning_ep-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning_ep-ingest.xml @@ -9,7 +9,7 @@ - + binlightning - + --> - + binlightning diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/res/spring/bufrmos-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.bufrmos/res/spring/bufrmos-ingest.xml index 656b35ba9b..90ea632604 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/res/spring/bufrmos-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/res/spring/bufrmos-ingest.xml @@ -8,7 +8,7 @@ - + bufrmos - + --> - + bufrmos diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-ingest.xml index 4b2643dff6..df4ddcd80c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-ingest.xml @@ -32,13 +32,13 @@ bufrua - + --> - + bufrua diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/res/spring/ccfp-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ccfp/res/spring/ccfp-ingest.xml index bca9b008bb..a13ea2bad9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/res/spring/ccfp-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/res/spring/ccfp-ingest.xml @@ -29,13 +29,13 @@ ccfp - + --> - + ccfp diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-common.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-common.xml index 9035319bc5..495781a71b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-common.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-common.xml @@ -55,7 +55,7 @@ errorHandlerRef="errorHandler"> - + @@ -87,7 +87,7 @@ - + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml index b1b68a4994..b296dc27ba 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml @@ -464,9 +464,9 @@ - - + @@ -487,11 +487,11 @@ - + - + @@ -623,7 +623,7 @@ - + @@ -643,7 +643,7 @@ errorHandlerRef="errorHandler" autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml index c2c87fd5bf..0f267bc501 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml @@ -8,8 +8,8 @@ - + @@ -40,7 +40,7 @@ xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler"> - + @@ -51,7 +51,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -117,9 +117,9 @@ - + - + java.lang.Throwable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java index f56c8d9a14..23dbcf7fa5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java @@ -21,7 +21,6 @@ package com.raytheon.edex.plugin.gfe.cache.d2dparms; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -72,6 +71,8 @@ import com.raytheon.uf.edex.site.SiteAwareRegistry; * Mar 20, 2013 #1774 randerso Changed to use GFDD2DDao * Apr 01, 2013 #1774 randerso Moved wind component checking to GfeIngestNotificaionFilter * May 14, 2013 #2004 randerso Added DBInvChangeNotifications when D2D data is purged + * Sep 12, 2013 #2348 randerso Changed to send DBInvChangeNotifications in a batch instead + * of one at a time. * * * @@ -346,13 +347,8 @@ public class D2DParmIdCache { putParmIDList(parmIds); List currentDbInventory = this.getDatabaseIDs(); dbsToRemove.removeAll(currentDbInventory); - List invChgList = new ArrayList( - dbsToRemove.size()); - for (DatabaseID dbId : dbsToRemove) { - invChgList.add(new DBInvChangeNotification(null, Arrays - .asList(dbId), siteID)); - } - SendNotifications.send(invChgList); + SendNotifications.send(new DBInvChangeNotification(null, + dbsToRemove, siteID)); // inform GfeIngestNotificationFilter of removed dbs GfeIngestNotificationFilter.purgeDbs(dbsToRemove); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java index ac19cd6994..106c4fd65f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java @@ -88,7 +88,7 @@ import com.raytheon.uf.edex.site.notify.SendSiteActivationNotifications; * activation. * Mar 20, 2013 #1774 randerso Changed to use GFED2DDao * May 02, 2013 #1969 randerso Moved updateDbs method into IFPGridDatabase - * + * Sep 13, 2013 2368 rjpeter Used durable jms settings. * * * @author njensen @@ -115,7 +115,7 @@ public class GFESiteActivation implements ISiteActivationListener { private boolean intialized = false; - private ExecutorService postActivationTaskExecutor = MoreExecutors + private final ExecutorService postActivationTaskExecutor = MoreExecutors .getExitingExecutorService((ThreadPoolExecutor) Executors .newCachedThreadPool()); @@ -356,7 +356,7 @@ public class GFESiteActivation implements ISiteActivationListener { GridDatabase db = GridParmManager.getDb(dbid); // cluster locked since IFPGridDatabase can modify the grids // based on changes to grid size, etc - if (db instanceof IFPGridDatabase && db.databaseIsValid()) { + if ((db instanceof IFPGridDatabase) && db.databaseIsValid()) { ((IFPGridDatabase) db).updateDbs(); } } @@ -410,7 +410,7 @@ public class GFESiteActivation implements ISiteActivationListener { long startTime = System.currentTimeMillis(); // wait for system startup or at least 3 minutes while (!EDEXUtil.isRunning() - || System.currentTimeMillis() > startTime + 180000) { + || (System.currentTimeMillis() > (startTime + 180000))) { try { Thread.sleep(15000); } catch (InterruptedException e) { @@ -420,7 +420,7 @@ public class GFESiteActivation implements ISiteActivationListener { ClusterTask ct = ClusterLockUtils.lookupLock(TASK_NAME, SMART_INIT_TASK_DETAILS + siteID); - if (ct.getLastExecution() + SMART_INIT_TIMEOUT < System + if ((ct.getLastExecution() + SMART_INIT_TIMEOUT) < System .currentTimeMillis()) { ct = ClusterLockUtils.lock(TASK_NAME, SMART_INIT_TASK_DETAILS + siteID, @@ -467,7 +467,7 @@ public class GFESiteActivation implements ISiteActivationListener { "Firing smartinit for " + id); try { producer.sendAsyncUri( - "jms-generic:queue:manualSmartInit", + "jms-durable:queue:manualSmartInit", id + ":0::" + SmartInitRecord.SITE_ACTIVATION_INIT_PRIORITY); @@ -499,7 +499,7 @@ public class GFESiteActivation implements ISiteActivationListener { long startTime = System.currentTimeMillis(); // wait for system startup or at least 3 minutes while (!EDEXUtil.isRunning() - || System.currentTimeMillis() > startTime + 180000) { + || (System.currentTimeMillis() > (startTime + 180000))) { try { Thread.sleep(15000); } catch (InterruptedException e) { diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java index 110f104736..e39f39347c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java @@ -100,6 +100,12 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger; * Removed inventory from DBInvChangedNotification * 05/03/13 #1974 randerso Fixed error logging to include stack trace * 05/14/13 #2004 randerso Added methods to synch GridParmManager across JVMs + * 09/12/13 #2348 randerso Added logging when database are added/removed from dbMap + * Fixed the synchronization of dbMap with the database inventory + * Changed to call D2DGridDatabase.getDatabase instead of calling + * the constructor directly to ensure the data exists before creating + * the D2DGridDatabase object + * * * * @author bphillip @@ -1016,10 +1022,10 @@ public class GridParmManager { sr.addMessage("VersionPurge failed - couldn't get inventory"); return sr; } - List databases = sr.getPayload(); + List currentInv = sr.getPayload(); // sort the inventory by site, type, model, time (most recent first) - Collections.sort(databases); + Collections.sort(currentInv); // process the inventory looking for "old" unwanted databases String model = null; @@ -1027,7 +1033,7 @@ public class GridParmManager { String type = null; int count = 0; int desiredVersions = 0; - for (DatabaseID dbId : databases) { + for (DatabaseID dbId : currentInv) { // new series? if (!dbId.getSiteId().equals(site) || !dbId.getDbType().equals(type) @@ -1055,11 +1061,31 @@ public class GridParmManager { } } + List newInv = getDbInventory(siteID).getPayload(); + List additions = new ArrayList(newInv); + additions.removeAll(currentInv); + + List deletions = new ArrayList(currentInv); + deletions.removeAll(newInv); + // kludge to keep dbMap in synch until GridParmManager/D2DParmICache // merge/refactor - dbMap.keySet().retainAll(databases); + List toRemove = new ArrayList(dbMap.keySet()); + toRemove.removeAll(newInv); + for (DatabaseID dbId : toRemove) { + statusHandler + .info("Synching GridParmManager with database inventory, removing " + + dbId); + dbMap.remove(dbId); - createDbNotification(siteID, databases); + // add any removals to the deletions list + // so notifications go to the other JVMs + if (!deletions.contains(dbId)) { + deletions.add(dbId); + } + } + + createDbNotification(siteID, additions, deletions); return sr; } @@ -1220,8 +1246,8 @@ public class GridParmManager { // ingested String d2dModelName = serverConfig .d2dModelNameMapping(modelName); - db = new D2DGridDatabase(serverConfig, d2dModelName, - dbId.getModelTimeAsDate()); + db = D2DGridDatabase.getDatabase(serverConfig, + d2dModelName, dbId.getModelTimeAsDate()); } catch (Exception e) { statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); @@ -1244,6 +1270,7 @@ public class GridParmManager { } if ((db != null) && db.databaseIsValid()) { + statusHandler.info("getDb called, adding " + dbId); dbMap.put(dbId, db); } } @@ -1255,6 +1282,8 @@ public class GridParmManager { while (iter.hasNext()) { DatabaseID dbId = iter.next(); if (dbId.getSiteId().equals(siteID)) { + statusHandler.info("purgeDbCache(" + siteID + "), removing " + + dbId); iter.remove(); } } @@ -1370,18 +1399,6 @@ public class GridParmManager { return sr; } - private static void createDbNotification(String siteID, - List prevInventory) { - List newInventory = getDbInventory(siteID).getPayload(); - List additions = new ArrayList(newInventory); - additions.removeAll(prevInventory); - - List deletions = new ArrayList(prevInventory); - deletions.removeAll(newInventory); - - createDbNotification(siteID, additions, deletions); - } - private static void createDbNotification(String siteID, List additions, List deletions) { if (!additions.isEmpty() || !deletions.isEmpty()) { @@ -1400,6 +1417,7 @@ public class GridParmManager { "Unable to purge model database: " + id, e); } } + statusHandler.info("deallocateDb called, removing " + id); dbMap.remove(id); } @@ -1429,6 +1447,9 @@ public class GridParmManager { } for (DatabaseID dbId : invChanged.getDeletions()) { + statusHandler + .info("DBInvChangeNotification deletion received, removing " + + dbId); dbMap.remove(dbId); } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java index 4d398756e0..9f35eabb27 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java @@ -43,7 +43,6 @@ import com.raytheon.edex.plugin.gfe.db.dao.GFED2DDao; import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfo; import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfoLookup; import com.raytheon.edex.plugin.gfe.paraminfo.ParameterInfo; -import com.raytheon.edex.plugin.gfe.server.GridParmManager; import com.raytheon.uf.common.comm.CommunicationException; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; @@ -107,6 +106,9 @@ import com.raytheon.uf.edex.database.DataAccessLayerException; * 04/17/2013 #1913 randerso Added GFE level mapping to replace GridTranslator * 05/02/2013 #1969 randerso Removed unnecessary updateDbs method * 05/03/2013 #1974 randerso Fixed error handling when no D2D level mapping found + * 09/12/2013 #2348 randerso Removed code that called getDb from getD2DDatabaseIdsFromDb + * Added function to create a D2DGridDatabase object only if there is + * data in postgres for the desired model/reftime * * * @@ -135,6 +137,33 @@ public class D2DGridDatabase extends VGridDatabase { gfeModelName, modelTime); } + /** + * Get a D2DGridDatabase if it is available + * + * @param config + * configuration for site + * @param dbId + * DatabaseID of desired database + * @return D2DGridDatabase or null if not available + */ + public static D2DGridDatabase getDatabase(IFPServerConfig config, + String d2dModelName, Date refTime) { + try { + GFED2DDao dao = new GFED2DDao(); + List result = dao.getModelRunTimes(d2dModelName, -1); + + if (result.contains(refTime)) { + D2DGridDatabase db = new D2DGridDatabase(config, d2dModelName, + refTime); + return db; + } + return null; + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); + return null; + } + } + /** * Retrieves DatabaseIDs for all model runs of a given d2dModelName * @@ -178,15 +207,7 @@ public class D2DGridDatabase extends VGridDatabase { for (Date date : result) { DatabaseID dbId = null; dbId = getDbId(d2dModelName, date, config); - try { - GridDatabase db = GridParmManager.getDb(dbId); - if ((db != null) && !dbInventory.contains(dbId)) { - dbInventory.add(dbId); - } - } catch (GfeException e) { - statusHandler.handle(Priority.PROBLEM, - e.getLocalizedMessage(), e); - } + dbInventory.add(dbId); } return dbInventory; } catch (PluginException e) { @@ -285,10 +306,14 @@ public class D2DGridDatabase extends VGridDatabase { /** * Constructs a new D2DGridDatabase * + * For internal use only. External code should call + * D2DGridDatabase.getDatabase(IFPServerConfig, String, Date) to ensure + * objects are only created if data is present + * * @param dbId * The database ID of this database */ - public D2DGridDatabase(IFPServerConfig config, String d2dModelName, + private D2DGridDatabase(IFPServerConfig config, String d2dModelName, Date refTime) throws GfeException { super(config); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/SmartInitRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/SmartInitRequestHandler.java index 3492acf6d8..8a57825302 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/SmartInitRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/SmartInitRequestHandler.java @@ -35,7 +35,7 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler; import com.raytheon.uf.edex.core.EDEXUtil; /** - * TODO Add Description + * Handler for SmartInitRequest. * *
  * 
@@ -43,7 +43,7 @@ import com.raytheon.uf.edex.core.EDEXUtil;
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Oct 12, 2010            dgilling     Initial creation
- * 
+ * Sep 13, 2013 2368       rjpeter      Used durable jms settings.
  * 
* * @author dgilling @@ -93,7 +93,7 @@ public class SmartInitRequestHandler implements .append(SmartInitRecord.MANUAL_SMART_INIT_PRIORITY); EDEXUtil.getMessageProducer().sendAsyncUri( - "jms-generic:queue:manualSmartInit", + "jms-durable:queue:manualSmartInit", manualInitString.toString()); } else { sr.addMessage("No valid model data could be retrieved for model " diff --git a/edexOsgi/com.raytheon.edex.plugin.goessounding/res/spring/goessounding-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.goessounding/res/spring/goessounding-ingest.xml index ea38fe8764..25158070e6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.goessounding/res/spring/goessounding-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.goessounding/res/spring/goessounding-ingest.xml @@ -12,7 +12,7 @@ - + goessounding - +
--> - + goessounding diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.deprecated/grib-decode.xml b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.deprecated/grib-decode.xml index 19b4807c0b..c8556bce9f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.deprecated/grib-decode.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.deprecated/grib-decode.xml @@ -6,14 +6,11 @@ - + - - - - + @@ -61,7 +58,7 @@ autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.future/grib-decode.xml b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.future/grib-decode.xml index 19236c7b3d..3c36fb0ed9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.future/grib-decode.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring.future/grib-decode.xml @@ -6,14 +6,11 @@ - + - - - - + @@ -57,7 +54,7 @@ autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/datasetInfo/gribDatasets_RFC-9.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/datasetInfo/gribDatasets_RFC-9.xml index 9f7bf13420..b6b933f6a3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/datasetInfo/gribDatasets_RFC-9.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/common_static/base/grid/datasetInfo/gribDatasets_RFC-9.xml @@ -515,11 +515,6 @@ FFG-TIR
1
- - FFG-TIR-HiRes - FFG-TIR-HiRes -
1
-
QPE-TIR QPE-TIR diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml index 15eb7b2bd5..5483816d9d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml @@ -1079,19 +1079,9 @@ 180 - - - FFG-TIR -
9
- 160 - 240160 - - 151 - -
- FFG-TIR-HiRes + FFG-TIR
9
160 250160 diff --git a/edexOsgi/com.raytheon.edex.plugin.ldad/res/spring/ldad-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldad/res/spring/ldad-ingest.xml index 3cc4285252..6c33246a98 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldad/res/spring/ldad-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldad/res/spring/ldad-ingest.xml @@ -21,11 +21,11 @@ ldad - +
- + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml index 9823726819..fda646aaea 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml @@ -13,7 +13,7 @@ - + @@ -28,7 +28,7 @@ errorHandlerRef="errorHandler" autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml index 8911bac188..08bb3d9182 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml @@ -12,7 +12,7 @@ - + - + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/res/spring/ldadprofiler-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/res/spring/ldadprofiler-ingest.xml index 18fb79835a..cdde40ba86 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/res/spring/ldadprofiler-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/res/spring/ldadprofiler-ingest.xml @@ -16,7 +16,7 @@ - + ldadprofiler - + --> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-ingest.xml index d2479bf461..5a664102f7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-ingest.xml @@ -22,7 +22,7 @@ - + modelsounding - + --> - + modelsounding diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml index f30d8ffeeb..5bec4f52ae 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml @@ -12,7 +12,7 @@ - + obs - + --> - + obs diff --git a/edexOsgi/com.raytheon.edex.plugin.pirep/res/spring/pirep-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.pirep/res/spring/pirep-ingest.xml index 8a3bc973bd..444d2faa3f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.pirep/res/spring/pirep-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.pirep/res/spring/pirep-ingest.xml @@ -34,12 +34,12 @@ pirep - + --> - + pirep diff --git a/edexOsgi/com.raytheon.edex.plugin.poessounding/res/spring/poessounding-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.poessounding/res/spring/poessounding-ingest.xml index 431cfa949a..b82366bf4b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.poessounding/res/spring/poessounding-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.poessounding/res/spring/poessounding-ingest.xml @@ -9,7 +9,7 @@ - + poessounding - + --> - + poessounding diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-ingest.xml index c7023d4244..6b15f7bfe7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-ingest.xml @@ -9,7 +9,7 @@ - + profiler - + --> - + profiler diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-ingest.xml index 992b1ffa71..4099b9b31c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-ingest.xml @@ -6,12 +6,11 @@ - + - - + @@ -54,7 +53,7 @@ - + radar-sbn @@ -62,7 +61,7 @@ - + radar-local diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/res/spring/recco-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.recco/res/spring/recco-ingest.xml index ffbb96a228..2ef0c4dbe6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.recco/res/spring/recco-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.recco/res/spring/recco-ingest.xml @@ -33,13 +33,13 @@ recco - + --> - + recco diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/res/spring/redbook-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.redbook/res/spring/redbook-ingest.xml index c040dfe92c..710cbff1f2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/res/spring/redbook-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/res/spring/redbook-ingest.xml @@ -10,7 +10,7 @@ - + - + redbook diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-ingest.xml index 1a7cbda284..0268baaa52 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-ingest.xml @@ -4,11 +4,11 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - + - + @@ -47,13 +47,13 @@ satellite - + --> - + satellite diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/spring/sfcobs-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/spring/sfcobs-ingest.xml index 74331b1784..a8d9d8c731 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/spring/sfcobs-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/spring/sfcobs-ingest.xml @@ -13,7 +13,7 @@ - + sfcobs - + --> - + sfcobs diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/res/spring/shef-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.shef/res/spring/shef-ingest.xml index ba744a3c9a..94e68bba7a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/res/spring/shef-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.shef/res/spring/shef-ingest.xml @@ -4,11 +4,11 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - + - + @@ -47,13 +47,13 @@ factory-method="register"> + value="jms-dist:queue:Ingest.Shef"/> - + + uri="jms-durable:queue:Ingest.ShefManual"/> @@ -92,7 +92,7 @@ + uri="jms-shef:queue:Ingest.Shef"/> shef @@ -103,7 +103,7 @@ + uri="jms-shef:queue:Ingest.ShefStaged"/> shef @@ -119,7 +119,7 @@ - + @@ -134,7 +134,7 @@ + uri="jms-durable:queue:Ingest.ShefStaged"/>
@@ -155,7 +155,7 @@ + uri="jms-shef:queue:Ingest.ShefManual"/> shef diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java index c355d74a3d..1fc27abaf0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java @@ -80,6 +80,7 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; * 02/24/2012 14535 W. Kwock Correct the duration value. * 11/29/2012 15530 lbousaidi corrected posting and production time for * latestobsvalue table. + * 09/19/2013 16515 w. Kwock Fix the excessive digits in rawpp,lake,height...tables * * * @@ -1065,7 +1066,7 @@ public class PostTables { cs.setString(5, shefData.getExtremum().getCode()); cs.setTimestamp(6, new Timestamp(shefData.getObservationTimeObj() .getTime())); - cs.setFloat(7, Float.parseFloat(dataValue)); + cs.setDouble(7, Double.parseDouble(dataValue)); cs.setString(8, qualifier); cs.setInt(9, (int) qualityCode); @@ -1184,7 +1185,7 @@ public class PostTables { cs.setString(5, shefData.getExtremum().getCode()); cs.setTimestamp(6, new java.sql.Timestamp(shefData .getObservationTimeObj().getTime())); - cs.setFloat(7, Float.parseFloat(dataValue)); + cs.setDouble(7, Double.parseDouble(dataValue)); cs.setString(8, qualifier); cs.setInt(9, (int) qualityCode); @@ -1316,7 +1317,7 @@ public class PostTables { timeStamp = new java.sql.Timestamp(basisDate.getTime()); cs.setTimestamp(8, timeStamp); - cs.setFloat(9, Float.parseFloat(dataValue)); + cs.setDouble(9, Double.parseDouble(dataValue)); cs.setString(10, qualifier); @@ -1534,7 +1535,7 @@ public class PostTables { ps.setTimestamp(8, timeStamp2); // ps.setFloat(9, Float.parseFloat(shefDataValue.getStringValue())); - ps.setFloat(9, shefDataValue.getValue().floatValue()); + ps.setDouble(9, shefDataValue.getValue().floatValue()); if (updateFlag) { ps.setString(10, lid); diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/res/spring/taf-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.taf/res/spring/taf-ingest.xml index 6fa7bc90db..fcd1df9358 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/res/spring/taf-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.taf/res/spring/taf-ingest.xml @@ -9,13 +9,13 @@ - + - + taf - + --> - + taf @@ -69,7 +69,5 @@
- - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml index 4b03fe4a5e..945f5599a4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml @@ -11,7 +11,7 @@ - + - + @@ -33,12 +33,11 @@ - + - - + @@ -66,7 +65,7 @@ text - +
--> @@ -120,7 +119,7 @@ - + text @@ -147,7 +146,7 @@ - + @@ -156,7 +155,7 @@ - + diff --git a/edexOsgi/com.raytheon.edex.plugin.textlightning/res/spring/textlightning_ep-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.textlightning/res/spring/textlightning_ep-ingest.xml index f4a6428e18..feb8c3a7a6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.textlightning/res/spring/textlightning_ep-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.textlightning/res/spring/textlightning_ep-ingest.xml @@ -9,7 +9,7 @@ - + textlightning - + --> - + textlightning diff --git a/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-ingest.xml index 85a08e2df5..a088d2fc1b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-ingest.xml @@ -8,13 +8,13 @@ - + - + - + - - + @@ -49,7 +48,7 @@ warning - + --> @@ -57,7 +56,7 @@ Warning routes --> - + warning @@ -72,7 +71,7 @@ - + @@ -89,6 +88,5 @@ - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/EmergencyType.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/EmergencyType.java new file mode 100644 index 0000000000..bcb1ff1d76 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/EmergencyType.java @@ -0,0 +1,91 @@ +/** + * 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.common.dataplugin.warning; + +/** + * Helps manage and identify emergency products. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep  4, 2013  2176      jsanchez     Initial creation
+ * 
+ * 
+ * + * @author jsanchez + * @version 1.0 + */ + +public class EmergencyType { + + public static final String EMER = "EMER"; + + private static final EmergencyType TORNADO = new EmergencyType( + "TORNADO EMERGENCY", "TO.W"); + + private static final EmergencyType FLASH_FLOOD = new EmergencyType( + "FLASH FLOOD EMERGENCY", "FF.W"); + + private final String value; + + private final String phensig; + + private final static EmergencyType[] values = new EmergencyType[] { + TORNADO, FLASH_FLOOD }; + + private EmergencyType(String type, String phensig) { + this.value = type; + this.phensig = phensig; + } + + public static EmergencyType valueOf(String phensig) { + EmergencyType type = null; + for (EmergencyType t : values) { + if (t.phensig.equals(phensig)) { + type = t; + break; + } + } + return type; + } + + /** + * Checks to see if the text product is an emergency product. + * + * @param rawmessage + * @return + */ + public static boolean isEmergency(String rawmessage) { + for (EmergencyType type : values) { + if (rawmessage != null && rawmessage.contains(type.getValue())) { + return true; + } + } + return false; + } + + public String getValue() { + return value; + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.activetable/res/spring/activetable-ingest.xml b/edexOsgi/com.raytheon.uf.edex.activetable/res/spring/activetable-ingest.xml index 83a30388cb..0d6e84d11e 100644 --- a/edexOsgi/com.raytheon.uf.edex.activetable/res/spring/activetable-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.activetable/res/spring/activetable-ingest.xml @@ -11,7 +11,7 @@ autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/RemoteRequestRouteWrapper.java b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/RemoteRequestRouteWrapper.java index e053ec67f4..527121de78 100644 --- a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/RemoteRequestRouteWrapper.java +++ b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/RemoteRequestRouteWrapper.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.edex.auth; +import java.io.InputStream; + import com.raytheon.uf.common.auth.AuthException; import com.raytheon.uf.common.auth.resp.AuthServerErrorResponse; import com.raytheon.uf.common.serialization.ExceptionWrapper; @@ -41,13 +43,15 @@ import com.raytheon.uf.common.util.SizeUtil; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 10, 2009 mschenke Initial creation - * Jul 24, 2012 njensen Enhanced logging - * + * Jul 24, 2012 njensen Enhanced logging + * Jun 24, 2013 2136 rjpeter Switched to accepting InputStream to reduce garbage + * objected generated by camel doing the auto conversion. * * * @author mschenke * @version 1.0 */ + public class RemoteRequestRouteWrapper { private static final IUFStatusHandler thriftSrvLogger = UFStatus @@ -55,10 +59,11 @@ public class RemoteRequestRouteWrapper { private RemoteRequestServer server; - public byte[] executeThrift(byte[] data) { + public byte[] executeThrift(InputStream data) { try { long startTime = System.currentTimeMillis(); - Object obj = SerializationUtil.transformFromThrift(data); + Object obj = SerializationUtil.transformFromThrift(Object.class, + data); IServerRequest request = null; if (obj instanceof RequestWrapper) { request = ((RequestWrapper) obj).getRequest(); @@ -70,9 +75,7 @@ public class RemoteRequestRouteWrapper { long endTime = System.currentTimeMillis(); StringBuilder sb = new StringBuilder(300); sb.append("Handled ").append(obj.toString()).append(" in ") - .append((endTime - startTime)).append("ms, "); - sb.append("request was size ").append( - SizeUtil.prettyByteSize(data.length)); + .append((endTime - startTime)).append("ms"); sb.append(", response was size ").append( SizeUtil.prettyByteSize(rval.length)); thriftSrvLogger.info(sb.toString()); @@ -84,7 +87,8 @@ public class RemoteRequestRouteWrapper { try { return SerializationUtil.transformToThrift(resp); } catch (SerializationException e1) { - e1.printStackTrace(); + thriftSrvLogger.error( + "Failed to serialize AuthException to client", e1); return new byte[] {}; } } catch (Throwable t) { @@ -93,7 +97,8 @@ public class RemoteRequestRouteWrapper { resp.setException(ExceptionWrapper.wrapThrowable(t)); return SerializationUtil.transformToThrift(resp); } catch (SerializationException e) { - e.printStackTrace(); + thriftSrvLogger.error( + "Failed to serialize throwable to client", e); return new byte[] {}; } } diff --git a/edexOsgi/com.raytheon.uf.edex.cpgsrv/res/spring/cpgsrv-spring.xml b/edexOsgi/com.raytheon.uf.edex.cpgsrv/res/spring/cpgsrv-spring.xml index 8e6590e032..69c5a9e7f6 100644 --- a/edexOsgi/com.raytheon.uf.edex.cpgsrv/res/spring/cpgsrv-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.cpgsrv/res/spring/cpgsrv-spring.xml @@ -30,9 +30,9 @@ - - - + + + java.lang.Throwable @@ -42,7 +42,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery-edex-impl.xml b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery-edex-impl.xml index 82c5961d31..290cab7094 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery-edex-impl.xml +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery-edex-impl.xml @@ -54,7 +54,7 @@ + uri="jms-durable:queue:matureSubscriptions"/> diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.event/res/spring/event-datadelivery-ingest.xml b/edexOsgi/com.raytheon.uf.edex.datadelivery.event/res/spring/event-datadelivery-ingest.xml index b46677e860..6b0bf48923 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.event/res/spring/event-datadelivery-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.event/res/spring/event-datadelivery-ingest.xml @@ -6,7 +6,7 @@ + value="jms-generic:topic:notify.msg"/> diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/res/spring/harvester-datadelivery.xml b/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/res/spring/harvester-datadelivery.xml index a08888d46f..15d153514a 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/res/spring/harvester-datadelivery.xml +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.harvester/res/spring/harvester-datadelivery.xml @@ -2,13 +2,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - - - + @@ -29,11 +24,11 @@ errorHandlerRef="errorHandler"> - + - + diff --git a/edexOsgi/com.raytheon.uf.edex.dissemination/res/spring/dissemination-request.xml b/edexOsgi/com.raytheon.uf.edex.dissemination/res/spring/dissemination-request.xml index 592aad665e..4c6ca44914 100644 --- a/edexOsgi/com.raytheon.uf.edex.dissemination/res/spring/dissemination-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.dissemination/res/spring/dissemination-request.xml @@ -34,12 +34,12 @@ a new route and use moveFileToArchive --> + uri="jms-durable:queue:Ingest.handleoup"/> + uri="jms-durable:queue:handleoup.dropbox"/> java.lang.Throwable - + + - - - + @@ -30,7 +29,7 @@ - + @@ -41,7 +40,7 @@ - + @@ -52,7 +51,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml index bc32359ada..7db114019d 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml @@ -9,13 +9,13 @@ - + - + dpa - + --> - + dpa @@ -60,6 +60,5 @@ - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/arealffgGenerator-spring.xml b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/arealffgGenerator-spring.xml index bf202ee202..1f19aed7ac 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/arealffgGenerator-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/arealffgGenerator-spring.xml @@ -31,14 +31,14 @@ arealffg - + --> - + dhr @@ -52,7 +52,7 @@ errorHandlerRef="errorHandler"> - + diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/q2FileProcessor-spring.xml b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/q2FileProcessor-spring.xml index 0a6b8311c5..4c90c7a7f8 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/q2FileProcessor-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/q2FileProcessor-spring.xml @@ -8,7 +8,7 @@ - + - + diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/HPEDhrSrv.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/HPEDhrSrv.java index 0c2b467dd2..bcdd7a2d1e 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/HPEDhrSrv.java +++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/HPEDhrSrv.java @@ -49,12 +49,12 @@ import com.raytheon.uf.edex.ohd.MainMethod; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 20, 2010 4200 snaples Initial creation - * Mar 09, 2012 417 dgilling Refactor to use two-stage queue + * Jan 20, 2010 4200 snaples Initial creation + * Mar 09, 2012 417 dgilling Refactor to use two-stage queue * process. * Mar 20, 2013 1804 bsteffen Switch all radar decompressing to be in * memory. - * + * Sep 13, 2013 2368 rjpeter Updated to use durable jms settings. * * * @author snaples @@ -92,9 +92,9 @@ public class HPEDhrSrv { private static final int DT_IDX = 2; - private static final String JMS_QUEUE_URI = "jms-generic:queue:dhrProcess"; + private static final String JMS_QUEUE_URI = "jms-durable:queue:dhrProcess"; - private AppsDefaults appsDefaults = AppsDefaults.getInstance(); + private final AppsDefaults appsDefaults = AppsDefaults.getInstance(); /** * Route endpoint for "dhrIngestRoute". Takes a message, writes the file to diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acars/res/spring/acars-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acars/res/spring/acars-ingest.xml index 1fdc32f63e..3970913f1b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acars/res/spring/acars-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acars/res/spring/acars-ingest.xml @@ -10,7 +10,7 @@ - + acars - + --> - + acars diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/res/spring/bufrascat-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/res/spring/bufrascat-ingest.xml index 7b06593774..555e481851 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/res/spring/bufrascat-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/res/spring/bufrascat-ingest.xml @@ -37,13 +37,13 @@ bufrascat - + --> - + bufrascat diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/res/spring/bufrhdw-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/res/spring/bufrhdw-ingest.xml index 6ec50ec4c1..13c2a92577 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/res/spring/bufrhdw-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/res/spring/bufrhdw-ingest.xml @@ -10,7 +10,7 @@ - + bufrhdw - + --> - + bufrhdw diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/res/spring/bufrmthdw-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/res/spring/bufrmthdw-ingest.xml index f9ac6f6360..4e14275afa 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/res/spring/bufrmthdw-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/res/spring/bufrmthdw-ingest.xml @@ -10,7 +10,7 @@ - + bufrmthdw - + --> - + bufrmthdw diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/res/spring/bufrncwf-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/res/spring/bufrncwf-ingest.xml index 086d87414c..09d6036294 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/res/spring/bufrncwf-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/res/spring/bufrncwf-ingest.xml @@ -9,7 +9,7 @@ - + bufrncwf - + --> - + bufrncwf diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/res/spring/bufrquikscat-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/res/spring/bufrquikscat-ingest.xml index b87f4f528d..33bbe3d3ea 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/res/spring/bufrquikscat-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/res/spring/bufrquikscat-ingest.xml @@ -16,7 +16,7 @@ - + bufrquikscat - + --> - + bufrquikscat diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/res/spring/bufrsigwx-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/res/spring/bufrsigwx-ingest.xml index 105354db60..83a5477522 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/res/spring/bufrsigwx-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/res/spring/bufrsigwx-ingest.xml @@ -32,13 +32,13 @@ bufrsigwx - + --> - + bufrsigwx diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/res/spring/bufrssmi-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/res/spring/bufrssmi-ingest.xml index a6b184480e..f46b4a195a 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/res/spring/bufrssmi-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/res/spring/bufrssmi-ingest.xml @@ -16,7 +16,7 @@ - + bufrssmi - + --> - + bufrssmi diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/res/spring/cwa-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/res/spring/cwa-ingest.xml index 4ffba53407..7170d7db2e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/res/spring/cwa-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/res/spring/cwa-ingest.xml @@ -24,7 +24,7 @@ autoStartup="false"> - + cwa diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/res/spring/cwat-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/res/spring/cwat-ingest.xml index 0e0a471a98..1a230939fd 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/res/spring/cwat-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/res/spring/cwat-ingest.xml @@ -12,7 +12,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml index fdb5c7ecc8..7c9a709340 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml @@ -28,7 +28,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.fog/res/spring/fog-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.fog/res/spring/fog-ingest.xml index d860306f98..d6e9e55176 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.fog/res/spring/fog-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.fog/res/spring/fog-ingest.xml @@ -12,7 +12,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/res/spring/fssobs-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/res/spring/fssobs-ingest.xml index fc44cc5c1f..3c80ab9e44 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/res/spring/fssobs-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/res/spring/fssobs-ingest.xml @@ -15,7 +15,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/res/spring/ldadmesonet-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/res/spring/ldadmesonet-ingest.xml index 41c7f38307..156bced102 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/res/spring/ldadmesonet-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/res/spring/ldadmesonet-ingest.xml @@ -15,7 +15,7 @@ - + @@ -30,7 +30,7 @@ errorHandlerRef="errorHandler" autoStartup="false"> - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.loctables/res/spring/loctables-spring.xml b/edexOsgi/com.raytheon.uf.edex.plugin.loctables/res/spring/loctables-spring.xml index 19e95ab8f8..761d2fdf82 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.loctables/res/spring/loctables-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.loctables/res/spring/loctables-spring.xml @@ -33,7 +33,7 @@ - + loctables diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/res/spring/lsr-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/res/spring/lsr-ingest.xml index 388c01b927..ca898cf275 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/res/spring/lsr-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/res/spring/lsr-ingest.xml @@ -31,13 +31,13 @@ lsr - + --> - + lsr diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-request.xml b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-request.xml index 3018e3d30a..eab8b24d84 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-request.xml @@ -8,11 +8,11 @@ - + - + java.lang.Throwable diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-spring.xml b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-spring.xml index 7c5c1010eb..5b7d9ec7a2 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/res/spring/manualIngest-spring.xml @@ -16,7 +16,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/res/spring/mesowest-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/res/spring/mesowest-ingest.xml index fc04d39b07..23a5694be6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/res/spring/mesowest-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/res/spring/mesowest-ingest.xml @@ -49,13 +49,13 @@ mesowest - + --> - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/res/spring/crimss-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/res/spring/crimss-ingest.xml index 311684aff5..7f2882bc9f 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/res/spring/crimss-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/res/spring/crimss-ingest.xml @@ -24,7 +24,7 @@ - + crimss diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.nucaps/res/spring/nucaps-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.nucaps/res/spring/nucaps-ingest.xml index 29c2aa2faa..5cb9948a33 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.nucaps/res/spring/nucaps-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.nucaps/res/spring/nucaps-ingest.xml @@ -24,7 +24,7 @@ - + nucaps diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml index d275f1f337..0833d2ef2f 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml @@ -8,14 +8,12 @@ - - - + - + @@ -42,7 +40,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/res/spring/preciprate-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/res/spring/preciprate-ingest.xml index 5751d3a9e6..eb49a866b7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/res/spring/preciprate-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/res/spring/preciprate-ingest.xml @@ -12,7 +12,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.qpf/res/spring/qpf-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.qpf/res/spring/qpf-ingest.xml index faec13e4c2..2b90e0b133 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.qpf/res/spring/qpf-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.qpf/res/spring/qpf-ingest.xml @@ -12,7 +12,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/res/spring/satellite-mcidas-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/res/spring/satellite-mcidas-ingest.xml index f2a06df07d..43c3f88bdf 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/res/spring/satellite-mcidas-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/res/spring/satellite-mcidas-ingest.xml @@ -4,17 +4,16 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - + - - + @@ -36,7 +35,7 @@ - + satellite-mcidas diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/res/spring/scan-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.scan/res/spring/scan-ingest.xml index 719f851bf6..6c59176e41 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/res/spring/scan-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/res/spring/scan-ingest.xml @@ -28,7 +28,7 @@ xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler"> - + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/res/spring/svrwx-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/res/spring/svrwx-ingest.xml index e5770ca7ba..09021bf61e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/res/spring/svrwx-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/res/spring/svrwx-ingest.xml @@ -24,7 +24,7 @@ autoStartup="false"> - + svrwx diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/res/spring/tcg-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/res/spring/tcg-ingest.xml index ca50801379..113efae2fa 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/res/spring/tcg-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/res/spring/tcg-ingest.xml @@ -10,7 +10,7 @@ - + - + tcg diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcs/res/spring/tcs-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.tcs/res/spring/tcs-ingest.xml index f223e4bf0a..1583d2405b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcs/res/spring/tcs-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcs/res/spring/tcs-ingest.xml @@ -24,7 +24,7 @@ autoStartup="false"> - + tcs diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/res/spring/vaa-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/res/spring/vaa-ingest.xml index 3a0c5dfe8a..76532eb545 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/res/spring/vaa-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/res/spring/vaa-ingest.xml @@ -10,7 +10,7 @@ - + vaa - + --> - + vaa diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.vil/res/spring/vil-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.vil/res/spring/vil-ingest.xml index 809da4ce6d..9044e2d523 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.vil/res/spring/vil-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.vil/res/spring/vil-ingest.xml @@ -12,7 +12,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java index 2e9bbafe0f..5d21a08424 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.edex.registry.ebxml; +import java.io.ByteArrayInputStream; + import javax.jws.WebService; import com.raytheon.uf.common.registry.IRegistryRequestService; @@ -44,12 +46,13 @@ import com.raytheon.uf.edex.auth.RemoteRequestRouteWrapper; public class RegistryRemoteRequestWrapper extends RemoteRequestRouteWrapper implements IRegistryRequestService { + @Override public byte[] request(byte[] data) { return executeThrift(data); } public byte[] executeThrift(byte[] data) { - return super.executeThrift(data); + return super.executeThrift(new ByteArrayInputStream(data)); } } diff --git a/edexOsgi/com.raytheon.uf.edex.useradmin/res/spring/useradmin-request.xml b/edexOsgi/com.raytheon.uf.edex.useradmin/res/spring/useradmin-request.xml index cb98375d92..e5fe9d1102 100644 --- a/edexOsgi/com.raytheon.uf.edex.useradmin/res/spring/useradmin-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.useradmin/res/spring/useradmin-request.xml @@ -8,7 +8,7 @@ + value="jms-generic:topic:user.authentication.changed?timeToLive=60000"/> diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java b/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java index ff16a2cd89..e1662dc0f7 100644 --- a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java +++ b/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java @@ -64,6 +64,7 @@ import com.raytheon.wes2bridge.common.configuration.Wes2BridgeConfiguration; * Jan 18, 2012 1490 bkowal Pypies is now added to each * edex-environment instance * Apr 18, 2013 1899 bkowal Updates qpid 0.18 configuration now. + * July 2, 2013 2133 bkowal Updates for yajsw-wrapped qpid * * * @@ -440,23 +441,11 @@ public class Wes2BridgeManager { BufferedWriter bw = this.getBufferedWriter(qpidd); final String line1 = "QPID_HOME="; - /* - * Need to update the 'ps' command that determines if qpid is running or - * not. - */ - final String line2 = "isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c \"PNAME=QPBRKR \"`"; String line = StringUtils.EMPTY; while ((line = br.readLine()) != null) { if (line.startsWith(line1)) { line = line1 + qpidDirectory; - } else if (line.contains(line2)) { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder - .append("isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep QPID_HOME="); - stringBuilder.append(qpidDirectory); - stringBuilder.append("| grep -c \"PNAME=QPBRKR \"`"); - line = stringBuilder.toString(); } bw.write(line + "\n"); diff --git a/javaUtilities/yajsw/deploy.xml b/javaUtilities/yajsw/deploy.xml new file mode 100644 index 0000000000..9b013eaf74 --- /dev/null +++ b/javaUtilities/yajsw/deploy.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/localization/localization.OAX/utility/common_static/site/OAX/warngen/config.xml b/localization/localization.OAX/utility/common_static/site/OAX/warngen/config.xml deleted file mode 100644 index 608df36aa5..0000000000 --- a/localization/localization.OAX/utility/common_static/site/OAX/warngen/config.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - OMAHA/VALLEY NE - OMAHA - EAX/KANSAS CITY,DMX/DES MOINES,BOX/BOSTON,LBF/NORTH PLATTE,PQR/PORTLAND - OMA - severethunderstorm - Flash Flood/ffw,Severe Thunderstorm/severethunderstorm,Tornado/tornado - Severe Weather Statement/SVS,Flash Flood Statement/ffs,non-convective FFW (Dam Break)/dambreak,non-convective Flash Flood Statement/dambreakffs,Areal Flood Warning/flw,Areal Flood Warning Followup/fls,Areal Flood Advisory/fla,Areal Flood Advisory Followup/flas,Special Marine Warning/smw,Marine Weather Statement (SMW Follow)/smws,Marine Weather Statement standalone/marinestatement,Short Term Forecast/shortterm,Special Weather Statement (zones)/sws - 5000 - \ No newline at end of file diff --git a/nativeLib/edexBridge/edexBridge.cpp b/nativeLib/edexBridge/edexBridge.cpp index 784973d279..29da5db4bc 100644 --- a/nativeLib/edexBridge/edexBridge.cpp +++ b/nativeLib/edexBridge/edexBridge.cpp @@ -97,9 +97,9 @@ public: uint64_t current = (((long long) tv.tv_sec) * 1000000 + ((long long) tv.tv_usec)) / 1000; message.setDurable(true); - message.setSubject(fileHeader); message.setContent(fileLocation); - message.setProperty("enqueueTime", current); + message.getProperties()["header"] = fileHeader; + message.getProperties()["enqueueTime"] = current; this->sender.send(message); diff --git a/nativeLib/edex_com/src/EdexNotification.h b/nativeLib/edex_com/src/EdexNotification.h index 1118fdcf22..9c02d955d4 100644 --- a/nativeLib/edex_com/src/EdexNotification.h +++ b/nativeLib/edex_com/src/EdexNotification.h @@ -56,7 +56,6 @@ typedef void CEdexNotification; #include "NotificationProtocol.h" using namespace qpid::messaging; -using namespace qpid::framing; using namespace std; using apache::thrift::transport::TMemoryBuffer; using boost::shared_ptr; diff --git a/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id b/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id index 9da0cb73ab..2291591ae6 100644 --- a/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id +++ b/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id @@ -1 +1 @@ -c28b0356ba38c6aa1c3ad220caf3ad27f2534f33 \ No newline at end of file +2d8d4c03270ef631f167570cf0c03461ff832fea \ No newline at end of file diff --git a/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id b/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id index 9da0cb73ab..2291591ae6 100644 --- a/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id +++ b/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id @@ -1 +1 @@ -c28b0356ba38c6aa1c3ad220caf3ad27f2534f33 \ No newline at end of file +2d8d4c03270ef631f167570cf0c03461ff832fea \ No newline at end of file diff --git a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c index 109d64e57b..cbaa91f41d 100644 --- a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c +++ b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c @@ -174,7 +174,7 @@ void main_mpe_fieldgen_for_calls_from_editor(int num_args, char ** args) sprintf ( message , "\t\tMPE Precip Processing -- %s\n", strTempTime) ; printMessage( message, logFile ); - sprintf ( message , "\t\tLast Modification: August 1, 2013 \n") ; + sprintf ( message , "\t\tLast Modification: September 19, 2013 \n") ; printMessage( message, logFile ); sprintf ( message , "\t\t \n") ; printMessage( message, logFile ); diff --git a/nativeLib/rary.ohd.pproc/src/MPEGui/TEXT/read_field_data_RFCW.c b/nativeLib/rary.ohd.pproc/src/MPEGui/TEXT/read_field_data_RFCW.c index 068d0d46c0..55dc06d34b 100644 --- a/nativeLib/rary.ohd.pproc/src/MPEGui/TEXT/read_field_data_RFCW.c +++ b/nativeLib/rary.ohd.pproc/src/MPEGui/TEXT/read_field_data_RFCW.c @@ -201,21 +201,6 @@ void display_field_data_RFCW ( enum DisplayFieldData display_data , idate = date.month*1000000 + date.day*10000 + date.year; sprintf(fname,"%s/%s%08d%02dz",dirname,cv_use_tmp,idate,date.hour); } - else if ( display_data == display_satPrecip ) - { - iyr = date.year ; - imo = date.month ; - ida = date.day ; - ihr = date.hour ; - im = 0 ; - is = 0 ; - tdiff = -1 ; - tunit = 2 ; - TADJ ( & iyr , & imo , & ida , & ihr , & im , & is , & tdiff , & tunit ) ; - sprintf ( fname , "%s/%4d%02d%02d_%02d00.multi" , dirname , iyr , imo , - ida , ihr ) ; - - } else if ( display_data == display_rfcMosaic ) { sprintf(fname,"%s/%s01%sz",dirname,cv_use_tmp,date.cdate); @@ -225,16 +210,10 @@ void display_field_data_RFCW ( enum DisplayFieldData display_data , sprintf(fname,"%s/%s%sz",dirname,cv_use_tmp,date.cdate); } - if ( display_data != display_satPrecip ) - { - len_fname = strlen ( fname ) ; - display_field_read_xmrg ( data_array_tmp , fname, addition_flag , rowSize, colSize ); - } - else - { - /* Special logic to process the satellite image. */ - display_field_read_spe ( data_array_tmp , fname, addition_flag ) ; - } + len_fname = strlen ( fname ) ; + display_field_read_xmrg ( data_array_tmp , fname, addition_flag , rowSize, colSize ); + + } diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/res/spring/airmet-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/res/spring/airmet-ingest.xml old mode 100755 new mode 100644 index 4b1fe89335..867cee8113 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/res/spring/airmet-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/res/spring/airmet-ingest.xml @@ -33,13 +33,13 @@ airmet - + --> - + airmet diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/res/spring/atcf-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/res/spring/atcf-ingest.xml index 2766178013..059bea827e 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/res/spring/atcf-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/res/spring/atcf-ingest.xml @@ -21,7 +21,7 @@ - + @@ -42,11 +42,11 @@ atcf - + - + atcf diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml index a5d33aaca6..ecc5b995e3 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml @@ -24,7 +24,7 @@ aww - + - + aww diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/res/spring/convsigmet-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/res/spring/convsigmet-ingest.xml old mode 100755 new mode 100644 index ce4746a203..32e0c3183f --- a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/res/spring/convsigmet-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/res/spring/convsigmet-ingest.xml @@ -34,13 +34,13 @@ convsigmet - + --> - + convsigmet diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/res/spring/ffg-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/res/spring/ffg-ingest.xml index c1776312c3..0e8174e082 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/res/spring/ffg-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/res/spring/ffg-ingest.xml @@ -32,13 +32,13 @@ ffg - + --> - + ffg diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.geomag/res/spring/geomag-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.geomag/res/spring/geomag-ingest.xml index 7553b0140a..3c215f8fb9 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.geomag/res/spring/geomag-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.geomag/res/spring/geomag-ingest.xml @@ -1,8 +1,7 @@ + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> @@ -15,7 +14,7 @@ - + geomag - + - + geomag @@ -64,7 +63,7 @@ - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/res/spring/idft-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/res/spring/idft-ingest.xml index eb5fa71338..b45a6a1348 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/res/spring/idft-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/res/spring/idft-ingest.xml @@ -29,11 +29,11 @@ idft - + - + idft diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/res/spring/intlsigmet-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/res/spring/intlsigmet-ingest.xml old mode 100755 new mode 100644 index 41591d2dcb..726905ee80 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/res/spring/intlsigmet-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/res/spring/intlsigmet-ingest.xml @@ -33,13 +33,13 @@ intlsigmet - + --> - + intlsigmet diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/res/spring/mcidas-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/res/spring/mcidas-ingest.xml index be5ddbe708..464607cb5e 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/res/spring/mcidas-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/res/spring/mcidas-ingest.xml @@ -42,11 +42,11 @@ mcidas - + - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/res/spring/mosaic-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/res/spring/mosaic-ingest.xml index 4bba0d5c86..32178b148c 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/res/spring/mosaic-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/res/spring/mosaic-ingest.xml @@ -44,12 +44,12 @@ mosaic - + - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/res/spring/ncairep-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/res/spring/ncairep-ingest.xml index 32c07728e7..1e20119437 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/res/spring/ncairep-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/res/spring/ncairep-ingest.xml @@ -35,13 +35,13 @@ ncairep - + - + ncairep diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/res/spring/ncccfp-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/res/spring/ncccfp-ingest.xml index 574d75d380..d6d31142c0 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/res/spring/ncccfp-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/res/spring/ncccfp-ingest.xml @@ -32,12 +32,12 @@ ncccfp - + - + ncccfp diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-ingest.xml index 496b1b4dda..2ea92cbf0a 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/res/spring/ncgrib-ingest.xml @@ -17,12 +17,11 @@ - + - - + @@ -71,7 +70,7 @@ - + ncgrib diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/res/spring/ncpafm-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/res/spring/ncpafm-ingest.xml index 6b00caf83f..dba9ae8fc6 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/res/spring/ncpafm-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpafm/res/spring/ncpafm-ingest.xml @@ -37,13 +37,13 @@ ncpafm - + --> - + ncpafm diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/res/spring/ncpirep-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/res/spring/ncpirep-ingest.xml index c4d3dafb39..8c612bb468 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/res/spring/ncpirep-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/res/spring/ncpirep-ingest.xml @@ -40,13 +40,13 @@ ncpirep - + - + ncpirep diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/res/spring/ncscat-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/res/spring/ncscat-ingest.xml index c665e79bbd..a84ff1ac4c 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/res/spring/ncscat-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/res/spring/ncscat-ingest.xml @@ -36,12 +36,12 @@ ncscat - + - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/res/spring/ncscd-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/res/spring/ncscd-ingest.xml index dfc0c0e70a..1bafa989f7 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/res/spring/ncscd-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscd/res/spring/ncscd-ingest.xml @@ -43,11 +43,11 @@ ncscd - + - + ncscd diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/res/spring/nctaf-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/res/spring/nctaf-ingest.xml index 194b53f7bb..21366df5b5 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/res/spring/nctaf-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nctaf/res/spring/nctaf-ingest.xml @@ -12,7 +12,7 @@ - + nctaf - + --> - + nctaf diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nctext/res/spring/nctext-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.nctext/res/spring/nctext-ingest.xml index 4636578641..d9bbe3e33f 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nctext/res/spring/nctext-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nctext/res/spring/nctext-ingest.xml @@ -38,12 +38,12 @@ nctext - + - + nctext diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/res/spring/ncuair-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/res/spring/ncuair-ingest.xml index d56bc81baa..9f005f2495 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/res/spring/ncuair-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncuair/res/spring/ncuair-ingest.xml @@ -34,13 +34,13 @@ ncuair - - + + - + ncuair diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/res/spring/nonconvsigmet-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/res/spring/nonconvsigmet-ingest.xml old mode 100755 new mode 100644 index cc03e8f32c..016a8362b0 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/res/spring/nonconvsigmet-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/res/spring/nonconvsigmet-ingest.xml @@ -34,13 +34,13 @@ nonconvsigmet - + --> - + nonconvsigmet diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ntrans/res/spring/ntrans-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ntrans/res/spring/ntrans-ingest.xml index 603b1569b0..3be95f7491 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ntrans/res/spring/ntrans-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ntrans/res/spring/ntrans-ingest.xml @@ -34,12 +34,12 @@ ntrans - + - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/res/spring/sgwh-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/res/spring/sgwh-ingest.xml index 815ff04049..438aa4403d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/res/spring/sgwh-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwh/res/spring/sgwh-ingest.xml @@ -39,11 +39,11 @@ sgwh - + - + sgwh diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/res/spring/sgwhv-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/res/spring/sgwhv-ingest.xml index 5b75fa5185..75a484bb3f 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/res/spring/sgwhv-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.sgwhv/res/spring/sgwhv-ingest.xml @@ -39,11 +39,11 @@ sgwhv - + - + sgwhv diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.solarimage/res/spring/solarimage-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.solarimage/res/spring/solarimage-ingest.xml index 23eb705d94..2e55c631e8 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.solarimage/res/spring/solarimage-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.solarimage/res/spring/solarimage-ingest.xml @@ -27,7 +27,7 @@ - + solarimage - + - + solarimage @@ -78,7 +78,7 @@ - + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/res/spring/ssha-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/res/spring/ssha-ingest.xml index f34042890c..cff4c91bdd 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/res/spring/ssha-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/res/spring/ssha-ingest.xml @@ -40,11 +40,11 @@ ssha - + - + ssha diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/res/spring/stormtrack-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/res/spring/stormtrack-ingest.xml index 37bdf9b9cb..06e172d200 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/res/spring/stormtrack-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/res/spring/stormtrack-ingest.xml @@ -19,7 +19,7 @@ - + @@ -40,11 +40,11 @@ stormtrack - + - + stormtrack diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/res/spring/tcm-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/res/spring/tcm-ingest.xml index ca51191363..ff1e6d016b 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/res/spring/tcm-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/res/spring/tcm-ingest.xml @@ -33,11 +33,11 @@ tcm - + - + tcm diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/res/spring/wcp-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/res/spring/wcp-ingest.xml index dbc4032f1f..ee08113523 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/res/spring/wcp-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.wcp/res/spring/wcp-ingest.xml @@ -29,11 +29,11 @@ wcp - + - + wcp diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/bin/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/LICENSE.txt b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/bin/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/LICENSE.txt deleted file mode 100644 index 9de7145a20..0000000000 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/bin/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/LICENSE.txt +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2009, Swiss AviationSoftware Ltd. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -- Neither the name of the Swiss AviationSoftware Ltd. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/Command.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/Command.java index 2c91892e70..8c72b34d5a 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/Command.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/jcgm/Command.java @@ -77,6 +77,13 @@ public class Command implements Cloneable { this.elementClass = ec; this.elementCode = eid; + boolean extendArgLengthToEven = false; + // ORIGINAL does not contain the following "if" + if (l==32) { // normally maxes at 31 (to indicate long-form command); 32 indicates... + extendArgLengthToEven = true; // ..."push" needed to even length (used for little endian text) + l = 31; + } + // end of this change to ORIGINAL, but see also extendArgLengthToEven reference below... if (l != 31) { this.args = new int[l]; for (int i = 0; i < l; i++) @@ -107,6 +114,11 @@ public class Command implements Cloneable { else { done = true; } + //ORIGINAL doesn't contain following statement... + if (extendArgLengthToEven && l % 2 == 1) { + l++; + } + // end of this change to ORIGINAL, but see also extendArgLengthToEven reference above if (this.args == null) { this.args = new int[l]; } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcCGM.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcCGM.java index 1ff9906860..36b427a7ef 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcCGM.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcCGM.java @@ -113,6 +113,10 @@ public class NcCGM extends CGM implements Cloneable { if (c == null) continue; // or should we add as null command? + if (c instanceof NcLineWidth || c instanceof NcTextAlignment) { + logger.info("[CGM command #" + com + " completed] " + c.toString()); + } + logger.debug("[CGM command #" + com + " completed] " + c.toString()); for (ICommandListener listener : this.commandListeners) { diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcLineWidth.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcLineWidth.java index 212f3069a1..7141e1cb5d 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcLineWidth.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcLineWidth.java @@ -39,7 +39,7 @@ public class NcLineWidth extends LineWidth implements INcCommand { public void paint(IGraphicsTarget target, PaintProperties paintProps, IDescriptor descriptor, ImageBuilder ib) throws VizException { - ib.currentLineWidth = this.width / 10.0; // TODO ?? + ib.currentLineWidth = this.width / 1.0; // TODO ?? } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcText.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcText.java index 746fe62013..df7bbc4710 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcText.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcText.java @@ -3,105 +3,108 @@ */ package gov.noaa.nws.ncep.viz.rsc.ntrans.ncgm; +import gov.noaa.nws.ncep.viz.rsc.ntrans.jcgm.Text; +import gov.noaa.nws.ncep.viz.rsc.ntrans.rsc.NtransResource.ImageBuilder; + import java.io.DataInput; import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.eclipse.swt.graphics.RGB; import com.raytheon.uf.viz.core.DrawableString; import com.raytheon.uf.viz.core.IGraphicsTarget; -import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment; -import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle; -import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment; import com.raytheon.uf.viz.core.drawables.IDescriptor; -import com.raytheon.uf.viz.core.drawables.IFont; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.geom.PixelCoordinate; - -import gov.noaa.nws.ncep.viz.rsc.ntrans.jcgm.Text; -import gov.noaa.nws.ncep.viz.rsc.ntrans.rsc.NtransResource.ImageBuilder; /** * @author bhebbard - * + * */ public class NcText extends Text implements INcCommand { - private final Log logger = LogFactory.getLog(this.getClass()); //TODO static better?? - - static boolean flipflop = true; + private final Log logger = LogFactory.getLog(this.getClass()); // TODO + // static + // better?? - /** - * @param ec - * @param eid - * @param l - * @param in - * @throws IOException - */ - public NcText(int ec, int eid, int l, DataInput in) throws IOException { - super(ec, eid, l, in); - // TODO Auto-generated constructor stub - } + static boolean flipflop = true; - /* (non-Javadoc) - * @see gov.noaa.nws.ncep.viz.rsc.ntrans.ncgm.INcCommand#paint(com.raytheon.uf.viz.core.IGraphicsTarget, com.raytheon.uf.viz.core.drawables.PaintProperties, gov.noaa.nws.ncep.viz.rsc.ntrans.rsc.NtransResource.ImageBuilder) - */ - @Override - public void paint(IGraphicsTarget target, PaintProperties paintProps, - IDescriptor descriptor, - ImageBuilder ib) throws VizException { - - DrawableString ds = new DrawableString(this.string, ib.currentLineColor); //TODO:why? - double[] newpoint = new double[] { 0.0, 0.0 }; - if (flipflop) //TODO test code - { - newpoint = ib.scalePoint(this.position.x, this.position.y); - } - else - { - newpoint = ib.scalePointNoZoom(this.position.x, this.position.y); - } - //flipflop = ! flipflop ; - ds.setCoordinates(newpoint[0],newpoint[1]); - - ds.font = ib.currentFont; - ds.textStyle = ib.textStyle; - ds.horizontalAlignment = ib.horizontalAlignment; - ds.verticallAlignment = ib.verticalAlignment; - - ib.strings.add(ds); - - - /* - IFont font = target.initializeFont("Monospace", 14, new IFont.Style[] { IFont.Style.BOLD}); - PixelCoordinate textLoc = new PixelCoordinate( this.position.x * ib.scaling, - this.position.y * ib.scaling, 0 ); - target.drawString(font, - this.string, textLoc.getX(), - textLoc.getY(), 0.0, - TextStyle.NORMAL, - new RGB( 255, 255, 200 ), - HorizontalAlignment.CENTER, - VerticalAlignment.MIDDLE, 0.0); - */ + /** + * @param ec + * @param eid + * @param l + * @param in + * @throws IOException + */ + public NcText(int ec, int eid, int l, DataInput in) throws IOException { + // To handle little-endian strings, we need to bump an odd length ("l") parameter + // up one to make it even (ending on two-byte CGM word boundary), so that we + // get the last character. (Will be flipped into place later.) Note that + // special case of l=31 indicates "long form" (string length >=31 char, to + // be specified in following 2-byte integer), so the parent constructor for + // Command has also been modified to interpret l=32 fed up to it as a signal + // to handle as l=31, then "bump" the long-form length it reads (from next + // 2 bytes) up to even value if needed. + super(ec, eid, (l + 1) / 2 * 2, in); + } - } + /* + * (non-Javadoc) + * + * @see + * gov.noaa.nws.ncep.viz.rsc.ntrans.ncgm.INcCommand#paint(com.raytheon.uf + * .viz.core.IGraphicsTarget, + * com.raytheon.uf.viz.core.drawables.PaintProperties, + * gov.noaa.nws.ncep.viz.rsc.ntrans.rsc.NtransResource.ImageBuilder) + */ + @Override + public void paint(IGraphicsTarget target, PaintProperties paintProps, + IDescriptor descriptor, ImageBuilder ib) throws VizException { - public void flipString() { - // Flip every even char with its odd sibling (endianess reversal) - String oldString = this.string; - char[] oldCharArray = oldString.toCharArray(); - int lengthOfNewArray = oldCharArray.length / 2 * 2; // if odd length, discard last character (null) - char[] newCharArray = new char[lengthOfNewArray]; - for (int i = 0 ; i < lengthOfNewArray ; i = i + 2 ) { - newCharArray[i] = oldCharArray[i+1]; - newCharArray[i+1] = oldCharArray[i]; - } - String newString = new String(newCharArray); - this.string = newString; - } + DrawableString ds = new DrawableString(this.string, ib.currentLineColor); // TODO:why? + double[] newpoint = new double[] { 0.0, 0.0 }; + if (flipflop) // TODO test code + { + newpoint = ib.scalePoint(this.position.x, this.position.y); + } else { + newpoint = ib.scalePointNoZoom(this.position.x, this.position.y); + } + // flipflop = ! flipflop ; + ds.setCoordinates(newpoint[0], newpoint[1]); + + ds.font = ib.currentFont; + ds.textStyle = ib.textStyle; + ds.horizontalAlignment = ib.horizontalAlignment; + ds.verticallAlignment = ib.verticalAlignment; + + ib.strings.add(ds); + + /* + * IFont font = target.initializeFont("Monospace", 14, new IFont.Style[] + * { IFont.Style.BOLD}); PixelCoordinate textLoc = new PixelCoordinate( + * this.position.x * ib.scaling, this.position.y * ib.scaling, 0 ); + * target.drawString(font, this.string, textLoc.getX(), textLoc.getY(), + * 0.0, TextStyle.NORMAL, new RGB( 255, 255, 200 ), + * HorizontalAlignment.CENTER, VerticalAlignment.MIDDLE, 0.0); + */ + + } + + public void flipString() { + // Flip every even char with its odd sibling (endianess reversal) + String oldString = this.string; + char[] oldCharArray = oldString.toCharArray(); + int lengthOfNewArray = oldCharArray.length / 2 * 2; // if odd length, + // discard last + // character (null) + char[] newCharArray = new char[lengthOfNewArray]; + for (int i = 0; i < lengthOfNewArray; i = i + 2) { + newCharArray[i] = oldCharArray[i + 1]; + newCharArray[i + 1] = oldCharArray[i]; + } + String newString = new String(newCharArray); + this.string = newString.trim(); + } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcTextAlignment.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcTextAlignment.java index da4331896c..c884bd6fff 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcTextAlignment.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/ncgm/NcTextAlignment.java @@ -48,11 +48,24 @@ public class NcTextAlignment extends TextAlignment implements INcCommand { // Map/convert CGM-style text alignments to their IGraphicsTarget equivalents. switch (this.horizontalAlignment) { + case NORMAL_HORIZONTAL: + //TODO: Following is sort of a hack, to deal with the way legacy + // NTRANS metafiles are created by the NC driver code. A horizontal + // alignment of CENTER appears to be coded (intentionally or otherwise) + // in the legacy generated CGM by a *vertical* alignment value of CAP. + // Might want to investigate, and possibly bring legacy code to CGM + // compliance. + if (this.verticalAlignment == TextAlignment.VerticalAlignment.CAP) { + ib.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.CENTER; + } + else { + ib.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.LEFT; + } + break; case LEFT: ib.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.LEFT; break; - case NORMAL_HORIZONTAL: - case CONTINOUS_HORIZONTAL: //TODO?? + case CONTINOUS_HORIZONTAL: //TODO?? case CENTRE: ib.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.CENTER; break; @@ -69,13 +82,17 @@ public class NcTextAlignment extends TextAlignment implements INcCommand { case TOP: case CAP: //TODO?? ib.verticalAlignment = IGraphicsTarget.VerticalAlignment.TOP; + ib.verticalAlignment = IGraphicsTarget.VerticalAlignment.BOTTOM; + break; case HALF: ib.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE; + break; case NORMAL_VERTICAL: case CONTINOUS_VERTICAL: //TODO?? case BASE: //TODO?? case BOTTOM: ib.verticalAlignment = IGraphicsTarget.VerticalAlignment.BOTTOM; + break; default: //TODO fail ib.verticalAlignment = IGraphicsTarget.VerticalAlignment.BOTTOM; diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/rsc/NtransResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/rsc/NtransResource.java index 9ca99a754f..1e51c84685 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/rsc/NtransResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ntrans/src/gov/noaa/nws/ncep/viz/rsc/ntrans/rsc/NtransResource.java @@ -105,7 +105,9 @@ public class NtransResource extends AbstractNatlCntrsResource - + @@ -42,7 +42,7 @@ - + regionalsat diff --git a/rpms/awips2.ade/Installer.eclipse/component.spec b/rpms/awips2.ade/Installer.eclipse/component.spec index d242441936..950bb3f77b 100644 --- a/rpms/awips2.ade/Installer.eclipse/component.spec +++ b/rpms/awips2.ade/Installer.eclipse/component.spec @@ -9,7 +9,7 @@ Name: awips2-eclipse Summary: AWIPS II Eclipse Distribution -Version: 3.6.1 +Version: 3.8.2 Release: 1 Group: AWIPSII BuildRoot: %{_build_root} @@ -174,4 +174,4 @@ rm -rf ${RPM_BUILD_ROOT} /awips2/eclipse/epl-v10.html /awips2/eclipse/icon.xpm /awips2/eclipse/libcairo-swt.so -/awips2/eclipse/notice.html \ No newline at end of file +/awips2/eclipse/notice.html diff --git a/rpms/awips2.ade/Installer.eclipse/component.spec.3.6.1 b/rpms/awips2.ade/Installer.eclipse/component.spec.3.6.1 new file mode 100644 index 0000000000..d242441936 --- /dev/null +++ b/rpms/awips2.ade/Installer.eclipse/component.spec.3.6.1 @@ -0,0 +1,177 @@ +# +# AWIPS II Eclipse Spec File +# + +# --define arguments: +# %{_uframe_eclipse} +# %{_build_root} +# %{_baseline_workspace} + +Name: awips2-eclipse +Summary: AWIPS II Eclipse Distribution +Version: 3.6.1 +Release: 1 +Group: AWIPSII +BuildRoot: %{_build_root} +URL: N/A +License: N/A +Distribution: N/A +Vendor: Raytheon +Packager: Bryan Kowal + +AutoReq: no +provides: awips2-eclipse + +%description +AWIPS II Eclipse Distribution - Contains the AWIPS II Eclipse Distribution. + +# Turn off the brp-python-bytecompile script +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g') + +%prep +# Verify That The User Has Specified A BuildRoot. +if [ "%{_build_root}" = "/tmp" ] +then + echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter." + echo "Unable To Continue ... Terminating" + exit 1 +fi + +if [ -d %{_build_root} ]; then + rm -rf %{_build_root} +fi +mkdir -p %{_build_root}/awips2/eclipse + +%build + +%install +# The location of the awips2 eclipse source directory will be +# specified as a command line argument. Fail if the specified +# directory cannot be found. +if [ ! -d %{_uframe_eclipse} ]; then + echo "ERROR: Unable To Find The AWIPS II Eclipse Distribution." + echo "Unable To Continue ... Terminating" + exit 1 +fi + +# Copy the uframe eclipse distribution. +cp -r %{_uframe_eclipse}/* %{_build_root}/awips2/eclipse + +# Copy eclipse.sh to our build-directory. +cp %{_baseline_workspace}/rpms/awips2.ade/Installer.eclipse/scripts/* \ + %{_build_root}/awips2/eclipse + +# delete the basemaps and etc links +rm -f %{_build_root}/awips2/eclipse/basemaps +rm -f %{_build_root}/awips2/eclipse/etc + +%pre +JAVA_INSTALL="" +PYTHON_INSTALL="" +ANT_INSTALL="" + +INSTALL_PATH="/awips2/java" +if [ -d ${INSTALL_PATH} ]; then + JAVA_INSTALL=${INSTALL_PATH} +fi + +INSTALL_PATH="/awips2/python" +if [ -d ${INSTALL_PATH} ]; then + PYTHON_INSTALL=${INSTALL_PATH} +fi + +INSTALL_PATH="/awips2/ant" +if [ -d ${INSTALL_PATH} ]; then + ANT_INSTALL=${INSTALL_PATH} +fi + +echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" +echo -e "\e[1;34m\| Installing the AWIPS II Eclipse Distribution...\e[m" +echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" +echo -e "\e[1;34m Java Detected At: ${JAVA_INSTALL}\e[m" +echo -e "\e[1;34m Python Detected At: ${PYTHON_INSTALL}\e[m" +echo -e "\e[1;34m Ant Detected At: ${ANT_INSTALL}\e[m" + +%post +echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" +echo -e "\e[1;34m\| Creating ADE Eclipse Desktop Shortcut...\e[m" +echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" +ADE_ECLIPSE_SHORTCUT="ade-eclipse" +SHORTCUT_OWNER="${USER}" +CREATE_SHORTCUT="true" +if [ ! "${SUDO_USER}" = "" ]; then + SHORTCUT_OWNER="${SUDO_USER}" +fi +echo -e "\e[1;34m Creating Shortcut For User: ${SHORTCUT_OWNER}\e[m" + +USER_HOME_DIR="~${SHORTCUT_OWNER}" +if [ ! -d ${USER_HOME_DIR} ]; then + USER_HOME_DIR="/home/${SHORTCUT_OWNER}" + echo " (Assuming User Home Directory Is Under '/home')" +fi + +if [ ! -d ${USER_HOME_DIR}/Desktop ]; then + echo -e "\e[1;31m ERROR: Unable To Find The User's Desktop!!!" + CREATE_SHORTCUT="false" +fi + +if [ "${CREATE_SHORTCUT}" = "true" ]; then + SHORTCUT_TMP="${USER_HOME_DIR}/Desktop/${ADE_ECLIPSE_SHORTCUT}.tmp" + SHORTCUT="${USER_HOME_DIR}/Desktop/${ADE_ECLIPSE_SHORTCUT}.desktop" + + if [ -f ${SHORTCUT} ]; then + echo -n " Attempting To Remove The Existing Shortcut ... " + sudo -u ${SHORTCUT_OWNER} rm -f ${SHORTCUT} + if [ ! -f ${SHORTCUT} ]; then + echo -n "SUCCESS" + else + echo -n "FAILURE" + fi + echo "" + fi + sudo -u ${SHORTCUT_OWNER} touch ${SHORTCUT_TMP} + sudo -u ${SHORTCUT_OWNER} chmod 666 ${SHORTCUT_TMP} + + echo "[Desktop Entry]" >> ${SHORTCUT_TMP} + echo "Version=1.0" >> ${SHORTCUT_TMP} + echo "Encoding=UTF-8" >> ${SHORTCUT_TMP} + echo "Name=ADE Eclipse" >> ${SHORTCUT_TMP} + echo "GenericName=Eclipse" >> ${SHORTCUT_TMP} + echo "Comment=IDE" >> ${SHORTCUT_TMP} + echo "Exec=/bin/bash -i -c \"xterm -title 'AWIPS II ADE Eclipse' -e '/awips2/eclipse/eclipseShortcutWrap.sh'\"" >> ${SHORTCUT_TMP} + echo "Icon=/awips2/eclipse/icon.xpm" >> ${SHORTCUT_TMP} + echo "Terminal=false" >> ${SHORTCUT_TMP} + echo "Type=Application" >> ${SHORTCUT_TMP} + echo "Categories=Development;IDE;" >> ${SHORTCUT_TMP} + + sudo -u ${SHORTCUT_OWNER} mv ${SHORTCUT_TMP} ${SHORTCUT} + sudo -u ${SHORTCUT_OWNER} chmod 644 ${SHORTCUT} +fi + +echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" +echo -e "\e[1;32m\| AWIPS II Eclipse Distribution Installation - COMPLETE\e[m" +echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" + +%preun + +%postun + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(644,awips,fxalpha,755) +%dir /awips2/eclipse +/awips2/eclipse/* +%defattr(755,awips,fxalpha,755) +/awips2/eclipse/about.html +/awips2/eclipse/artifacts.xml +/awips2/eclipse/eclipse +/awips2/eclipse/eclipse.ini +/awips2/eclipse/eclipse.sh +/awips2/eclipse/eclipseShortcutWrap.sh +/awips2/eclipse/epl-v10.html +/awips2/eclipse/icon.xpm +/awips2/eclipse/libcairo-swt.so +/awips2/eclipse/notice.html \ No newline at end of file diff --git a/rpms/awips2.qpid/0.18/SOURCES/awips.patch b/rpms/awips2.qpid/0.18/SOURCES/awips.patch index fe2d834485..385fc794e5 100644 --- a/rpms/awips2.qpid/0.18/SOURCES/awips.patch +++ b/rpms/awips2.qpid/0.18/SOURCES/awips.patch @@ -78,7 +78,7 @@ diff -crB a/qpid/java/build.deps b/qpid/java/build.deps commons-cli=lib/required/commons-cli-1.2.jar ! commons-codec=lib/required/commons-codec-1.6.jar commons-collections=lib/required/commons-collections-3.2.1.jar -! commons-configuration=lib/required/commons-configuration-1.8.jar + commons-configuration=lib/required/commons-configuration-1.8.jar commons-digester=lib/required/commons-digester-1.8.1.jar ! commons-lang=lib/required/commons-lang-2.6.jar commons-logging=lib/required/commons-logging-1.1.1.jar @@ -90,7 +90,7 @@ diff -crB a/qpid/java/build.deps b/qpid/java/build.deps commons-cli=lib/required/commons-cli-1.2.jar ! commons-codec=lib/required/commons-codec-1.4.jar commons-collections=lib/required/commons-collections-3.2.1.jar -! commons-configuration=lib/required/commons-configuration-1.6.jar + commons-configuration=lib/required/commons-configuration-1.8.jar commons-digester=lib/required/commons-digester-1.8.1.jar ! commons-lang=lib/required/commons-lang-2.3.jar commons-logging=lib/required/commons-logging-1.1.1.jar diff --git a/rpms/awips2.qpid/0.18/SOURCES/awips2/commons-configuration-1.8.jar b/rpms/awips2.qpid/0.18/SOURCES/awips2/commons-configuration-1.8.jar new file mode 100644 index 0000000000..ae9ae9969b Binary files /dev/null and b/rpms/awips2.qpid/0.18/SOURCES/awips2/commons-configuration-1.8.jar differ diff --git a/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt b/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt index 0ff6e28315..02518e4cef 100644 --- a/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt +++ b/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt @@ -7,7 +7,6 @@ org.apache.commons.digester/commons-digester-1.8.1.jar org.apache.commons.codec/commons-codec-1.4.jar org.apache.commons.lang/commons-lang-2.3.jar org.apache.commons.collections/commons-collections-3.2.jar -org.apache.commons.configuration/commons-configuration-1.6.jar org.codehaus.jackson/jackson-core-asl-1.7.3.jar org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar org.junit/mockito-all-1.9.0.jar diff --git a/rpms/awips2.qpid/0.18/SOURCES/qpid-messageNotFound.patch b/rpms/awips2.qpid/0.18/SOURCES/qpid-messageNotFound.patch new file mode 100644 index 0000000000..3519e08446 --- /dev/null +++ b/rpms/awips2.qpid/0.18/SOURCES/qpid-messageNotFound.patch @@ -0,0 +1,137 @@ +diff -crB a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java +*** a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java 2012-06-28 11:46:12.000000000 -0500 +--- b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java 2013-09-16 13:26:48.000000000 -0500 +*************** +*** 38,47 **** + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + import java.util.concurrent.atomic.AtomicLongFieldUpdater; + import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; + + public abstract class QueueEntryImpl implements QueueEntry + { +! private static final Logger _log = Logger.getLogger(QueueEntryImpl.class); + + private final QueueEntryList _queueEntryList; + +--- 38,48 ---- + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + import java.util.concurrent.atomic.AtomicLongFieldUpdater; + import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; ++ import java.util.logging.Level; + + public abstract class QueueEntryImpl implements QueueEntry + { +! private static final java.util.logging.Logger _log = java.util.logging.Logger.getLogger(QueueEntryImpl.class.getName()); + + private final QueueEntryList _queueEntryList; + +*************** +*** 145,156 **** + ServerMessage message = getMessage(); + if(message != null) + { +! long expiration = message.getExpiration(); +! if (expiration != 0L) +! { +! long now = System.currentTimeMillis(); + +! return (now > expiration); + } + } + return false; +--- 146,162 ---- + ServerMessage message = getMessage(); + if(message != null) + { +! try { +! long expiration = message.getExpiration(); +! if (expiration != 0L) +! { +! long now = System.currentTimeMillis(); + +! return (now > expiration); +! } +! } catch (Exception e) { +! _log.log(Level.SEVERE, "Caught exception checking if message is expired. Message State: " + _state.getState().name(), e); +! return isAvailable(); + } + } + return false; +*************** +*** 343,349 **** + } + else + { +! _log.warn("Requesting rejection by null subscriber:" + this); + } + } + +--- 349,355 ---- + } + else + { +! _log.warning("Requesting rejection by null subscriber:" + this); + } + } + +diff -crB a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java +*** a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java 2012-07-08 10:30:05.000000000 -0500 +--- b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java 2013-09-16 14:15:11.000000000 -0500 +*************** +*** 36,41 **** +--- 36,42 ---- + import java.util.concurrent.atomic.AtomicLong; + + import org.apache.log4j.Logger; ++ import org.apache.log4j.Level; + import org.apache.qpid.AMQException; + import org.apache.qpid.AMQSecurityException; + import org.apache.qpid.framing.AMQShortString; +*************** +*** 1053,1060 **** + + public long getOldestMessageArrivalTime() + { +! QueueEntry entry = getOldestQueueEntry(); +! return entry == null ? Long.MAX_VALUE : entry.getMessage().getArrivalTime(); + } + + protected QueueEntry getOldestQueueEntry() +--- 1054,1090 ---- + + public long getOldestMessageArrivalTime() + { +! int tries = 0; +! QueueEntry prev = null; +! +! while (tries < 3) { +! QueueEntry entry = null; +! try { +! entry = getOldestQueueEntry(); +! return entry == null ? Long.MAX_VALUE : entry.getMessage().getArrivalTime(); +! } catch (Exception e) { +! if ((prev == null) || (prev != entry)) { +! tries++; +! _logger.log(Level.FATAL, +! "Error occurred getting oldest message arrival time, message: " +! + entry + ", attempt " + tries + " of 3", e); +! prev = entry; +! } else { +! // same invalid entry returned, try deleting? +! _logger.log(Level.WARN, +! "Received same invalid entry on getting oldest message, attempting discard."); +! try { +! entry.discard(); +! } catch (Exception e2) { +! _logger.log(Level.ERROR, +! "Failed to discard message. Restart recommended if errors continue", e2); +! } +! } +! } +! } +! +! // default case +! return Long.MAX_VALUE; + } + + protected QueueEntry getOldestQueueEntry() diff --git a/rpms/awips2.qpid/0.18/SOURCES/qpid-wrapper b/rpms/awips2.qpid/0.18/SOURCES/qpid-wrapper new file mode 100644 index 0000000000..ff2c960ba1 --- /dev/null +++ b/rpms/awips2.qpid/0.18/SOURCES/qpid-wrapper @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# this version of the qpid start script will utilize the yajsw wrapper + +CONF_FILE="wrapper.conf" + +WHEREAMI=`dirname $0` +if [ -z "$QPID_HOME" ]; then + export QPID_HOME=`cd $WHEREAMI/../ && pwd` +fi + +if [ -z "$QPID_WORK" ]; then + export QPID_WORK=$QPID_HOME +fi + +if [ -z "${QPID_PID_FILENAME}" ]; then + export QPID_PID_FILENAME="qpid-server.pid" +fi + +# Set other variables used by the wrapper +export JAVA=/awips2/java/bin/java \ + JAVA_VM=-server \ + AMQJ_LOGGING_LEVEL=info \ + QPID_PNAME=" -DPNAME=QPBRKR" \ + CONSOLE_LOGLEVEL=DEBUG + +if [ ! -f ${JAVA} ]; then + echo "ERROR: the specified Java does not exist - ${JAVA}." + echo "Unable to Continue ... Terminating." + exit 1 +fi + +$JAVA -jar ${QPID_HOME}/bin/yajsw/wrapper.jar -c ${QPID_HOME}/conf/${CONF_FILE} diff --git a/rpms/awips2.qpid/0.18/SOURCES/qpidd b/rpms/awips2.qpid/0.18/SOURCES/qpidd index 46b5d44659..76fc3fde7d 100644 --- a/rpms/awips2.qpid/0.18/SOURCES/qpidd +++ b/rpms/awips2.qpid/0.18/SOURCES/qpidd @@ -19,7 +19,7 @@ [ ${NETWORKING} = "no" ] && exit 0 RETVAL=0 -prog="qpid-server" +prog="qpid-wrapper" # Who to run QPID as, usually "awips". (NOT "root") QPIDUSER=awips @@ -28,17 +28,37 @@ QPIDUSER=awips TODAY=`/bin/date +%Y%m%d` QPID_HOME=/awips2/qpid +wrapper_process="org.rzo.yajsw.app.WrapperJVMMain" +_wrapper_jar=${QPID_HOME}/bin/yajsw/wrapper.jar -export QPID_JAVA_MEM=-Xmx2048m +function getQPID_psCount() +{ + psCount_qpid=`ps -ef | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep -c "PNAME=QPBRKR "` +} + +function getQPID_pid() +{ + pid_qpid=`ps -e -o pid,args | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o` +} + +function getWrapper_psCount() +{ + psCount_wrapper=`ps -ef | grep "${_wrapper_jar} -c" | grep -c wrapper.conf` +} + +function getWrapper_pid() +{ + pid_wrapper=`ps -e -o pid,args | grep "${_wrapper_jar} -c" | grep wrapper.conf | grep -e "^ *\([0-9]\+\)" -o` +} start() { - isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "` - if [ $isRunning -eq 1 ]; then + getQPID_psCount + if [ ${psCount_qpid} -eq 1 ]; then echo "WARNING: QPID already running, not starting another instance" return 1 fi - DAEMON="${QPID_HOME}/bin/qpid-server" + DAEMON="/bin/bash ${QPID_HOME}/bin/${prog}" QPIDSTARTLOG=${QPID_HOME}/log/start-qpid-$TODAY.log su $QPIDUSER -c "$DAEMON" >> $QPIDSTARTLOG 2>&1 & @@ -47,35 +67,47 @@ start() { } stop() { - isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "` - - if [ $isRunning -eq 1 ]; then - pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o` - kill $pid - - CNT=0 - while [[ "X$pid" != "X" ]]; do - if [ "$CNT" -ge "15" ]; then - echo "QPID did not shut down gracefully in 15 seconds, force shutting down" - kill -9 $pid - else - let CNT=${CNT}+1 - fi - - sleep 1 - pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o` - done - else - echo "QPID is not running" + # determine if qpid is running, first. + getQPID_psCount + if [ ${psCount_qpid} -ne 1 ]; then + echo "WARNING: Qpid is not running, no shutdown attempted!" + return 1 fi - + # get the qpid pid + getQPID_pid + + # determine if the qpid wrapper is running. + getWrapper_psCount + if [ ${psCount_wrapper} -eq 1 ]; then + # get the wrapper pid + getWrapper_pid + + # stop the wrapper + kill ${pid_wrapper} + else + # stop qpid + kill ${pid_qpid} + fi + + # wait for and verify that qpid has stopped running + savepid=${pid_qpid} + while [ "X${pid_qpid}" != "X" ]; do + sleep 1 + + getQPID_psCount + if [ ${psCount_qpid} -eq 1 ]; then + pid_qpid=${savepid} + else + pid_qpid="" + fi + done } checkStatus() { - isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "` - if [ $isRunning -eq 1 ]; then - pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o` - echo "QPID is running (PID $pid)" + getQPID_psCount + if [ ${psCount_qpid} -eq 1 ]; then + getQPID_pid + echo "QPID is running (PID ${pid_qpid})" else echo "QPID is not running" fi diff --git a/rpms/awips2.qpid/0.18/SOURCES/wrapper.conf b/rpms/awips2.qpid/0.18/SOURCES/wrapper.conf new file mode 100644 index 0000000000..d90ec22fb0 --- /dev/null +++ b/rpms/awips2.qpid/0.18/SOURCES/wrapper.conf @@ -0,0 +1,122 @@ +#******************************************************************** +## +# 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. +## +# Wrapper Properties +#******************************************************************** + +wrapper.debug=false +set.default.QPID_HOME=../.. +wrapper.working.dir=/awips2/qpid/bin +# required due to java bug: +# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4388188 +# not sure if the yajsw developers have any intention of +# implementing the work-around (solution?) stated in the +# ticket. +wrapper.fork_hack=true +# at a minimum: prevents the printing of the "Invalid parameter" messages +wrapper.console.pipestreams=true + +# Java Application +wrapper.java.command=/awips2/java/bin/java + +# Java Classpath (include wrapper.jar) Add class path elements as +# needed starting from 1 +wrapper.java.classpath.1=${QPID_HOME}/bin/yajsw/wrapper.jar + +# include ANY jar files that are found in the locations denoted by +# wrapper.search.java.classpath.# +wrapper.search.java.classpath.1=${QPID_HOME}/lib/opt +wrapper.search.java.classpath.2=${QPID_HOME}/lib/opt/qpid-deps + +# garbage collection settings +wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC +wrapper.java.additional.gc.2=-XX:+HeapDumpOnOutOfMemoryError + +# the main qpid java class that will be started +wrapper.java.app.mainclass=org.apache.qpid.server.Main + +# Java Additional Parameters +# note that n is the parameter number starting from 1. +wrapper.java.additional.1=${JAVA_VM} +wrapper.java.additional.2=${QPID_PNAME} +wrapper.java.additional.3=-Damqj.logging.level=${AMQJ_LOGGING_LEVEL} +wrapper.java.additional.4=-DQPID_HOME=${QPID_HOME} +wrapper.java.additional.5=-DQPID_WORK=${QPID_WORK} +wrapper.java.additional.6=-Damqj.read_write_pool_size=32 +wrapper.java.additional.7=-Dqpid.broker.exceptionHandler.continue=true + +# Maximum Java Heap Size (in MB) +wrapper.java.maxmemory=2048 + +wrapper.ping.timeout=300 + +#******************************************************************** +# Monitor the Application +#******************************************************************** +wrapper.java.monitor.heap = true +# warning messages will be logged; it is also possible to send an e-mail +wrapper.java.monitor.heap.threshold.percent = 90 + +wrapper.java.monitor.deadlock = true +wrapper.filter.trigger.deadlock.restart=wrapper.java.monitor.deadlock: DEADLOCK IN THREADS: +wrapper.filter.action.deadlock.restart=RESTART + +# restart the application if it runs out of memory +wrapper.filter.trigger.1=java.lang.OutOfMemoryError +wrapper.filter.action.1=RESTART + +# restart the application if it crashes +wrapper.on_exit.default=RESTART + +#******************************************************************** +# Wrapper Logging Properties +#******************************************************************** +# Format of output for the console. (See docs for formats) +wrapper.console.format=M + +# Log file to use for wrapper output logging. +wrapper.logfile=${QPID_HOME}/log/qpid-wrapper-YYYYMMDD.log + +# Format of output for the log file. (See docs for formats) +wrapper.logfile.format=M + +# Log Level for log file output. (See docs for log levels) +wrapper.logfile.loglevel=INFO + +# Set the log rollover mode for the log. +# DATE - creates a new file each day - file name must include YYYYMMDD. +# SIZE - uses log size for log roll-over. +wrapper.logfile.rollmode=DATE + +# Maximum number of rolled log files which will be allowed before old +# files are deleted. The default value of 0 implies no limit. +wrapper.logfile.maxfiles=7 + +# Log Level for console output. (See docs for log levels) +wrapper.console.loglevel=${CONSOLE_LOGLEVEL} + +# Log Level for log file output. (See docs for log levels) +wrapper.logfile.loglevel=INFO + +#******************************************************************** +# Wrapper Windows Properties +#******************************************************************** +# Title to use when running as a console +wrapper.console.title=QPID diff --git a/rpms/awips2.qpid/0.18/SOURCES/yajsw-distribution.tar b/rpms/awips2.qpid/0.18/SOURCES/yajsw-distribution.tar new file mode 100644 index 0000000000..6836495dee Binary files /dev/null and b/rpms/awips2.qpid/0.18/SOURCES/yajsw-distribution.tar differ diff --git a/rpms/awips2.qpid/0.18/SPECS/qpid-java.spec.patch0 b/rpms/awips2.qpid/0.18/SPECS/qpid-java.spec.patch0 index 64df514a2f..c36b7701ff 100644 --- a/rpms/awips2.qpid/0.18/SPECS/qpid-java.spec.patch0 +++ b/rpms/awips2.qpid/0.18/SPECS/qpid-java.spec.patch0 @@ -1,6 +1,6 @@ diff -crB a/qpid-java.spec b/qpid-java.spec -*** a/qpid-java.spec 2013-05-14 20:24:21.000000000 -0500 ---- b/qpid-java.spec 2013-05-14 20:23:49.000000000 -0500 +*** a/qpid-java.spec 2013-09-16 16:26:10.000000000 -0500 +--- b/qpid-java.spec 2013-09-16 16:25:55.000000000 -0500 *************** *** 1,6 **** ! Name: qpid-java @@ -14,13 +14,13 @@ diff -crB a/qpid-java.spec b/qpid-java.spec ! ! Name: awips2-qpid-java Version: 0.18 -! Release: 1%{?dist} +! Release: 3%{?dist} Summary: Java implementation of Apache Qpid License: Apache Software License Group: Development/Java *************** *** 12,21 **** ---- 14,28 ---- +--- 14,32 ---- Source0: %{qpid_src_dir}.tar.gz Source1: qpid-build-deps-%{version}.tar.gz Source2: %{qpid_deps_src_dir}.tar.gz @@ -28,11 +28,15 @@ diff -crB a/qpid-java.spec b/qpid-java.spec + Source4: virtualhosts.xml + Source5: qpidd + Source6: log4j.xml ++ Source7: qpid-wrapper ++ Source8: wrapper.conf ++ Source9: yajsw-distribution.tar Patch0: mrg.patch Patch1: examples.patch Patch2: build.patch + Patch3: awips.patch ++ Patch4: qpid-messageNotFound.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -49,7 +53,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec Requires: log4j >= 1.2.12 %description client ---- 42,61 ---- +--- 46,65 ---- %description common Java implementation of Apache Qpid - common files @@ -79,7 +83,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec %description example Java implementation of Apache Qpid - example ---- 65,71 ---- +--- 69,75 ---- Summary: Java implementation of Apache Qpid - example Group: Development/Java BuildArch: noarch @@ -89,7 +93,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec Java implementation of Apache Qpid - example *************** *** 58,67 **** ---- 74,98 ---- +--- 78,103 ---- %setup -q -n %{qpid_src_dir} mkdir -p java/lib/required tar -xvzf %SOURCE1 -C java/lib/required @@ -112,6 +116,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec %patch2 -p2 + # apply the awips patch + %patch3 -p2 ++ %patch4 -p2 %setup -q -T -b 2 -n %{qpid_deps_src_dir} @@ -124,7 +129,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec # blacklisted jars are either provided by the Requires: or not needed. BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests" ---- 101,115 ---- +--- 106,120 ---- ( cd %{qpid_src_dir}/java @@ -189,7 +194,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec %changelog * Thu Sep 6 2012 Irina Boverman - 0.18-2 ---- 123,234 ---- +--- 128,249 ---- cd .. @@ -214,6 +219,14 @@ diff -crB a/qpid-java.spec b/qpid-java.spec ! # scripts for broker ! install -dm 755 %{buildroot}%{_awips2_directory}/bin ! install -pm 644 %{qpid_src_dir}/java/build/bin/* %{buildroot}%{_awips2_directory}/bin +! # install the wrapper script +! install -pm 644 %SOURCE7 %{buildroot}%{_awips2_directory}/bin +! # add the yajsw distribution +! tar -xf %SOURCE9 -C %{buildroot}%{_awips2_directory}/bin +! +! # wrapper configuration +! install -dm 755 %{buildroot}%{_awips2_directory}/conf +! install -pm 644 %SOURCE8 %{buildroot}%{_awips2_directory}/conf ! ! # service script ! mkdir -p %{buildroot}/etc/init.d @@ -288,6 +301,8 @@ diff -crB a/qpid-java.spec b/qpid-java.spec ! /awips2/qpid/lib/opt/qpid-broker-plugins-firewall-%{version}.jar ! /awips2/qpid/lib/opt/qpid-broker-plugins-management-http-%{version}.jar ! %dir /awips2/qpid/log +! %dir /awips2/qpid/conf +! /awips2/qpid/conf/* ! %defattr(755,awips,fxalpha,755) ! %dir /awips2/qpid/bin ! /awips2/qpid/bin/* diff --git a/rpms/awips2.qpid/0.18/deploy.builder/build.sh b/rpms/awips2.qpid/0.18/deploy.builder/build.sh index 47e5aa48e6..2d65ade323 100644 --- a/rpms/awips2.qpid/0.18/deploy.builder/build.sh +++ b/rpms/awips2.qpid/0.18/deploy.builder/build.sh @@ -5,6 +5,10 @@ if [ -z ${WORKSPACE} ]; then echo "Error: the location of the baseline workspace must be specified using the WORKSPACE environment variable." exit 1 fi +if [ -z ${AWIPSII_BUILD_ROOT} ]; then + echo "Error: the location of the AWIPS II build root must be specified using the AWIPSII_BUILD_ROOT environment variable." + exit 1 +fi __SPECS=qpid-java.spec __SPECS_PATCH0=qpid-java.spec.patch0 diff --git a/rpms/build/i386/build.sh b/rpms/build/i386/build.sh index c9f535acae..7c73b99ac6 100644 --- a/rpms/build/i386/build.sh +++ b/rpms/build/i386/build.sh @@ -130,6 +130,13 @@ if [ "${1}" = "-python-qpid" ]; then exit 0 fi +if [ "${1}" = "-notification" ]; then + buildRPM "awips2-notification" + + exit 0 +fi + + if [ "${1}" = "-postgres" ]; then buildRPM "awips2-postgres" buildRPM "awips2-database-server-configuration" @@ -333,6 +340,12 @@ if [ "${1}" = "-ade" ]; then exit 1 fi + # Build the source jar file + ade_work_dir="/home/dmsys/Dim12/build/AWIPS2/AWIPS2-ADE-OB13.5.1-CM" + cd $ade_work_dir + ./build_source_jar.sh + cp -v /tmp/awips-component/tmp/awips2-ade-baseline-SOURCES.jar ${WORKSPACE}/${ade_directory} + # Tar the directory. pushd . > /dev/null 2>&1 cd ${WORKSPACE} @@ -350,7 +363,7 @@ if [ "${1}" = "-viz" ]; then buildRPM "awips2" buildRPM "awips2-common-base" # buildRPM "awips2-rcm" - # buildRPM "awips2-hydroapps-shared" + buildRPM "awips2-hydroapps-shared" # buildRPM "awips2-notification" buildCAVE if [ $? -ne 0 ]; then @@ -364,7 +377,7 @@ fi if [ "${1}" = "-edex" ]; then #buildRPM "awips2" #buildRPM "awips2-common-base" - # buildRPM "awips2-adapt-native" + buildRPM "awips2-adapt-native" #buildRPM "awips2-python-qpid" # buildRPM "awips2-cli" buildRPM "awips2-gfesuite-client" @@ -379,6 +392,16 @@ if [ "${1}" = "-edex" ]; then exit 0 fi +if [ "${1}" = "-localization" ]; then + buildLocalizationRPMs + if [ $? -ne 0 ]; then + exit 1 + fi + + exit 0 +fi + + if [ "${1}" = "-qpid" ]; then buildQPID if [ $? -ne 0 ]; then