Issue #1108 make ZAGL level deprecated since it is in use in derived parameters, modify derived parameters to handle deprecated master levels.
Former-commit-id: 2242eefb25cd65edb4378b47b9cafbcab8510c53
This commit is contained in:
parent
9c9a068908
commit
7d3f479031
5 changed files with 48 additions and 6 deletions
|
@ -9,13 +9,14 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||||
javax.measure,
|
javax.measure,
|
||||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||||
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
|
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
|
||||||
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174"
|
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
|
||||||
|
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||||
|
com.raytheon.uf.common.util;bundle-version="1.12.1174"
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
|
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
|
||||||
Import-Package: com.raytheon.uf.common.comm,
|
Import-Package: com.raytheon.uf.common.comm,
|
||||||
com.raytheon.uf.common.dataplugin,
|
com.raytheon.uf.common.dataplugin,
|
||||||
com.raytheon.uf.common.dataplugin.level,
|
|
||||||
com.raytheon.uf.common.derivparam.tree,
|
com.raytheon.uf.common.derivparam.tree,
|
||||||
com.raytheon.uf.common.geospatial,
|
com.raytheon.uf.common.geospatial,
|
||||||
com.raytheon.uf.common.localization,
|
com.raytheon.uf.common.localization,
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<Method levels="MB,C" name="Union">
|
<Method levels="MB,C" name="Union">
|
||||||
<Field abbreviation="T"/>
|
<Field abbreviation="T"/>
|
||||||
</Method>
|
</Method>
|
||||||
<Method levels="ZAGL,C" name="Union">
|
<Method levels="FHAG,C" name="Union">
|
||||||
<Field abbreviation="T"/>
|
<Field abbreviation="T"/>
|
||||||
</Method>
|
</Method>
|
||||||
</DerivedParameter>
|
</DerivedParameter>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<Method levels="MB,C" name="Union">
|
<Method levels="MB,C" name="Union">
|
||||||
<Field abbreviation="TW"/>
|
<Field abbreviation="TW"/>
|
||||||
</Method>
|
</Method>
|
||||||
<Method levels="ZAGL,C" name="Union">
|
<Method levels="FHAG,C" name="Union">
|
||||||
<Field abbreviation="TW"/>
|
<Field abbreviation="TW"/>
|
||||||
</Method>
|
</Method>
|
||||||
</DerivedParameter>
|
</DerivedParameter>
|
||||||
|
|
|
@ -33,6 +33,9 @@ import com.raytheon.uf.common.dataplugin.level.CompareType;
|
||||||
import com.raytheon.uf.common.dataplugin.level.Level;
|
import com.raytheon.uf.common.dataplugin.level.Level;
|
||||||
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
|
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
|
||||||
import com.raytheon.uf.common.dataplugin.level.MasterLevel;
|
import com.raytheon.uf.common.dataplugin.level.MasterLevel;
|
||||||
|
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapper;
|
||||||
|
import com.raytheon.uf.common.util.mapping.Mapper;
|
||||||
|
import com.raytheon.uf.common.util.mapping.MultipleMappingException;
|
||||||
import com.raytheon.uf.viz.core.exception.VizCommunicationException;
|
import com.raytheon.uf.viz.core.exception.VizCommunicationException;
|
||||||
import com.raytheon.uf.viz.core.level.LevelMapping;
|
import com.raytheon.uf.viz.core.level.LevelMapping;
|
||||||
import com.raytheon.uf.viz.core.level.LevelMappingFactory;
|
import com.raytheon.uf.viz.core.level.LevelMappingFactory;
|
||||||
|
@ -62,6 +65,8 @@ public class ValidLevelGenerator {
|
||||||
|
|
||||||
private LevelFactory lf;
|
private LevelFactory lf;
|
||||||
|
|
||||||
|
private LevelMapper lm;
|
||||||
|
|
||||||
private Map<MasterLevel, Set<Level>> masterLevels;
|
private Map<MasterLevel, Set<Level>> masterLevels;
|
||||||
|
|
||||||
private Set<Level> validLevels;
|
private Set<Level> validLevels;
|
||||||
|
@ -71,6 +76,7 @@ public class ValidLevelGenerator {
|
||||||
public ValidLevelGenerator() {
|
public ValidLevelGenerator() {
|
||||||
lmf = LevelMappingFactory.getInstance();
|
lmf = LevelMappingFactory.getInstance();
|
||||||
lf = LevelFactory.getInstance();
|
lf = LevelFactory.getInstance();
|
||||||
|
lm = LevelMapper.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Level> generateLevels(String validLevelsString)
|
public Set<Level> generateLevels(String validLevelsString)
|
||||||
|
@ -78,7 +84,6 @@ public class ValidLevelGenerator {
|
||||||
masterLevels = new HashMap<MasterLevel, Set<Level>>();
|
masterLevels = new HashMap<MasterLevel, Set<Level>>();
|
||||||
validLevels = new HashSet<Level>();
|
validLevels = new HashSet<Level>();
|
||||||
masterLevelsHandled = new HashSet<MasterLevel>();
|
masterLevelsHandled = new HashSet<MasterLevel>();
|
||||||
|
|
||||||
if (validLevelsString != null && validLevelsString.length() > 0) {
|
if (validLevelsString != null && validLevelsString.length() > 0) {
|
||||||
String[] levelTokenArray = validLevelsString.split(",");
|
String[] levelTokenArray = validLevelsString.split(",");
|
||||||
List<String> tokensToProcess = new ArrayList<String>(
|
List<String> tokensToProcess = new ArrayList<String>(
|
||||||
|
@ -291,7 +296,13 @@ public class ValidLevelGenerator {
|
||||||
}
|
}
|
||||||
case MasterLevel: {
|
case MasterLevel: {
|
||||||
MasterLevel ml = lf.getMasterLevel(token);
|
MasterLevel ml = lf.getMasterLevel(token);
|
||||||
|
if (ml == null) {
|
||||||
|
try {
|
||||||
|
ml = lm.lookupMasterLevel(token, Mapper.DEPRECATED);
|
||||||
|
} catch (MultipleMappingException e) {
|
||||||
|
ml = lf.getMasterLevel(e.getArbitraryMapping());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (negate) {
|
if (negate) {
|
||||||
for (Entry<MasterLevel, Set<Level>> entry : masterLevels
|
for (Entry<MasterLevel, Set<Level>> entry : masterLevels
|
||||||
.entrySet()) {
|
.entrySet()) {
|
||||||
|
@ -340,6 +351,13 @@ public class ValidLevelGenerator {
|
||||||
} else {
|
} else {
|
||||||
// plane was not a group, see if it is a master level
|
// plane was not a group, see if it is a master level
|
||||||
MasterLevel ml = lf.getMasterLevel(token);
|
MasterLevel ml = lf.getMasterLevel(token);
|
||||||
|
if (ml == null) {
|
||||||
|
try {
|
||||||
|
ml = lm.lookupMasterLevel(token, Mapper.DEPRECATED);
|
||||||
|
} catch (MultipleMappingException e) {
|
||||||
|
ml = lf.getMasterLevel(e.getArbitraryMapping());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ml != null) {
|
if (ml != null) {
|
||||||
rval = Type.MasterLevel;
|
rval = Type.MasterLevel;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<aliasList namespace="deprecated">
|
||||||
|
<alias base="FHAG">ZAGL</alias>
|
||||||
|
</aliasList>
|
Loading…
Add table
Reference in a new issue