Issue #2711 Use level factory more.

Former-commit-id: d7a3ae4fdb [formerly db58ae5999ea088cb93a8016836a6c62efe347e4]
Former-commit-id: 3da086b71f
This commit is contained in:
Ben Steffensmeier 2014-02-26 15:10:20 -06:00
parent b4b6cb655e
commit f45646ae91
2 changed files with 20 additions and 23 deletions

View file

@ -64,16 +64,18 @@ import com.raytheon.viz.grid.rsc.GridResourceData;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 21, 2010 bsteffens Initial creation
* May 26, 2010 mnash Used ProductBrowserLabel implementation instead of requery
* ------------- -------- ----------- --------------------------
* May 21, 2010 bsteffen Initial creation
* May 26, 2010 mnash Used ProductBrowserLabel implementation
* instead of requery
* May 02, 2013 1949 bsteffen Switch Product Browser from uengine to
* DbQueryRequest.
* Sep 19, 2013 2391 mpduff refactored some methods to common class.
* Jan 23, 2014 2711 bsteffen Get all levels from LevelFactory.
*
* </pre>
*
* @author bsteffens
* @author bsteffen
* @version 1.0
*/
public class GridProductBrowserDataDefinition extends
@ -172,11 +174,8 @@ public class GridProductBrowserDataDefinition extends
params = Arrays.asList(value);
} else if (key.equals(GridInventory.MASTER_LEVEL_QUERY)) {
if (levels == null) {
levels = new ArrayList<Level>(
LevelMappingFactory
.getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
.getAllLevels());
levels = new ArrayList<Level>(LevelFactory
.getInstance().getAllLevels());
}
Iterator<Level> iter = levels.iterator();
while (iter.hasNext()) {

View file

@ -20,11 +20,11 @@
package com.raytheon.uf.common.dataplugin.level.util;
import java.text.ParsePosition;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.NavigableSet;
import java.util.Set;
import java.util.TreeSet;
import javax.measure.unit.Unit;
@ -35,7 +35,6 @@ 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.LevelMappingFactory;
/**
* Level utilities
@ -46,10 +45,11 @@ import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 11/21/2009 #3576 rjpeter Initial version
* 01/30/2014 #2725 ekladstrup Moved to common and removed
* ------------- -------- ----------- --------------------------
* Nov 21, 2009 3576 rjpeter Initial version
* Jan 30, 2014 2725 ekladstrup Moved to common and removed
* usage of VizCommunicationException
* Jan 23, 2014 2711 bsteffen Get all levels from LevelFactory.
* </pre>
*
* @author rjpeter
@ -117,9 +117,7 @@ public class LevelUtilities {
};
Map<String, NavigableSet<Level>> masterLevelToOrderedSet = new HashMap<String, NavigableSet<Level>>();
Set<Level> allLevels;
allLevels = LevelMappingFactory.getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
Collection<Level> allLevels = LevelFactory.getInstance()
.getAllLevels();
for (Level level : allLevels) {
NavigableSet<Level> levels = masterLevelToOrderedSet.get(level