Merge "Issue #2491 Bug fixes and clean up all remaining resource datas. Change-Id: I6cb8948a984f298d938e1b6baa9bf4af5fe6d4c6" into development

Former-commit-id: de50a9214b [formerly fc3adf193a8afacfec4c36feae4a3f1384119922]
Former-commit-id: ccf3d5b1e9
This commit is contained in:
Nate Jensen 2013-10-31 12:24:23 -05:00 committed by Gerrit Code Review
commit b17891ba0e
13 changed files with 40 additions and 48 deletions

View file

@ -1,7 +1,4 @@
com.raytheon.uf.viz.collaboration.display.editor.CreateRemoteDisplay
com.raytheon.uf.viz.collaboration.display.roles.dataprovider.rsc.DataProviderRscData
com.raytheon.uf.viz.collaboration.display.rsc.CollaborationWrapperResourceData
com.raytheon.uf.viz.collaboration.display.rsc.event.SharedResource
com.raytheon.uf.viz.collaboration.display.rsc.event.ResourceCapabilityChanged
com.raytheon.uf.viz.collaboration.display.rsc.event.ResourcePropertiesChanged
com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingResourceData

View file

@ -1,7 +1 @@
com.raytheon.uf.viz.core.maps.rsc.MapResourceGroupData
com.raytheon.uf.viz.core.maps.rsc.DbMapResourceData
com.raytheon.uf.viz.core.maps.rsc.DbPointMapResourceData
com.raytheon.uf.viz.core.maps.MapStylePreferenceStore
com.raytheon.uf.viz.core.maps.display.MapRenderableDisplay
com.raytheon.uf.viz.core.maps.display.PlainMapRenderableDisplay
com.raytheon.uf.viz.core.maps.scales.MapScaleRenderableDisplay

View file

@ -154,6 +154,20 @@ public class ProcedureXmlManager {
}
}
/**
* Transofrm an object to XML and store it in the specified file.
*
* @param obj
* Object to store
* @param filePath
* file to store object in.
* @throws SerializationException
*/
public void marshalToFile(Object obj, String filePath)
throws SerializationException {
getManager().marshalToXmlFile(obj, filePath);
}
/**
* Transform some xml in a String to an object of the specified class.
*

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.datadelivery.rsc.DrawBoxResourceData

View file

@ -1,2 +1 @@
com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResourceData
com.raytheon.uf.viz.npp.viirs.style.VIIRSDataMatchCriteria

View file

@ -1,9 +1,2 @@
com.raytheon.viz.grid.xml.ParameterList
com.raytheon.viz.grid.xml.ParameterMapping
com.raytheon.viz.grid.rsc.GridResourceData
com.raytheon.viz.grid.rsc.FfgVizGroupResourceData
com.raytheon.viz.grid.rsc.RcmResourceData
com.raytheon.viz.grid.rsc.GridLoadProperties
com.raytheon.viz.grid.rsc.DataMappedGridResourceData
com.raytheon.viz.grid.rsc.general.DifferenceGridResourceData
com.raytheon.viz.grid.GridProductBrowserDataDefinition

View file

@ -1,5 +1,2 @@
com.raytheon.viz.hydro.ui.HydroMapRenderableDisplay
com.raytheon.viz.hydro.timeseries.ShefIssueXML
com.raytheon.viz.hydro.appsdefaults.SHEFAppsDefaultsXML
com.raytheon.viz.hydro.resource.DamLocationResourceData
com.raytheon.viz.hydro.resource.MultiPointResourceData

View file

@ -1,4 +1,2 @@
com.raytheon.viz.redbook.RedbookWMOMap
com.raytheon.viz.redbook.rsc.RedbookResourceData
com.raytheon.viz.redbookua.rsc.RedbookUpperAirResourceData
com.raytheon.viz.redbook.rsc.RedbookProductBrowserDataDefinition

View file

@ -35,10 +35,10 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
import com.raytheon.uf.viz.core.drawables.IRenderableDisplay;
import com.raytheon.uf.viz.core.procedures.Bundle;
import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager;
import com.raytheon.viz.ui.EditorUtil;
import com.raytheon.viz.ui.UiPlugin;
import com.raytheon.viz.ui.UiUtil;
@ -51,8 +51,10 @@ import com.raytheon.viz.ui.UiUtil;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Jan 29, 2007 chammack Initial Creation.
* Oct 22, 2013 2491 bsteffen Switch serialization to
* ProcedureXmlManager
*
* </pre>
*
@ -108,7 +110,7 @@ public class SaveBundle extends AbstractHandler {
try {
Bundle bundle = extractCurrentBundle();
SerializationUtil.jaxbMarshalToXmlFile(bundle, fileName);
ProcedureXmlManager.getInstance().marshalToFile(bundle, fileName);
} catch (Exception e) {
Status status = new Status(Status.ERROR, UiPlugin.PLUGIN_ID, 0,
"Error occurred during bundle save.", e);

View file

@ -19,14 +19,13 @@
**/
package com.raytheon.viz.ui.cmenu;
import javax.xml.bind.JAXBException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.SerializationException;
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.drawables.ResourcePair;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager;
import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.DisplayType;
@ -35,15 +34,18 @@ import com.raytheon.uf.viz.core.rsc.ResourceProperties;
import com.raytheon.uf.viz.core.rsc.capabilities.DisplayTypeCapability;
/**
* TODO Add Description
* Duplicate a resource but with a different display type. Works only on
* resources with the {@link DisplayTypeCapability}.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Apr 26, 2010 bsteffen Initial creation
* Aug 10, 2011 njensen Added runWithEvent
* Oct 22, 2013 2491 bsteffen Switch serialization to
* ProcedureXmlManager
*
* </pre>
*
@ -63,11 +65,12 @@ public abstract class LoadAsDisplayTypeAction extends AbstractRightClickAction {
@Override
public void run() {
try {
ProcedureXmlManager jaxb = ProcedureXmlManager.getInstance();
ResourcePair rp = selectedRsc;
ResourceGroup group = new ResourceGroup();
group.getResourceList().add(rp);
String xml = SerializationUtil.marshalToXml(group);
group = (ResourceGroup) SerializationUtil.unmarshalFromXml(xml);
String xml = jaxb.marshal(group);
group = jaxb.unmarshal(ResourceGroup.class, xml);
rp = group.getResourceList().get(0);
rp.setProperties(new ResourceProperties());
rp.getLoadProperties()
@ -77,7 +80,7 @@ public abstract class LoadAsDisplayTypeAction extends AbstractRightClickAction {
.setDisplayType(getDisplayType());
rp.instantiateResource(getDescriptor());
getDescriptor().getResourceList().add(rp);
} catch (JAXBException e) {
} catch (SerializationException e) {
statusHandler.handle(Priority.PROBLEM,
"Unexpected error cloning resource", e);
} catch (VizException e) {

View file

@ -7,5 +7,4 @@ gov.noaa.nws.ncep.ui.pgen.tca.WaterBreakpointList
gov.noaa.nws.ncep.ui.pgen.tca.CoastBreakpointList
gov.noaa.nws.ncep.ui.pgen.file.Products
gov.noaa.nws.ncep.ui.pgen.producttypes.ProductTypes
gov.noaa.nws.ncep.ui.pgen.rsc.PgenResourceData
gov.noaa.nws.ncep.ui.pgen.attrdialog.SpcPhoneList

View file

@ -1 +0,0 @@
gov.noaa.nws.ncep.edex.common.dataRecords.NcFloatDataRecord

View file

@ -1,6 +1,4 @@
gov.noaa.nws.ncep.viz.rsc.plotdata.rsc.PlotResourceData
gov.noaa.nws.ncep.viz.rsc.plotdata.parameters.PlotParameterDefn
gov.noaa.nws.ncep.viz.rsc.plotdata.parameters.PlotParameterDefns
gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.elements.PlotModel
gov.noaa.nws.ncep.viz.rsc.plotdata.conditionalfilter.ConditionalFilter
gov.noaa.nws.ncep.viz.rsc.plotdata.rsc.TafPlotInfoRetriever