Omaha #4442 Fix locking of area notations in followups.
Change-Id: I4ad06f23004c1436c84767d022efaf7df36f2f19 Former-commit-id: 9fb4fcc33d9eaf2df0e0c89c5bf3bb09670bab64
This commit is contained in:
parent
b1501e5871
commit
b49c7f1d8f
1 changed files with 31 additions and 29 deletions
|
@ -146,32 +146,38 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String headline(String headline) {
|
private String headline(String headline) {
|
||||||
|
// Marine products follow different locking rules
|
||||||
|
if (isMarineProduct()) {
|
||||||
|
// The full headline of a marine product should be locked.
|
||||||
|
headline = WarnGenPatterns.LOCK_START + headline
|
||||||
|
+ WarnGenPatterns.LOCK_END;
|
||||||
|
|
||||||
|
} else {
|
||||||
Set<String> notations = new HashSet<String>();
|
Set<String> notations = new HashSet<String>();
|
||||||
Set<String> names = new HashSet<String>();
|
Set<String> names = new HashSet<String>();
|
||||||
|
|
||||||
for (AffectedAreas affectedArea : affectedAreas) {
|
for (AffectedAreas affectedArea : affectedAreas) {
|
||||||
if ((affectedArea.getAreaNotation() != null)
|
if ((affectedArea.getAreaNotation() != null)
|
||||||
&& (affectedArea.getAreaNotation().trim().length() != 0)) {
|
&& (affectedArea.getAreaNotation().trim().length() != 0)) {
|
||||||
notations.add(affectedArea.getAreaNotation());
|
notations.add(affectedArea.getAreaNotation().toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((affectedArea.getAreasNotation() != null)
|
if ((affectedArea.getAreasNotation() != null)
|
||||||
&& (affectedArea.getAreasNotation().trim().length() != 0)) {
|
&& (affectedArea.getAreasNotation().trim().length() != 0)) {
|
||||||
notations.add(affectedArea.getAreasNotation());
|
notations
|
||||||
|
.add(affectedArea.getAreasNotation().toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((affectedArea.getName() != null)
|
if ((affectedArea.getName() != null)
|
||||||
&& (affectedArea.getName().trim().length() != 0)) {
|
&& (affectedArea.getName().trim().length() != 0)) {
|
||||||
/*
|
/*
|
||||||
* force area name to upper case for headlines since headlines
|
* force area name to upper case for headlines since
|
||||||
* are all upper case
|
* headlines are all upper case
|
||||||
*/
|
*/
|
||||||
names.add(affectedArea.getName().toUpperCase());
|
names.add(affectedArea.getName().toUpperCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Marine products follow different locking rules
|
|
||||||
if (!isMarineProduct()) {
|
|
||||||
headline = keywords(headline);
|
headline = keywords(headline);
|
||||||
Iterator<String> iterator1 = notations.iterator();
|
Iterator<String> iterator1 = notations.iterator();
|
||||||
while (iterator1.hasNext()) {
|
while (iterator1.hasNext()) {
|
||||||
|
@ -192,10 +198,6 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
||||||
+ WarnGenPatterns.LOCK_END);
|
+ WarnGenPatterns.LOCK_END);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// The full headline of a marine product should be locked.
|
|
||||||
headline = WarnGenPatterns.LOCK_START + headline
|
|
||||||
+ WarnGenPatterns.LOCK_END;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return headline;
|
return headline;
|
||||||
|
|
Loading…
Add table
Reference in a new issue