Merge "Issue #1108 make ZAGL level deprecated since it is in use in derived parameters, modify derived parameters to handle deprecated master levels." into development
Former-commit-id:8a1f3a10a4
[formerly ef3483e14907e044a66cb6c5c677b6794bf9b03a] Former-commit-id:e51d86ce3a
This commit is contained in:
commit
cf8fd9f731
5 changed files with 48 additions and 6 deletions
|
@ -9,13 +9,14 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
javax.measure,
|
||||
com.raytheon.uf.viz.core;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-ActivationPolicy: lazy
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
|
||||
Import-Package: com.raytheon.uf.common.comm,
|
||||
com.raytheon.uf.common.dataplugin,
|
||||
com.raytheon.uf.common.dataplugin.level,
|
||||
com.raytheon.uf.common.derivparam.tree,
|
||||
com.raytheon.uf.common.geospatial,
|
||||
com.raytheon.uf.common.localization,
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<Method levels="MB,C" name="Union">
|
||||
<Field abbreviation="T"/>
|
||||
</Method>
|
||||
<Method levels="ZAGL,C" name="Union">
|
||||
<Method levels="FHAG,C" name="Union">
|
||||
<Field abbreviation="T"/>
|
||||
</Method>
|
||||
</DerivedParameter>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Method levels="MB,C" name="Union">
|
||||
<Field abbreviation="TW"/>
|
||||
</Method>
|
||||
<Method levels="ZAGL,C" name="Union">
|
||||
<Method levels="FHAG,C" name="Union">
|
||||
<Field abbreviation="TW"/>
|
||||
</Method>
|
||||
</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.LevelFactory;
|
||||
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.level.LevelMapping;
|
||||
import com.raytheon.uf.viz.core.level.LevelMappingFactory;
|
||||
|
@ -62,6 +65,8 @@ public class ValidLevelGenerator {
|
|||
|
||||
private LevelFactory lf;
|
||||
|
||||
private LevelMapper lm;
|
||||
|
||||
private Map<MasterLevel, Set<Level>> masterLevels;
|
||||
|
||||
private Set<Level> validLevels;
|
||||
|
@ -71,6 +76,7 @@ public class ValidLevelGenerator {
|
|||
public ValidLevelGenerator() {
|
||||
lmf = LevelMappingFactory.getInstance();
|
||||
lf = LevelFactory.getInstance();
|
||||
lm = LevelMapper.getInstance();
|
||||
}
|
||||
|
||||
public Set<Level> generateLevels(String validLevelsString)
|
||||
|
@ -78,7 +84,6 @@ public class ValidLevelGenerator {
|
|||
masterLevels = new HashMap<MasterLevel, Set<Level>>();
|
||||
validLevels = new HashSet<Level>();
|
||||
masterLevelsHandled = new HashSet<MasterLevel>();
|
||||
|
||||
if (validLevelsString != null && validLevelsString.length() > 0) {
|
||||
String[] levelTokenArray = validLevelsString.split(",");
|
||||
List<String> tokensToProcess = new ArrayList<String>(
|
||||
|
@ -291,7 +296,13 @@ public class ValidLevelGenerator {
|
|||
}
|
||||
case MasterLevel: {
|
||||
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) {
|
||||
for (Entry<MasterLevel, Set<Level>> entry : masterLevels
|
||||
.entrySet()) {
|
||||
|
@ -340,6 +351,13 @@ public class ValidLevelGenerator {
|
|||
} else {
|
||||
// plane was not a group, see if it is a master level
|
||||
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) {
|
||||
rval = Type.MasterLevel;
|
||||
} 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