Merge "ASM #529 Invalid QC message for Areal Flood Advisory" into asm_14.3.1

Former-commit-id: 7ac4c96822 [formerly 167c388492] [formerly 9b7823084f] [formerly 4786f2e19e [formerly 9b7823084f [formerly f08b93fb1bd32ec83a2e590d29d5e4d0fe18c0a9]]]
Former-commit-id: 4786f2e19e
Former-commit-id: 7b5c7908c089a233f7fdaf275cb709c7e5f83f43 [formerly d76091c857]
Former-commit-id: 4a00dfa9d5
This commit is contained in:
Matthew Howard 2014-09-16 08:32:37 -05:00 committed by Gerrit Code Review
commit 656048cf81

View file

@ -20,6 +20,7 @@
package com.raytheon.viz.texteditor.qc;
import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@ -59,6 +60,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
* 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().
* 15 SEP 2014 529 mgamazaychikov Create firstBulletImmediateCauseQCExclusions list and add IC to it.
*
* </pre>
*
@ -86,6 +88,9 @@ public class TextSegmentCheck implements IQCCheck {
}
}
// List of immediate causes to be excluded from quality control check in the first bullet
private static List<String> firstBulletImmediateCauseQCExclusions = Arrays.asList("ER", "MC", "UU", "IC");
@Override
public String runQC(String header, String body, String nnn) {
int countyOrZoneCounter = 0;
@ -362,8 +367,9 @@ public class TextSegmentCheck implements IQCCheck {
}
if (insideFirstBullet) {
if (ic != null && !ic.equals("ER") && !ic.equals("MC")
&& !ic.equals("UU") && checkIC) {
if (ic != null
&& !firstBulletImmediateCauseQCExclusions.contains(ic)
&& checkIC) {
boolean validIC = false;
for (String causes : QualityControl.getImmediateCauses()) {
if (causes.startsWith(ic)