ASM #15311 - Merge and Build Support - Merge ASM delivery into 14.4.1-1m.
Merge branch 'asm_14.4.1' of ssh://10.201.30.8:29418/AWIPS2_baseline into master_14.4.1 Conflicts: cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/SmartScript.py cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/ActiveTable.java rpms/awips2.core/Installer.postgres/component.spec rpms/awips2.core/Installer.python/component.spec rpms/awips2.core/Installer.tools/component.spec rpms/python.site-packages/Installer.h5py/component.spec rpms/python.site-packages/Installer.matplotlib/component.spec rpms/python.site-packages/Installer.nose/component.spec rpms/python.site-packages/Installer.pupynere/component.spec rpms/python.site-packages/Installer.qpid/component.spec rpms/python.site-packages/Installer.scientific/component.spec rpms/python.site-packages/Installer.scipy/component.spec rpms/python.site-packages/Installer.shapely/component.spec rpms/python.site-packages/Installer.tables/component.spec Former-commit-id:6b77894bd0
[formerlyc6bd5d7675
] [formerly6b77894bd0
[formerlyc6bd5d7675
] [formerlyeed6737801
[formerly 1f331890b8fc38b4f8ed3a3debc66b8fedba4fdd]]] Former-commit-id:eed6737801
Former-commit-id:f3ecae8573
[formerly5cc8e5b4af
] Former-commit-id:06ac6b396e
This commit is contained in:
commit
1e9024ede9
139 changed files with 13148 additions and 5279 deletions
|
@ -99,6 +99,7 @@ import com.raytheon.viz.ui.editor.AbstractEditor;
|
|||
* 08/15/2012 1053 jkorman Added capability to save/restore user
|
||||
* print settings.
|
||||
* 10/12/2012 1229 rferrel Made dialog non-blocking.
|
||||
* 12/09/2014 ASM #11982 D. Friedman Fix print-to-file
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -650,8 +651,8 @@ public class PrintDialog extends CaveSWTDialog {
|
|||
} else if (this.fileRadioButton.getSelection()) {
|
||||
printerSettings.selectedPrinter = this.printToFileData;
|
||||
printerSettings.selectedPrinter.printToFile = true;
|
||||
printerSettings.selectedPrinter.fileName = "file://"
|
||||
+ this.destinationFileText.getText();
|
||||
printerSettings.selectedPrinter.fileName =
|
||||
this.destinationFileText.getText();
|
||||
}
|
||||
printerSettings.selectedPrinter.copyCount = this.copiesSpinner
|
||||
.getSelection();
|
||||
|
|
|
@ -40,6 +40,8 @@ import org.eclipse.swt.widgets.Scale;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 4, 2008 1164 jelkins Initial creation
|
||||
* Dec 11, 2014 638 mgamazaychikov Add isFloat to explicitly specify the type of return value
|
||||
* be either Float or Integer.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,6 +67,8 @@ public class ScaleWidget extends Widget {
|
|||
|
||||
private DecimalFormat format;
|
||||
|
||||
private boolean isFloat = false;
|
||||
|
||||
/**
|
||||
* Class constructor specifying this scale's label.
|
||||
*
|
||||
|
@ -126,7 +130,12 @@ public class ScaleWidget extends Widget {
|
|||
scale.setPageIncrement(1);
|
||||
|
||||
if (getValue() == null) {
|
||||
setValue(new Float(minValue));
|
||||
if (isFloat()) {
|
||||
setValue(new Float(minValue));
|
||||
}
|
||||
else {
|
||||
setValue(new Integer((int)minValue));
|
||||
}
|
||||
}
|
||||
|
||||
setInitialScaleValue(((Number) (getValue())).floatValue());
|
||||
|
@ -140,7 +149,12 @@ public class ScaleWidget extends Widget {
|
|||
float value = getScaleValue();
|
||||
|
||||
label.setText(format.format(value));
|
||||
setValue(new Float(value));
|
||||
if (isFloat()) {
|
||||
setValue(new Float(value));
|
||||
}
|
||||
else {
|
||||
setValue(new Integer((int)value));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -241,4 +255,11 @@ public class ScaleWidget extends Widget {
|
|||
this.precision = precision;
|
||||
}
|
||||
|
||||
public boolean isFloat() {
|
||||
return isFloat;
|
||||
}
|
||||
|
||||
public void setFloat(boolean isFloat) {
|
||||
this.isFloat = isFloat;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,6 +240,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 07/23/2014 15645 zhao modified checkBasicSyntaxError()
|
||||
* May 15, 2014 3002 bgonzale Moved common taf code to com.raytheon.uf.common.dataplugin.taf.
|
||||
* 08/13/2014 3497 njensen Refactored syntax checking to prevent potential infinite loop
|
||||
* 12/02/2014 #15007 zhao Added restoreFrom() for the "Restore From..." menu option
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1163,7 +1164,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
restoreFromMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
restoreFile(null);
|
||||
restoreFrom();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2501,6 +2502,92 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* restore from a file a user selects
|
||||
*/
|
||||
private void restoreFrom() {
|
||||
|
||||
if ( tabFolder.getSelectionIndex() == VIEWER_TAB_SELECTED ) {
|
||||
tabFolder.setSelection(editorTab);
|
||||
}
|
||||
|
||||
String tempTafPath = "aviation/tmp/";
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext context = pm.getContext(LocalizationType.CAVE_STATIC, LocalizationLevel.SITE);
|
||||
String path = pm.getFile(context, tempTafPath).getAbsolutePath();
|
||||
FileDialog dlg = new FileDialog(shell, SWT.OPEN);
|
||||
dlg.setFilterPath(path);
|
||||
String filepath = dlg.open();
|
||||
|
||||
String errorMsg = null;
|
||||
|
||||
try {
|
||||
setWaitCursor(true);
|
||||
File file = new File(filepath);
|
||||
FileReader reader = new FileReader(file);
|
||||
BufferedReader input = new BufferedReader(reader);
|
||||
StringBuilder contents = new StringBuilder();
|
||||
String line = null;
|
||||
line = input.readLine();
|
||||
|
||||
if (line == null) {
|
||||
errorMsg = "empty file";
|
||||
} else {
|
||||
String[] values = line.split("\t");
|
||||
// Assume first line contains wmo, wmo site and issue time.
|
||||
if (values.length != 3) {
|
||||
errorMsg = "parse error";
|
||||
contents.append(line);
|
||||
contents.append(System.getProperty("line.separator"));
|
||||
} else {
|
||||
editorTafTabComp.setWmoIdLbl(values[0].trim());
|
||||
editorTafTabComp.setWmoSiteLbl(values[1].trim());
|
||||
editorTafTabComp.setLargeTF(values[2].trim());
|
||||
}
|
||||
}
|
||||
|
||||
while ((line = input.readLine()) != null) {
|
||||
contents.append(line);
|
||||
contents.append(System.getProperty("line.separator"));
|
||||
}
|
||||
|
||||
input.close();
|
||||
|
||||
String tafText = contents.toString();
|
||||
List<String> sitesInTaf = getSitesInTaf(tafText);
|
||||
String icao = "----";
|
||||
String bbb = "---";
|
||||
|
||||
if (errorMsg == null) {
|
||||
bbb = editorTafTabComp.getBBB();
|
||||
}
|
||||
|
||||
if (sitesInTaf.size() > 0) {
|
||||
icao = sitesInTaf.get(0);
|
||||
} else if (errorMsg == null) {
|
||||
errorMsg = "uable to determine station";
|
||||
}
|
||||
|
||||
ti.setText(icao + " " + bbb);
|
||||
editorTafTabComp.getTextEditorControl().setText(tafText);
|
||||
|
||||
if (editorTafTabComp.isTafSent()) {
|
||||
editorTafTabComp.updateTafSent(false);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
setMessageStatusError("File " + filepath + " not found.");
|
||||
} catch (IOException e) {
|
||||
setMessageStatusError("An IOException occured while opening file " + filepath);
|
||||
} finally {
|
||||
if (errorMsg != null) {
|
||||
setMessageStatusError("File " + filepath + ": " + errorMsg);
|
||||
} else {
|
||||
setMessageStatusOK("File " + filepath + " opened successfully.");
|
||||
}
|
||||
setWaitCursor(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a TAF bulletin from a tmp file.
|
||||
|
|
|
@ -50,6 +50,13 @@
|
|||
#
|
||||
# 2010/04/23 ryu Initial port to AWIPS II. Fixed bugs with the "Stat vs. Scale" tab.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 12/02/2014 RM #625 ryu Changed checkGroup() as suggested to display models
|
||||
# in multi-columns when a single column is insufficient.
|
||||
#
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
MenuItems = ["Verify"]
|
||||
|
@ -7721,18 +7728,31 @@ class Verif(BVDialog):
|
|||
# checkGroup - make a group of check buttons
|
||||
#
|
||||
def checkGroup(self,master,labeltext,varlist,valuelist,
|
||||
defaultvalues,filltype,expandflag,callback=None):
|
||||
defaultvalues,filltype,expandflag,callback=None,maxRows=30):
|
||||
checkFrame=Tkinter.Frame(master,relief=Tkinter.GROOVE,borderwidth=2)
|
||||
checkLabel=Tkinter.Label(checkFrame,text=labeltext)
|
||||
checkLabel.pack(side=Tkinter.TOP,anchor=Tkinter.W)
|
||||
cnt=0
|
||||
row=0
|
||||
col=0
|
||||
f=Tkinter.Frame(checkFrame,relief=Tkinter.FLAT,borderwidth=2)
|
||||
f.pack(side=Tkinter.TOP,anchor=Tkinter.W)
|
||||
if len(valuelist) > maxRows:
|
||||
ncols = (len(valuelist) - 1)/maxRows + 1
|
||||
maxRows = (len(valuelist) - 1)/ncols + 1
|
||||
for item in valuelist:
|
||||
a=Tkinter.Checkbutton(checkFrame,text=item,variable=varlist[cnt],
|
||||
a=Tkinter.Checkbutton(f,text=item,variable=varlist[cnt],
|
||||
onvalue=item,offvalue="",command=callback)
|
||||
if item in defaultvalues:
|
||||
varlist[cnt].set(item)
|
||||
a.pack(side=Tkinter.TOP,anchor=Tkinter.W)
|
||||
cnt+=1
|
||||
|
||||
a.grid(row=row,column=col,sticky=Tkinter.NW)
|
||||
print "Formatting row %d col %d for %s" % (row,col,item)
|
||||
row=row+1
|
||||
if row == maxRows:
|
||||
row = 0
|
||||
col =col + 1
|
||||
cnt=cnt+1
|
||||
checkFrame.pack(side=Tkinter.TOP,fill=filltype,expand=expandflag)
|
||||
return varlist
|
||||
#=================================================================
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
# ------------ ---------- ----------- --------------------------
|
||||
# 11/21/13 16770 ryu Change name of temporary files
|
||||
# for dual domain.
|
||||
# 11/26/2014 #649 zhao changed "dbName" to "dbid"
|
||||
#=====================================================================
|
||||
#
|
||||
# S T A R T C O N F I G U R A T I O N S E C T I O N
|
||||
|
@ -594,11 +595,11 @@ class Procedure (SmartScript.SmartScript):
|
|||
# Read the climo grids on either side
|
||||
#
|
||||
if prevClimoStart!=self.prevClimoSave:
|
||||
temp=self.getGrids(dbName,parmName,"SFC",prevClimoTR)
|
||||
temp=self.getGrids(dbid,parmName,"SFC",prevClimoTR)
|
||||
self.prevClimo=self.convertKtoF(temp)
|
||||
self.prevClimoSave=prevClimoStart
|
||||
if nextClimoStart!=self.nextClimoSave:
|
||||
temp=self.getGrids(dbName,parmName,"SFC",nextClimoTR)
|
||||
temp=self.getGrids(dbid,parmName,"SFC",nextClimoTR)
|
||||
self.nextClimo=self.convertKtoF(temp)
|
||||
self.nextClimoSave=nextClimoStart
|
||||
#
|
||||
|
|
|
@ -167,8 +167,8 @@ class Tool (SmartScript.SmartScript):
|
|||
cubeShape = (len(tCube), tCube.shape[1], tCube.shape[2])
|
||||
gridShape = (tCube.shape[1], tCube.shape[2])
|
||||
layerSR = zeros(cubeShape, 'int8')
|
||||
pvvAvg = zeros(cubeShape, 'int8')
|
||||
pvvSum = zeros(gridShape, 'int8')
|
||||
pvvAvg = zeros(cubeShape, 'float32')
|
||||
pvvSum = zeros(gridShape, 'float32')
|
||||
|
||||
for i in range(len(ghCube) - 1):
|
||||
#for i in range(len(ghCube)):
|
||||
|
@ -235,10 +235,10 @@ class Tool (SmartScript.SmartScript):
|
|||
totalSnowRatio = where(less(pvvSum, 1.0), thicknessSnowRatio, totalSnowRatio)
|
||||
|
||||
# If there's any layer above 0.0C, snowRatio gets 0
|
||||
mask = greater(tCube, 272.65)
|
||||
mask = any(less_equal(tCube, 272.65), axis = 0)
|
||||
mask = sum(mask) # reduce to single level by adding bits vertically
|
||||
# if mask == 0, nowhere in the column is temp < 0.5C
|
||||
totalSnowRatio = where(equal(mask, 0), totalSnowRatio, 0.0)
|
||||
totalSnowRatio = where(mask, totalSnowRatio, 0.0)
|
||||
#Calculate Snowfall - taper to zero from 31 to 34 F.
|
||||
snowfall = QPF * totalSnowRatio
|
||||
snowfall = where(greater(T, 31.0), pow(35.0 - T,2)/16.0 * snowfall , snowfall)
|
||||
|
|
|
@ -37,6 +37,7 @@ from java.io import File
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 05/29/08 njensen Initial Creation.
|
||||
# 12/10/14 #14946 ryu Add getTimeZones() function.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -434,6 +435,26 @@ def getVTECMessageType(productCategory):
|
|||
import VTECMessageType
|
||||
return VTECMessageType.getVTECMessageType(productCategory)
|
||||
|
||||
def getTimeZones(zones, officeTZ):
|
||||
import AreaDictionary
|
||||
timezones = []
|
||||
if zones is not None:
|
||||
for zone in JUtil.javaStringListToPylist(zones):
|
||||
area_dict = AreaDictionary.AreaDictionary.get(zone)
|
||||
if area_dict is None:
|
||||
continue
|
||||
tzs = area_dict.get("ugcTimeZone")
|
||||
if tzs is not None:
|
||||
if type(tzs) is str:
|
||||
tzs = [tzs]
|
||||
for tz in tzs:
|
||||
if tz not in timezones:
|
||||
timezones.append(tz)
|
||||
if officeTZ in timezones and officeTZ != timezones[0]:
|
||||
timezones.remove(officeTZ)
|
||||
timezones.insert(0, officeTZ)
|
||||
return JUtil.pylistToJavaStringList(timezones)
|
||||
|
||||
def reloadModule(moduleName):
|
||||
# m = __import__(moduleName)
|
||||
# reload(m)
|
||||
|
|
|
@ -56,13 +56,13 @@
|
|||
# Wx/Discrete in First mode.
|
||||
# Dec 23, 2013 16893 ryu Added unloadWEs() method (created by njensen)
|
||||
# Apr 29, 2014 3097 randerso Fixed getGrids() to return non-scalar grids as tuples in all cases
|
||||
# Nov 26, 2014 #633 zhao Corrected a type error in loadParm()
|
||||
# Dec 01, 2014 3875 randerso Added gmTime() and localTime() functions which are exact equivalents
|
||||
# to those in the python time module.
|
||||
# Added getTimeZoneStr and getTzInfo which return the site's local time
|
||||
# zone as a string or as an object respectively
|
||||
# Fixed createTimeRange to correctly return time ranges relative to local
|
||||
# time regardless of setting of os.environ['TZ']
|
||||
#
|
||||
########################################################################
|
||||
import types, string, time, sys
|
||||
from math import *
|
||||
|
@ -213,7 +213,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
else:
|
||||
raise TypeError("SmartScript loadParm: " + \
|
||||
"couldn't load " + `model` + ' ' + `element` + ' ' + `level` + \
|
||||
' ' + mostRecent)
|
||||
' ' + str(mostRecent) + " (None is returned from getParm())" )
|
||||
##
|
||||
# Get the list of timeranges locked by me in this weather element.
|
||||
#
|
||||
|
|
|
@ -160,6 +160,9 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 03/25/2014 #2884 randerso Added xxxid to check for disabling editor
|
||||
* 05/12/2014 16195 zhao Modified widgetSelected() for "Auto Wrap" option widget
|
||||
* 10/20/2014 #3685 randerso Made conversion to upper case conditional on product id
|
||||
* 12/01/2014 #624 zhao Modified saveFile()
|
||||
* 12/16/2014 #14946 ryu Modified updateIssueExpireTimes() so issuance time is displayed
|
||||
* for the local time zones for each segment.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -2011,15 +2014,18 @@ public class ProductEditorComp extends Composite implements
|
|||
ProductDataStruct pds = textComp.getProductDataStruct();
|
||||
|
||||
if (pds != null) {
|
||||
String officeTimeZone = dm.getParmManager()
|
||||
.compositeGridLocation()
|
||||
.getTimeZone();
|
||||
int numSegments = pds.getSegmentsArray().size();
|
||||
SimpleDateFormat fmt = new SimpleDateFormat(longLocalFmtStr);
|
||||
fmt.setTimeZone(localTimeZone);
|
||||
String issueTime = fmt.format(now).toUpperCase();
|
||||
String officeIssueTime = fmt.format(now).toUpperCase();
|
||||
|
||||
for (int i = 0; i < numSegments; i++) {
|
||||
textComp.startUpdate();
|
||||
HashMap<String, TextIndexPoints> segMap = textComp
|
||||
.getProductDataStruct().getSegmentsArray()
|
||||
HashMap<String, TextIndexPoints> segMap = pds
|
||||
.getSegmentsArray()
|
||||
.get(i).getSementMap();
|
||||
|
||||
TextIndexPoints tip = segMap.get("purgeT");
|
||||
|
@ -2040,9 +2046,32 @@ public class ProductEditorComp extends Composite implements
|
|||
// vtecs are fixed length and this is variable length,
|
||||
// which ensures we only need to reParse() once per
|
||||
// segment
|
||||
List<String> zones = decodeUGCs(pds.getSegmentsArray().get(i));
|
||||
List<String> timeZones = dm.getTextProductMgr()
|
||||
.getTimeZones(zones,
|
||||
officeTimeZone);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String tz : timeZones) {
|
||||
String issueTime;
|
||||
if (tz.equals(officeTimeZone)) {
|
||||
issueTime = officeIssueTime;
|
||||
} else {
|
||||
fmt.setTimeZone(TimeZone.getTimeZone(tz));
|
||||
issueTime = fmt.format(now).toUpperCase();
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
sb.append(" /");
|
||||
sb.append(issueTime);
|
||||
sb.append("/");
|
||||
} else {
|
||||
sb.append(issueTime);
|
||||
}
|
||||
}
|
||||
|
||||
tip = segMap.get("nwstime");
|
||||
if (tip != null) {
|
||||
textComp.replaceText(tip, issueTime);
|
||||
textComp.replaceText(tip, sb.toString());
|
||||
}
|
||||
textComp.endUpdate();
|
||||
}
|
||||
|
@ -2225,10 +2254,22 @@ public class ProductEditorComp extends Composite implements
|
|||
* Save the current text in the product editor to a file.
|
||||
*/
|
||||
private void saveFile() {
|
||||
String fname = getDir();
|
||||
|
||||
String fname = null;
|
||||
if ( productDefinition.get("outputFile") != null ) {
|
||||
fname = getDefString("outputFile");
|
||||
if ( fname.equals(EMPTY) ) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
fname = fixfname(fname);
|
||||
|
||||
FileDialog fd = new FileDialog(parent.getShell(), SWT.SAVE);
|
||||
fd.setText("Save As");
|
||||
fd.setFilterPath(fname);
|
||||
String filePath = (new File(fname)).getParentFile().getPath();
|
||||
fd.setFilterPath(filePath);
|
||||
fd.setFileName(guessFilename());
|
||||
fname = fd.open();
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ import com.raytheon.viz.ui.statusline.StatusStore;
|
|||
* Apr 03,2012 436 randerso Reworked dialog to be called by Python MakeHazard procedure
|
||||
* Apr 09,2012 436 randerso Merged RNK's MakeHazards_Elevation procedure
|
||||
* May 30,2012 2028 randerso Cleaned up dialog layout
|
||||
* Nov 13,2014 646 lshi Fixed hard coded endTimeSlider's Max value
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1167,6 +1168,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
gd.minimumWidth = 200;
|
||||
endTimeSlider.setLayoutData(gd);
|
||||
|
||||
toHours = this.timeScaleEndTime; //#646
|
||||
endTimeSlider.setMinimum(1);
|
||||
endTimeSlider.setMaximum(toHours + 1);
|
||||
endTimeSlider.setIncrement(1);
|
||||
|
|
|
@ -22,7 +22,9 @@ package com.raytheon.viz.gfe.textformatter;
|
|||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -59,6 +61,7 @@ import com.raytheon.viz.gfe.core.DataManager;
|
|||
* Jan 15, 2010 3395 ryu Fix "issued by" functionality
|
||||
* Apr 24, 2013 1936 dgilling Remove unused imports.
|
||||
* Feb 12, 2014 2591 randerso Removed reloadModule method
|
||||
* Dec 15, 2014 #14946 ryu Add getTimeZones() method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -245,6 +248,22 @@ public class TextProductManager {
|
|||
return vtec;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getTimeZones(List<String> zones,
|
||||
String officeTimeZone) {
|
||||
List<String> timeZones = Collections.emptyList();
|
||||
HashMap<String, Object> map = new HashMap<String, Object>(2);
|
||||
map.put("zones", zones);
|
||||
map.put("officeTZ", officeTimeZone);
|
||||
try {
|
||||
timeZones = (List<String>) script.execute("getTimeZones", map);
|
||||
} catch (JepException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Exception getting time zones", e);
|
||||
}
|
||||
return timeZones;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
script.dispose();
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ import com.raytheon.viz.gfe.smartscript.FieldDefinition.FieldType;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* May 30, 2012 randerso Initial creation
|
||||
* May 12, 2014 16167 ryu Fix sizing and accessibility of content.
|
||||
* Dec 11, 2014 638 mgamazaychikov Set isFloat in makeScale.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -403,9 +404,14 @@ public class DialogAreaComposite extends ScrolledComposite {
|
|||
|
||||
ScaleWidget scale = new ScaleWidget(labelText);
|
||||
scale.setOptions(valueList);
|
||||
scale.setValue(initialValue);
|
||||
scale.setResolution(res);
|
||||
scale.setPrecision(precision);
|
||||
if (initialValue instanceof Float ){
|
||||
scale.setFloat(true);
|
||||
} else {
|
||||
scale.setFloat(false);
|
||||
}
|
||||
scale.setValue(initialValue);
|
||||
|
||||
scale.buildComposite(this.topFrame);
|
||||
return scale;
|
||||
|
|
|
@ -72,7 +72,9 @@ import com.raytheon.viz.hydrocommon.util.DbUtils;
|
|||
* Feb 22 2013 14676 lbousaidi check when producttime is null
|
||||
* Mar 25, 2013 1781 mpduff Constrain time series table query with a start time.
|
||||
* May 12 2014 16705 lbousaidi update revision and shef_qual_code in edit routine.
|
||||
* </pre>
|
||||
* Dec 14, 2014 16388 xwei updated the insertion of rejecteddata table.
|
||||
*
|
||||
</pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
|
@ -946,11 +948,10 @@ public class TimeSeriesDataManager extends HydroDataManager {
|
|||
for (ForecastData dr : deleteList) {
|
||||
|
||||
int probability = -1;
|
||||
int revision = 0;
|
||||
if (dr.getTs().toUpperCase().startsWith("F")
|
||||
|| dr.getTs().toUpperCase().startsWith("C")) {
|
||||
int revision = 1;
|
||||
|
||||
if ( dr.getTs().toUpperCase().startsWith("F") || dr.getTs().toUpperCase().startsWith("C") ) {
|
||||
probability = 0;
|
||||
revision = 1;
|
||||
}
|
||||
|
||||
Date productTime = dr.getProductTime();
|
||||
|
@ -1196,36 +1197,6 @@ public class TimeSeriesDataManager extends HydroDataManager {
|
|||
|
||||
sql.setWhereClause(where.toString());
|
||||
|
||||
if (data.getValue() == HydroConstants.MISSING_VALUE) {
|
||||
DataRecord dr = new DataRecord();
|
||||
Date productTime = data.getProductTime();
|
||||
if (productTime == null) {
|
||||
productTime = now;
|
||||
}
|
||||
|
||||
dr.setDur(data.getDur());
|
||||
dr.setExt(data.getExtremum().toUpperCase());
|
||||
dr.setLid(data.getLid());
|
||||
dr.setObsTime(data.getObsTime());
|
||||
dr.setPe(data.getPe().toUpperCase());
|
||||
dr.setPostingTime(now);
|
||||
dr.setQualityCode(TimeSeriesUtil.DEFAULT_QC_VALUE);
|
||||
dr.setRevision(data.getRevision());
|
||||
dr.setShefQualCode("M");
|
||||
dr.setTs(data.getTs().toUpperCase());
|
||||
dr.setValue(data.getPreviousValue());
|
||||
dr.setProductTime(productTime);
|
||||
dr.setProductId(data.getProductID());
|
||||
if (data.getValidTime() != null) {
|
||||
dr.setValidTime(data.getValidTime());
|
||||
dr.setBasisTime(dateFormat.format(data.getBasisTime()));
|
||||
} else {
|
||||
dr.setValidTime(data.getObsTime());
|
||||
}
|
||||
|
||||
insertRejectedData(dr);
|
||||
}
|
||||
|
||||
AppsDefaults ad = AppsDefaults.getInstance();
|
||||
boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN,
|
||||
false);
|
||||
|
|
|
@ -94,6 +94,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 30 Jan 2012 15459 mpduff Redmine 1560 - Make graph canvases redraw on page up/down.
|
||||
* 06 Feb 2013 1578 rferrel Code cleanup for non-blocking dialogs.
|
||||
* 24 Apr 2013 1921 mpduff Fix zoom reset to only reset the "active" graph
|
||||
* 14 May 2014 16388 xwei updated the insertion of rejecteddata table.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -888,6 +889,7 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
|
||||
if (editList.size() > 0) {
|
||||
try {
|
||||
dataManager.insertRejectedData(editList);
|
||||
dataManager.edit(editList);
|
||||
updateMaxFcst(editList);
|
||||
} catch (VizException e) {
|
||||
|
|
|
@ -72,6 +72,9 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=43004
|
||||
* Jul 11, 2013 2088 rferrel Make dialog non-blocking.
|
||||
*
|
||||
* Dec 10, 2014 16061 lbousaidi set the crest time to the correct value for a
|
||||
* new record,also fixed the sorting to match the correct
|
||||
* timecrest.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -401,6 +404,8 @@ public class CrestHistoryDlg extends CaveSWTDialog implements
|
|||
public void widgetSelected(SelectionEvent event) {
|
||||
sortCrestHistoryList();
|
||||
updateCrestHistoryList();
|
||||
crestHistoryList.setSelection(0);
|
||||
setSelectedCrest(crestHistoryData.getCrestDataArray().get(0));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1006,7 +1011,7 @@ public class CrestHistoryDlg extends CaveSWTDialog implements
|
|||
suppressChk.setSelection(false);
|
||||
iceJamChk.setSelection(false);
|
||||
|
||||
statusCbo.select(3);
|
||||
statusCbo.select(0);
|
||||
remarksTF.setText("");
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="com.raytheon.viz.ui.actions.notImplemented1"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.transmitBestEstimateQPE"
|
||||
label="Transmit Best Estimate QPE"
|
||||
mnemonic="T">
|
||||
</command>
|
||||
|
@ -984,8 +984,8 @@
|
|||
name="Clear MPE Data">
|
||||
</command>
|
||||
<command
|
||||
id="com.raytheon.viz.ui.actions.notImplemented1"
|
||||
name="NOT Implemented">
|
||||
id="com.raytheon.viz.mpe.ui.actions.transmitBestEstimateQPE"
|
||||
name="Transmit Best Estimate QPE">
|
||||
</command>
|
||||
<command
|
||||
id="com.raytheon.viz.mpe.ui.actions.transmitRFCBias"
|
||||
|
@ -1222,6 +1222,23 @@
|
|||
definitionId="com.raytheon.viz.inMPEActionSet">
|
||||
</reference>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.mpe.ui.actions.TransmitBestEstimateQPE"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.transmitBestEstimateQPE">
|
||||
<enabledWhen>
|
||||
<with
|
||||
variable="com.raytheon.viz.mpe.ui.transmitBestEstimateQPE">
|
||||
<equals value="true">
|
||||
</equals>
|
||||
</with>
|
||||
</enabledWhen>
|
||||
<activeWhen>
|
||||
<reference
|
||||
definitionId="com.raytheon.viz.inMPEActionSet">
|
||||
</reference>
|
||||
</activeWhen>
|
||||
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.mpe.ui.actions.TransmitRFCBias"
|
||||
|
@ -1803,9 +1820,9 @@
|
|||
</extension>
|
||||
<extension point="org.eclipse.ui.services">
|
||||
<sourceProvider
|
||||
provider="com.raytheon.viz.mpe.ui.NotImplementedSourceProvider">
|
||||
provider="com.raytheon.viz.mpe.ui.TransmitBestEstimateQPEProvider">
|
||||
<variable
|
||||
name="com.raytheon.viz.mpe.ui.notImplemented"
|
||||
name="com.raytheon.viz.mpe.ui.transmitBestEstimateQPE"
|
||||
priorityLevel="activeWorkbenchWindow">
|
||||
</variable>
|
||||
</sourceProvider>
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
package com.raytheon.viz.mpe.ui;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.ui.AbstractSourceProvider;
|
||||
|
||||
public class NotImplementedSourceProvider extends AbstractSourceProvider {
|
||||
|
||||
private static final String[] MENU_ENABLED = new String[] { "com.raytheon.viz.mpe.ui.notImplemented" };
|
||||
|
||||
private final boolean enabled = false;
|
||||
|
||||
private final Map<String, Boolean> sourceMap = new HashMap<String, Boolean>();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#getCurrentState()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Boolean> getCurrentState() {
|
||||
// System.out.println("test");
|
||||
sourceMap.put(MENU_ENABLED[0], enabled);
|
||||
return sourceMap;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#getProvidedSourceNames()
|
||||
*/
|
||||
@Override
|
||||
public String[] getProvidedSourceNames() {
|
||||
// System.out.println("test1");
|
||||
// TODO Auto-generated method stub
|
||||
return MENU_ENABLED;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
/**
|
||||
* 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.viz.mpe.ui;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.ui.AbstractSourceProvider;
|
||||
import org.eclipse.ui.ISources;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
import org.eclipse.ui.services.ISourceProviderService;
|
||||
|
||||
import com.raytheon.uf.common.ohd.AppsDefaults;
|
||||
import com.raytheon.viz.ui.VizWorkbenchManager;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 05, 2015 #14246 lbousaidi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lbousaidi
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class TransmitBestEstimateQPEProvider extends AbstractSourceProvider {
|
||||
|
||||
private static final String[] MENU_ENABLED = new String[] { "com.raytheon.viz.mpe.ui.transmitBestEstimateQPE" };
|
||||
|
||||
private final boolean enabled = false;
|
||||
|
||||
private final Map<String, Boolean> sourceMap = new HashMap<String, Boolean>();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#getCurrentState()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Boolean> getCurrentState() {
|
||||
sourceMap.put(MENU_ENABLED[0], enabled);
|
||||
return sourceMap;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.ISourceProvider#getProvidedSourceNames()
|
||||
*/
|
||||
@Override
|
||||
public String[] getProvidedSourceNames() {
|
||||
// TODO Auto-generated method stub
|
||||
return MENU_ENABLED;
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean enabled) {
|
||||
AppsDefaults appsDefaults = AppsDefaults.getInstance();
|
||||
boolean transmitFlag=appsDefaults.getBoolean("mpe_send_qpe_to_sbn", false);
|
||||
|
||||
IWorkbenchWindow window = VizWorkbenchManager.getInstance()
|
||||
.getCurrentWindow();
|
||||
if (window != null) {
|
||||
ISourceProviderService service = (ISourceProviderService) window
|
||||
.getService(ISourceProviderService.class);
|
||||
TransmitBestEstimateQPEProvider provider =
|
||||
(TransmitBestEstimateQPEProvider) service
|
||||
.getSourceProvider(MENU_ENABLED[0]);
|
||||
|
||||
Map<String, Boolean> sourceMap = new HashMap<String, Boolean>();
|
||||
sourceMap.put(MENU_ENABLED[0], transmitFlag?enabled:false);
|
||||
|
||||
provider.fireSourceChanged(ISources.ACTIVE_WORKBENCH_WINDOW,
|
||||
sourceMap);
|
||||
}
|
||||
}
|
||||
|
||||
public static TransmitBestEstimateQPEProvider getProvider(ExecutionEvent event) {
|
||||
ISourceProviderService service = (ISourceProviderService) HandlerUtil
|
||||
.getActiveWorkbenchWindow(event).getService(
|
||||
ISourceProviderService.class);
|
||||
return (TransmitBestEstimateQPEProvider) service
|
||||
.getSourceProvider(MENU_ENABLED[0]);
|
||||
}
|
||||
|
||||
}
|
|
@ -25,6 +25,7 @@ import org.eclipse.ui.IEditorPart;
|
|||
|
||||
import com.raytheon.uf.viz.core.IDisplayPane;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.viz.mpe.ui.TransmitBestEstimateQPEProvider;
|
||||
import com.raytheon.viz.mpe.ui.TransmitRFCBiasProvider;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
|
||||
|
@ -40,6 +41,8 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 3, 2012 mschenke Initial creation
|
||||
* Feb 26, 2014 2842 mpduff Use PlatformUI rather than HandlerUtil.
|
||||
* Jan 05, 2015 14246 lbousaidi disable TransmitBestEstimateQPE when you
|
||||
* clear data.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -69,6 +72,7 @@ public class ClearMPEData extends FullScreen {
|
|||
// Ensure in full screen
|
||||
super.execute(event);
|
||||
TransmitRFCBiasProvider.setEnabled(false);
|
||||
TransmitBestEstimateQPEProvider.setEnabled(false);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.viz.mpe.ui.actions;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
|
||||
import com.raytheon.uf.common.ohd.AppsDefaults;
|
||||
import com.raytheon.uf.viz.core.IDisplayPane;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 05 , 2015 #14246 lbousaidi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lbousaidi
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class TransmitBestEstimateQPE extends AbstractHandler {
|
||||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
IEditorPart editor = EditorUtil.getActiveEditor();
|
||||
IDisplayPane pane = null;
|
||||
if (editor instanceof IMultiPaneEditor) {
|
||||
IMultiPaneEditor multiPane = (IMultiPaneEditor) editor;
|
||||
if (multiPane.getNumberofPanes() > 1
|
||||
&& multiPane.displayedPaneCount() > 1) {
|
||||
pane = multiPane.getSelectedPane(IMultiPaneEditor.LOAD_ACTION);
|
||||
} else {
|
||||
pane = ((IDisplayPaneContainer) editor).getDisplayPanes()[0];
|
||||
}
|
||||
}
|
||||
|
||||
MPEDisplayManager dm = MPEDisplayManager.getInstance(pane);
|
||||
Date currentDate = dm.getCurrentEditDate();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHH");
|
||||
String transmitDate = formatter.format(currentDate);
|
||||
|
||||
AppsDefaults appsDefaults = AppsDefaults.getInstance();
|
||||
String scriptDir = appsDefaults.getToken("pproc_bin");
|
||||
|
||||
String scriptName = "transmit_rfc_qpe";
|
||||
ProcessBuilder pb = new ProcessBuilder(scriptDir + "/" + scriptName,
|
||||
transmitDate);
|
||||
try {
|
||||
pb.start();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -49,6 +49,7 @@ import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
|||
import com.raytheon.viz.mpe.core.MPEDataManager;
|
||||
import com.raytheon.viz.mpe.core.MPEDataManager.MPEDateInfo;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.mpe.ui.TransmitBestEstimateQPEProvider;
|
||||
import com.raytheon.viz.mpe.ui.TransmitRFCBiasProvider;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||
|
@ -68,6 +69,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
|||
*
|
||||
* Nov 24, 2014 16911 xwei The day of Hydrologic Date is set to the next day
|
||||
* if hour is greater than 18Z.
|
||||
* Jan 05, 2015 14246 lbousaidi enable Transmit Best Estimate QPE.
|
||||
* </pre>
|
||||
*
|
||||
* @author randerso
|
||||
|
@ -333,6 +335,7 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog {
|
|||
restore();
|
||||
}
|
||||
TransmitRFCBiasProvider.setEnabled(true);
|
||||
TransmitBestEstimateQPEProvider.setEnabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 31, 2009 snaples Initial creation
|
||||
* Dec 22, 2014 #16952 lbousaidi fixed the eratic estimate values.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -147,10 +148,10 @@ public class EstMissingStations {
|
|||
} else {
|
||||
padj = pdata[j].stn[i].frain[h].data;
|
||||
}
|
||||
|
||||
fdist = 1 / (testdist + fdist);
|
||||
fdata = padj / (testdist + fdata);
|
||||
|
||||
|
||||
fdist += 1 / testdist;
|
||||
fdata += padj / testdist;
|
||||
|
||||
l++;
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
|
|||
<text id="lat" plotMode="sample" class="text" plotParam="latitude" plotSymbol="deg" plotFormat="%3.2f">0</text>
|
||||
<text id="lon" plotMode="sample" class="text" plotParam="longitude" plotSymbol="deg" plotFormat="%3.2f">0</text>
|
||||
<text id="sample5" plotMode="sample" class="text" plotLookupTable="output_formats.txt" plotParam="vertIntegWater" plotFormat="%2.1f" plotSymbol="kg/(m**2)">75</text>
|
||||
<text id="vilText" plotMode="range" class="text" plotLookupTable="output_formats.txt" plotParam="vertIntegWater" plotFormat="%2.1f">0</text>
|
||||
<text id="vilText" plotMode="range" class="text" plotLookupTable="output_formats.txt" plotParam="vertIntegWater" plotFormat="%2.2f">0</text>
|
||||
|
||||
|
||||
</symbol>
|
||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -93,6 +93,7 @@ import com.raytheon.viz.pointdata.rsc.PlotResourceData;
|
|||
* Mar 21, 2014 2868 njensen Refactored python usage to PythonJobCoordinator
|
||||
* Jun 06, 2014 2061 bsteffen Rename and add support for data formats in sampling.
|
||||
* Aug 07, 2014 3478 bclement removed PointDataDescription.Type.Double
|
||||
* Dec 16, 2014 16193 kshrestha Updated range limits
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1096,7 +1097,9 @@ public class PlotModelFactory {
|
|||
|
||||
if (element.lookup != null && sValue != null) {
|
||||
String lu = null;
|
||||
lu = element.lookup.lookup(sValue);
|
||||
if (!sValue.equals("?")){
|
||||
lu = element.lookup.lookup(sValue);
|
||||
}
|
||||
if (lu != null) {
|
||||
sValue = lu.trim();
|
||||
}
|
||||
|
@ -1119,8 +1122,6 @@ public class PlotModelFactory {
|
|||
case LONG:
|
||||
Number value = ob.getNumber(element.parameter);
|
||||
if (value != null && value.doubleValue() != -9999.0) {
|
||||
if (value.doubleValue() >= lowerLimit
|
||||
&& value.doubleValue() <= upperLimit) {
|
||||
double displayValue = 0.0;
|
||||
if (element.unit != null) {
|
||||
if (element.converter == null) {
|
||||
|
@ -1139,16 +1140,18 @@ public class PlotModelFactory {
|
|||
} else {
|
||||
displayValue = value.doubleValue();
|
||||
}
|
||||
if (element.format != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Formatter testing = new Formatter(sb);
|
||||
testing.format(element.format, displayValue);
|
||||
sValue = sb.toString();
|
||||
testing.close();
|
||||
} else {
|
||||
sValue = Double.toString(displayValue);
|
||||
|
||||
if (isValidValue(displayValue)){
|
||||
if (element.format != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Formatter testing = new Formatter(sb);
|
||||
testing.format(element.format, displayValue);
|
||||
sValue = sb.toString();
|
||||
testing.close();
|
||||
} else {
|
||||
sValue = Double.toString(displayValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case STRING:
|
||||
|
@ -1157,14 +1160,18 @@ public class PlotModelFactory {
|
|||
default:
|
||||
element.plotNode.setNodeValue(" ");
|
||||
}
|
||||
if (element.lookup != null) {
|
||||
sValue = element.lookup.lookup(sValue);
|
||||
if (element.lookup != null && sValue != null) {
|
||||
String lu = null;
|
||||
lu = element.lookup.lookup(sValue);
|
||||
if (!lu.equals(""))
|
||||
sValue = lu;
|
||||
}
|
||||
if (sValue != null) {
|
||||
element.plotNode.setNodeValue(sValue.substring(element.trim));
|
||||
return !sValue.trim().isEmpty();
|
||||
} else if (plotMissingData) {
|
||||
element.plotNode.setNodeValue("m");
|
||||
setPlotMissingData(false);
|
||||
return true;
|
||||
} else {
|
||||
element.plotNode.setNodeValue(" ");
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
plotModelFile="${svg}"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
lowerLimit="0" upperLimit="34" plotMissingData="true">
|
||||
lowerLimit="0" upperLimit="34">
|
||||
<binOffset posOffset="1800" negOffset="1800" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
|
@ -102,7 +102,7 @@
|
|||
plotModelFile="${svg}"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
lowerLimit="-1.1" upperLimit="-0.9">
|
||||
lowerLimit="-1.1" upperLimit="-0.9" plotMissingData="true">
|
||||
<binOffset posOffset="1800" negOffset="1800" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.HashMap;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 02/26/09 jsanchez Initial Creation.
|
||||
* 03/16/09 800 jsanchez Updated legend.
|
||||
* 12/16/14 15196 kshrestha Converted Millimeters to Inches for Total Precip Water
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
@ -71,7 +72,7 @@ public class SatelliteConstants {
|
|||
|
||||
private static final String SOUNDER_BASED_DERIVED_LI_LEGEND = "GOES Sounder DPI Lifted Index ( C )";
|
||||
|
||||
private static final String SOUNDER_BASED_DERIVED_PW_LEGEND = "Total Precip Water (mm)";
|
||||
private static final String SOUNDER_BASED_DERIVED_PW_LEGEND = "Total Precip Water (in)";
|
||||
|
||||
private static final String SOUNDER_BASED_DERIVED_SFC_SKIN_LEGEND = "GOES Sounder DPI Skin Temperature ( C )";
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.viz.texteditor.msgs.ITextWorkstationCallback;
|
|||
* dependency
|
||||
* 05/28/2010 2187 cjeanbap Added StdTextProductFactory functionality.
|
||||
* 03/18/2014 DR 17174 D. Friedman Return correct 3-letter site IDs in getNnnXxx.
|
||||
* 12/02/2014 DR 643 mgamazaychikov Change nnnxxxPattern to allow for numbers in nnnxxx.
|
||||
* </pre>
|
||||
*
|
||||
* @author grichard
|
||||
|
@ -83,7 +84,7 @@ public final class TextDisplayModel {
|
|||
.compile("/[A-Z]\\.([A-Z]{3})\\.(\\p{Alnum}{4})\\.([A-Z]{2}\\.[A-Z]{1})");
|
||||
|
||||
private static final Pattern nnnxxxPattern = Pattern
|
||||
.compile("[\\r\\n]+([A-Z]{3})([A-Z]{3})(| WRKWG[0-9])[\\r\\n]+");
|
||||
.compile("[\\r\\n]+([A-Z0-9]{3})([A-Z0-9]{3})(| WRKWG[0-9])[\\r\\n]+");
|
||||
|
||||
/**
|
||||
* The static singleton instance.
|
||||
|
|
|
@ -81,6 +81,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
|||
* the implementation of proximity alarm
|
||||
* 07/24/2014 3423 randerso Ensure ringBell is called on UI thread
|
||||
* 09/09/2014 3580 mapeters Removed IQueryTransport usage (no longer exists).
|
||||
* 12/03/2014 ASM #16829 D. Friedman Lazy initialization of alarmAlertBell
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -110,8 +111,7 @@ public class AlarmAlertFunctions {
|
|||
|
||||
private static final String SITE_FILE = "DefaultSiteAlarms.xml";
|
||||
|
||||
private static final AlarmAlertBell alarmAlertBell = new AlarmAlertBell(
|
||||
new Shell());
|
||||
private static AlarmAlertBell alarmAlertBell;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(AlarmAlertFunctions.class);
|
||||
|
@ -174,7 +174,7 @@ public class AlarmAlertFunctions {
|
|||
}
|
||||
|
||||
protected static void ringBell(boolean sound) {
|
||||
alarmAlertBell.open(sound);
|
||||
getAlarmalertbell().open(sound);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -867,6 +867,10 @@ public class AlarmAlertFunctions {
|
|||
* @return the alarmalertbell
|
||||
*/
|
||||
public static AlarmAlertBell getAlarmalertbell() {
|
||||
if (alarmAlertBell == null) {
|
||||
// No synchronize because this must be called on the UI thread anyway.
|
||||
alarmAlertBell = new AlarmAlertBell(new Shell());
|
||||
}
|
||||
return alarmAlertBell;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,5 @@ output.. = bin/
|
|||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml,\
|
||||
icons/
|
||||
icons/,\
|
||||
localization/
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="mapRenderableDisplay"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties>
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID"
|
||||
outlineOn="true" outlineWidth="1" />
|
||||
<capability xsi:type="pointCapability" pointStyle="NONE" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<table>mapdata.warngenloc</table>
|
||||
<mapName>WarnGenLoc</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -414,10 +414,16 @@
|
|||
<bean id="sbLockMgr" class="com.raytheon.edex.plugin.gfe.server.handler.svcbu.ServiceBackupLockManager"
|
||||
factory-method="getInstance"/>
|
||||
|
||||
<bean id="productPurger" class="com.raytheon.uf.common.dataplugin.gfe.util.FilePurger">
|
||||
<constructor-arg value="/awips2/GFESuite/products"/> <!-- directory to be purged -->
|
||||
<constructor-arg value="2419200000"/> <!-- purge age: 28 days in milliseconds -->
|
||||
</bean>
|
||||
|
||||
<camelContext id="gfe-request-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
|
||||
|
||||
<endpoint id="exportDigitalDataCron" uri="clusteredquartz://gfe/exportDigitalData/?cron=${gfe.cron}"/>
|
||||
<endpoint id="gfeLogPurgeCron" uri="clusteredquartz://gfe/purgeGfeLogs/?cron=${purge.gfe.logs.cron}"/>
|
||||
<endpoint id="gfeProductPurgeCron" uri="clusteredquartz://gfe/purgeGfeProducts/?cron=${purge.gfe.products.cron}"/>
|
||||
<endpoint id="svcbuLogPurgeCron" uri="clusteredquartz://gfe/purgeSvcbuLogs/?cron=${purge.svcbu.logs.cron}"/>
|
||||
<endpoint id="iscSendLauncher" uri="quartz://iscSendThread?trigger.repeatCount=0&trigger.repeatInterval=1"/>
|
||||
|
||||
|
@ -457,7 +463,23 @@
|
|||
</doCatch>
|
||||
</doTry>
|
||||
</route>
|
||||
|
||||
|
||||
<route id="purgeGfeProducts">
|
||||
<from uri="gfeProductPurgeCron"/>
|
||||
<to uri="jms-generic:queue:purgeGfeProductWork"/>
|
||||
</route>
|
||||
<route id="purgeGfeProductWork">
|
||||
<from uri="jms-generic:queue:purgeGfeProductWork"/>
|
||||
<doTry>
|
||||
<bean ref="productPurger" method="purge"/>
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
<to
|
||||
uri="log:svcBackup?level=ERROR"/>
|
||||
</doCatch>
|
||||
</doTry>
|
||||
</route>
|
||||
|
||||
<route id="purgeSvcbuLogs">
|
||||
<from uri="svcbuLogPurgeCron"/>
|
||||
<to uri="jms-generic:queue:purgeSvcbuLogWork"/>
|
||||
|
|
|
@ -8,4 +8,7 @@ gfe.cron=0+15+*+*+*+?
|
|||
purge.gfe.logs.cron=0+30+0+*+*+?
|
||||
|
||||
# Interval at which the service backup logs are purged
|
||||
purge.svcbu.logs.cron=0+30+0+*+*+?
|
||||
purge.svcbu.logs.cron=0+30+0+*+*+?
|
||||
|
||||
# Interval at which the gfe products are purged
|
||||
purge.gfe.products.cron=0+45+0+*+*+?
|
||||
|
|
|
@ -24,6 +24,8 @@ import java.util.Map;
|
|||
|
||||
import com.raytheon.edex.plugin.gfe.isc.IscScript;
|
||||
import com.raytheon.edex.plugin.gfe.isc.IscScriptExecutor;
|
||||
import com.raytheon.edex.plugin.gfe.server.IFPServer;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.request.ExecuteIfpNetCDFGridRequest;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
||||
import com.raytheon.uf.common.python.concurrent.PythonJobCoordinator;
|
||||
|
@ -43,6 +45,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 24, 2010 dgilling Initial creation
|
||||
* Mar 11, 2013 #1759 dgilling Re-write using new IscScript classes.
|
||||
* Nov 20, 2014 #98 lshi ifpnetCDF no longer gives an error code in some cases
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -70,6 +73,19 @@ public class ExecuteIfpNetCDFGridRequestHandler implements
|
|||
throws Exception {
|
||||
ServerResponse<Boolean> sr = new ServerResponse<Boolean>();
|
||||
sr.setPayload(Boolean.FALSE);
|
||||
|
||||
//#98 verify requested database exists
|
||||
IFPServer ifpServer = IFPServer.getActiveServer(request.getDatabaseID()
|
||||
.getSiteId());
|
||||
ServerResponse<java.util.List<DatabaseID>> ssr = ifpServer.getGridParmMgr()
|
||||
.getDbInventory();
|
||||
if (!ssr.isOkay()) {
|
||||
sr.addMessages(ssr);
|
||||
return sr;
|
||||
} else if (!ssr.getPayload().contains(request.getDatabaseID())) {
|
||||
sr.addMessage(request.getDatabaseID() + " does not exist");
|
||||
return sr;
|
||||
}
|
||||
|
||||
statusHandler.debug("Received ifpnetCDF request: " + request);
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
# 05/29/2014 #3224 randerso Added "SPC":8 to D2DDBVERSIONS
|
||||
# 07/09/2014 #3146 randerso Removed unused import
|
||||
# 07/10/2014 swhite Add surge and tropical threat WEs and their dependencies
|
||||
# 01/08/2015 #15035 lshi add site WNJ
|
||||
# 12/03/2014 #3866 rferrel Added GFS20
|
||||
########################################################################
|
||||
|
||||
|
@ -864,6 +865,7 @@ SITES = {
|
|||
'ONA' : ([244, 383], (68.9375, 19.5625), (15.1875, 23.875), 'EST5EDT', Grid211, "wfo"),
|
||||
'ONP' : ([396, 415], (8.1875, 21.5625), (24.6875, 25.875), 'PST8PDT', Grid211, "wfo"),
|
||||
'HPA' : ([899, 671], (284.0, 30.0), (898.0, 670.0), 'Pacific/Honolulu', NDFD_Oceanic_10K, "wfo"),
|
||||
'WNJ' : ([301, 346], (1000.0, 475.0), (300.0, 345.0), 'CST6CDT', NDFD_Oceanic_10K, "wfo"),
|
||||
|
||||
#Ice Desk for AFC
|
||||
'AICE' : ([560, 340], (9.0, 11.0), (29.0, 19.0), 'America/Anchorage',
|
||||
|
|
|
@ -56,7 +56,7 @@ class LAPSForecaster(Forecaster):
|
|||
## Uses LAPS skyCover grid to make IFP sky grids
|
||||
##-------------------------------------------------------------------------
|
||||
def calcSky(self, ccov_SFC):
|
||||
return clip(ccov_SFC*100, 0, 100)
|
||||
return clip(ccov_SFC, 0, 100)
|
||||
|
||||
##-------------------------------------------------------------------------
|
||||
## Uses LAPS one-hour snowAmt grids to initialize SnowAmt
|
||||
|
@ -98,4 +98,4 @@ class LAPSForecaster(Forecaster):
|
|||
|
||||
|
||||
def main():
|
||||
LAPSForecaster().run()
|
||||
LAPSForecaster().run()
|
||||
|
|
|
@ -99,6 +99,7 @@ import com.raytheon.uf.edex.database.cluster.ClusterTask;
|
|||
* Oct 09, 2013 2457 bsteffen Improve error message for missing icao.
|
||||
* Jan 21, 2014 2627 njensen Removed decode()'s try/catch, camel route will do try/catch
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Dec 26, 2014 ASM#632 dhuffman Added AlertMessageSanityCheck() for this DR.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -313,11 +314,20 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
details += "Alert Category : " + category + "\n";
|
||||
details += "Threshold : " + msg.getThresholdValue() + "\n";
|
||||
details += "Exceeding : " + msg.getExceedingValue() + "\n";
|
||||
details += "Storm Cell ID :" + msg.getStormId() + "\n";
|
||||
details += "Storm Cell ID : " + msg.getStormId() + "\n";
|
||||
record.setAlertMessage(msg);
|
||||
EDEXUtil.sendMessageAlertViz(Priority.SIGNIFICANT,
|
||||
RadarConstants.PLUGIN_ID, EDEX, RADAR, record.getIcao()
|
||||
+ ": Alert Message Received", details, null);
|
||||
if (AlertMessageSanityCheck(msg)) {
|
||||
EDEXUtil.sendMessageAlertViz(Priority.SIGNIFICANT,
|
||||
RadarConstants.PLUGIN_ID, EDEX, RADAR,
|
||||
record.getIcao() + ": Alert Message Received",
|
||||
details, null);
|
||||
} else {
|
||||
details += "Alert Category # : " + msg.getAlertCategory() + "\n";
|
||||
EDEXUtil.sendMessageAlertViz(Priority.DEBUG,
|
||||
RadarConstants.PLUGIN_ID, EDEX, RADAR,
|
||||
record.getIcao() + ": Alert Received & Obviated",
|
||||
details, null);
|
||||
}
|
||||
} else {
|
||||
record.setLatitude((float) l3Radar.getLatitude());
|
||||
record.setLongitude((float) l3Radar.getLongitude());
|
||||
|
@ -759,4 +769,24 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
public void setRadarStationDao(RadarStationDao radarStationDao) {
|
||||
this.radarStationDao = radarStationDao;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter these erroneous messages; pursuant to ASM DR #632.
|
||||
*
|
||||
* @param AlertMessage
|
||||
* @return boolean
|
||||
*/
|
||||
private static boolean AlertMessageSanityCheck(final AlertMessage alertMessage) {
|
||||
if (alertMessage.getExceedingValue() < alertMessage.getThresholdValue())
|
||||
return false;
|
||||
|
||||
if (alertMessage.getGridBoxAz() == 0
|
||||
&& alertMessage.getGridBoxRange() == 0
|
||||
&& alertMessage.getThresholdValue() == 0
|
||||
&& alertMessage.getExceedingValue() == 0
|
||||
&& (alertMessage.getAlertCategory() == 16 || alertMessage.getAlertCategory() == 25))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
/**
|
||||
* 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.gfe.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.FileVisitOption;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.FileVisitor;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.PathMatcher;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.nio.file.attribute.FileTime;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* File Purger
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------------------------------ --------------------------
|
||||
* Aug 12, 2014 647 (17113) randerso Initial creation (code checked in by zhao on 12/16/2014 with slight modification)
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author randerso
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class FilePurger {
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(FilePurger.class);
|
||||
|
||||
final private Path rootPath;
|
||||
|
||||
final private long purgeAge;
|
||||
|
||||
final private boolean removeRoot;
|
||||
|
||||
final private PathMatcher matcher;
|
||||
|
||||
public FilePurger(String rootDirectory, long purgeAge) {
|
||||
this(rootDirectory, purgeAge, "**", false);
|
||||
}
|
||||
|
||||
public FilePurger(String rootDirectory, long purgeAge,
|
||||
String filenamePattern) {
|
||||
this(rootDirectory, purgeAge, filenamePattern, false);
|
||||
}
|
||||
|
||||
public FilePurger(String rootDirectory, long purgeAge,
|
||||
String filenamePattern, boolean removeRoot) {
|
||||
this.rootPath = Paths.get(rootDirectory);
|
||||
this.purgeAge = purgeAge;
|
||||
this.removeRoot = removeRoot;
|
||||
this.matcher = this.rootPath.getFileSystem().getPathMatcher(
|
||||
"glob:" + filenamePattern);
|
||||
}
|
||||
|
||||
public void purge() {
|
||||
statusHandler.info("Purging files older than "
|
||||
+ TimeUtil.prettyDuration(purgeAge) + " from " + rootPath);
|
||||
final FileTime purgeTime = FileTime.fromMillis(System
|
||||
.currentTimeMillis() - purgeAge);
|
||||
|
||||
EnumSet<FileVisitOption> options = EnumSet
|
||||
.of(FileVisitOption.FOLLOW_LINKS);
|
||||
|
||||
FileVisitor<Path> visitor = new SimpleFileVisitor<Path>() {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.nio.file.SimpleFileVisitor#visitFile(java.lang .Object,
|
||||
* java.nio.file.attribute.BasicFileAttributes)
|
||||
*/
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file,
|
||||
BasicFileAttributes attrs) throws IOException {
|
||||
|
||||
boolean matches = matcher.matches(file);
|
||||
boolean oldEnough = attrs.lastModifiedTime().compareTo(
|
||||
purgeTime) < 0;
|
||||
|
||||
if (!matches) {
|
||||
statusHandler.debug(file + " doesn't match pattern");
|
||||
} else if (!oldEnough) {
|
||||
statusHandler.debug(file + " not old enough");
|
||||
} else {
|
||||
try {
|
||||
Files.delete(file);
|
||||
statusHandler.debug(file + " deleted");
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Unable to purge file: " + file, e);
|
||||
}
|
||||
}
|
||||
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.nio.file.SimpleFileVisitor#visitFileFailed(java.lang
|
||||
* .Object, java.io.IOException)
|
||||
*/
|
||||
@Override
|
||||
public FileVisitResult visitFileFailed(Path file, IOException exc)
|
||||
throws IOException {
|
||||
statusHandler.error("Unable to purge file: " + file, exc);
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.nio.file.SimpleFileVisitor#postVisitDirectory
|
||||
* (java.lang.Object, java.io.IOException)
|
||||
*/
|
||||
@Override
|
||||
public FileVisitResult postVisitDirectory(Path dir, IOException exc)
|
||||
throws IOException {
|
||||
try (DirectoryStream<Path> stream = Files
|
||||
.newDirectoryStream(dir)) {
|
||||
if (dir.equals(rootPath) && !removeRoot) {
|
||||
statusHandler.debug(dir + " is root");
|
||||
} else if (stream.iterator().hasNext()) {
|
||||
statusHandler.debug(dir + " not empty");
|
||||
} else {
|
||||
Files.delete(dir);
|
||||
statusHandler.debug(dir + " deleted");
|
||||
}
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
Files.walkFileTree(rootPath, options, Integer.MAX_VALUE, visitor);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Exception while purging " + rootPath, e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,6 +35,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* Aug 04, 2011 mnash Initial creation
|
||||
* Jun 04, 2014 3232 bsteffen Remove ISerializableObject
|
||||
* Dec 26, 2014 ASM#632 dhuffman Edited AlertCategory to conform with
|
||||
* Table IV of the "ICD for the RPG to Class 1 User"
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,9 +46,50 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
|
||||
@DynamicSerialize
|
||||
public class AlertMessage {
|
||||
|
||||
// Table IV in document: Interface Control Document for the RPG to Class 1 User
|
||||
public enum AlertCategory {
|
||||
Empty, GRID_Velocity, GRID_Composite_Reflectivity, GRID_Echo_Tops, GRID_Severe_Weather_Probability, GRID_Spare, GRID_Vertically_Integrated_Liquid, VOLUME_Velocity_Azimuth_Display, VOLUME_Minimum_Size_Hail, VOLUME_Spare, VOLUME_Tornado_Vortex_Signature, VOLUME_Maximum_Storm_Reflectivity, VOLUME_Probability_of_Hail, VOLUME_Storm_Top, VOLUME_Maximum_1_Hour_Rainfall_Accumulation, VOLUME_MDA_Strength_Rank, VOLUME_Spare1, FORECAST_Maximum_Hail_Size, FORECAST_Spare, FORECAST_Tornado_Vortex_Signature, FORECAST_Maximum_Storm_Reflectivity, FORECAST_Probability_of_Hail, FORECAST_Probability_of_Severe_Hail, FORECAST_Storm_Top, FORECAST_MDA_Strength_Rank, FORECAST_Spare1
|
||||
UNUSED_Zero,
|
||||
GRID_Velocity,
|
||||
GRID_Composite_Reflectivity,
|
||||
GRID_Echo_Tops,
|
||||
GRID_Severe_Weather_Probability,
|
||||
GRID_Spare,
|
||||
GRID_Vertically_Integrated_Liquid,
|
||||
VOLUME_Velocity_Azimuth_Display,
|
||||
VOLUME_Maximum_Size_Hail,
|
||||
VOLUME_Spare,
|
||||
VOLUME_Tornado_Vortex_Signature,
|
||||
VOLUME_Maximum_Storm_Reflectivity,
|
||||
VOLUME_Probability_of_Hail,
|
||||
VOLUME_Probability_of_Severe_Hail,
|
||||
VOLUME_Storm_Top,
|
||||
VOLUME_Maximum_1_Hour_Rainfall_Accumulation,
|
||||
VOLUME_MDA_Strength_Rank,
|
||||
UNUSED_Spare17,
|
||||
UNUSED_Spare18,
|
||||
UNUSED_Spare19,
|
||||
UNUSED_Spare20,
|
||||
UNUSED_Spare21,
|
||||
UNUSED_Spare22,
|
||||
UNUSED_Spare23,
|
||||
UNUSED_Spare24,
|
||||
FORECAST_Maximum_Hail_Size,
|
||||
FORECAST_Spare,
|
||||
FORECAST_Tornado_Vortex_Signature,
|
||||
FORECAST_Maximum_Storm_Reflectivity,
|
||||
FORECAST_Probability_of_Hail,
|
||||
FORECAST_Probability_of_Severe_Hail,
|
||||
FORECAST_Storm_Top,
|
||||
FORECAST_MDA_Strength_Rank,
|
||||
UNUSED_Spare33,
|
||||
UNUSED_Spare34,
|
||||
UNUSED_Spare35,
|
||||
UNUSED_Spare36,
|
||||
UNUSED_Spare37,
|
||||
UNUSED_Spare38,
|
||||
UNUSED_Spare39,
|
||||
UNUSED_Spare40,
|
||||
UNUSED_Spare41
|
||||
}
|
||||
|
||||
@DynamicSerializeElement
|
||||
|
|
|
@ -166,18 +166,18 @@
|
|||
<creatingEntity>Composite</creatingEntity>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits>mm</displayUnits>
|
||||
<displayUnits>in</displayUnits>
|
||||
<range scale="LINEAR">
|
||||
<minValue>0</minValue>
|
||||
<maxValue>85.425</maxValue>
|
||||
<maxValue>3.36</maxValue>
|
||||
</range>
|
||||
<samplePrefs>
|
||||
<minValue>-0.3</minValue>
|
||||
<maxValue>67</maxValue>
|
||||
<minValue>-0.01</minValue>
|
||||
<maxValue>2.64</maxValue>
|
||||
</samplePrefs>
|
||||
<defaultColormap>Sat/Precip Water/Precip Water Default</defaultColormap>
|
||||
<colorbarLabeling>
|
||||
<values>10 20 30 40 50 67</values>
|
||||
<values>0.4 0.8 1.2 1.6 2.0 2.6</values>
|
||||
</colorbarLabeling>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
|
@ -289,14 +289,14 @@
|
|||
<creatingEntity>Miscellaneous</creatingEntity>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits>mm</displayUnits>
|
||||
<displayUnits>in</displayUnits>
|
||||
<range scale="LINEAR">
|
||||
<minValue>-176</minValue>
|
||||
<maxValue>76</maxValue>
|
||||
<minValue>-7</minValue>
|
||||
<maxValue>3</maxValue>
|
||||
</range>
|
||||
<defaultColormap>Sat/Precip Water/Blended Total Precip Water</defaultColormap>
|
||||
<colorbarLabeling>
|
||||
<values>0 25 50 75</values>
|
||||
<values>0 1 2 3</values>
|
||||
</colorbarLabeling>
|
||||
<!-- dataMapping>
|
||||
<entry pixelValue="0" label="NO DATA" />
|
||||
|
|
|
@ -95,6 +95,11 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
|||
* Added performance logging
|
||||
* Nov 14, 2014 4953 randerso Moved dumpProductToTempFile into PracticeVtecDecoder
|
||||
* since it had no reason to be in this class
|
||||
* Dec 30, 2014 16942 ryu Fix update of records for sites other than
|
||||
* the home site and its neighbors.
|
||||
* Pass issuance site id to getActiveTable()
|
||||
* in updateActiveTable() so records will
|
||||
* be updated correctly.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -289,11 +294,13 @@ public class ActiveTable {
|
|||
mode = ActiveTableMode.OPERATIONAL;
|
||||
}
|
||||
|
||||
String issueSiteId = newRecords.get(0).getOfficeid();
|
||||
|
||||
IPerformanceStatusHandler perfStat = PerformanceStatus
|
||||
.getHandler("ActiveTable");
|
||||
ITimer timer = TimeUtil.getTimer();
|
||||
timer.start();
|
||||
List<ActiveTableRecord> activeTable = getActiveTable(siteId, mode);
|
||||
List<ActiveTableRecord> activeTable = getActiveTable(issueSiteId, mode);
|
||||
timer.stop();
|
||||
perfStat.logDuration("getActiveTable", timer.getElapsedTime());
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ Import-Package: com.raytheon.edex.util,
|
|||
com.raytheon.uf.edex.database.dao,
|
||||
com.raytheon.uf.edex.database.plugin,
|
||||
com.raytheon.uf.edex.plugin.text.db,
|
||||
com.raytheon.uf.edex.plugin.text.dbsrv.impl,
|
||||
org.quartz
|
||||
Export-Package: com.raytheon.uf.edex.ohd,
|
||||
com.raytheon.uf.edex.ohd.reportalarm,
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.raytheon.uf.common.ohd.AppsDefaults;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -30,6 +31,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.edex.plugin.text.db.TextDB;
|
||||
import com.raytheon.uf.edex.plugin.text.dbsrv.impl.AlarmAlertUtil;
|
||||
|
||||
/**
|
||||
* Provides SHEF with the ability to generate alert/alarms report products and
|
||||
|
@ -44,6 +46,7 @@ import com.raytheon.uf.edex.plugin.text.db.TextDB;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 12, 2014 #2783 dgilling Initial creation
|
||||
* Dec 15, 2014 16736 mgamazaychikov Add call to sendProductAlarmAlert.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -149,6 +152,12 @@ public final class RunReportAlarmSrv {
|
|||
TextDB textdb = new TextDB();
|
||||
long statusCode = textdb.writeProduct(productId, productText, true,
|
||||
null);
|
||||
// Set the current time and send product alarm alert.
|
||||
Date d = new Date(System.currentTimeMillis());
|
||||
d.setTime(statusCode);
|
||||
AlarmAlertUtil.sendProductAlarmAlert(productId,
|
||||
String.valueOf(d.getTime()),
|
||||
true);
|
||||
|
||||
if (statusCode != Long.MIN_VALUE) {
|
||||
statusHandler.info("Product successfully sent");
|
||||
|
|
|
@ -17,7 +17,8 @@ Require-Bundle: org.apache.commons.lang,
|
|||
Export-Package: com.raytheon.uf.edex.plugin.text,
|
||||
com.raytheon.uf.edex.plugin.text.dao,
|
||||
com.raytheon.uf.edex.plugin.text.db,
|
||||
com.raytheon.uf.edex.plugin.text.dbsrv
|
||||
com.raytheon.uf.edex.plugin.text.dbsrv,
|
||||
com.raytheon.uf.edex.plugin.text.dbsrv.impl
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: com.raytheon.edex.uengine.runners,
|
||||
com.raytheon.uf.common.dataplugin.text,
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.plugin.text.impl.separator;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -49,6 +52,7 @@ import com.raytheon.uf.edex.plugin.text.impl.WMOReportData;
|
|||
* Fixed calculation of message end.
|
||||
* Apr 01, 2014 2915 dgilling Support re-factored TextDBStaticData.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||
* Dec 03, 2014 ASM #16859 D. Friedman Use CharBuffer instead of StringBuilder.
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -115,6 +119,12 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
}
|
||||
}
|
||||
|
||||
static boolean charSeqStartsWith(CharSequence sequence, String searchString) {
|
||||
return sequence.length() >= searchString.length()
|
||||
&& searchString.contentEquals(sequence.subSequence(0,
|
||||
searchString.length()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -142,14 +152,17 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
if (endIndex <= startIndex) {
|
||||
endIndex = rawData.length - 1;
|
||||
}
|
||||
String rawMsg = new String(rawData, startIndex, endIndex - startIndex);
|
||||
StringBuilder sb = null;
|
||||
if ((rawMsg.indexOf(METAR) == 0) || (rawMsg.indexOf(SPECI) == 0)) {
|
||||
productType = (rawMsg.indexOf(METAR) == 0 ? METAR : SPECI);
|
||||
|
||||
CharBuffer rawMsg = Charset.forName("ISO-8859-1").decode(
|
||||
ByteBuffer.wrap(rawData, startIndex, endIndex - startIndex));
|
||||
if (charSeqStartsWith(rawMsg, METAR)) {
|
||||
productType = METAR;
|
||||
} else if (charSeqStartsWith(rawMsg, SPECI)) {
|
||||
productType = SPECI;
|
||||
}
|
||||
|
||||
if ("TAF".equals(afos_id.getNnn())) {
|
||||
sb = new StringBuilder(rawMsg);
|
||||
StringBuilder sb = new StringBuilder(rawMsg);
|
||||
Matcher m = P_TAF.matcher(sb);
|
||||
while (m.find()) {
|
||||
sb.delete(m.start(), m.end());
|
||||
|
@ -157,13 +170,16 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
}
|
||||
sb.insert(0, "\n");
|
||||
sb.insert(0, "TAFXXX\nTAF");
|
||||
rawMsg = sb.toString();
|
||||
rawMsg = CharBuffer.allocate(sb.length());
|
||||
rawMsg.append(sb);
|
||||
rawMsg.flip();
|
||||
}
|
||||
Matcher nnnxxxMatcher = NNNXXX.matcher(rawMsg);
|
||||
if (nnnxxxMatcher.find() && nnnxxxMatcher.start() == 0) {
|
||||
rawMsg = rawMsg.substring(nnnxxxMatcher.end());
|
||||
rawMsg.position(rawMsg.position() + nnnxxxMatcher.end());
|
||||
}
|
||||
StringBuilder buffer = new StringBuilder(rawMsg);
|
||||
|
||||
CharBuffer buffer = rawMsg;
|
||||
boolean parsing = true;
|
||||
|
||||
while (parsing) {
|
||||
|
@ -276,7 +292,7 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
// filter out junk characters
|
||||
while (buffer.length() > 0
|
||||
&& !checkCharNum(buffer.charAt(0))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
// again, trash data if it is less than 20 bytes
|
||||
|
@ -321,9 +337,9 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
* @param XXX_id
|
||||
* @param parsedMsg
|
||||
*/
|
||||
private void parseCollMsg(StringBuilder buffer, StringBuilder XXX_id,
|
||||
private void parseCollMsg(CharBuffer buffer, StringBuilder XXX_id,
|
||||
StringBuilder parsedMsg) {
|
||||
String msgId = null;
|
||||
CharSequence msgId = null;
|
||||
|
||||
// Check the status of the special case flags and if necessary,
|
||||
// skip the special case characters.
|
||||
|
@ -331,8 +347,8 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
if (checkFouHeader && fouFlag) {
|
||||
// Get the length of the FWC header section and save section
|
||||
// to store at the beginning of each product.
|
||||
if (buffer.charAt(0) == (char) 0x1e) {
|
||||
buffer.deleteCharAt(0);
|
||||
if (buffer.length() > 0 && buffer.charAt(0) == (char) 0x1e) {
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
if (!getTextSegment(buffer, fouHeader, OCSEP)) {
|
||||
|
@ -344,8 +360,8 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
checkFouHeader = false;
|
||||
}
|
||||
|
||||
String blank = buffer.substring(0,
|
||||
buffer.length() < 5 ? buffer.length() : 5);
|
||||
String blank = buffer.subSequence(0, Math.min(5, buffer.length()))
|
||||
.toString();
|
||||
|
||||
if (blank.equals("METAR") || blank.equals("SPECI")
|
||||
|| blank.equals("TESTM") || blank.equals("TESTS")) {
|
||||
|
@ -353,9 +369,9 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
return;
|
||||
}
|
||||
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
if (buffer.charAt(0) == ' ') {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
reportType = blank;
|
||||
|
@ -366,20 +382,20 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
while (buffer.length() > 0) {
|
||||
char c = buffer.charAt(0);
|
||||
if ((c == '\n') || (c == '\r')) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// The next test on blank uses at most three characters
|
||||
blank = buffer.substring(0, buffer.length() < 3 ? buffer.length()
|
||||
: 3);
|
||||
blank = buffer.subSequence(0, Math.min(3, buffer.length()))
|
||||
.toString();
|
||||
} else if (pirFlag) {
|
||||
if (buffer != null) {
|
||||
for (int i = 0; i < buffer.length(); i++) {
|
||||
if (buffer.charAt(i) == '\r') {
|
||||
buffer.setCharAt(i, '\n');
|
||||
buffer.put(buffer.position() + i, '\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -391,7 +407,7 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
while (buffer.length() > 0) {
|
||||
char c = buffer.charAt(0);
|
||||
if ((c == ' ') || (c == '\n')) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -400,17 +416,17 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
}
|
||||
pirFlag = false;
|
||||
}
|
||||
blank = buffer.toString();
|
||||
blank = buffer.subSequence(0, Math.min(3, buffer.length())).toString();
|
||||
if (blank.startsWith("AMD") || blank.startsWith("COR")) {
|
||||
if (safeStrpbrk(buffer, CSPC)) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
}
|
||||
|
||||
// Skip junk characters
|
||||
while (buffer.length() > 0
|
||||
&& !(checkCharNum(buffer.charAt(0)) && (buffer.charAt(0) != EOM))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
// Grab the first word of each line to act as the XXX of the afos id.
|
||||
|
@ -452,7 +468,7 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
|
|||
parsedMsg.setLength(parsedMsg.length() - 3);
|
||||
} else if (buffer.charAt(0) == '=') {
|
||||
if (safeStrpbrk(buffer, CSPL)) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
} else if ((buffer.charAt(0) == EOM)
|
||||
&& (parsedMsg.length() > (MIN_COLL_DATA_LEN - 1))) {
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.plugin.text.impl.separator;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -47,6 +50,7 @@ import com.raytheon.uf.edex.plugin.text.impl.WMOReportData;
|
|||
* Apr 01, 2014 2915 dgilling Support re-factored TextDBStaticData.
|
||||
* Apr 02, 2014 2652 skorolev Corrected a removing of excess control characters.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||
* Dec 03, 2014 ASM #16859 D. Friedman Use CharBuffer instead of StringBuilder.
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -122,12 +126,13 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
|
|||
if (endIndex <= startIndex) {
|
||||
endIndex = rawData.length - 1;
|
||||
}
|
||||
String rawMsg = new String(rawData, startIndex, endIndex - startIndex);
|
||||
CharBuffer rawMsg = Charset.forName("ISO-8859-1").decode(
|
||||
ByteBuffer.wrap(rawData, startIndex, endIndex - startIndex));
|
||||
Matcher nnnxxxMatcher = NNNXXX.matcher(rawMsg);
|
||||
if (nnnxxxMatcher.find() && nnnxxxMatcher.start() == 0) {
|
||||
rawMsg = rawMsg.substring(nnnxxxMatcher.end());
|
||||
rawMsg.position(rawMsg.position() + nnnxxxMatcher.end());
|
||||
}
|
||||
StringBuilder buffer = new StringBuilder(rawMsg);
|
||||
CharBuffer buffer = rawMsg;
|
||||
String hdrStr = wmoHdr.getWmoHeader();
|
||||
String dataDes = createDataDes(wmoHdr);
|
||||
String origin = wmoHdr.getCccc();
|
||||
|
@ -213,7 +218,7 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
|
|||
// filter out junk characters
|
||||
while (buffer.length() > 0
|
||||
&& !checkCharNum(buffer.charAt(0))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
// again, trash data if it is less than 20 bytes
|
||||
|
@ -400,35 +405,35 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
|
|||
// ---------------------------------------------------------
|
||||
// Called by the decodeUpAirMsg function.
|
||||
// ---------------------------------------------------------------------------
|
||||
private void parseUpairMsg(StringBuilder buffer, StringBuilder stationNum,
|
||||
private void parseUpairMsg(CharBuffer buffer, StringBuilder stationNum,
|
||||
StringBuilder parsedMsg, String dataDes) {
|
||||
stationNum.setLength(0);
|
||||
|
||||
// Check each message for the \036 record separator and increment past
|
||||
// it.
|
||||
if (!checkCharNum(buffer.charAt(0))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
|
||||
// Check for UEXX or UJXX formatted messages and decode
|
||||
if (dataDes.endsWith("XX") || dataDes.endsWith("81")
|
||||
|| dataDes.endsWith("82")) {
|
||||
stationNum.append(assignTextSegment(buffer.toString(), CSPC));
|
||||
stationNum.append(assignTextSegment(buffer, CSPC));
|
||||
getTextSegment(buffer, parsedMsg, MARKERANDEOM);
|
||||
}
|
||||
// Check for USUS80 or 90 formatted messages and decode
|
||||
else if (dataDes.endsWith("80") || dataDes.endsWith("90")) {
|
||||
if (checkCharNum(buffer.charAt(0))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
} else {
|
||||
stationNum.append(assignTextSegment(buffer.toString(), CSPC));
|
||||
stationNum.append(assignTextSegment(buffer, CSPC));
|
||||
}
|
||||
|
||||
getTextSegment(buffer, parsedMsg, CSEP);
|
||||
} else {
|
||||
// Otherwise it's standard format so decode
|
||||
if (!checkCharNum(buffer.charAt(0))) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
} else {
|
||||
|
||||
// Move to the third field of the message to get the station
|
||||
|
@ -444,11 +449,11 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
|
|||
if (len - buffer.length() >= 4) {
|
||||
x++;
|
||||
}
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
}
|
||||
}
|
||||
|
||||
stationNum.append(assignTextSegment(buffer.toString(), CSPC));
|
||||
stationNum.append(assignTextSegment(buffer, CSPC));
|
||||
}
|
||||
|
||||
getTextSegment(buffer, parsedMsg, CSEP);
|
||||
|
@ -462,11 +467,11 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
|
|||
trim_message(parsedMsg);
|
||||
}
|
||||
} else if (buffer.charAt(0) == '=') {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
while (buffer.length() > 0) {
|
||||
char c = buffer.charAt(0);
|
||||
if ((c == '\n') || (c == '\r')) {
|
||||
buffer.deleteCharAt(0);
|
||||
buffer.get();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.plugin.text.impl.separator;
|
||||
|
||||
import java.nio.CharBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -48,6 +50,7 @@ import com.raytheon.uf.edex.plugin.text.impl.WMOReportData;
|
|||
* Jul 10, 2009 2191 rjpeter Reimplemented.
|
||||
* Mar 04, 2014 2652 skorolev Corrected NNNXXX pattern.
|
||||
* Mar 14, 2014 2652 skorolev Changed logging for skipped headers.
|
||||
* Dec 03, 2014 ASM #16859 D. Friedman Use CharBuffer instead of StringBuilder.
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
|
@ -317,7 +320,7 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator {
|
|||
* @param charSet
|
||||
* @return
|
||||
*/
|
||||
static boolean safeStrpbrk(StringBuilder src, Pattern charSet) {
|
||||
static boolean safeStrpbrk(CharBuffer src, Pattern charSet) {
|
||||
return getTextSegment(src, null, charSet);
|
||||
}
|
||||
|
||||
|
@ -333,24 +336,17 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator {
|
|||
* @param charSet
|
||||
* @return
|
||||
*/
|
||||
static boolean getTextSegment(StringBuilder src, StringBuilder out,
|
||||
static boolean getTextSegment(CharBuffer src, StringBuilder out,
|
||||
Pattern charSet) {
|
||||
String s = src.toString();
|
||||
String[] sArr = charSet.split(s, 2);
|
||||
|
||||
Matcher m = charSet.matcher(src);
|
||||
boolean found = m.find();
|
||||
int pos = found ? m.start() : src.length();
|
||||
if (out != null) {
|
||||
out.setLength(0);
|
||||
out.append(sArr[0]);
|
||||
out.append(src, 0, pos);
|
||||
}
|
||||
|
||||
if (sArr.length != 2) {
|
||||
// no pattern found
|
||||
src.setLength(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
src.delete(0, sArr[0].length());
|
||||
return true;
|
||||
src.position(src.position() + pos);
|
||||
return found;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -361,10 +357,9 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator {
|
|||
* @param charSet
|
||||
* @return
|
||||
*/
|
||||
static String assignTextSegment(String src, Pattern charSet) {
|
||||
String[] sArr = charSet.split(src, 2);
|
||||
|
||||
return sArr[0];
|
||||
static CharSequence assignTextSegment(CharSequence src, Pattern charSet) {
|
||||
Matcher m = charSet.matcher(src);
|
||||
return src.subSequence(0, m.find() ? m.start() : src.length());
|
||||
}
|
||||
|
||||
// -- fileScope
|
||||
|
@ -409,10 +404,10 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator {
|
|||
|
||||
public static final void main(String[] args) {
|
||||
|
||||
StringBuilder sb = new StringBuilder(
|
||||
CharBuffer cb = CharBuffer.wrap(
|
||||
"\r\r\nKOFF 1912/20/15\n\n\r BECMG");
|
||||
|
||||
safeStrpbrk(sb, nl);
|
||||
safeStrpbrk(cb, nl);
|
||||
|
||||
// Pattern NNNXXX = Pattern.compile("\\w{4,6}(?:\\s{1,2})?[\\r\\n]+(?:"
|
||||
// + (char) 0x1e + ")?");
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.raytheon.uf.common.dataplugin.text.db.SubscriptionRecord;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 22, 2014 2536 bclement Initial creation
|
||||
* 12.13.14 DR 14638 dhuffman Cut whitespace.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,16 +82,20 @@ public class TriggerMatcher {
|
|||
// 3)+"NNNXXX" +
|
||||
// " -- trigger.substring(0, 3)+\"NNN\"+trigger.substring(6)="+trigger.substring(0,
|
||||
// 3)+"NNN"+trigger.substring(6));
|
||||
retVal = (trigger.equalsIgnoreCase(recordTrigger))
|
||||
|| ((trigger.substring(0, 6) + "XXX")
|
||||
.equalsIgnoreCase(recordTrigger))
|
||||
|| (("CCC" + trigger.substring(3, 6) + "XXX")
|
||||
.equalsIgnoreCase(recordTrigger))
|
||||
|| ((trigger.substring(0, 3) + "NNNXXX")
|
||||
.equalsIgnoreCase(recordTrigger))
|
||||
|| ((trigger.substring(0, 3) + "NNN" + trigger.substring(6))
|
||||
.equalsIgnoreCase(recordTrigger) || (recordTrigger
|
||||
.startsWith(trigger)));
|
||||
|
||||
// Below, "subscriptionTrigger" is data from the subscription database table.
|
||||
String subscriptionTrigger = recordTrigger.replaceAll("\\s+$", "");
|
||||
String requestTrigger = trigger.replaceAll("\\s+$", "");
|
||||
retVal = (requestTrigger.equalsIgnoreCase(subscriptionTrigger))
|
||||
|| ((requestTrigger.substring(0, 6) + "XXX")
|
||||
.equalsIgnoreCase(subscriptionTrigger))
|
||||
|| (("CCC" + requestTrigger.substring(3, 6) + "XXX")
|
||||
.equalsIgnoreCase(subscriptionTrigger))
|
||||
|| ((requestTrigger.substring(0, 3) + "NNNXXX")
|
||||
.equalsIgnoreCase(subscriptionTrigger))
|
||||
|| ((requestTrigger.substring(0, 3) + "NNN" + requestTrigger.substring(6))
|
||||
.equalsIgnoreCase(subscriptionTrigger) || (subscriptionTrigger
|
||||
.startsWith(requestTrigger)));
|
||||
} else {
|
||||
String pattern = recordTrigger.replaceAll("\\*", ".+");
|
||||
retVal = trigger.matches(pattern);
|
||||
|
|
|
@ -30,7 +30,7 @@ cprm $tmp_location/hydroapps $hydro_base_dir
|
|||
mkdir -p $hydro_base_dir/bin
|
||||
mkdir -p $hydro_base_dir/lib/native/linux32
|
||||
cp $tmp_location/edex/bin/runso $hydro_base_dir/bin
|
||||
ohd_util_libraries="libecpg_compat.so.3 libecpg_compat.so.3.4 libecpg.so.6 libecpg.so.6.4 library.ohd.util.so libjasper.so.1 libjasper.so.1.0.0 libjvm.so libpgtypes.so.3 libpgtypes.so.3.3 library.ohd.ofs.so library.ohd.pproc.so libgfortran.so.1 library.empty.motif.so library.ohd.whfs.so libpq.so libpq.so.5 libpq.so.5.5"
|
||||
ohd_util_libraries="libecpg_compat.so.3 libecpg_compat.so.3.5 libecpg.so.6 libecpg.so.6.5 library.ohd.util.so libjasper.so.1 libjasper.so.1.0.0 libjvm.so libpgtypes.so.3 libpgtypes.so.3.4 library.ohd.ofs.so library.ohd.pproc.so libgfortran.so.1 library.empty.motif.so library.ohd.whfs.so libpq.so libpq.so.5 libpq.so.5.6"
|
||||
for lib in $ohd_util_libraries; do
|
||||
cp -P $tmp_location/edex/lib/native/linux32/$lib $hydro_base_dir/lib/native/linux32
|
||||
done
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
libecpg.so.6.4
|
||||
libecpg.so.6.5
|
Binary file not shown.
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libecpg.so.6.5
Executable file
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libecpg.so.6.5
Executable file
Binary file not shown.
|
@ -1 +1 @@
|
|||
libecpg_compat.so.3.4
|
||||
libecpg_compat.so.3.5
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
libpgtypes.so.3.3
|
||||
libpgtypes.so.3.4
|
Binary file not shown.
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libpgtypes.so.3.4
Executable file
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libpgtypes.so.3.4
Executable file
Binary file not shown.
|
@ -1 +1 @@
|
|||
libpq.so.5.5
|
||||
libpq.so.5.6
|
|
@ -1 +1 @@
|
|||
libpq.so.5.5
|
||||
libpq.so.5.6
|
Binary file not shown.
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libpq.so.5.6
Executable file
BIN
nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/libpq.so.5.6
Executable file
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
885386942bccbe952a96250f398352dcecee44f2
|
||||
5a30fa165d3f36567b5cb5722716772a5db0431c
|
|
@ -1 +1 @@
|
|||
2109eb4c569e826e7f4c496823ca83699014c77d
|
||||
049e7b47e9c8ce3a9839dac563a90ce743b2446c
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
libecpg.so.6.4
|
||||
libecpg.so.6.5
|
|
@ -1 +1 @@
|
|||
libecpg.so.6.4
|
||||
libecpg.so.6.5
|
Binary file not shown.
BIN
nativeLib/files.native/edex/lib/native/linux32/libecpg.so.6.5
Executable file
BIN
nativeLib/files.native/edex/lib/native/linux32/libecpg.so.6.5
Executable file
Binary file not shown.
|
@ -1 +1 @@
|
|||
libecpg_compat.so.3.4
|
||||
libecpg_compat.so.3.5
|
|
@ -1 +1 @@
|
|||
libecpg_compat.so.3.4
|
||||
libecpg_compat.so.3.5
|
Binary file not shown.
BIN
nativeLib/files.native/edex/lib/native/linux32/libecpg_compat.so.3.5
Executable file
BIN
nativeLib/files.native/edex/lib/native/linux32/libecpg_compat.so.3.5
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
libpgtypes.so.3.3
|
||||
libpgtypes.so.3.4
|
|
@ -1 +1 @@
|
|||
libpgtypes.so.3.3
|
||||
libpgtypes.so.3.4
|
Binary file not shown.
BIN
nativeLib/files.native/edex/lib/native/linux32/libpgtypes.so.3.4
Executable file
BIN
nativeLib/files.native/edex/lib/native/linux32/libpgtypes.so.3.4
Executable file
Binary file not shown.
|
@ -1 +1 @@
|
|||
libpq.so.5.5
|
||||
libpq.so.5.6
|
|
@ -1 +1 @@
|
|||
libpq.so.5.5
|
||||
libpq.so.5.6
|
Binary file not shown.
BIN
nativeLib/files.native/edex/lib/native/linux32/libpq.so.5.6
Executable file
BIN
nativeLib/files.native/edex/lib/native/linux32/libpq.so.5.6
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
885386942bccbe952a96250f398352dcecee44f2
|
||||
5a30fa165d3f36567b5cb5722716772a5db0431c
|
|
@ -1 +1 @@
|
|||
2109eb4c569e826e7f4c496823ca83699014c77d
|
||||
049e7b47e9c8ce3a9839dac563a90ce743b2446c
|
Binary file not shown.
Binary file not shown.
|
@ -1,7 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject>
|
||||
<?fileVersion 4.0.0?><cproject>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780">
|
||||
<storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780" moduleId="org.eclipse.cdt.core.settings"/>
|
||||
|
@ -12,7 +10,7 @@
|
|||
<folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1876339733" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1876339733.302219468" name=""/>
|
||||
<builder cleanBuildTarget="cleanJasper" id="org.eclipse.cdt.build.core.settings.default.builder.1318518731" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<builder cleanBuildTarget="cleanJasper" enableAutoBuild="false" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.1318518731" incrementalBuildTarget="copyJasper" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1381183454" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1283896387" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2047332090" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
|
@ -46,7 +44,11 @@
|
|||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="rary.cots.jasper.null.597761625" name="rary.cots.jasper"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="i386-pc-linux-gnu.release">
|
||||
<resource resourceType="PROJECT" workspacePath="/rary.cots.jasper"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
|
@ -133,4 +135,9 @@
|
|||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets/>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
eclipse.preferences.version=1
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<environment append\="true" appendContributed\="true">\n<variable delimiter\=";" name\="INSTALL_TO" operation\="replace" value\="${ConfigName}"/>\n</environment>\n
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710=
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CC/delimiter=;
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CC/delimiter=\:
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CC/operation=replace
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CC/value=gcc -Wl,--hash-style\=sysv
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CFLAGS/delimiter=\:
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CFLAGS/operation=append
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/CFLAGS/value=-m32
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/INSTALL_TO/delimiter=;
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/INSTALL_TO/operation=replace
|
||||
environment/project/preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1995602780.1155347710/INSTALL_TO/value=../build.native/i386-pc-linux-gnu
|
||||
|
|
11117
nativeLib/rary.cots.jasper/jasper-1.900.1/configure
vendored
11117
nativeLib/rary.cots.jasper/jasper-1.900.1/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -141,7 +141,7 @@
|
|||
/* Define to `long long' if <sys/types.h> does not define. */
|
||||
#undef longlong
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
# Only build from command line, configure breaks when running from Eclipse
|
||||
# Export CFLAGS=-m32 before building
|
||||
configure_options =--enable-shared --disable-libjpeg --disable-static
|
||||
|
||||
configure_options = --enable-shared --disable-libjpeg --disable-static
|
||||
-include ../build.native/makefile.cots
|
||||
|
||||
-include ../build.native/makefile.arch
|
||||
all: jasper copyJasper
|
||||
all: configure jasper copyJasper
|
||||
|
||||
jasper:
|
||||
clean: cleanJasper
|
||||
|
||||
configure:
|
||||
cd ./jasper-1.900.1; \
|
||||
./configure $(configure_options); \
|
||||
make
|
||||
./configure $(configure_options)
|
||||
|
||||
jasper:
|
||||
cd ./jasper-1.900.1; \
|
||||
make all
|
||||
|
||||
copyJasper:
|
||||
/bin/mkdir -p ../build.native/i386-pc-linux-gnu/lib
|
||||
|
@ -21,4 +28,4 @@ cleanJasper:
|
|||
make -C ./jasper-1.900.1 distclean
|
||||
/bin/rm -fv ../build.native/i386-pc-linux-gnu/lib/libjasper.so.1.0.0 \
|
||||
../build.native/i386-pc-linux-gnu/lib/libjasper.so.1 \
|
||||
../build.native/i386-pc-linux-gnu/lib/libjasper.so
|
||||
../build.native/i386-pc-linux-gnu/lib/libjasper.so
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
bf93be5f585df5cc8d0494346c7fb009ddca3ae7
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue