Merge tag 'OB_14.4.1-24' into omaha_14.4.1

14.4.4-24


Former-commit-id: b78afa0e72 [formerly 11b32bb99084a6162cd0d463800281c7115aef85]
Former-commit-id: 50ea025340
This commit is contained in:
Steve Harris 2015-04-13 08:56:12 -05:00
commit 7592f02576
15 changed files with 285 additions and 55 deletions

View file

@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Spellchecker Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.spellchecker
Bundle-SymbolicName: com.raytheon.uf.viz.spellchecker;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.spellchecker.Activator
Bundle-Vendor: RAYTHEON
@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.viz.core;bundle-version="1.11.26",
com.google.guava;bundle-version="11.0.2",
org.eclipse.jdt.ui
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.jdt.internal.ui.text.spelling,
org.eclipse.jdt.ui,

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
localization/
localization/,\
plugin.xml

View file

@ -0,0 +1,56 @@
# This file defines words that we do not allow the spellchecker to display as
# spelling suggestions.
#
# Overrides to this file are not incremental so if you want this base list
# included in your override, you must copy this word list to the override file.
#
ASSHOLE'S
ASSHOLES
ASSHOLE
BITCH
BITCH'S
BITCHES
LEPROSY
GAYEST
SHIT
PISS
PISSED
PISSER
PISSES
PISSING
TITS
FUCK
CUNT
BLOWJOB
BEATOFF
BUTTHEAD
DICKHEAD
BUTTMUNCH
WHACKOFF
DICKFACE
PUSSYWHIPPED
TWAT
LACKANOOKIE
JACKOFF
GODDAMN
PECKERHEAD
PECKERFACE
DORK
DOOKIE
BALLBUSTER
GETLAID
PECKERWOOD
TIT
FART
BAZONGAS
SCHMUCK
PRICKHEAD
PRICKFACE
PUSSYFACE
ASSWIPE
ASSLICK
COCKHEAD
COCKFACE
COCKSUCKER
PERVERT

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<?eclipse version="3.8"?>
<plugin>
<extension
point="com.raytheon.uf.viz.localization.localizationpath">
<path
application="TextWS"
extensionFilter=".txt"
localizationType="CAVE_STATIC"
name="Spell Checker"
recursive="false"
value="spellchecker">
</path>
</extension>
</plugin>

View file

@ -19,9 +19,12 @@
**/
package com.raytheon.uf.viz.spellchecker.dialogs;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.io.InputStreamReader;
import java.util.Collection;
import java.util.Collections;
import java.util.Deque;
import java.util.HashSet;
import java.util.LinkedList;
@ -80,6 +83,7 @@ import com.raytheon.uf.viz.spellchecker.jobs.SpellCheckJob;
* 09/24/2014 #16693 lshi filter out swear words in spelling check
* 10/23/2014 #3685 randerso Changes to support mixed case
* 10/30/2014 #16693 lshi Add more swear words to the filter
* 03/30/2015 #4344 dgilling Make bad word filter configurable.
*
* </pre>
*
@ -88,15 +92,17 @@ import com.raytheon.uf.viz.spellchecker.jobs.SpellCheckJob;
*
*/
public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector {
private static java.util.List<String> swearWords = Arrays.asList("ASSHOLE", "ASSHOLE'S", "ASSHOLES",
"BITCH", "BITCH'S", "BITCHES", "LEPROSY", "GAYEST",
"SHIT", "PISS", "PISSED","PISSER","PISSES","PISSING","TITS");
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(SpellCheckDlg.class);
private static final Pattern DIGITS = Pattern.compile("\\d");
private static final String SUGGESTION_BLACKLIST_PATH = FileUtil.join(
"spellchecker", "inappropriateWords.txt");
private static final Pattern COMMENT = Pattern.compile("^#");
/**
* The event handler for the check word button. It doubles as the problem
* collector for its internal SpellCheckJob.
@ -282,6 +288,8 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector {
private boolean singleLettersToRestore;
private Collection<String> suggestionsBlacklist;
/**
* Constructor.
*
@ -326,6 +334,59 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector {
spellCheckJob = new SpellCheckJob("spellCheck");
spellCheckJob.setText(styledText.getText());
spellCheckJob.setCollector(this);
suggestionsBlacklist = getSuggestionsBlacklist();
}
private Collection<String> getSuggestionsBlacklist() {
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationFile blacklistFile = pathMgr.getStaticLocalizationFile(
LocalizationType.CAVE_STATIC, SUGGESTION_BLACKLIST_PATH);
try {
return readBlacklistFile(blacklistFile);
} catch (IOException | LocalizationException e) {
if (blacklistFile.getContext().getLocalizationLevel() != LocalizationLevel.BASE) {
statusHandler.handle(Priority.WARN,
"Unable to read spell checker blacklist override file: "
+ blacklistFile
+ ". Falling back to BASE file.", e);
} else {
statusHandler.error(
"Unable to read spell checker blacklist file: "
+ blacklistFile + ".", e);
return Collections.emptySet();
}
}
blacklistFile = pathMgr.getLocalizationFile(pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.BASE),
SUGGESTION_BLACKLIST_PATH);
try {
return readBlacklistFile(blacklistFile);
} catch (IOException | LocalizationException e) {
statusHandler.error("Unable to read spell checker blacklist file: "
+ blacklistFile + ".", e);
return Collections.emptySet();
}
}
private Collection<String> readBlacklistFile(
final LocalizationFile blacklistFile) throws IOException,
LocalizationException {
Collection<String> retVal = new HashSet<>();
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
blacklistFile.openInputStream()))) {
String line = null;
while ((line = reader.readLine()) != null) {
line = line.trim();
if ((!COMMENT.matcher(line).find()) && (!line.isEmpty())) {
retVal.add(line);
}
}
}
return retVal;
}
/*
@ -356,10 +417,8 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector {
Matcher pdMatch = CHANGE_TO.matcher(pdString);
if (pdMatch.matches()) {
String replString = pdMatch.group(1);
// proposals may include case changes, which get lost
// if (replString != badWord) {
if (!swearWords.contains(replString)
&& !replString.equals(badWord)) {
if (!suggestionsBlacklist
.contains(replString.toUpperCase())) {
suggestionList.add(replString);
}
}

View file

@ -241,6 +241,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 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
* 04/07/2015 17332 zhao Added code to handle case of "Cancel" in "Restore From..."
*
* </pre>
*
@ -2519,6 +2520,9 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
FileDialog dlg = new FileDialog(shell, SWT.OPEN);
dlg.setFilterPath(path);
String filepath = dlg.open();
if ( filepath == null ) { // if "Cancel"; do nothing
return;
}
String errorMsg = null;

View file

@ -126,24 +126,4 @@ Config["MaxPointsInColumn"]=10
# default state of elevation effects when the dialog starts up.
#
Config["ElevationDefault"]="On"
#
#==============================================================================
#
# The following empty code is here to fool the ifpServer into
# thinking it's a tool. This is so that the configuration will
# appear right next to the primary tool.
#
# DO NOT CHANGE THE LINES BELOW
#
ToolType = "numeric"
WeatherElementEdited = "None"
from numpy import *
HideTool = 1
import SmartScript
class Tool (SmartScript.SmartScript):
def __init__(self, dbss):
SmartScript.SmartScript.__init__(self, dbss)
def execute(self):
return

View file

@ -47,6 +47,7 @@
# 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
# 03/30/2015 #17206 yteng Changed some parameters that are not rate parameters
# 04/03/2015 #4367 dgilling Change WindGust's time constraints back to TC1
# for Fcst/Official.
#
@ -140,7 +141,7 @@ Weather = ("Wx", WEATHER, "wx", "Weather")
IceAcc = ("IceAccum", SCALAR, "in", "Ice Accumulation", 12.0, 0.0, 1, YES)
SnowAmt = ("SnowAmt", SCALAR, "in", "Snowfall amount", 20.0, 0.0, 1, YES)
StormTotalSnow = ("StormTotalSnow", SCALAR, "in","Storm Total Snow", 50.0,
0.0, 1, YES)
0.0, 1, NO)
PoP = ("PoP", SCALAR, "%", "Prob of Precip", 100.0, 0.0, 0, NO)
PoP6 = ("PoP6", SCALAR, "%", "Prob of Precip (6hr)", 100.0, 0.0, 0, NO)
PoP12 = ("PoP12", SCALAR, "%", "Prob of Precip (12hr)", 100.0, 0.0, 0, NO)
@ -159,17 +160,17 @@ QPF6hr = ("QPF6hr", SCALAR, "in", "6 hr Precipitation (in)", 5.0, 0.0, 2, YES)
SnowAmt6hr = ("SnowAmt6hr", SCALAR, "in", "6 hr Snowfall", 30.0, 0.0, 1, YES)
# Cobb SnowTool included.
SnowRatio = ('SnowRatio', SCALAR, '%', 'Snow Ratio', 40.0, 0.0, 1, YES)
SnowRatio = ('SnowRatio', SCALAR, '%', 'Snow Ratio', 40.0, 0.0, 1, NO)
#totalVV = ('totalVV', SCALAR, 'ubar/s', 'Total VV', 400.0, 0.0, 0, YES)
cape = ("cape", SCALAR, "1unit", "CAPE", 8000.0, 0.0, 1, NO)
ApparentT = ("ApparentT", SCALAR, "F", "Apparent Temperature", 130.0, -120.0, 0, NO)
UWaveDir = ("UWaveDir", SCALAR, "m/s", "U WaveDir Comp", 0.50, -0.50, 3, NO)
VWaveDir = ("VWaveDir", SCALAR, "m/s", "V WaveDir Comp", 0.50, -0.50, 3, NO)
LkSfcT = ("LkSfcT", SCALAR, "C", "Lake Surface T", 40.0, -2.0, 1, NO)
SnowMap = ("SnowMap", SCALAR, "in", "Snowfall Map", 20.0, 0.0, 1, YES)
SnowMap = ("SnowMap", SCALAR, "in", "Snowfall Map", 20.0, 0.0, 1, NO)
WaveDir = ("WaveDir", VECTOR, "m/s", "Wave Direction", 5.0, 0.0, 2, NO)
StormTotalQPF = ('StormTotalQPF', SCALAR, 'in', 'Storm Total QPF (in)', 10.0, 0.0, 2, NO)
SeasonTotalSnow = ('SeasonTotalSnow', SCALAR, 'in', 'Season Total Snow (in)', 150.0, 0.0, 2, YES)
SeasonTotalSnow = ('SeasonTotalSnow', SCALAR, 'in', 'Season Total Snow (in)', 150.0, 0.0, 2, NO)
# Marine Weather Elements
WindWaveHeight = ("WindWaveHgt", SCALAR, "ft", "Wind Wave Height",
@ -249,7 +250,7 @@ Wind20ft = ("Wind20ft", VECTOR, "kts", "20ft. Wind", 125.0, 0.0, 0, NO)
FreeWind = ("FreeWind", VECTOR, "kts", "Free Air Wind", 125.0, 0.0, 0, NO)
TransWind = ("TransWind", VECTOR, "kts", "Transport Wind", 125.0, 0.0, 0, NO)
Stability = ("Stability",SCALAR,"cat","Stability", 6.0,1.0,0, NO)
HrsOfSun = ("HrsOfSun",SCALAR,"hrs","Hours of Sun",24.0,0.0,1, YES)
HrsOfSun = ("HrsOfSun",SCALAR,"hrs","Hours of Sun",24.0,0.0,1, NO)
MarineLayer = ("MarineLayer",SCALAR,"ft","Depth of Marine Layer",
20000.0,0.0,0,NO)
InvBurnOffTemp = ("InvBurnOffTemp",SCALAR,"F","Inversion Burn-off Temperature",

View file

@ -9,7 +9,7 @@ class nwpsCG1Forecaster(Forecaster):
grid = htsgw_SFC / 0.3048
return grid
def calcSwanSwell(self, swell_SFC):
grid = swell_SFC / 0.3048)
grid = swell_SFC / 0.3048
return grid
def calcPeriod(self, perpw_SFC):
period = clip(perpw_SFC, 0, 25)

View file

@ -0,0 +1,86 @@
from Init import *
import os
class nwpsTrkngCG0Forecaster(Forecaster):
def __init__(self):
Forecaster.__init__(self, "nwpsTrkngCG0", "nwpsTrkngCG0")
def calcPeriod1(self, SWPER_OSEQD1):
period = SWPER_OSEQD1
return period
def calcPeriod2(self, SWPER_OSEQD2):
period = SWPER_OSEQD2
return period
def calcPeriod3(self, SWPER_OSEQD3):
period = SWPER_OSEQD3
return period
def calcPeriod4(self, SWPER_OSEQD4):
period = SWPER_OSEQD4
return period
def calcPeriod5(self, SWPER_OSEQD5):
period = SWPER_OSEQD5
return period
def calcPeriod6(self, SWPER_OSEQD6):
period = SWPER_OSEQD6
return period
def calcPeriod7(self, SWPER_OSEQD7):
period = SWPER_OSEQD7
return period
def calcPeriod8(self, SWPER_OSEQD8):
period = SWPER_OSEQD8
return period
def calcPeriod9(self, SWPER_OSEQD9):
period = SWPER_OSEQD9
return period
def calcPeriod10(self, SWPER_OSEQD10):
period = SWPER_OSEQD10
return period
def calcWave1(self, SWELL_OSEQD1, SWDIR_OSEQD1):
mag = SWELL_OSEQD1 * 3.28
dir = clip(SWDIR_OSEQD1, 0, 359.5)
return (mag, dir)
def calcWave2(self, SWELL_OSEQD2, SWDIR_OSEQD2):
mag = SWELL_OSEQD2 * 3.28
dir = clip(SWDIR_OSEQD2, 0, 359.5)
return (mag, dir)
def calcWave3(self, SWELL_OSEQD3, SWDIR_OSEQD3):
mag = SWELL_OSEQD3 * 3.28
dir = clip(SWDIR_OSEQD3, 0, 359.5)
return (mag, dir)
def calcWave4(self, SWELL_OSEQD4, SWDIR_OSEQD4):
mag = SWELL_OSEQD4 * 3.28
dir = clip(SWDIR_OSEQD4, 0, 359.5)
return (mag, dir)
def calcWave5(self, SWELL_OSEQD5, SWDIR_OSEQD5):
mag = SWELL_OSEQD5 * 3.28
dir = clip(SWDIR_OSEQD5, 0, 359.5)
return (mag, dir)
def calcWave6(self, SWELL_OSEQD6, SWDIR_OSEQD6):
mag = SWELL_OSEQD6 * 3.28
dir = clip(SWDIR_OSEQD6, 0, 359.5)
return (mag, dir)
def calcWave7(self, SWELL_OSEQD7, SWDIR_OSEQD7):
mag = SWELL_OSEQD7 * 3.28
dir = clip(SWDIR_OSEQD7, 0, 359.5)
return (mag, dir)
def calcWave8(self, SWELL_OSEQD8, SWDIR_OSEQD8):
mag = SWELL_OSEQD8 * 3.28
dir = clip(SWDIR_OSEQD8, 0, 359.5)
return (mag, dir)
def calcWave9(self, SWELL_OSEQD9, SWDIR_OSEQD9):
mag = SWELL_OSEQD9 * 3.28
dir = clip(SWDIR_OSEQD9, 0, 359.5)
return (mag, dir)
def calcWave10(self, SWELL_OSEQD10, SWDIR_OSEQD10):
mag = SWELL_OSEQD10 * 3.28
dir = clip(SWDIR_OSEQD10, 0, 359.5)
return (mag, dir)
def main():
nwpsTrkngCG0Forecaster().run()
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "TRACKING WAVE GRIDS ARE NOW IN GFE"')
if __name__ == "__main__":
main()

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.edex.plugin.redbook.ingest.xml.RedbookMenusXML;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 30, 2015 4030 mpduff Initial creation
* Mar 19, 2015 4310 mpduff Some values must be trimmed.
*
* </pre>
*
@ -177,7 +178,9 @@ public class NdmMenuConverter {
subEntry.setKey(WMO);
for (String subPart : subParts) {
subPart = subPart.trim();
for (String key : dataKeyMap.keySet()) {
key = key.trim();
if (key.startsWith(subPart)) {
subValue.append(dataKeyMap.get(key))
.append(",");

View file

@ -44,6 +44,10 @@
<istrue value="${client.build}"/>
</condition>
<condition property="deploy.hti" value="yes">
<isfalse value="${client.build}"/>
</condition>
<condition property="deploy.svcBackup" value="yes">
<and>
<isfalse value="${client.build}"/>
@ -94,13 +98,12 @@
</copy>
</target>
<target name="-deploy.hti"
<target name="-deploy.hti" if="deploy.hti"
description="Deploys HTI software to a specific directory">
<!-- copy the CLI tools to the deploy directory -->
<echo message="Copying in HTI files" />
<copy todir="${gfe.suite.hti}" overwrite="true">
<fileset dir="${basedir}/hti"/>
<filterset refid="installer.filter.set"/>
</copy>
</target>

View file

@ -99,6 +99,9 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(644,awips,fxalpha,775)
%dir /awips2/GFESuite/nwps
/awips2/GFESuite/nwps/*
%defattr(775,awips,fxalpha,775)
%dir /awips2/GFESuite/hti
/awips2/GFESuite/hti/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/GFESuite/bin
/awips2/GFESuite/bin/*

View file

@ -1,4 +1,4 @@
%define _ldm_version 6.12.6
%define _ldm_version 6.12.9
%define _ldm_src_tar ldm-%{_ldm_version}.tar.gz
# ldm-%{_ldm_version}.tar.gz is tarred up ldm-%{_ldm_version}/src dir after
# ISG makes retrans changes
@ -351,21 +351,21 @@ do
fi
done
#if a remote CP site, copy over the filtered data configuration
if [ ${_myHost} == "dx1" -o ${_myHost} == "dx2" ] ; then
case $SITE_IDENTIFIER in gum|hfo|pbp|vrh)
echo -e "\nInstalling ldmd.conf for $SITE_IDENTIFIER."
if ! scp /usr/local/ldm-%{_ldm_version}/etc/ldmd.conf.$SITE_IDENTIFIER cpsbn1:/usr/local/ldm/etc/ldmd.conf
then
echo "ERROR: Failed copy of ldmd.conf to cpsbn1"
fi
if ! scp /usr/local/ldm-%{_ldm_version}/etc/ldmd.conf.$SITE_IDENTIFIER cpsbn2:/usr/local/ldm/etc/ldmd.conf
then
echo "ERROR: Failed copy of ldmd.conf to cpsbn2"
fi
;;
esac
fi
#if [ ${_myHost} == "dx1" -o ${_myHost} == "dx2" ] ; then
# case $SITE_IDENTIFIER in gum|hfo|pbp|vrh)
# echo -e "\nInstalling ldmd.conf for $SITE_IDENTIFIER."
# if ! scp /usr/local/ldm-%{_ldm_version}/etc/ldmd.conf.$SITE_IDENTIFIER cpsbn1:/usr/local/ldm/etc/ldmd.conf
# then
# echo "ERROR: Failed copy of ldmd.conf to cpsbn1"
# fi
#
# if ! scp /usr/local/ldm-%{_ldm_version}/etc/ldmd.conf.$SITE_IDENTIFIER cpsbn2:/usr/local/ldm/etc/ldmd.conf
# then
# echo "ERROR: Failed copy of ldmd.conf to cpsbn2"
# fi
# ;;
# esac
#fi
# remove the extra configuration files
rm -f /usr/local/ldm/etc/ldmd.conf.*

Binary file not shown.