Issue #2361 remove viz.grid ISerializableObjects
Change-Id: I76be90f90dedf5d5d5e3656d23bd1180de9014b8 Former-commit-id:88eb0aab5c
[formerly88eb0aab5c
[formerly 6dde4cfe4f7669cd3d3ca15bbb7f4ab2a1a50e92]] Former-commit-id:10548cd1c7
Former-commit-id:48a479d2dc
This commit is contained in:
parent
7a316f69ef
commit
fc79c7053d
4 changed files with 18 additions and 19 deletions
|
@ -1,2 +0,0 @@
|
|||
com.raytheon.viz.grid.xml.ParameterList
|
||||
com.raytheon.viz.grid.xml.ParameterMapping
|
|
@ -29,13 +29,11 @@ import com.raytheon.uf.common.localization.IPathManager;
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.status.StatusConstants;
|
||||
import com.raytheon.viz.grid.Activator;
|
||||
import com.raytheon.viz.grid.xml.ParameterList;
|
||||
import com.raytheon.viz.grid.xml.ParameterMapping;
|
||||
|
||||
|
@ -48,6 +46,7 @@ import com.raytheon.viz.grid.xml.ParameterMapping;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 22, 2010 #4473 rjpeter Initial creation
|
||||
* Nov 07, 2361 2361 njensen Use JAXBManager for XML
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -86,13 +85,14 @@ public class RadarProductCodeMapping {
|
|||
"/parameterMapping/radar/RadarProductCodes.xml");
|
||||
|
||||
try {
|
||||
loadParameters(baseFile);
|
||||
JAXBManager jaxb = new JAXBManager(ParameterList.class);
|
||||
loadParameters(baseFile, jaxb);
|
||||
|
||||
if (siteFile.exists()) {
|
||||
loadParameters(siteFile);
|
||||
loadParameters(siteFile, jaxb);
|
||||
}
|
||||
if (userFile.exists()) {
|
||||
loadParameters(userFile);
|
||||
loadParameters(userFile, jaxb);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
|
@ -102,9 +102,10 @@ public class RadarProductCodeMapping {
|
|||
}
|
||||
}
|
||||
|
||||
private void loadParameters(File fileToLoad) throws SerializationException {
|
||||
ParameterList parameterList = (ParameterList) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(fileToLoad);
|
||||
private void loadParameters(File fileToLoad, JAXBManager jaxb)
|
||||
throws SerializationException {
|
||||
ParameterList parameterList = jaxb.unmarshalFromXmlFile(
|
||||
ParameterList.class, fileToLoad);
|
||||
for (ParameterMapping parameter : parameterList.getParameters()) {
|
||||
// print message for overwrite?
|
||||
parameterMappings.put(parameter.getAbbrev(),
|
||||
|
|
|
@ -26,10 +26,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* List of ParameterMappings
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -37,6 +35,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 22, 2010 #4473 rjpeter Initial creation
|
||||
* Nov 07, 2013 2361 njensen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -45,7 +44,8 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
*/
|
||||
@XmlRootElement(name = "parameterList")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class ParameterList implements ISerializableObject {
|
||||
public class ParameterList {
|
||||
|
||||
@XmlElement(name = "parameter")
|
||||
private List<ParameterMapping> parameters;
|
||||
|
||||
|
|
|
@ -25,10 +25,8 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Grid parameter name to map various radar product codes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -36,6 +34,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 22, 2010 #4473 rjpeter Initial creation
|
||||
* Nov 07, 2013 2361 njensen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,7 +42,8 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class ParameterMapping implements ISerializableObject {
|
||||
public class ParameterMapping {
|
||||
|
||||
@XmlAttribute
|
||||
private String abbrev;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue