ASM #556 - WarnGen: use noon/midnight instead of 1200 PM/1200 AM
Change-Id: I31cc6fe46fff0f9246585ddbf84b2f94b3d8c22c Former-commit-id:c9e359f947
[formerlyb7d276d00f
] [formerly75c4b15e8e
] [formerlyc5097660c2
[formerly75c4b15e8e
[formerly 763641d787f7f8c79bf28456314dcc16786702ed]]] Former-commit-id:c5097660c2
Former-commit-id: cba5eacd009b07ca51d595c26e8a4b851d4605b4 [formerly89fa05128e
] Former-commit-id:bdae3cdfdf
This commit is contained in:
parent
07372d5761
commit
bdf527d5f2
4 changed files with 21 additions and 12 deletions
|
@ -58,6 +58,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
|
|||
* 07 NOV 2012 15003 mgamazaychikov Do not perform QC check on standalone MWS headline.
|
||||
* 21 MAY 2013 16200 Qinglu Lin Prevent countyOrZoneCounter from being increased for a line
|
||||
* that has no word County/Parish/Municipality in it.
|
||||
* 13 MAY 2014 17177 Qinglu Lin Updated runQC().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -305,7 +306,7 @@ public class TextSegmentCheck implements IQCCheck {
|
|||
// second bullet
|
||||
if (line.startsWith("*") && nb == 2) {
|
||||
m = secondBulletPtrn.matcher(line);
|
||||
if (m.find()) {
|
||||
if (m.find() || line.contains("* UNTIL NOON") || line.contains("* UNTIL MIDNIGHT")) {
|
||||
secondBulletFound = true;
|
||||
insideFirstBullet = false;
|
||||
continue;
|
||||
|
|
|
@ -42,6 +42,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
|
|||
* Initial creation
|
||||
* Aug 25, 2011 10719 rferrel ugcPtrn now local to file.
|
||||
* Mar 14, 2014 DR 17175 D. Friedman Get correct time zone from times.
|
||||
* May 13, 2014 DR 17177 Qinglu Lin Updated runQC().
|
||||
* </pre>
|
||||
*
|
||||
* @version 1.0
|
||||
|
@ -89,7 +90,9 @@ public class TimeConsistentCheck implements IQCCheck {
|
|||
}
|
||||
|
||||
// Event ending time (second bullet) vs Expiration
|
||||
m = secondBulletPtrn.matcher(body);
|
||||
String newBody = body.replaceAll("UNTIL NOON", "UNTIL 1200 PM");
|
||||
newBody = newBody.replaceAll("UNTIL MIDNIGHT", "UNTIL 1200 AM");
|
||||
m = secondBulletPtrn.matcher(newBody);
|
||||
if (m.find()) {
|
||||
TimeZone timeZone = TextWarningConstants.timeZoneShortNameMap
|
||||
.get(m.group(4));
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
|||
* bulletIndices(), header(), firstBullet(), secondBullet(), getImmediateCausesPtrn();
|
||||
* updated body(), header(), and secondBullet();
|
||||
* Mar 13, 2013 DR 15892 D. Friedman Fix bullet parsing.
|
||||
* May 13, 2014 DR 17177 Qinglu Lin Updated secondBullet().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -255,14 +256,14 @@ abstract public class AbstractLockingBehavior implements ICommonPatterns {
|
|||
* Locks the second bullet.
|
||||
*/
|
||||
private void secondBullet() {
|
||||
// LOCK_END should not be found at the beginning since the previous line
|
||||
// should be blank.
|
||||
String secondBullet =
|
||||
"\\* UNTIL \\d{3,4} (AM|PM) \\w{3,4}( \\w{6,9}){0,1}(\\/\\d{3,4} (AM|PM) \\w{3,4}( \\w{6,9}){0,1}\\/){0,1}"
|
||||
+ newline;
|
||||
Pattern secondBulletPtrn = Pattern.compile(secondBullet,
|
||||
Pattern.MULTILINE);
|
||||
find(secondBulletPtrn.matcher(text));
|
||||
// LOCK_END should not be found at the beginning since the previous line
|
||||
// should be blank.
|
||||
String secondBullet =
|
||||
"\\* UNTIL (\\d{3,4} (AM|PM)|NOON|MIDNIGHT) \\w{3,4}( \\w{6,9}){0,1}(\\/(\\d{3,4} (AM|PM)|NOON|MIDNIGHT) \\w{3,4}( \\w{6,9}){0,1}\\/){0,1}"
|
||||
+ newline;
|
||||
Pattern secondBulletPtrn = Pattern.compile(secondBullet,
|
||||
Pattern.MULTILINE);
|
||||
find(secondBulletPtrn.matcher(text));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
##### Evan Bookbinder 05-05-2013 handleClosesPoints and 3rd bullet changes (OVER & now)
|
||||
##### Evan Bookbinder 09-20-2013 Fixed rural area otherPoints in pathcast section, added rural phrase
|
||||
##### Qinglu Lin 03-17-2014 DR 16309. Updated inserttorwatches and insertsvrwatches.
|
||||
##### Qinglu Lin 05-13-2014 DR 17177. Updated secondBullet.
|
||||
####################################################################################################
|
||||
#*
|
||||
Mile Marker Test Code
|
||||
|
@ -1142,10 +1143,13 @@ ${partOfArea}${area.name}...
|
|||
######### MACRO TO GENERATE SECOND BULLET (UNTIL XXXX AMPM TZ (DAY) IN WARNINGS ##########
|
||||
#macro(secondBullet $dateUtil $expire $timeFormat $localtimezone $secondtimezone $duration)
|
||||
#if(${duration} >= 360)
|
||||
UNTIL ${dateUtil.format(${expire}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#set($text = "UNTIL ${dateUtil.format(${expire}, ${timeFormat.plain}, 15, ${localtimezone})}")
|
||||
#else
|
||||
UNTIL ${dateUtil.format(${expire}, ${timeFormat.clock}, 15, ${localtimezone})}##
|
||||
#set($text = "UNTIL ${dateUtil.format(${expire}, ${timeFormat.clock}, 15, ${localtimezone})}")
|
||||
#end
|
||||
#set($text = $text.replace("1200 PM", "NOON"))
|
||||
#set($text = $text.replace("1200 AM", "MIDNIGHT"))
|
||||
${text}##
|
||||
#if(${secondtimezone})
|
||||
#if(${duration} >= 360)
|
||||
/${dateUtil.format(${expire}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
|
|
Loading…
Add table
Reference in a new issue