Merge branch 'development' into development_on_RHEL6

Conflicts:
	cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java
	cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/stationprofile/StationProfileDlg.java
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/GfeIRT.java
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py
	edexOsgi/com.raytheon.edex.plugin.ldadhydro/src/com/raytheon/edex/plugin/ldadhydro/dao/HydroDecoder.java
	edexOsgi/com.raytheon.uf.common.base.feature/feature.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java
	nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so
	nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so
	ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/ContourSupport.java
	rpms/awips2.core/Installer.httpd-pypies/component.spec
	rpms/build/i386/build.sh
	rpms/build/i386/build.sh-keep-10032013
	rpms/build/i386/build.sh-keep-11012013
	rpms/build/x86_64/build.sh
	rpms/build/x86_64/build.sh.orig

Change-Id: Id1498fac3a822ab2db55e783ef0ebe5519c66461

Former-commit-id: 061fa07147 [formerly 7ba466f5a6] [formerly 306bd6fae1] [formerly 061fa07147 [formerly 7ba466f5a6] [formerly 306bd6fae1] [formerly 460a7b8b5d [formerly 306bd6fae1 [formerly 333073fc97c9d454d0e41f8fbe01be3a19b18184]]]]
Former-commit-id: 460a7b8b5d
Former-commit-id: 112816a54c [formerly 3f68fc6eed] [formerly 617c9d2d122683ab3ac05ff74694962b33afa16d [formerly 59671c1e7d]]
Former-commit-id: 8b93a7813019963981a150f64ec44daf5d188cde [formerly c8ef435295]
Former-commit-id: ef23a8f65b
This commit is contained in:
Richard Peter 2013-11-12 11:11:36 -06:00
commit ff729f46b5
215 changed files with 4597 additions and 4882 deletions

View file

@ -173,4 +173,10 @@
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.commons.io"
download-size="0"
install-size="0"
version="0.0.0"/>
</feature>

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.core.maps.MapStylePreferenceStore

View file

@ -20,10 +20,12 @@
package com.raytheon.uf.viz.core.maps;
import java.io.File;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@ -37,12 +39,13 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.localization.exception.LocalizationException;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.JAXBManager;
import com.raytheon.uf.common.serialization.jaxb.JAXBClassLocator;
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.reflect.SubClassLocator;
import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.Capabilities;
/**
@ -53,10 +56,11 @@ import com.raytheon.uf.viz.core.rsc.capabilities.Capabilities;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 7, 2010 randerso Initial creation
* May 7, 2010 randerso Initial creation
* Jan 25, 2013 DR 15649 D. Friedman Clone capabilities in get/put.
* Stored preferences in a sub-directory
* and observe changes.
* Nov 08, 2013 2361 njensen Use JAXBManager for XML
*
* </pre>
*
@ -66,7 +70,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.Capabilities;
@XmlRootElement()
@XmlAccessorType(XmlAccessType.FIELD)
public class MapStylePreferenceStore implements ISerializableObject {
public class MapStylePreferenceStore {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(MapStylePreferenceStore.class);
@ -74,6 +78,8 @@ public class MapStylePreferenceStore implements ISerializableObject {
private static final String OLD_MAPSTYLE_FILENAME = "mapstylepreferences.xml";
private static JAXBManager jaxb;
private static class MapStylePreferenceKey {
private String perspective;
@ -195,13 +201,13 @@ public class MapStylePreferenceStore implements ISerializableObject {
IPathManager pathMgr = PathManagerFactory.getPathManager();
if (siteLf == null) {
siteLf = pathMgr.getLocalizationFile(pathMgr
.getContext(LocalizationType.CAVE_STATIC,
LocalizationLevel.SITE), MAPSTYLE_FILENAME);
siteLf = pathMgr.getLocalizationFile(pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.SITE),
MAPSTYLE_FILENAME);
userLf = pathMgr.getLocalizationFile(pathMgr
.getContext(LocalizationType.CAVE_STATIC,
LocalizationLevel.USER), MAPSTYLE_FILENAME);
userLf = pathMgr.getLocalizationFile(pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER),
MAPSTYLE_FILENAME);
ILocalizationFileObserver obs = new ILocalizationFileObserver() {
@Override
@ -215,22 +221,26 @@ public class MapStylePreferenceStore implements ISerializableObject {
siteLf.addFileUpdatedObserver(obs);
userLf.addFileUpdatedObserver(obs);
/* DR 15649 for OB 13.3.1: If the map style preferences are in the
* old location, move it to the correct place. This code can be
/*
* DR 15649 for OB 13.3.1: If the map style preferences are in the
* old location, move it to the correct place. This code can be
* removed in the future.
*/
if (! userLf.exists()) {
LocalizationFile oldUserLf = pathMgr.getLocalizationFile(pathMgr
.getContext(LocalizationType.CAVE_STATIC,
if (!userLf.exists()) {
LocalizationFile oldUserLf = pathMgr.getLocalizationFile(
pathMgr.getContext(LocalizationType.CAVE_STATIC,
LocalizationLevel.USER), OLD_MAPSTYLE_FILENAME);
if (oldUserLf.exists()) {
try {
userLf.write(oldUserLf.read());
oldUserLf.delete();
statusHandler.handle(Priority.INFO, "Moved user map style preferences to new location");
statusHandler
.handle(Priority.INFO,
"Moved user map style preferences to new location");
} catch (LocalizationException e) {
statusHandler.handle(Priority.PROBLEM, "Unable to move map style preferences", e);
statusHandler.handle(Priority.PROBLEM,
"Unable to move map style preferences", e);
e.printStackTrace();
}
}
@ -239,9 +249,9 @@ public class MapStylePreferenceStore implements ISerializableObject {
if (siteLf.exists()) {
try {
combinedPreferences = ((MapStylePreferenceStore) SerializationUtil
.jaxbUnmarshalFromXmlFile(siteLf.getFile())).preferences;
} catch (SerializationException e) {
combinedPreferences = getJaxbManager().unmarshalFromXmlFile(
MapStylePreferenceStore.class, siteLf.getFile()).preferences;
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"Exception while loading site map style preferences",
@ -253,17 +263,16 @@ public class MapStylePreferenceStore implements ISerializableObject {
if (userLf.exists()) {
try {
preferences = ((MapStylePreferenceStore) SerializationUtil
.jaxbUnmarshalFromXmlFile(userLf.getFile())).preferences;
preferences = getJaxbManager().unmarshalFromXmlFile(
MapStylePreferenceStore.class, userLf.getFile()).preferences;
// merge user into site
for (Entry<MapStylePreferenceKey, Capabilities> entry : preferences
.entrySet()) {
combinedPreferences.put(entry.getKey(),
entry.getValue());
combinedPreferences.put(entry.getKey(), entry.getValue());
}
} catch (SerializationException e) {
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"Exception while loading user map style preferences",
@ -274,6 +283,18 @@ public class MapStylePreferenceStore implements ISerializableObject {
}
}
private static synchronized JAXBManager getJaxbManager()
throws JAXBException {
if (jaxb == null) {
SubClassLocator locator = new SubClassLocator();
Collection<Class<?>> classes = JAXBClassLocator.getJAXBClasses(
locator, AbstractCapability.class,
MapStylePreferenceStore.class);
jaxb = new JAXBManager(classes.toArray(new Class<?>[0]));
}
return jaxb;
}
private MapStylePreferenceStore() {
}
@ -308,8 +329,7 @@ public class MapStylePreferenceStore implements ISerializableObject {
File file = lf.getFile();
try {
SerializationUtil
.jaxbMarshalToXmlFile(this, file.getAbsolutePath());
getJaxbManager().marshalToXmlFile(this, file.getAbsolutePath());
lf.save();
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -92,6 +92,8 @@ import com.vividsolutions.jts.io.WKBReader;
* Sep 18, 2012 1019 randerso improved error handling
* Aug 12, 2013 1133 bsteffen Better error handling for invalid
* polygons in map resource.
* Nov 06, 2013 2361 njensen Prepopulate fields in initInternal
* instead of constructor for speed
*
* </pre>
*
@ -295,9 +297,10 @@ public class DbMapResource extends
fields.add(column.toString());
}
}
double[] lev = getLevels();
QueryResult mappedResult = DbMapQueryFactory.getMapQuery(
resourceData.getTable(),
getGeomField(levels[levels.length - 1]))
getGeomField(lev[lev.length - 1]))
.queryWithinEnvelope(req.envelope, fields,
constraints);
Map<Integer, Geometry> gidMap = new HashMap<Integer, Geometry>(
@ -533,7 +536,7 @@ public class DbMapResource extends
protected Map<Object, RGB> colorMap;
protected double[] levels;
private double[] levels;
protected double lastSimpLev;
@ -543,16 +546,11 @@ public class DbMapResource extends
private MapQueryJob queryJob;
protected String geometryType;
private String geometryType;
public DbMapResource(DbMapResourceData data, LoadProperties loadProperties) {
super(data, loadProperties);
queryJob = new MapQueryJob();
// Prepopulate fields
getGeometryType();
getLabelFields();
getLevels();
}
@Override
@ -571,6 +569,13 @@ public class DbMapResource extends
@Override
protected void initInternal(IGraphicsTarget target) throws VizException {
super.initInternal(target);
// Prepopulate fields in initInternal since this is not on the UI
// thread
getGeometryType();
getLabelFields();
getLevels();
getCapability(ShadeableCapability.class).setAvailableShadingFields(
getLabelFields().toArray(new String[0]));
}

View file

@ -25,16 +25,14 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBException;
import com.raytheon.uf.common.dataquery.db.QueryResult;
import com.raytheon.uf.common.dataquery.db.QueryResultRow;
import com.raytheon.uf.common.dataquery.requests.QlServerRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.SaveOrUpdateRequest;
import com.raytheon.uf.common.message.response.AbstractResponseMessage;
import com.raytheon.uf.common.message.response.ResponseMessageError;
import com.raytheon.uf.common.message.response.ResponseMessageGeneric;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.exception.VizServerSideException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
@ -49,6 +47,7 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
* ------------ ---------- ----------- --------------------------
* 10/15/2008 1615 bphillip Initial Creation
* 12/11/2008 1777 bphillip Added insert/update functionality
* Nov 08, 2013 2361 njensen Refactored/improved saveOrUpdateList()
*
* </pre>
*
@ -319,44 +318,11 @@ public class DirectDbQuery {
*/
private int saveOrUpdateList(List<Object> objList, String database)
throws VizException {
SaveOrUpdateRequest req = new SaveOrUpdateRequest();
req.setDbName(database);
req.setObjectsToUpdate(objList);
constraints.put("database", new RequestConstraint(database));
for (int i = 0; i < objList.size(); i++) {
String xml = null;
try {
xml = SerializationUtil.marshalToXml(objList.get(i));
} catch (JAXBException e) {
throw new VizException(
"Unable to marshal object. Save Failed.", e);
}
// xml = xml.replaceAll("\"", "<quote>");
// xml = xml.replaceAll("\n", "");
constraints.put("obj" + String.valueOf(i), new RequestConstraint(
xml));
}
// set mode
constraints.put("mode", new RequestConstraint("saveOrUpdateObject"));
// create and send request
QlServerRequest request = new QlServerRequest(constraints);
int retVal = 0;
AbstractResponseMessage response = (AbstractResponseMessage) ThriftClient
.sendRequest(request);
if (constraints.containsKey("mode")) {
constraints.remove("mode");
}
if (response instanceof ResponseMessageGeneric) {
retVal = (Integer) ((ResponseMessageGeneric) response)
.getContents();
} else if (response instanceof ResponseMessageError) {
ResponseMessageError rme = (ResponseMessageError) response;
VizServerSideException innerException = new VizServerSideException(
rme.toString());
throw new VizServerSideException(rme.getErrorMsg(), innerException);
}
return retVal;
Object result = ThriftClient.sendRequest(req);
return (Integer) result;
}
}

View file

@ -19,8 +19,9 @@
**/
package com.raytheon.uf.viz.core.drawables;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
/**
* Describes a Colormapped Image
@ -64,4 +65,12 @@ public interface IColormappedImage extends IImage {
*/
public abstract double getValue(int x, int y);
/**
* Get the unit associated with the data in the image. Values returned from
* {@link #getValue(int, int)} will be in this unit
*
* @return
*/
public abstract Unit<?> getDataUnit();
}

View file

@ -21,6 +21,8 @@ package com.raytheon.uf.viz.core.drawables.ext.colormap;
import java.awt.image.RenderedImage;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.image.ColorMapData;
import com.raytheon.uf.common.colormap.image.Colormapper;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
@ -59,6 +61,8 @@ public class ColormappedImage implements IColormappedImage,
private ColorMapParameters parameters;
private Unit<?> dataUnit;
public ColormappedImage(IGraphicsTarget target,
IColorMapDataRetrievalCallback callback,
ColorMapParameters parameters) {
@ -103,9 +107,7 @@ public class ColormappedImage implements IColormappedImage,
*/
@Override
public void dispose() {
if (image != null) {
image.dispose();
}
image.dispose();
}
/*
@ -209,11 +211,15 @@ public class ColormappedImage implements IColormappedImage,
*/
@Override
public RenderedImage getImage() throws VizException {
if (parameters == null || parameters.getColorMap() == null) {
return null;
RenderedImage image = null;
if (parameters != null && parameters.getColorMap() != null) {
ColorMapData colorMapData = callback.getColorMapData();
if (colorMapData != null) {
this.dataUnit = colorMapData.getDataUnit();
image = Colormapper.colorMap(colorMapData, parameters);
}
}
ColorMapData colorMapData = callback.getColorMapData();
return Colormapper.colorMap(colorMapData, parameters);
return image;
}
/*
@ -237,4 +243,15 @@ public class ColormappedImage implements IColormappedImage,
image.stage();
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getDataUnit()
*/
@Override
public Unit<?> getDataUnit() {
return dataUnit == null ? getColorMapParameters().getDataUnit()
: dataUnit;
}
}

View file

@ -142,6 +142,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
* Oct 15, 2013 2477 mpduff Fix bug in group settings.
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
* Oct 21, 2013 2292 mpduff Close dialog on OK.
* Nov 07, 2013 2291 skorolev Used showText() method for "Unable to Create Subscription" message.
*
* </pre>
*
@ -1206,9 +1207,11 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
close();
} else {
setStatus(Status.CANCEL);
displayPopup(
"Unable to Create Subscription",
status.getMessage());
DataDeliveryUtils
.showText(
getShell(),
"Unable to Create Subscription",
status.getMessage());
}
}
}

View file

@ -31,7 +31,6 @@ import java.util.TimeZone;
import java.util.TreeSet;
import java.util.concurrent.Callable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
import com.google.common.annotations.VisibleForTesting;
@ -94,6 +93,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
* Sept 25, 2013 1797 dhladky separated time from gridded time
* Oct 12, 2013 2460 dhladky restored adhoc subscriptions to registry storage.
* Oct 22, 2013 2292 mpduff Removed subscriptionOverlapService.
* Nov 07, 2013 2291 skorolev Used showText() method for "Shared Subscription" message.
*
* </pre>
*
@ -151,8 +151,8 @@ public class SubscriptionService implements ISubscriptionService {
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
DataDeliveryUtils.showMessage(shell, SWT.OK,
"Shared Subscription", message);
DataDeliveryUtils.showText(shell, "Shared Subscription",
message);
}
});
}

View file

@ -81,8 +81,9 @@ import com.vividsolutions.jts.geom.Coordinate;
* Jun 12, 2013 2064 mpduff Use SizeUtil to format data size output.
* Jul 26, 2031 2232 mpduff Removed sendAuthorizationRequest method.
* Aug 30, 2013 2288 bgonzale Added latency to details display.
* Sept 30, 2013 1797 dhladky Time GriddedTime separation
* Sep 30, 2013 1797 dhladky Time GriddedTime separation
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
* Nov 07, 2013 2291 skorolev Added showText() method for messages with many lines.
* </pre>
*
* @author mpduff
@ -614,6 +615,20 @@ public class DataDeliveryUtils {
"The changes were successfully applied.");
}
/**
* Show message with long list of lines.
*
* @param shell
* @param messageTitle
* @param messageText
*/
public static void showText(Shell shell, String messageTitle,
String messageText) {
TextMessageDlg textMsgDlgdlg = new TextMessageDlg(shell, messageTitle,
messageText);
textMsgDlgdlg.open();
}
/**
* Provides the text for the subscription details dialog
*

View file

@ -0,0 +1,69 @@
package com.raytheon.uf.viz.datadelivery.utils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
/**
* Replace a message box for messages with too big number of lines.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 7, 2013 skorolev Initial creation
*
* </pre>
*
* @author skorolev
* @version 1.0
*/
public class TextMessageDlg extends CaveSWTDialog {
private String messageText;
protected TextMessageDlg(Shell parentShell, String messageTitle,
String messageText) {
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
this.messageText = messageText;
this.setText(messageTitle);
}
@Override
protected void initializeComponents(Shell shell) {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false);
GridLayout gl = new GridLayout(1, false);
Composite mainComp = new Composite(shell, SWT.NONE);
mainComp.setLayout(gl);
mainComp.setLayoutData(gd);
gd = new GridData();
gd.widthHint = 350;
gd.heightHint = 350;
StyledText text = new StyledText(mainComp, SWT.MULTI | SWT.WRAP
| SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
text.setLayoutData(gd);
text.setText(messageText);
Button okBtn = new Button(mainComp, SWT.PUSH);
okBtn.setText("OK");
okBtn.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, true));
okBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
close();
}
});
}
}

View file

@ -24,6 +24,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import javax.measure.unit.Unit;
import org.geotools.coverage.grid.GridGeometry2D;
import com.raytheon.uf.common.colormap.image.ColorMapData;
@ -64,6 +66,8 @@ public class KmlColormappedImage extends KmlImage implements IColormappedImage {
private ColorMapParameters colorMapParameters;
private Unit<?> dataUnit;
public KmlColormappedImage(IColorMapDataRetrievalCallback dataCallback,
ColorMapParameters colorMapParameters) {
this.dataCallback = dataCallback;
@ -72,6 +76,7 @@ public class KmlColormappedImage extends KmlImage implements IColormappedImage {
public DataSource getData(GridGeometry2D geometry) throws VizException {
ColorMapData data = dataCallback.getColorMapData();
this.dataUnit = data.getDataUnit();
switch (data.getDataType()) {
case FLOAT:
return new FloatBufferWrapper(((FloatBuffer) data.getBuffer()),
@ -122,4 +127,15 @@ public class KmlColormappedImage extends KmlImage implements IColormappedImage {
return 0;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getDataUnit()
*/
@Override
public Unit<?> getDataUnit() {
return dataUnit == null ? getColorMapParameters().getDataUnit()
: dataUnit;
}
}

View file

@ -21,6 +21,8 @@ package com.raytheon.uf.viz.kml.export.graphics.ext;
import java.util.Comparator;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.DrawableImage;
import com.raytheon.uf.viz.core.IExtent;
@ -146,4 +148,14 @@ class KmlMosaicImage implements IMosaicImage {
this.imageExtent = imageExtent;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getDataUnit()
*/
@Override
public Unit<?> getDataUnit() {
return getColorMapParameters().getColorMapUnit();
}
}

View file

@ -10,12 +10,12 @@ Eclipse-BuddyPolicy: dependent
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
org.geotools;bundle-version="2.6.4",
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
com.raytheon.viz.ui;bundle-version="1.12.1174",
javax.vecmath;bundle-version="1.3.1",
com.raytheon.uf.common.util;bundle-version="1.12.1174",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174"
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
javax.measure;bundle-version="1.0.0",
javax.vecmath;bundle-version="1.3.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.remote.graphics,

View file

@ -19,6 +19,8 @@
**/
package com.raytheon.uf.viz.remote.graphics.objects;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.IColorMap;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.colormap.prefs.IColorMapParametersListener;
@ -150,4 +152,14 @@ public class DispatchingColormappedImage<T extends IColormappedImage> extends
}
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getDataUnit()
*/
@Override
public Unit<?> getDataUnit() {
return wrappedObject.getDataUnit();
}
}

View file

@ -52,7 +52,8 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 6, 2012 mschenke Initial creation
* Aug 6, 2012 mschenke Initial creation
* Nov 4, 2013 2492 mschenke Reworked to use GLSL Data mapping
*
* </pre>
*

View file

@ -225,8 +225,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 11/05/2012 15477 zhao Trim blank lines in text in Editor when check Syntax
* 01/09/2013 15528 zhao Modified saveFile() and restoreFile()
* 08/09/2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR
* 09/04/2013 2322 lvenable Added CAVE style so this dialog is perspective independent
* 10/24/2013 16478 zhao add syntax check for extra '=' sign
* 04Sep2013 #2322 lvenable Added CAVE style so this dialog is perspective independent
*
* </pre>
*

View file

@ -161,69 +161,111 @@ float getLinearIndex(float cmapValue, float cmapMin, float cmapMax) {
return capIndex(index);
}
/**
* Converts a colormap value to a log index
*/
float valueToLogIndex(float value, float rangeMin, float rangeMax) {
// Account for 0 min index
if (rangeMin == 0) {
rangeMin = 0.0000001;
if (rangeMax < 0) {
rangeMin = -rangeMin;
}
}
int reverse = 0;
if ((value < rangeMin && rangeMin > 0)
|| (value > rangeMin && rangeMin < 0)) {
reverse = 1;
}
value = abs(value);
rangeMin = abs(rangeMin);
rangeMax = abs(rangeMax);
// Check uncomputable index value, everything between this range is 0,
// rangeMin->rangeMax 0 -> 1, -rangeMin->-rangeMax 0 -> -1
if (value <= rangeMin && value >= -rangeMin) {
return 0;
}
double index = (log(value) - log(rangeMin))
/ (log(rangeMax) - log(rangeMin));
if (reverse != 0) {
index = -index;
}
return index;
}
/**
* This function logarithmically finds the index for the cmapValue into
* cmapMin/cmapMax (capped at 0-1).
*/
float getLogIndex(float cmapValue, float cmapMin, float cmapMax, int mirror) {
int inverted = 0;
float rangeMin = abs(cmapMin);
float rangeMax = abs(cmapMax);
float rangeValue = abs(cmapValue);
if (rangeMin > rangeMax) {
// Inverted colormapping range (cmapMax is closest to 0)
inverted = 1;
float tmp = rangeMin;
rangeMin = rangeMax;
rangeMax = tmp;
}
float index = 0.0;
// is this strictly negative, strictly positive or neg to pos scaling?
if (cmapMin >= 0.0 && cmapMax >= 0.0 && mirror != 1) {
if (cmapValue < cmapMin) {
index = 0.0;
} else {
// simple calculation
index = ((log(cmapValue) - log(cmapMin))
/ abs(log(cmapMax) - log(cmapMin)));
// Flag if min/max values are on opposite sides of zero
int minMaxOpposite = 0;
if ((cmapMin < 0 && cmapMax > 0) || (cmapMin > 0 && cmapMax < 0)) {
minMaxOpposite = 1;
}
if (mirror != 0 || minMaxOpposite != 0) {
if (cmapMax < 0) {
// Invert colormapping if negative range was given
cmapValue = -cmapValue;
}
} else if (cmapMin <= 0.0 && cmapMax <= 0.0 && mirror != 1) {
index = ((log(cmapValue) - log(cmapMax))
/ abs(log(cmapMin) - log(cmapMax)));
} else {
// special case, neg to pos:
float colorMapMin = cmapMin;
float colorMapMax = cmapMax;
float zeroVal = max(colorMapMax, abs(colorMapMin)) * 0.0001;
if (mirror == 1 && (colorMapMin > 0.0 || colorMapMax < 0.0)) {
if (colorMapMax < 0.0) {
colorMapMax = -cmapMax;
cmapValue = -cmapValue;
zeroVal = -colorMapMin;
} else {
zeroVal = cmapMin;
}
colorMapMin = -cmapMax;
// Log scaling is happening on both sides of zero, need to compute
// our zero index value
float zeroVal = rangeMin;
if (minMaxOpposite == 1) {
// Min/Max are on opposite sides of zero, compute a zero value
zeroVal = max(rangeMin, rangeMax) * 0.0001;
}
float leftZero = 0.0;
float rightZero = 0.0;
float negCmapMax = rangeMin;
float posCmapMax = rangeMax;
if (mirror != 0) {
negCmapMax = posCmapMax = rangeMax;
}
// Compute log zero val and log neg/pos max vals
float absLogZeroVal = abs(log(zeroVal));
rightZero = absLogZeroVal + log(colorMapMax);
float cmapMax2 = abs(colorMapMin);
leftZero = absLogZeroVal + log(cmapMax2);
float zeroIndex = leftZero / (leftZero + rightZero);
// figure out index for texture val
float absTextureColor = abs(cmapValue);
if (absTextureColor <= zeroVal) {
index = zeroIndex;
} else if (cmapValue > 0.0) {
// positive texture color value, find index from 0 to
// cmapMax:
float logTexColor = absLogZeroVal + log(cmapValue);
float texIndex = logTexColor / rightZero;
index = (zeroIndex + ((1.0 - zeroIndex) * texIndex));
float logNegCmapMax = absLogZeroVal + log(negCmapMax);
float logPosCmapMax = absLogZeroVal + log(posCmapMax);
// Calculate index which zeroVal is at based on neg max and pos max
float zeroValIndex = logNegCmapMax / (logNegCmapMax + logPosCmapMax);
if (cmapValue > 0) {
index = valueToLogIndex(rangeValue, zeroVal, posCmapMax);
index = zeroValIndex + (1 - zeroValIndex) * index;
} else {
// negative texture color value, find index from 0 to
// cmapMax:
float logTexColor = absLogZeroVal + log(absTextureColor);
float texIndex = logTexColor / leftZero;
index = (zeroIndex - (zeroIndex * texIndex));
index = valueToLogIndex(rangeValue, zeroVal, negCmapMax);
index = zeroValIndex - zeroValIndex * index;
}
if (inverted != 0) {
index = 1.0 - index;
}
} else {
// Simple case, just use log converter to get index
index = valueToLogIndex(rangeValue, rangeMin, rangeMax);
if (inverted == 1) {
index = 1.0 - index;
}
if (cmapMin > 0 && cmapValue < rangeMin
|| (cmapMin < 0 && cmapValue > -rangeMin)) {
index = -index;
}
}
return capIndex(index);

View file

@ -256,6 +256,10 @@ public class GLDataMappingFactory {
float currDelta = (float) (currEndValue - dataMapping[0]);
for (int i = 2; i < dataMapping.length; ++i) {
double nextValue = dataMapping[i];
// Deltas are compared in float space because it
// minimizes the precision errors and the mapping will
// occur in floats in GLSL so no need for the extra
// precision
float nextDelta = (float) ((nextValue - currEndValue) / (i - currEndIndex));
if (nextDelta == currDelta) {
// Remove linear entries

View file

@ -27,7 +27,8 @@ import com.raytheon.viz.core.gl.glsl.GLShaderProgram;
import com.raytheon.viz.core.gl.images.AbstractGLImage;
/**
* TODO Add Description
* Default GL imaging extension. Renders RGB images in GL applying alpha,
* brightness, and contrast settings.
*
* <pre>
*

View file

@ -23,7 +23,7 @@ import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.viz.core.gl.dataformat.AbstractGLColorMapDataFormat;
/**
* Factory for creating GLSL struct mappings
* Factory for creating API defined GLSL structs in a {@link GLShaderProgram}.
*
* <pre>
*

View file

@ -39,7 +39,8 @@ import com.sun.opengl.util.texture.TextureCoords;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 16, 2013 2333 mschenke Initial creation
* Oct 16, 2013 2333 mschenke Initial creation
* Nov 4, 2013 2492 mschenke Reworked to use GLSL Data mapping
*
* </pre>
*

View file

@ -19,6 +19,7 @@
**/
package com.raytheon.viz.core.gl.images;
import javax.measure.unit.Unit;
import javax.media.opengl.GL;
import com.raytheon.uf.common.colormap.image.ColorMapData.ColorMapDataType;
@ -102,4 +103,12 @@ public class GLColormappedImage extends AbstractGLColormappedImage {
super.usaAsFrameBuffer();
}
@Override
public Unit<?> getDataUnit() {
if (data != null && data.getDataUnit() != null) {
return data.getDataUnit();
}
return getColorMapParameters().getDataUnit();
}
}

View file

@ -19,6 +19,8 @@
**/
package com.raytheon.viz.core.gl.images;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension;
import com.raytheon.viz.core.gl.dataformat.GLColorMapData;
@ -66,4 +68,9 @@ public class GLOffscreenColormappedImage extends AbstractGLColormappedImage {
return Double.NaN;
}
@Override
public Unit<?> getDataUnit() {
return getColorMapParameters().getColorMapUnit();
}
}

View file

@ -19,6 +19,8 @@
**/
package com.raytheon.viz.core.gl.internal.ext.mosaic;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.DrawableImage;
import com.raytheon.uf.viz.core.IExtent;
@ -172,4 +174,14 @@ public class GLMosaicImage extends GLDelegateImage<GLOffscreenColormappedImage>
this.image = wrappedImage;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getDataUnit()
*/
@Override
public Unit<?> getDataUnit() {
return image.getDataUnit();
}
}

View file

@ -50,8 +50,10 @@
# so mask can be used with advanced indexing
# (e.g. grid[mask] = value)
# Oct 07, 2013 2424 randerso remove use of pytz
# Oct 29, 2013 2476 njensen Improved getting wx/discrete keys in _getGridResults
# Oct 29, 2013 2476 njensen Improved getting wx/discrete keys in _getGridResults
# Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
# Nov 07, 2013 2476 dgilling Fix _getGridsResult() for retrieving
# Wx/Discrete in First mode.
#
########################################################################
import types, string, time, sys
@ -485,7 +487,7 @@ class SmartScript(BaseTool.BaseTool):
if result[0].dtype != numpy.int8:
# scalar
result = result[0]
else:
else:
# discrete or weather
keys = JUtil.javaObjToPyVal(slice.getKeyList())
result.append(keys)

View file

@ -1,2 +0,0 @@
com.raytheon.viz.grid.xml.ParameterList
com.raytheon.viz.grid.xml.ParameterMapping

View file

@ -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(),

View file

@ -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;

View file

@ -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;

View file

@ -328,8 +328,8 @@ public class StationProfileDlg extends CaveSWTDialog {
* Calculate pixel and offset values.
*/
private void calculateValues() {
double totalElevInc = Math.abs(stationProfData.getElevationFtMax())
- Math.abs(stationProfData.getElevationFtMin());
double totalElevInc = stationProfData.getElevationFtMax()
- stationProfData.getElevationFtMin();
// Calculate the offset between the elevation points
double offsetDbl = totalElevInc / 5;

View file

@ -24,6 +24,27 @@
<import feature="com.raytheon.viz.radar.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
id="com.raytheon.uf.common.archive"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.auth"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.archive"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.edex.textdb"
download-size="0"
@ -38,20 +59,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.maintenance"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.edex.plugin.text"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.viz.texteditor"
download-size="0"

View file

@ -21,12 +21,12 @@ package com.raytheon.viz.ui.dialogs;
import java.text.DecimalFormat;
import javax.measure.converter.ConversionException;
import javax.measure.converter.UnitConverter;
import javax.measure.unit.Unit;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
@ -36,11 +36,9 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Scale;
import org.eclipse.swt.widgets.Text;
import com.raytheon.uf.common.colormap.image.Colormapper;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
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.viz.ui.dialogs.colordialog.ColorUtil;
import com.raytheon.uf.common.colormap.prefs.DataMappingPreferences.DataMappingEntry;
/**
* Composite for slider bars for ColorMapParameters
@ -51,7 +49,9 @@ import com.raytheon.viz.ui.dialogs.colordialog.ColorUtil;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 3, 2012 mschenke Initial creation
* Jan 3, 2012 mschenke Initial creation
* Nov 8, 2013 2492 mschenke Rewritten to work with colormap
* units different from data units
*
* </pre>
*
@ -61,8 +61,13 @@ import com.raytheon.viz.ui.dialogs.colordialog.ColorUtil;
public class ColorMapSliderComp extends Composite {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(ColorMapSliderComp.class);
private static final String NaN_STRING = "NO DATA";
private static final int SLIDER_MIN = 0;
private static final int SLIDER_MAX = 255;
private static final int SLIDER_INC = 1;
private ColorMapParameters cmap;
@ -74,25 +79,25 @@ public class ColorMapSliderComp extends Composite {
private Text maxValueText;
private String[] sliderText;
private final float cmapAbsoluteMin;
private float cmapMin;
private final float cmapAbsoluteMax;
private float cmapMax;
private final float origCmapMin;
private float cmapWidth;
private final float origCmapMax;
private float cmapIncrement;
private float currentCmapMin;
private DecimalFormat format = null;
private float currentCmapMax;
private float currentMin;
private final DecimalFormat format;
private float currentMax;
private final boolean dataInverted;
private float origCmapMin;
private UnitConverter displayToColorMap;
private float origCmapMax;
private UnitConverter colorMapToDisplay;
/**
* @param parent
@ -101,8 +106,46 @@ public class ColorMapSliderComp extends Composite {
public ColorMapSliderComp(Composite parent, ColorMapParameters cmap) {
super(parent, SWT.NONE);
this.cmap = cmap;
this.origCmapMin = cmap.getColorMapMin();
this.origCmapMax = cmap.getColorMapMax();
this.currentCmapMin = this.origCmapMin = cmap.getColorMapMin();
this.currentCmapMax = this.origCmapMax = cmap.getColorMapMax();
this.displayToColorMap = cmap.getDisplayToColorMapConverter();
this.colorMapToDisplay = cmap.getColorMapToDisplayConverter();
if (displayToColorMap == null) {
displayToColorMap = Unit.ONE.getConverterTo(Unit.ONE);
}
if (colorMapToDisplay == null) {
colorMapToDisplay = Unit.ONE.getConverterTo(Unit.ONE);
}
float cmapAbsoluteMin, cmapAbsoluteMax;
if (cmap.getDataMapping() != null) {
cmapAbsoluteMin = cmap.getColorMapMin();
cmapAbsoluteMax = cmap.getColorMapMax();
} else {
UnitConverter dataToColorMap = cmap.getDataToColorMapConverter();
cmapAbsoluteMin = cmap.getDataMin();
cmapAbsoluteMax = cmap.getDataMax();
if (dataToColorMap != null) {
cmapAbsoluteMin = (float) dataToColorMap.convert(cmap
.getDataMin());
cmapAbsoluteMax = (float) dataToColorMap.convert(cmap
.getDataMax());
}
}
this.cmapAbsoluteMin = cmapAbsoluteMin;
this.cmapAbsoluteMax = cmapAbsoluteMax;
boolean dataInverted = false;
if ((cmapAbsoluteMin > cmapAbsoluteMax && cmap.getDataMin() < cmap
.getDataMax())
|| (cmapAbsoluteMin < cmapAbsoluteMax && cmap.getDataMin() > cmap
.getDataMax())) {
dataInverted = true;
}
this.dataInverted = dataInverted;
this.format = getTextFormat();
initializeComponents();
}
@ -115,16 +158,15 @@ public class ColorMapSliderComp extends Composite {
*
*/
private void initializeComponents() {
buildColorMapData();
setLayout(new GridLayout(3, false));
Label maxLabel = new Label(this, SWT.None);
maxLabel.setText("Max:");
maxSlider = new Scale(this, SWT.HORIZONTAL);
maxSlider.setMaximum(255);
maxSlider.setMinimum(0);
maxSlider.setIncrement(1);
maxSlider.setMaximum(SLIDER_MAX);
maxSlider.setMinimum(SLIDER_MIN);
maxSlider.setIncrement(SLIDER_INC);
maxSlider.setSelection(maxSlider.getMaximum());
GridData layoutData = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
layoutData.minimumWidth = 250;
@ -142,9 +184,9 @@ public class ColorMapSliderComp extends Composite {
minLabel.setText("Min:");
minSlider = new Scale(this, SWT.HORIZONTAL);
minSlider.setMaximum(255);
minSlider.setMinimum(0);
minSlider.setIncrement(1);
minSlider.setMaximum(SLIDER_MAX);
minSlider.setMinimum(SLIDER_MIN);
minSlider.setIncrement(SLIDER_INC);
minSlider.setSelection(minSlider.getMinimum());
layoutData = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
layoutData.minimumWidth = 250;
@ -156,286 +198,186 @@ public class ColorMapSliderComp extends Composite {
minValueText.setLayoutData(labelLayoutData);
maxSlider.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (maxSlider.getSelection() <= minSlider.getSelection()) {
maxSlider.setSelection(minSlider.getSelection() + 1);
}
maxValueText.setText(selectionToText(maxSlider.getSelection()));
changeMax(maxSlider.getSelection());
setColorMapMax(selectionToColorMapValue(maxSlider
.getSelection()));
}
});
minSlider.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (minSlider.getSelection() >= maxSlider.getSelection()) {
minSlider.setSelection(maxSlider.getSelection() - 1);
}
minValueText.setText(selectionToText(minSlider.getSelection()));
changeMin(minSlider.getSelection());
setColorMapMin(selectionToColorMapValue(minSlider
.getSelection()));
}
});
maxValueText.addKeyListener(new KeyListener() {
maxValueText.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
maxTextChanged();
setColorMapMax(textToColorMapValue(maxValueText.getText()
.trim()));
}
}
@Override
public void keyReleased(KeyEvent e) {
// do nothing
}
});
minValueText.addKeyListener(new KeyListener() {
minValueText.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
minTextChanged();
setColorMapMin(textToColorMapValue(minValueText.getText()
.trim()));
}
}
@Override
public void keyReleased(KeyEvent e) {
// do nothing
}
});
// set initial values
currentMax = cmap.getColorMapMax();
currentMin = cmap.getColorMapMin();
maxSlider.setSelection(cmapToSelection(currentMax));
minSlider.setSelection(cmapToSelection(currentMin));
setMaxText();
setMinText();
setColorMapMin(currentCmapMin);
setColorMapMax(currentCmapMax);
}
private void setMaxText() {
maxValueText.setText(cmapToText(currentMax));
}
private void setMinText() {
minValueText.setText(cmapToText(currentMin));
}
private void setColorMapMax(float f) {
if (currentMax != f) {
currentMax = f;
cmap.setColorMapMax(f, true);
/**
* Converts a slider selection index to a colormap value
*
* @param selection
* @return
*/
private float selectionToColorMapValue(int selection) {
double indexValue = Colormapper.getLinearIndex(selection, SLIDER_MIN,
SLIDER_MAX);
if (dataInverted) {
indexValue = 1 - indexValue;
}
double colorMapValue = cmapAbsoluteMin
+ (cmapAbsoluteMax - cmapAbsoluteMin) * indexValue;
return (float) colorMapValue;
}
private void setColorMapMin(float f) {
if (currentMin != f) {
currentMin = f;
cmap.setColorMapMin(f, true);
/**
* Converts a colormap value to a slider selection index
*
* @param colorMapValue
* @return
*/
private int colorMapValueToSelection(float colorMapValue) {
double indexValue = Colormapper.getLinearIndex(colorMapValue,
cmapAbsoluteMin, cmapAbsoluteMax);
if (dataInverted) {
indexValue = 1 - indexValue;
}
return (int) (SLIDER_MIN + (SLIDER_MAX - SLIDER_MIN) * indexValue);
}
private void minTextChanged() {
String text = minValueText.getText().trim().split(" ")[0];
try {
float f = Float.valueOf(text);
UnitConverter unitConv = cmap.getImageToDisplayConverter();
if (unitConv != null) {
f = (float) unitConv.inverse().convert(f);
}
if (f >= currentMax) {
setMinText();
statusHandler.handle(Priority.ERROR,
"Minimum of colormap range cannot exceed the maximum.");
} else if (cmapMin >= f) {
setColorMapMin(cmapMin);
minSlider.setSelection(0);
setMinText();
} else {
setColorMapMin(f);
minSlider.setSelection(cmapToSelection(f));
}
} catch (NumberFormatException ex) {
statusHandler.handle(Priority.ERROR,
"Minimum of colormap range cannot be parsed: " + text);
setMinText();
} catch (ConversionException ex) {
statusHandler.handle(Priority.ERROR, "Unit converter error.", ex);
setMinText();
}
}
private void maxTextChanged() {
String text = maxValueText.getText().trim().split(" ")[0];
try {
float f = Float.valueOf(text);
UnitConverter unitConv = cmap.getImageToDisplayConverter();
if (unitConv != null) {
f = (float) unitConv.inverse().convert(f);
}
if (currentMin >= f) {
statusHandler
.handle(Priority.ERROR,
"Maximum of colormap range cannot be below the minimum.");
setMaxText();
} else if (f >= cmapMax) {
setColorMapMax(cmapMax);
maxSlider.setSelection(255);
setMaxText();
} else {
setColorMapMax(f);
maxSlider.setSelection(cmapToSelection(f));
}
} catch (NumberFormatException ex) {
statusHandler.handle(Priority.ERROR,
"Maximum of colormap range cannot be parsed: " + text);
setMaxText();
} catch (ConversionException ex) {
statusHandler.handle(Priority.ERROR, "Unit converter error.", ex);
setMaxText();
}
}
private void changeMax(int position) {
// slider min and max is based on the color map, so position is the new
// color map max
currentMax = selectionToCmap(position);
cmap.setColorMapMax(currentMax, true);
}
private void changeMin(int position) {
// slider min and max is based on the color map, so position is the new
// color map min
currentMin = selectionToCmap(position);
cmap.setColorMapMin(currentMin, true);
}
private String cmapToText(double value) {
UnitConverter unitConv = cmap.getImageToDisplayConverter();
String textStr = "";
if (unitConv != null) {
value = unitConv.convert(value);
if (((Double) value).isNaN()) {
textStr = "NO DATA";
/**
* Converts a text string to a colormap value
*
* @param text
* @return
*/
private float textToColorMapValue(String text) {
if (cmap.getDataMapping() != null && text.isEmpty() == false) {
// First check for data mapping entries
for (DataMappingEntry entry : cmap.getDataMapping().getEntries()) {
if (entry.getLabel() != null && text.equals(entry.getLabel())) {
return entry.getPixelValue().floatValue();
}
}
}
String txt;
if (textStr.length() == 0) {
txt = format.format(value);
if (NaN_STRING.equals(text)) {
// If special NaN String, try to find first NaN value
for (int i = SLIDER_MIN; i < SLIDER_MAX; i += SLIDER_INC) {
float colorMapValue = selectionToColorMapValue(i);
if (Double.isNaN(colorMapToDisplay.convert(colorMapValue))) {
return colorMapValue;
}
}
} else {
txt = textStr;
}
return txt;
}
private String selectionToText(int selection) {
String rval = "ERR";
if (selection > -1 && selection < sliderText.length) {
// exact match into sliderText array
rval = sliderText[selection];
} else {
statusHandler.handle(Priority.CRITICAL, "index " + selection
+ " out of range, max " + (sliderText.length - 1));
}
return rval;
}
private float selectionToCmap(int selection) {
float percentOffset = selection / 255.0f;
float value = percentOffset * cmapWidth + cmapMin;
return value;
}
private int cmapToSelection(float value) {
int selection = (int) ((value - cmapMin) * 255.0f / cmapWidth);
return selection;
}
// modified from logic in ColorBar.java
private void buildColorMapData() {
sliderText = new String[256];
cmapWidth = cmap.getDataMax() - cmap.getDataMin();
cmapIncrement = cmapWidth / ColorUtil.MAX_VALUE;
cmapMin = cmap.getDataMin();
cmapMax = cmap.getDataMax();
float start = cmap.getDataMin();
String units = "";
UnitConverter unitConv = cmap.getImageToDisplayConverter();
Double lastVal = Double.NaN;
// TODO: Handle piecewise pixel converts to show ranges (for radar)
for (int i = 0; i < sliderText.length; ++i) {
double value = start;
// handle precision errors
if (value > cmapMax) {
// if the difference is .1 the increment between steps assume
// that cmapMax is ok
if ((value - cmapMax) < (.1 * cmapIncrement)) {
value = cmapMax;
}
// Attempt to parse and convert
try {
float displayValue = Float.parseFloat(text);
return (float) displayToColorMap.convert(displayValue);
} catch (Throwable t) {
// Ignore, NaN will be returned and text will be reverted
}
}
return Float.NaN;
}
String textStr = "";
if (cmap.isLogarithmic()) {
// TODO: Handle case where min/max go from neg to pos
if (cmap.getColorMapMax() >= 0 && cmap.getColorMapMin() >= 0) {
double index = (i) / ColorUtil.MAX_VALUE;
value = Math.pow(Math.E,
(Math.log(cmap.getColorMapMin()) + (index * (Math
.log(cmap.getColorMapMax()) - Math.log(cmap
.getColorMapMin())))));
}
if (format == null) {
format = new DecimalFormat("0.000");
}
}
if (unitConv != null) {
value = unitConv.convert(value);
/*
* Check if the last value is non a number.
*/
if (lastVal.isNaN()) {
// If value is not a number then set the text to
// "NO DATA".
if (((Double) value).isNaN()) {
textStr = "NO DATA";
}
lastVal = value;
} else {
// If value is not a number then prepend ">"
// to the value.
if (((Double) value).isNaN()) {
textStr = "> " + lastVal;
} else {
lastVal = value;
/**
* Converts a colormap value into a text display string
*
* @param colorMapValue
* @return
*/
private String colorMapValueToText(float colorMapValue) {
String text = null;
if (cmap.getDataMapping() != null) {
text = cmap.getDataMapping().getLabelValueForDataValue(
colorMapValue);
}
if (text == null || text.trim().isEmpty()) {
float displayValue = (float) colorMapToDisplay
.convert(colorMapValue);
if (Float.isNaN(displayValue) == false) {
text = format.format(displayValue);
} else {
text = NaN_STRING;
int selection = colorMapValueToSelection(colorMapValue);
for (int i = selection; i >= SLIDER_MIN; i -= SLIDER_INC) {
displayValue = (float) colorMapToDisplay
.convert(selectionToColorMapValue(i));
if (Float.isNaN(displayValue) == false) {
text = "> " + format.format(displayValue);
break;
}
}
}
}
return text;
}
/**
* Sets the colormap min value, updates the text and slider
*
* @param colorMapMin
*/
private void setColorMapMin(float colorMapMin) {
if (Float.isNaN(colorMapMin) == false) {
currentCmapMin = colorMapMin;
}
minSlider.setSelection(colorMapValueToSelection(currentCmapMin));
minValueText.setText(colorMapValueToText(currentCmapMin));
cmap.setColorMapMin(currentCmapMin, true);
}
/**
* Sets the colormap max value, updates the text and slider
*
* @param colorMapMax
*/
private void setColorMapMax(float colorMapMax) {
if (Float.isNaN(colorMapMax) == false) {
currentCmapMax = colorMapMax;
}
maxSlider.setSelection(colorMapValueToSelection(currentCmapMax));
maxValueText.setText(colorMapValueToText(currentCmapMax));
cmap.setColorMapMax(currentCmapMax, true);
}
private DecimalFormat getTextFormat() {
if (cmap.isLogarithmic() == false) {
for (int i = SLIDER_MIN; i < SLIDER_MAX; ++i) {
double cmapValue = selectionToColorMapValue(i);
double displayValue = colorMapToDisplay.convert(cmapValue);
if (Double.isNaN(displayValue)) {
continue;
}
if (format == null && new Double(value).isNaN() == false) {
int zeros = 0;
String val = "" + value;
String val = "" + displayValue;
char[] vals = val.substring(val.indexOf(".") + 1).toCharArray();
for (int j = 0; j < vals.length; ++j) {
if (vals[j] == '0') {
@ -451,28 +393,10 @@ public class ColorMapSliderComp extends Composite {
for (int j = 0; j < zeros; ++j) {
f += "0";
}
format = new DecimalFormat(f);
return new DecimalFormat(f);
}
String txt;
/*
* If textStr doesn't have any text then set txt to the value in the
* value variable.
*/
if (textStr.length() == 0) {
txt = format.format(value);
} else {
txt = textStr;
}
if (units != null && units.length() != 0) {
txt += " " + units;
}
sliderText[i] = txt;
start += cmapIncrement;
}
return new DecimalFormat("0.000");
}
}

View file

@ -151,7 +151,7 @@ import com.vividsolutions.jts.geom.Polygon;
* Sep 17, 2013 DR 16496 D. Friedman Make editable state more consistent.
* Sep 24, 2013 #2401 lvenable Fixed font memory leak.
* Oct 01, 2013 DR16612 m.gamazaychikov Fixed inconsistencies with track locking and updateListSelected method
* Oct 29, 2013 DR 16734 D. Friedman If redraw-from-hatched-area fails, don't allow the pollygon the be used.
* Oct 29, 2013 DR 16734 D. Friedman If redraw-from-hatched-area fails, don't allow the polygon the be used.
* </pre>
*
* @author chammack
@ -1073,14 +1073,16 @@ public class WarngenDialog extends CaveSWTDialog implements
if ((followupData != null)
&& (WarningAction.valueOf(followupData.getAct()) == WarningAction.NEW)) {
redrawFromWarned();
if (! redrawFromWarned())
return;
}
if (((followupData == null) || ((WarningAction.valueOf(followupData
.getAct()) == WarningAction.CON) && warngenLayer
.conWarnAreaChanged(followupData)))
&& !polygonLocked && !trackLocked) {
redrawFromWarned();
if (!redrawFromWarned())
return;
}
// Need to check again because redraw may have failed.
@ -1457,14 +1459,10 @@ public class WarngenDialog extends CaveSWTDialog implements
/**
* Redraw everything based on warned area
*/
private void redrawFromWarned() {
try {
warngenLayer.redrawBoxFromHatched();
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Error redrawing box from hatched", e);
}
private boolean redrawFromWarned() {
boolean result = warngenLayer.redrawBoxFromHatched();
warngenLayer.issueRefresh();
return result;
}
/**

View file

@ -396,6 +396,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
private Polygon oldWarningPolygon;
private boolean haveInput;
public AreaHatcher(PolygonUtil polygonUtil) {
super("Hatching Warning Area");
setSystem(true);
@ -513,6 +515,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
this.warningPolygon = warningPolygon;
this.warningArea = warningArea;
this.oldWarningPolygon = oldWarningPolygon;
this.haveInput = true;
}
schedule();
}
@ -520,12 +523,15 @@ public class WarngenLayer extends AbstractStormTrackResource {
public synchronized Geometry[] getHatchedAreas() {
Polygon hatchedArea = null;
Geometry hatchedWarningArea = null;
if (getState() == Job.RUNNING) {
while (getState() != Job.NONE) {
try {
join();
} catch (InterruptedException e) {
break;
}
}
if (! this.haveInput)
return null;
hatchedArea = this.hatchedArea;
hatchedWarningArea = this.hatchedWarningArea;
return new Geometry[] { hatchedArea, hatchedWarningArea };
@ -2254,13 +2260,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
}
/**
*
* @return true if the box has been redraw successfully
*/
public void redrawBoxFromHatched() throws VizException {
public boolean redrawBoxFromHatched() {
boolean result = true;
if (state.snappedToArea == false) {
if (state.getWarningArea() == null
|| state.getWarningArea().isEmpty()) {
return;
return true;
}
try {
@ -2269,6 +2276,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
Geometry hatchedArea = state.getWarningArea();
if (areaHatcher != null) {
Geometry[] areas = areaHatcher.getHatchedAreas();
if (areas == null) {
// Somehow, the hatcher has not been run. Try it now.
warningAreaChanged();
areas = areaHatcher.getHatchedAreas();
// If still null, give up.
if (areas == null)
return false;
}
hatched = (Polygon) areas[0];
hatchedArea = areas[1];
}
@ -2302,15 +2317,18 @@ public class WarngenLayer extends AbstractStormTrackResource {
issueRefresh();
statusHandler.handle(Priority.PROBLEM,
"Could not redraw box from warned area");
result = false;
}
System.out.println("Time to createWarningPolygon: "
+ (System.currentTimeMillis() - t0) + "ms");
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
"Error hatching polygon", e);
result = false;
}
issueRefresh();
}
return result;
}
public void createDamThreatArea(Coordinate[] coordinates) {

View file

@ -56,6 +56,8 @@ import com.vividsolutions.jts.io.WKTReader;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 10, 2013 1951 rjpeter Initial history entry, updated ugcZones references
* Nov 08, 2013 16758 mgamazaychikov Added mergeWatches to simplify SPS processing
* and getEventKey to create SPS-unique key
* </pre>
*
* @author rjpeter
@ -286,4 +288,27 @@ public class CWASPSResource extends WatchesResource {
return textToPrint;
}
/**
* Groups all the ugc zones with the same 'product.act.phensig.etn'
*
* Since there are no ugc zones in SPSs return the input watch records
* without changing them.
*/
protected List<AbstractWarningRecord> mergeWatches(
List<AbstractWarningRecord> watchrecs) {
return watchrecs;
}
/**
* Create unique enough key to be used in paint method entryMap
*
* Use wmoId and countyHeader fields
**/
@Override
protected String getEventKey(WarningEntry entry) {
AbstractWarningRecord rec = entry.record;
return rec.getWmoid().replaceAll(" ", "_") + ':'
+ rec.getInsertTime().getTimeInMillis();
}
}

View file

@ -50,6 +50,8 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* May 06, 2013 1930 bsteffen Check for null in WatchesResource.
* May 10, 2013 1951 rjpeter Updated ugcZones references
* Sep 5, 2013 2176 jsanchez Disposed the emergency font.
* Nov 8, 2013 16758 mgamazaychikov Changed access modifier of mergeWatches to protected
* so a child class can override the implementation.
* </pre>
*
* @author jsanchez
@ -377,7 +379,7 @@ public class WatchesResource extends AbstractWWAResource {
/**
* Groups all the ugc zones with the same 'product.act.phensig.etn'
*/
private List<AbstractWarningRecord> mergeWatches(
protected List<AbstractWarningRecord> mergeWatches(
List<AbstractWarningRecord> watchrecs) {
Map<String, AbstractWarningRecord> watches = new HashMap<String, AbstractWarningRecord>();
for (AbstractWarningRecord watchrec : watchrecs) {

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="camel-http-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-core-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-http4-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-jetty-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-jms-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-quartz-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-spring-2.11.0.jar" sourcepath="apache-camel-2.11.0-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-core-2.11.2.jar" sourcepath="apache-camel-2.11.2-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-http-2.11.2.jar"/>
<classpathentry exported="true" kind="lib" path="camel-http4-2.11.2.jar"/>
<classpathentry exported="true" kind="lib" path="camel-jetty-2.11.2.jar"/>
<classpathentry exported="true" kind="lib" path="camel-jms-2.11.2.jar" sourcepath="apache-camel-2.11.2-src.zip"/>
<classpathentry exported="true" kind="lib" path="camel-quartz-2.11.2.jar"/>
<classpathentry exported="true" kind="lib" path="camel-spring-2.11.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>

View file

@ -2,16 +2,16 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Camel Plug-in
Bundle-SymbolicName: org.apache.camel
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 2.11.2
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
camel-core-2.11.0.jar,
camel-http4-2.11.0.jar,
camel-jetty-2.11.0.jar,
camel-jms-2.11.0.jar,
camel-quartz-2.11.0.jar,
camel-spring-2.11.0.jar,
camel-http-2.11.0.jar
camel-core-2.11.2.jar,
camel-http-2.11.2.jar,
camel-http4-2.11.2.jar,
camel-jetty-2.11.2.jar,
camel-jms-2.11.2.jar,
camel-quartz-2.11.2.jar,
camel-spring-2.11.2.jar
Require-Bundle: org.springframework;bundle-version="3.1.4",
org.apache.commons.management;bundle-version="1.0.0"
Export-Package: org.apache.camel,

View file

@ -1,9 +1,9 @@
bin.includes = META-INF/,\
.,\
camel-core-2.11.0.jar,\
camel-http4-2.11.0.jar,\
camel-jetty-2.11.0.jar,\
camel-jms-2.11.0.jar,\
camel-quartz-2.11.0.jar,\
camel-spring-2.11.0.jar,\
camel-http-2.11.0.jar
camel-core-2.11.2.jar,\
camel-http-2.11.2.jar,\
camel-http4-2.11.2.jar,\
camel-jetty-2.11.2.jar,\
camel-jms-2.11.2.jar,\
camel-quartz-2.11.2.jar,\
camel-spring-2.11.2.jar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -50,6 +50,10 @@
<param name="feature"
value="com.raytheon.uf.edex.grib.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.archive.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.text.feature" />
@ -110,10 +114,6 @@
<param name="feature"
value="com.raytheon.uf.edex.dataprovideragent.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.archive.feature" />
</antcall>
<!-- SPECIAL CASE -->
<if>

View file

@ -166,7 +166,7 @@
</appender>
<appender name="ThreadBasedLog" class="com.raytheon.uf.common.status.logback.ThreadBasedAppender">
<threadPatterns>RadarLog:radarThreadPool.*;SatelliteLog:satelliteThreadPool.*;ShefLog:shefThreadPool.*;TextLog:textThreadPool.*;SmartInitLog:smartInit.*</threadPatterns>
<threadPatterns>RadarLog:radarThreadPool.*;SatelliteLog:satelliteThreadPool.*;ShefLog:shefThreadPool.*;TextLog:textThreadPool.*;SmartInitLog:smartInit.*;PurgeLog:Purge.*;ArchiveLog:Archive.*</threadPatterns>
<defaultAppender>asyncConsole</defaultAppender>
<appender-ref ref="asyncConsole"/>
<appender-ref ref="RadarLog"/>
@ -174,6 +174,8 @@
<appender-ref ref="ShefLog"/>
<appender-ref ref="SmartInitLog"/>
<appender-ref ref="TextLog"/>
<appender-ref ref="PurgeLog"/>
<appender-ref ref="ArchiveLog"/>
</appender>
<appender name="PerformanceLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
@ -273,11 +275,6 @@
<appender-ref ref="PurgeLog"/>
</logger>
<logger name="com.raytheon.uf.edex.maintenance.archive" additivity="false">
<level value="INFO"/>
<appender-ref ref="ArchiveLog"/>
</logger>
<logger name="RouteFailedLog" additivity="false">
<level value="WARN"/>
<appender-ref ref="RouteFailedLog"/>

View file

@ -183,25 +183,14 @@
<bean id="errorHandler" class="org.apache.camel.builder.LoggingErrorHandlerBuilder"/>
<!-- sets default settings of log component across all of edex -->
<bean id="defaultEdexLogFormatter" class="org.apache.camel.component.log.LogFormatter">
<!-- if log component beans are created and the exchangeFormatter property is set, they can't process URI parameters -->
<!-- this bean needs to be named 'logFormatter' for the log component to find it in the context -->
<bean id="logFormatter" class="org.apache.camel.component.log.LogFormatter" scope="prototype">
<property name="maxChars" value="0" />
<property name="showBody" value="false" />
<property name="showCaughtException" value="true" />
<property name="showStackTrace" value="true" />
</bean>
<bean id="log" class="org.apache.camel.component.log.LogComponent">
<property name="exchangeFormatter" ref="defaultEdexLogFormatter" />
</bean>
<!-- for those special times when you really want to see the content of the message -->
<bean id="showBodyLogFormatter" class="org.apache.camel.component.log.LogFormatter">
<property name="maxChars" value="0" />
<property name="showCaughtException" value="true" />
<property name="showStackTrace" value="true" />
</bean>
<bean id="log-showbody" class="org.apache.camel.component.log.LogComponent">
<property name="exchangeFormatter" ref="showBodyLogFormatter" />
</bean>
<bean id="serializationUtil" class="com.raytheon.uf.common.serialization.SerializationUtil" />

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* 14Nov2008 1709 MW Fegan Initial creation.
* 14Apr2011 5163 cjeanbap NWRWAVES Setting AFOS text triggers in AWIPS II
* 04/24/13 1949 rjpeter Removed @Override on delete.
* Nov 08, 2013 2361 njensen Chaged method signature of saveOrUpdate(Object)
* </pre>
*
* @author mfegan
@ -127,9 +128,10 @@ public class SubscriptionDAO extends CoreDao {
}
@Override
public void saveOrUpdate(PersistableDataObject obj) {
public void saveOrUpdate(Object obj) {
super.saveOrUpdate(obj);
sendSubscriptionNotifyMessage(String.valueOf(obj.getIdentifier()));
sendSubscriptionNotifyMessage(String
.valueOf(((PersistableDataObject) obj).getIdentifier()));
}
@Override

View file

@ -68,6 +68,10 @@
id="com.raytheon.uf.edex.grib.feature"
version="0.0.0"/>
<includes
id="com.raytheon.uf.edex.archive.feature"
version="0.0.0"/>
<includes
id="com.raytheon.uf.edex.text.feature"
version="0.0.0"/>
@ -132,8 +136,4 @@
id="com.raytheon.uf.edex.dataprovideragent.feature"
version="0.0.0"/>
<includes
id="com.raytheon.uf.edex.archive.feature"
version="0.0.0"/>
</feature>

View file

@ -329,8 +329,8 @@ public class GFESiteActivation implements ISiteActivationListener {
e);
}
} else {
statusHandler.handle(Priority.EVENTA,
"ISC Enabled but will use another EDEX instance");
statusHandler
.info("ISC Enabled but will use another EDEX instance");
}
} else {
@ -340,7 +340,7 @@ public class GFESiteActivation implements ISiteActivationListener {
// doesn't need to be cluster locked
final IFPServerConfig configRef = config;
if (config.tableFetchTime() > 0 && isIscActivated) {
if ((config.tableFetchTime() > 0) && isIscActivated) {
Runnable activateFetchAT = new Runnable() {
@Override

View file

@ -65,7 +65,6 @@ import com.raytheon.uf.common.util.FileUtil;
* Sep 05, 2013 2307 dgilling Use better PythonScript constructor.
* Oct 16, 2013 2475 dgilling Move logic previously in IrtServer.py
* into this class to avoid Jep memory leak.
*
* </pre>
*
* @author bphillip
@ -205,6 +204,7 @@ public class GfeIRT extends Thread {
@Override
public void run() {
try {
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext cx = pathMgr.getContext(

View file

@ -176,13 +176,11 @@ def encodeGridSlice(grid, gridType, clipArea, cube, idx, keyList):
cube[0][idx] = clipToExtrema(vecGrids[0], clipArea)
cube[1][idx] = clipToExtrema(vecGrids[1], clipArea)
elif gridType == "WEATHER" or gridType == "DISCRETE":
if gridType == "DISCRETE":
keys = grid.getKeys()
keys = grid.getKeys()
gridKeys = []
for theKey in keys:
gridKeys.append(theKey.toString())
keyList.append(gridKeys)
cube[idx]= clipToExtrema(grid.__numpy__[0], clipArea)

View file

@ -87,7 +87,7 @@ from com.raytheon.uf.edex.database.cluster import ClusterTask
#
BATCH_WRITE_COUNT = 10
BATCH_WRITE_COUNT = 20
BATCH_DELAY = 0.0
ISC_USER="isc"
@ -113,15 +113,20 @@ class WECache(object):
for i in tokill:
del pyInv[i]
javaTRs = ArrayList()
for tr in pyInv:
javaTRs.add(iscUtil.toJavaTimeRange(tr))
gridsAndHist = self._we.get(javaTRs, True)
for idx, tr in enumerate(pyInv):
pair = gridsAndHist.get(idx)
g = self.__encodeGridSlice(pair.getFirst())
h = self.__encodeGridHistory(pair.getSecond())
self._inv[tr] = (g, h)
lst = list(pyInv)
while len(lst):
i = lst[:BATCH_WRITE_COUNT]
javaTRs = ArrayList()
for tr in i:
javaTRs.add(iscUtil.toJavaTimeRange(tr))
gridsAndHist = self._we.get(javaTRs, True)
for idx, tr in enumerate(i):
pair = gridsAndHist.get(idx)
g = self.__encodeGridSlice(pair.getFirst())
h = self.__encodeGridHistory(pair.getSecond())
self._inv[tr] = (g, h)
lst = lst[BATCH_WRITE_COUNT:]
time.sleep(BATCH_DELAY)
def keys(self):
if not self._invCache:

View file

@ -79,6 +79,7 @@ import com.raytheon.uf.common.time.DataTime;
public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
private static final String BAD_PROPERTY_FMT = "NumberFormatException setting property %s.%s(%s %s)";
private String traceId = null;
public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss");

View file

@ -2,16 +2,22 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modelsounding Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding
Bundle-Version: 1.12.1174.qualifier
Bundle-Version: 1.13.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON
com.google.guava;bundle-version="1.0.0"
Export-Package: com.raytheon.edex.plugin.modelsounding,
com.raytheon.edex.plugin.modelsounding.common,
com.raytheon.edex.plugin.modelsounding.dao,
com.raytheon.edex.plugin.modelsounding.decoder
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.google.guava;bundle-version="1.0.0",
javax.measure,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataaccess,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status;bundle-version="1.12.1174",
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
@ -24,8 +30,7 @@ Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.raytheon.uf.edex.decodertools;bundle-version="1.12.1174",
javax.persistence;bundle-version="1.0.0",
org.hibernate;bundle-version="1.0.0",
org.springframework;bundle-version="3.1.4",
com.google.guava;bundle-version="1.0.0"
org.springframework;bundle-version="3.1.4"
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.exception,
com.raytheon.edex.plugin,

View file

@ -0,0 +1,29 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="mdlsndDataAccessFactory" class="com.raytheon.edex.plugin.modelsounding.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="modelsounding"/>
<constructor-arg ref="mdlsndDataAccessFactory"/>
</bean>
<bean factory-bean="mdlsndDataAccessFactory" factory-method="register2D">
<constructor-arg value="numProfLvls"/>
<constructor-arg value="pressure"/>
<constructor-arg value="MB"/>
<constructor-arg>
<list>
<value>pressure</value>
<value>temperature</value>
<value>specHum</value>
<value>omega</value>
<value>uComp</value>
<value>vComp</value>
<value>cldCvr</value>
</list>
</constructor-arg>
</bean>
</beans>

View file

@ -0,0 +1,484 @@
/**
* 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.
**/
package com.raytheon.edex.plugin.modelsounding.dataaccess;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.measure.unit.Unit;
import javax.measure.unit.UnitFormat;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataaccess.DataAccessLayer;
import com.raytheon.uf.common.dataaccess.IDataRequest;
import com.raytheon.uf.common.dataaccess.exception.DataRetrievalException;
import com.raytheon.uf.common.dataaccess.exception.UnsupportedOutputTypeException;
import com.raytheon.uf.common.dataaccess.geom.IGeometryData;
import com.raytheon.uf.common.dataaccess.geom.IGeometryData.Type;
import com.raytheon.uf.common.dataaccess.grid.IGridData;
import com.raytheon.uf.common.dataaccess.impl.AbstractDataPluginFactory;
import com.raytheon.uf.common.dataaccess.impl.DefaultGeometryData;
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.MasterLevel;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.pointdata.PointDataConstants;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.pointdata.PointDataServerRequest;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.TimeRange;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
/**
* Data Access Factory for retrieving point data as a geometry.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Oct 31, 2013 2502 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class PointDataAccessFactory extends AbstractDataPluginFactory {
// TODO this should be in PointDataServerRequest
private static final String REQUEST_PARAMETERS_KEY = "requestedParameters";
// TODO this should be in PointDataServerRequest
private static final String REQUEST_MODE_KEY = "mode";
// TODO this should be in PointDataServerRequest
private static final String REQUEST_MODE_2D = "select2d";
private static class TwoDimensionalParameterGroup {
public final String countParameter;
public final String levelParameter;
public final String levelType;
public final String[] parameters;
public TwoDimensionalParameterGroup(String countParameter,
String levelParameter, String levelType, String[] parameters) {
super();
this.countParameter = countParameter;
this.levelParameter = levelParameter;
this.levelType = levelType;
this.parameters = parameters;
}
}
private String locationDatabaseKey = "location.stationId";
private String locationPointDataKey = PointDataConstants.DATASET_STATIONID;
private String latitudePointDataKey = "latitude";
private String longitudePointDataKey = "longitude";
private String refTimePointDataKey = PointDataConstants.DATASET_REFTIME;
private String fcstHrPointDataKey = PointDataConstants.DATASET_FORECASTHR;
private Map<String, TwoDimensionalParameterGroup> parameters2D = new HashMap<String, TwoDimensionalParameterGroup>();
@Override
public String[] getAvailableLocationNames(IDataRequest request) {
return getAvailableLocationNames(request, locationDatabaseKey);
}
@Override
public IGeometryData[] getGeometryData(IDataRequest request,
DataTime... times) {
/*
* Point data uses PointDataServerRequest instead of the DbQueryRequest
* that is used in AbstractDataPluginFactory. Override this method so
* the DbQueryRequest can be converted to a PointDataServerRequest
*/
validateRequest(request);
DbQueryRequest dbQueryRequest = this
.buildDbQueryRequest(request, times);
return getGeometryData(request, dbQueryRequest);
}
@Override
public IGeometryData[] getGeometryData(IDataRequest request,
TimeRange timeRange) {
/*
* Point data uses PointDataServerRequest instead of the DbQueryRequest
* that is used in AbstractDataPluginFactory. Override this method so
* the DbQueryRequest can be converted to a PointDataServerRequest
*/
validateRequest(request);
DbQueryRequest dbQueryRequest = this.buildDbQueryRequest(request,
timeRange);
return getGeometryData(request, dbQueryRequest);
}
@Override
protected IGeometryData[] getGeometryData(IDataRequest request,
DbQueryResponse dbQueryResponse) {
/*
* Since the public getGeometryData methods have been overriden, this is
* now unreachable code, but since it is an abstract method in the super
* class it must be implemented.
*/
throw new UnsupportedOperationException(
"This method should be unreachable");
}
@Override
protected IGridData[] getGridData(IDataRequest request,
DbQueryResponse dbQueryResponse) {
/*
* Point data cannot be gridded, so don't even try.
*/
throw new UnsupportedOutputTypeException(request.getDatatype(), "grid");
}
@Override
protected Map<String, RequestConstraint> buildConstraintsFromRequest(
IDataRequest request) {
Map<String, RequestConstraint> rcMap = new HashMap<String, RequestConstraint>();
String[] locations = request.getLocationNames();
if (locations != null && locations.length != 0) {
RequestConstraint rc = new RequestConstraint();
rc.setConstraintType(ConstraintType.IN);
rc.setConstraintValueList(locations);
rcMap.put(locationDatabaseKey, rc);
}
Map<String, Object> identifiers = request.getIdentifiers();
if (identifiers != null) {
for (Entry<String, Object> entry : identifiers.entrySet()) {
rcMap.put(entry.getKey(), new RequestConstraint(entry
.getValue().toString()));
}
}
return rcMap;
}
/**
*
* Request point data from the server and convert to {@link IGeometryData}
*
* @param request
* the original request from the {@link DataAccessLayer}
* @param dbQueryRequest
* the request generated by {@link AbstractDataPluginFactory},
* this will be converted into a {@link PointDataServerRequest}.
* @return {@link IGeometryData}
*/
protected IGeometryData[] getGeometryData(IDataRequest request,
DbQueryRequest dbQueryRequest) {
PointDataServerRequest serverRequest = convertRequest(request,
dbQueryRequest);
PointDataContainer pdc = null;
try {
pdc = (PointDataContainer) RequestRouter.route(serverRequest);
} catch (Exception e) {
throw new DataRetrievalException(
"Unable to complete the PointDataRequestMessage for request: "
+ request, e);
}
LevelFactory lf = LevelFactory.getInstance();
/* Convert the point data container into a list of IGeometryData */
List<IGeometryData> result = new ArrayList<IGeometryData>(
pdc.getAllocatedSz());
for (int i = 0; i < pdc.getCurrentSz(); i += 1) {
PointDataView pdv = pdc.readRandom(i);
DefaultGeometryData data = createNewGeometryData(pdv);
try {
data.setLevel(lf.getLevel(LevelFactory.UNKNOWN_LEVEL, 0.0));
} catch (CommunicationException e) {
throw new DataRetrievalException(
"Unable to retrieve level data for request: " + request,
e);
}
Set<TwoDimensionalParameterGroup> parameters2D = new HashSet<TwoDimensionalParameterGroup>();
for (String parameter : request.getParameters()) {
if (pdc.getParameters().contains(parameter)) {
int dim = pdc.getDimensions(parameter);
if (dim == 1) {
Unit<?> unit = pdv.getUnit(parameter);
PointDataDescription.Type type = pdv.getType(parameter);
if (type == PointDataDescription.Type.STRING) {
data.addData(parameter, pdv.getString(parameter),
Type.STRING, unit);
} else {
data.addData(parameter, pdv.getNumber(parameter),
unit);
}
} else if (this.parameters2D.containsKey(parameter)) {
parameters2D.add(this.parameters2D.get(parameter));
} else {
throw new DataRetrievalException(
"PointDataAccessFactory cannot handle " + dim
+ "D parameters: " + parameter);
}
}
}
for (TwoDimensionalParameterGroup p2d : parameters2D) {
result.addAll(make2DData(request, p2d, pdv));
}
if (!data.getParameters().isEmpty()) {
result.add(data);
}
}
return result.toArray(new IGeometryData[0]);
}
/**
* Pull the constraints ouf of a {@link DbQueryRequest} and combine the
* information with an {@link IDataRequest} to build a
* {@link PointDataServerRequest}. This is done because
* {@link AbstractDataPluginFactory} makes really nice DbQueryRequests but
* we can't use them for point data.
*
* @param request
* @param dbQueryRequest
* @return
*/
private PointDataServerRequest convertRequest(IDataRequest request,
DbQueryRequest dbQueryRequest) {
Map<String, RequestConstraint> constraints = dbQueryRequest
.getConstraints();
constraints.put(REQUEST_MODE_KEY,
new RequestConstraint(REQUEST_MODE_2D));
/*
* Figure out what parameters we actually need.
*/
Set<String> parameters = new HashSet<String>();
Set<TwoDimensionalParameterGroup> parameters2D = new HashSet<TwoDimensionalParameterGroup>();
for (String parameter : request.getParameters()) {
/*
* Make sure that any 2D parameters also have the count parameter
* requested.
*/
TwoDimensionalParameterGroup p2d = this.parameters2D.get(parameter);
if (p2d != null) {
parameters.add(p2d.countParameter);
parameters.add(p2d.levelParameter);
parameters2D.add(p2d);
}
parameters.add(parameter);
}
/* Always request location parameters */
parameters.add(locationPointDataKey);
parameters.add(latitudePointDataKey);
parameters.add(longitudePointDataKey);
parameters.add(refTimePointDataKey);
if (fcstHrPointDataKey != null) {
parameters.add(fcstHrPointDataKey);
}
RequestConstraint rc = new RequestConstraint();
rc.setConstraintType(ConstraintType.IN);
rc.setConstraintValueList(parameters.toArray(new String[0]));
constraints.put(REQUEST_PARAMETERS_KEY, rc);
return new PointDataServerRequest(constraints);
}
/**
* Pull out location and time data from a {@link PointDataView} to build a
* {@link DefaultGeometryData}.
*
* @param pdv
* view for a single record
* @return {@link DefaultGeometryData} with locationName, time, and geometry
* set.
*/
private DefaultGeometryData createNewGeometryData(PointDataView pdv) {
DefaultGeometryData data = new DefaultGeometryData();
data.setLocationName(pdv.getString(locationPointDataKey));
long refTime = pdv.getNumber(refTimePointDataKey).longValue();
if (fcstHrPointDataKey != null) {
int fcstTime = pdv.getNumber(fcstHrPointDataKey).intValue();
data.setDataTime(new DataTime(new Date(refTime), fcstTime));
} else {
data.setDataTime(new DataTime(new Date(refTime)));
}
Coordinate c = new Coordinate(pdv.getFloat(longitudePointDataKey),
pdv.getFloat(latitudePointDataKey));
data.setGeometry(new GeometryFactory().createPoint(c));
// TODO python will break if attributes is null
data.setAttributes(new HashMap<String, Object>(0));
return data;
}
/**
* Make a {@link IGeometryData} object for each level in a 2 dimensional
* data set.
*
* @param request
* the original request
* @param p2d
* The 2d Parameter group
* @param pdv
* pdv contining data.
* @return One IGeometryData for each valid level in the 2d group.
*/
private List<IGeometryData> make2DData(IDataRequest request,
TwoDimensionalParameterGroup p2d, PointDataView pdv) {
List<String> requestParameters = Arrays.asList(request.getParameters());
LevelFactory lf = LevelFactory.getInstance();
int count = pdv.getInt(p2d.countParameter);
List<IGeometryData> result = new ArrayList<IGeometryData>(count);
for (int j = 0; j < count; j += 1) {
/* Clone the data, not level or parameters though */
DefaultGeometryData leveldata = createNewGeometryData(pdv);
double levelValue = pdv.getNumberAllLevels(p2d.levelParameter)[j]
.doubleValue();
String levelUnit = UnitFormat.getUCUMInstance().format(
pdv.getUnit(p2d.levelParameter));
try {
leveldata.setLevel(lf.getLevel(p2d.levelType, levelValue,
levelUnit));
} catch (CommunicationException e) {
throw new DataRetrievalException(
"Unable to retrieve level data for request: " + request,
e);
}
for (String parameter : p2d.parameters) {
if (requestParameters.contains(parameter)) {
Unit<?> unit = pdv.getUnit(parameter);
PointDataDescription.Type type = pdv.getType(parameter);
if (type == PointDataDescription.Type.STRING) {
leveldata.addData(parameter,
pdv.getStringAllLevels(parameter)[j],
Type.STRING, unit);
} else {
leveldata.addData(parameter,
pdv.getNumberAllLevels(parameter)[j], unit);
}
}
}
result.add(leveldata);
}
return result;
}
/**
* Point data types with 2 dimensions need to register so the 2d parameters
* can be grouped appropriately
*
* @param countParameter
* parameter name of an integer parameter identifying the number
* of valid levels.
* @param levelParameter
* parameter which should be used to build the level object in
* IGeometryData, for example "pressure"
* @param levelType
* {@link MasterLevel} name for the levelParameter, for example
* "MB"
* @param parameters
* all the parameters that are valid on the same 2D levels.
* @return countParameter is returned so spring can have a bean.
*/
public String register2D(String countParameter, String levelParameter,
String levelType, String[] parameters) {
TwoDimensionalParameterGroup td = new TwoDimensionalParameterGroup(
countParameter, levelParameter, levelType, parameters);
for (String parameter : parameters) {
parameters2D.put(parameter, td);
}
return countParameter;
}
/**
* @param locationDatabaseKey
* The hibernate field name of the field that is used to identify
* location names. Default values is "location.stationId"
*/
public void setLocationDatabaseKey(String locationDatabaseKey) {
this.locationDatabaseKey = locationDatabaseKey;
}
/**
* @param locationPointDataKey
* The point data key that matches the location database key.
* Defaults to "stationId"
*/
public void setLocationPointDataKey(String locationPointDataKey) {
this.locationPointDataKey = locationPointDataKey;
}
/**
* @param latitudePointDataKey
* The point data key of the station latitude. Default value is
* "latitude"
*/
public void setLatitudePointDataKey(String latitudePointDataKey) {
this.latitudePointDataKey = latitudePointDataKey;
}
/**
* @param longitudePointDataKey
* The point data key of the station longitude. Default value is
* "longitude"
*/
public void setLongitudePointDataKey(String longitudePointDataKey) {
this.longitudePointDataKey = longitudePointDataKey;
}
/**
* @param refTimePointDataKey
* The point data key of the reference time. Default value is
* "refTime"
*/
public void setRefTimePointDataKey(String refTimePointDataKey) {
this.refTimePointDataKey = refTimePointDataKey;
}
/**
* @param fcstHrPointDataKey
* The point data key of the forecast hour. Default value is
* "forecastHr". For live data with no forecast times this can be
* set to null so that it is not retrieved.
*/
public void setFcstHrPointDataKey(String fcstHrPointDataKey) {
this.fcstHrPointDataKey = fcstHrPointDataKey;
}
}

View file

@ -12,12 +12,12 @@ Require-Bundle: com.raytheon.edex.textdb,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
com.raytheon.uf.common.status;bundle-version="1.11.17",
com.raytheon.uf.common.site;bundle-version="1.12.1174"
com.raytheon.uf.common.site;bundle-version="1.12.1174",
com.raytheon.uf.edex.archive
Export-Package: com.raytheon.edex.plugin.text,
com.raytheon.edex.plugin.text.dao
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.dataplugin.text,
com.raytheon.uf.common.dataplugin.text.db,
com.raytheon.uf.common.dataplugin.text.request,
com.raytheon.uf.edex.maintenance.archive,
org.apache.commons.logging

View file

@ -34,12 +34,12 @@ import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.dataplugin.text.db.StdTextProduct;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.archive.IPluginArchiveFileNameFormatter;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
import com.raytheon.uf.edex.maintenance.archive.IPluginArchiveFileNameFormatter;
/**
* TODO Add Description
* Properly stores StdTextProducts by time.
*
* <pre>
*
@ -48,7 +48,7 @@ import com.raytheon.uf.edex.maintenance.archive.IPluginArchiveFileNameFormatter;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 20, 2012 dgilling Initial creation
*
* Nov 05, 2013 2499 rjpeter Moved IPluginArchiveFileNameFormatter.
* </pre>
*
* @author dgilling
@ -70,6 +70,7 @@ public class TextArchiveFileNameFormatter implements
* com.raytheon.uf.edex.database.plugin.PluginDao, java.util.Map,
* java.util.Calendar, java.util.Calendar)
*/
@SuppressWarnings("rawtypes")
@Override
public Map<String, List<PersistableDataObject>> getPdosByFile(
String pluginName, PluginDao dao,

View file

@ -76,7 +76,7 @@
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log-showbody:warning?level=ERROR" />
<to uri="log:warning?level=ERROR&amp;showBody=true" />
</doCatch>
</doTry>
</route>

View file

@ -188,7 +188,7 @@ public class ArchiveConfigManager {
public Collection<ArchiveConfig> getArchives() {
String fileName = ArchiveConstants.selectFileName(Type.Retention, null);
SelectConfig selections = loadSelection(fileName);
if (selections != null && !selections.isEmpty()) {
if ((selections != null) && !selections.isEmpty()) {
try {
for (ArchiveSelect archiveSelect : selections.getArchiveList()) {
ArchiveConfig archiveConfig = archiveMap.get(archiveSelect
@ -407,7 +407,8 @@ public class ArchiveConfigManager {
private Calendar calculateExpiration(ArchiveConfig archive,
CategoryConfig category) {
Calendar expireCal = TimeUtil.newGmtCalendar();
int retHours = category == null || category.getRetentionHours() == 0 ? archive
int retHours = (category == null)
|| (category.getRetentionHours() == 0) ? archive
.getRetentionHours() : category.getRetentionHours();
if (retHours != 0) {
expireCal.add(Calendar.HOUR, (-1) * retHours);
@ -453,7 +454,7 @@ public class ArchiveConfigManager {
for (LocalizationFile lFile : files) {
try {
ArchiveConfig archiveConfig = unmarshalArhiveConfigFromXmlFile(lFile);
if (archiveConfig != null && archiveConfig.isValid()) {
if ((archiveConfig != null) && archiveConfig.isValid()) {
archiveNameToLocalizationFileMap.put(
archiveConfig.getName(), lFile);
archiveMap.put(archiveConfig.getName(), archiveConfig);

View file

@ -391,7 +391,7 @@
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="ch.qos.logback"
download-size="0"

View file

@ -0,0 +1,103 @@
/**
* 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.
**/
package com.raytheon.uf.common.colormap;
/**
* Converter that can do simple log scaling given a start/end range on either
* side of zero.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 7, 2013 2492 mschenke Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public class LogConverter {
private static double EFFECTIVE_ZERO = Double.MIN_VALUE;
public static double valueToIndex(double value, double rangeMin,
double rangeMax) {
// Account for 0 min index
if (rangeMin == 0) {
rangeMin = EFFECTIVE_ZERO;
if (rangeMax < 0) {
rangeMin = -rangeMin;
}
}
boolean reverse = false;
if ((value < rangeMin && rangeMin > 0)
|| (value > rangeMin && rangeMin < 0)) {
reverse = true;
}
value = Math.abs(value);
rangeMin = Math.abs(rangeMin);
rangeMax = Math.abs(rangeMax);
// Check uncomputable index value, everything between this range is 0,
// rangeMin->rangeMax 0 -> 1, -rangeMin->-rangeMax 0 -> -1
if (value <= rangeMin && value >= -rangeMin) {
return 0;
}
double index = (Math.log(value) - Math.log(rangeMin))
/ (Math.log(rangeMax) - Math.log(rangeMin));
if (reverse) {
index = -index;
}
return index;
}
public static double indexToValue(double index, double rangeMin,
double rangeMax) {
// Account for 0 min index
if (rangeMin == 0) {
rangeMin = EFFECTIVE_ZERO;
if (rangeMax < 0) {
rangeMin = -rangeMin;
}
}
boolean reverse = index < 0;
index = Math.abs(index);
rangeMin = Math.abs(rangeMin);
rangeMax = Math.abs(rangeMax);
double value = Math.exp(Math.log(rangeMin)
+ (index * (Math.log(rangeMax) - Math.log(rangeMin))));
if (reverse) {
value = -value;
}
return value;
}
}

View file

@ -40,6 +40,7 @@ import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.Color;
import com.raytheon.uf.common.colormap.IColorMap;
import com.raytheon.uf.common.colormap.LogConverter;
import com.raytheon.uf.common.colormap.image.ColorMapData.ColorMapDataType;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
@ -158,27 +159,6 @@ public class Colormapper {
blue, alpha);
}
/**
* Sets an index value into the indexArray for use in a Raster with
* IndexColorModel set
*
* @param dataArray
* @param idx
* @param idxValue
*/
public static void setIndexValue(Object dataArray, int idx, int idxValue) {
if (dataArray instanceof byte[]) {
((byte[]) dataArray)[idx] = (byte) idxValue;
} else if (dataArray instanceof short[]) {
((short[]) dataArray)[idx] = (short) idxValue;
} else if (dataArray instanceof int[]) {
((int[]) dataArray)[idx] = idxValue;
} else {
throw new IllegalArgumentException("Unsupported dataArray type: "
+ (dataArray != null ? dataArray.getClass() : null));
}
}
/**
* Returns the double representation of the data value for the Buffer at the
* given index
@ -250,64 +230,70 @@ public class Colormapper {
*/
public static double getLogIndex(double cmapValue, double cmapMin,
double cmapMax, boolean mirror) {
boolean inverted = false;
double rangeMin = Math.abs(cmapMin);
double rangeMax = Math.abs(cmapMax);
double rangeValue = Math.abs(cmapValue);
if (rangeMin > rangeMax) {
// Inverted colormapping range (cmapMax is closest to 0)
inverted = true;
double tmp = rangeMin;
rangeMin = rangeMax;
rangeMax = tmp;
}
double index = 0.0;
// is this strictly negative, strictly positive or neg to pos scaling?
if (cmapMin >= 0.0 && cmapMax >= 0.0 && !mirror) {
if (cmapValue < cmapMin) {
index = 0.0;
} else {
// simple calculation
index = ((Math.log(cmapValue) - Math.log(cmapMin)) / Math
.abs(Math.log(cmapMax) - Math.log(cmapMin)));
// Flag if min/max values are on opposite sides of zero
boolean minMaxOpposite = (cmapMin < 0 && cmapMax > 0)
|| (cmapMin > 0 && cmapMax < 0);
if (mirror || minMaxOpposite) {
if (cmapMax < 0) {
// Invert colormapping if negative range was given
cmapValue = -cmapValue;
}
} else if (cmapMin <= 0.0 && cmapMax <= 0.0 && !mirror) {
index = ((Math.log(cmapValue) - Math.log(cmapMax)) / Math.abs(Math
.log(cmapMin) - Math.log(cmapMax)));
} else {
// special case, neg to pos:
double colorMapMin = cmapMin;
double colorMapMax = cmapMax;
double zeroVal = Math.max(colorMapMax, Math.abs(colorMapMin)) * 0.0001;
if (mirror && (colorMapMin > 0.0 || colorMapMax < 0.0)) {
if (colorMapMax < 0.0) {
colorMapMax = -cmapMax;
cmapValue = -cmapValue;
zeroVal = -colorMapMin;
} else {
zeroVal = cmapMin;
}
colorMapMin = -cmapMax;
// Log scaling is happening on both sides of zero, need to compute
// our zero index value
double zeroVal = rangeMin;
if (minMaxOpposite) {
// Min/Max are on opposite sides of zero, compute a zero value
zeroVal = Math.max(rangeMin, rangeMax) * 0.0001;
}
double leftZero = 0.0;
double rightZero = 0.0;
double negCmapMax = rangeMin;
double posCmapMax = rangeMax;
if (mirror) {
negCmapMax = posCmapMax = rangeMax;
}
// Compute log zero val and log neg/pos max vals
double absLogZeroVal = Math.abs(Math.log(zeroVal));
rightZero = absLogZeroVal + Math.log(colorMapMax);
double cmapMax2 = Math.abs(colorMapMin);
leftZero = absLogZeroVal + Math.log(cmapMax2);
double zeroIndex = leftZero / (leftZero + rightZero);
// figure out index for texture val
double absTextureColor = Math.abs(cmapValue);
if (absTextureColor <= zeroVal) {
index = zeroIndex;
} else if (cmapValue > 0.0) {
// positive texture color value, find index from 0 to
// cmapMax:
double logTexColor = absLogZeroVal + Math.log(cmapValue);
double texIndex = logTexColor / rightZero;
index = (zeroIndex + ((1.0 - zeroIndex) * texIndex));
double logNegCmapMax = absLogZeroVal + Math.log(negCmapMax);
double logPosCmapMax = absLogZeroVal + Math.log(posCmapMax);
// Calculate index which zeroVal is at based on neg max and pos max
double zeroValIndex = logNegCmapMax
/ (logNegCmapMax + logPosCmapMax);
if (cmapValue > 0) {
index = LogConverter.valueToIndex(rangeValue, zeroVal,
posCmapMax);
index = zeroValIndex + (1 - zeroValIndex) * index;
} else {
// negative texture color value, find index from 0 to
// cmapMax:
double logTexColor = absLogZeroVal + Math.log(absTextureColor);
double texIndex = logTexColor / leftZero;
index = (zeroIndex - (zeroIndex * texIndex));
index = LogConverter.valueToIndex(rangeValue, zeroVal,
negCmapMax);
index = zeroValIndex - zeroValIndex * index;
}
if (inverted) {
index = 1.0 - index;
}
} else {
// Simple case, just use log converter to get index
index = LogConverter.valueToIndex(rangeValue, rangeMin, rangeMax);
if (inverted) {
index = 1.0 - index;
}
if (cmapMin > 0 && cmapValue < rangeMin
|| (cmapMin < 0 && cmapValue > -rangeMin)) {
index = -index;
}
}
return index;

View file

@ -133,6 +133,7 @@ public class ColorMapParameters {
protected Unit<?> colorMapUnit;
/** Units of the data values to colormap */
@Deprecated
protected Unit<?> dataUnit;
/** The maximum value used to apply the colormap */
@ -142,9 +143,11 @@ public class ColorMapParameters {
protected float colorMapMin;
/** The maximum (usually theoretical) value of the data */
@Deprecated
protected float dataMax;
/** The minimum (usually theoretical) value of the data */
@Deprecated
protected float dataMin;
/** The intervals upon which to apply labeling to the color bar */
@ -162,15 +165,19 @@ public class ColorMapParameters {
protected String colorMapName;
/** The converter that converts data values to {@link #displayUnit} * */
@Deprecated
protected UnitConverter dataToDisplayConverter;
/** The converter that converts display values to {@link #dataUnit} * */
@Deprecated
protected UnitConverter displayToDataConverter;
/** The converter that converts data values to {@link #colorMapUnit} */
@Deprecated
protected UnitConverter dataToColorMapConverter;
/** The converter that converts color map unit values to {@link #dataUnit} */
@Deprecated
protected UnitConverter colorMapToDataConverter;
/** The converter that converts color map unit values to {@link #displayUnit} */
@ -491,32 +498,40 @@ public class ColorMapParameters {
}
/**
* @deprecated data max is not important for general colormapping use
* @return the dataMax
*/
@Deprecated
public float getDataMax() {
return dataMax;
}
/**
* @deprecated data max is not important for general colormapping use
* @param dataMax
* the dataMax to set
*/
@Deprecated
public void setDataMax(float dataMax) {
this.dataMax = dataMax;
notifyListener();
}
/**
* @deprecated data min is not important for general colormapping use
* @return the dataMin
*/
@Deprecated
public float getDataMin() {
return dataMin;
}
/**
* @deprecated data min is not important for general colormapping use
* @param dataMin
* the dataMin to set
*/
@Deprecated
public void setDataMin(float dataMin) {
this.dataMin = dataMin;
notifyListener();
@ -563,8 +578,10 @@ public class ColorMapParameters {
/**
* Returns the unit data values to be colormapped are in
*
* @deprecated data unit is not important for general colormapping use
* @return the dataUnit
*/
@Deprecated
public Unit<?> getDataUnit() {
return dataUnit;
}
@ -572,9 +589,11 @@ public class ColorMapParameters {
/**
* Sets the unit data values to be colormapped are in
*
* @deprecated data unit is not important for general colormapping use
* @param dataUnit
* the dataUnit to set
*/
@Deprecated
public void setDataUnit(Unit<?> dataUnit) {
this.dataUnit = dataUnit;
@ -595,8 +614,10 @@ public class ColorMapParameters {
* Returns the {@link UnitConverter} from {@link #dataUnit} to
* {@link #displayUnit}
*
* @deprecated data unit is not important for general colormapping use
* @return the dataToDisplayConverter
*/
@Deprecated
public UnitConverter getDataToDisplayConverter() {
if (dataToDisplayConverter == null) {
dataToDisplayConverter = constructConverter(dataUnit, displayUnit);
@ -611,8 +632,10 @@ public class ColorMapParameters {
* Returns the {@link UnitConverter} from {@link #displayUnit} to
* {@link #dataUnit}
*
* @deprecated data unit is not important for general colormapping use
* @return the displayToDataConverter
*/
@Deprecated
public UnitConverter getDisplayToDataConverter() {
if (displayToDataConverter == null) {
displayToDataConverter = constructConverter(displayUnit, dataUnit);
@ -667,8 +690,10 @@ public class ColorMapParameters {
* Returns a {@link UnitConverter} converting {@link #dataUnit} values to
* the {@link #colorMapUnit} if compatible or null otherwise
*
* @deprecated data unit is not important for general colormapping use
* @return
*/
@Deprecated
public UnitConverter getDataToColorMapConverter() {
if (dataToColorMapConverter == null) {
dataToColorMapConverter = constructConverter(dataUnit, colorMapUnit);
@ -773,8 +798,10 @@ public class ColorMapParameters {
* Returns a {@link UnitConverter} converting {@link #colorMapUnit} values
* to the {@link #dataUnit} if compatible or null otherwise
*
* @deprecated data unit is not important for general colormapping use
* @return
*/
@Deprecated
public UnitConverter getColorMapToDataConverter() {
if (colorMapToDataConverter == null) {
colorMapToDataConverter = constructConverter(colorMapUnit, dataUnit);

View file

@ -45,7 +45,7 @@ import com.raytheon.uf.common.datadelivery.registry.Time;
* Dec 06, 2012 1397 djohnson Add ability to get bandwidth graph data.
* Jul 11, 2013 2106 djohnson Bandwidth service now returns names of subscriptions for proposing bandwidth availability.
* Jul 18, 2013 1653 mpduff Added getSubscriptionStatusSummary.
* Oct 2, 2013 1797 dhladky Generics
* Oct 2, 2013 1797 dhladky Generics
*
* </pre>
*

View file

@ -41,6 +41,7 @@ import com.raytheon.uf.common.registry.services.rest.response.RestCollectionResp
* 10/8/2013 1682 bphillip Added rest functions for use with the query web interface
* 10/23/2013 2385 bphillip restoreSubscriptions throws JAXBException
* 10/30/2013 1538 bphillip Moved data delivery specific servics out of registry plugin
* 11/7/2013 1678 bphillip Added get custom query method
* </pre>
*
* @author bphillip
@ -73,6 +74,15 @@ public interface IRegistryDataAccessService {
@Path("getQueries")
public String getValidQueries();
/**
* Gets the list of non-canonical query types contained in the registry
*
* @return The non-canonical query definitions
*/
@GET
@Path("getCustomQueries")
public String getCustomQueries();
/**
* Gets the valid parameters for a given query definition
*

View file

@ -1,16 +0,0 @@
com.raytheon.uf.common.datadelivery.retrieval.xml.Retrieval
com.raytheon.uf.common.datadelivery.retrieval.xml.RetrievalAttribute
com.raytheon.uf.common.datadelivery.retrieval.xml.Constant
com.raytheon.uf.common.datadelivery.retrieval.xml.DataSetConfig
com.raytheon.uf.common.datadelivery.retrieval.xml.DataSetNaming
com.raytheon.uf.common.datadelivery.retrieval.xml.DateConfig
com.raytheon.uf.common.datadelivery.retrieval.xml.LevelLookup
com.raytheon.uf.common.datadelivery.retrieval.xml.ParameterConfig
com.raytheon.uf.common.datadelivery.retrieval.xml.ParameterLookup
com.raytheon.uf.common.datadelivery.retrieval.xml.Pattern
com.raytheon.uf.common.datadelivery.retrieval.xml.ServiceConfig
com.raytheon.uf.common.datadelivery.retrieval.xml.UnitConfig
com.raytheon.uf.common.datadelivery.retrieval.xml.UnitLookup

View file

@ -14,7 +14,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -29,6 +29,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* ------------ ---------- ----------- --------------------------
* Oct 27, 2012 1163 dhladky Initial creation
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
* Nov 07, 2013 2361 njensen Use JAXBManager for XML
*
* </pre>
*
@ -48,6 +49,9 @@ public class HarvesterServiceManager implements ILocalizationFileObserver {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(HarvesterServiceManager.class);
private static final SingleTypeJAXBManager<ServiceConfig> jaxb = SingleTypeJAXBManager
.createWithoutException(ServiceConfig.class);
/**
* Get an instance of this singleton.
*
@ -64,6 +68,7 @@ public class HarvesterServiceManager implements ILocalizationFileObserver {
/** Singleton instance of this class */
private static final HarvesterServiceManager instance = new HarvesterServiceManager();
/* Private Constructor */
private HarvesterServiceManager() {
@ -194,8 +199,7 @@ public class HarvesterServiceManager implements ILocalizationFileObserver {
ServiceConfig service = null;
if (file != null) {
service = SerializationUtil.jaxbUnmarshalFromXmlFile(
ServiceConfig.class, file);
service = jaxb.unmarshalFromXmlFile(file);
}
return service;

View file

@ -27,6 +27,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBException;
import com.raytheon.uf.common.datadelivery.registry.Parameter;
import com.raytheon.uf.common.datadelivery.retrieval.xml.LevelLookup;
import com.raytheon.uf.common.datadelivery.retrieval.xml.ParameterConfig;
@ -38,7 +40,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.JAXBManager;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -56,7 +58,8 @@ import com.raytheon.uf.common.util.ServiceLoaderUtil;
* Mar 7, 2011 357 dhladky Initial creation
* Oct 27, 2012 1163 dhladky Improved, dynamically create files, Added Units
* Jan 18, 2013 1513 dhladky Level lookup refit.
* Mar 21, 2013 1794 djohnson ServiceLoaderUtil now requires the requesting class.
* Mar 21, 2013 1794 djohnson ServiceLoaderUtil now requires the requesting class.
* Nov 07, 2013 2361 njensen Use JAXBManager for XML
*
* </pre>
*
@ -65,7 +68,6 @@ import com.raytheon.uf.common.util.ServiceLoaderUtil;
*/
public class LookupManager {
/**
* Implementation of the xml writers that writes to localization files.
*/
@ -85,7 +87,7 @@ public class LookupManager {
LocalizationFile lf = pm.getLocalizationFile(lc, fileName);
File file = lf.getFile();
SerializationUtil.jaxbMarshalToXmlFile(ll, file.getAbsolutePath());
getJaxbManager().marshalToXmlFile(ll, file.getAbsolutePath());
}
/**
@ -103,7 +105,7 @@ public class LookupManager {
LocalizationFile lf = pm.getLocalizationFile(lc, fileName);
File file = lf.getFile();
SerializationUtil.jaxbMarshalToXmlFile(pl, file.getAbsolutePath());
getJaxbManager().marshalToXmlFile(pl, file.getAbsolutePath());
}
}
@ -147,6 +149,18 @@ public class LookupManager {
.load(LookupManager.class, ParameterXmlWriter.class,
new LocalizationXmlWriter());
private static JAXBManager jaxb;
private static JAXBManager getJaxbManager()
throws JAXBException {
if (jaxb == null) {
jaxb = new JAXBManager(LevelLookup.class, ParameterLookup.class,
UnitLookup.class);
}
return jaxb;
}
/* Private Constructor */
private LookupManager() {
@ -519,7 +533,7 @@ public class LookupManager {
LevelLookup levelXml = null;
if (file != null && file.exists()) {
levelXml = SerializationUtil.jaxbUnmarshalFromXmlFile(
levelXml = getJaxbManager().unmarshalFromXmlFile(
LevelLookup.class, file);
}
@ -538,7 +552,7 @@ public class LookupManager {
ParameterLookup paramXml = null;
if (file != null && file.exists()) {
paramXml = SerializationUtil.jaxbUnmarshalFromXmlFile(
paramXml = getJaxbManager().unmarshalFromXmlFile(
ParameterLookup.class, file);
}
@ -557,7 +571,7 @@ public class LookupManager {
UnitLookup unitXml = null;
if (file != null && file.exists()) {
unitXml = SerializationUtil.jaxbUnmarshalFromXmlFile(
unitXml = getJaxbManager().unmarshalFromXmlFile(
UnitLookup.class, file);
}

View file

@ -24,7 +24,6 @@ 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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,6 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -46,7 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class Constant implements ISerializableObject {
public class Constant {
@XmlAttribute(name = "name")
@DynamicSerializeElement

View file

@ -31,7 +31,6 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -43,6 +42,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -53,7 +53,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlRootElement(name = "dataSetConfig")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class DataSetConfig implements ISerializableObject {
public class DataSetConfig {
@XmlElements({ @XmlElement(name = "pattern", type = com.raytheon.uf.common.datadelivery.retrieval.xml.Pattern.class) })
private List<com.raytheon.uf.common.datadelivery.retrieval.xml.Pattern> patterns;

View file

@ -29,6 +29,7 @@ package com.raytheon.uf.common.datadelivery.retrieval.xml;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -40,13 +41,12 @@ 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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class DataSetNaming implements ISerializableObject {
public class DataSetNaming {
@XmlAttribute(name = "name")
@DynamicSerializeElement

View file

@ -6,7 +6,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -18,7 +17,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12 Sept, 2012 1038 dhladky Initial creation
* 12 Sept, 2012 1038 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -28,7 +28,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class DateConfig implements ISerializableObject {
public class DateConfig {
@XmlElement(name = "format", type = String.class)
@DynamicSerializeElement

View file

@ -26,7 +26,6 @@ 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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -39,7 +38,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 1, 2012 jpiatt Initial creation.
* Mar 1, 2012 jpiatt Initial creation.
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -50,7 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement(name = "LevelLookup")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class LevelLookup implements ISerializableObject {
public class LevelLookup {
@XmlElement(name = "Level", type = Double.class)
@DynamicSerializeElement

View file

@ -24,7 +24,6 @@ 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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,7 +36,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 1, 2012 jpiatt Initial creation.
* Mar 1, 2012 jpiatt Initial creation.
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -47,7 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ParameterConfig implements ISerializableObject {
public class ParameterConfig {
@XmlAttribute(name = "GrADs")
@DynamicSerializeElement

View file

@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -43,8 +42,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 1, 2012 jpiatt Initial creation.
* Oct 20, 2012 1163 dhladky speed it up
* Mar 1, 2012 jpiatt Initial creation.
* Oct 20, 2012 1163 dhladky speed it up
* Nov 07, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -55,7 +55,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement(name = "ParameterLookup")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ParameterLookup implements ISerializableObject {
public class ParameterLookup {
@XmlElements({ @XmlElement(name = "parameterConfig", type = ParameterConfig.class) })
@DynamicSerializeElement

View file

@ -27,7 +27,6 @@ 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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -40,6 +39,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -49,7 +49,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class Pattern implements ISerializableObject {
public class Pattern {
private static final String SEPARATOR = ",";

View file

@ -36,7 +36,6 @@ import com.raytheon.uf.common.datadelivery.registry.Connection;
import com.raytheon.uf.common.datadelivery.registry.DataType;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -48,9 +47,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 07, 2011 191 dhladky Initial creation
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
* Feb 07, 2013 1543 djohnson Never have null attributes.
* Jan 07, 2011 191 dhladky Initial creation
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
* Feb 07, 2013 1543 djohnson Never have null attributes.
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -61,7 +61,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class Retrieval implements ISerializableObject, Serializable {
public class Retrieval implements Serializable {
private static final long serialVersionUID = -1294387473701456892L;

View file

@ -32,7 +32,6 @@ import com.raytheon.uf.common.datadelivery.registry.Coverage;
import com.raytheon.uf.common.datadelivery.registry.Ensemble;
import com.raytheon.uf.common.datadelivery.registry.Parameter;
import com.raytheon.uf.common.datadelivery.registry.Time;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -44,9 +43,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 17, 2011 191 dhladky Initial creation
* Feb 15, 2013 1543 djohnson Allow any type of Coverage instance without a JAXB adapter.
* Oct 1, 2013 1797 dhladky Generics
* Jan 17, 2011 191 dhladky Initial creation
* Feb 15, 2013 1543 djohnson Allow any type of Coverage instance without a JAXB adapter.
* Oct 01, 2013 1797 dhladky Generics
* Nov 07, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -56,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class RetrievalAttribute<T extends Time, C extends Coverage> implements ISerializableObject, Serializable {
public class RetrievalAttribute<T extends Time, C extends Coverage> implements
Serializable {
/**
*

View file

@ -31,7 +31,6 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -43,7 +42,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -54,7 +54,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement(name = "serviceConfig")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ServiceConfig implements ISerializableObject {
public class ServiceConfig {
private static final String ALTERNATE_NAMING_SCHEMA = "ALTERNATE_NAMING_SCHEMA";

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -38,6 +37,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -48,7 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement(name = "unitConfig")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class UnitConfig implements ISerializableObject {
public class UnitConfig {
@XmlAttribute(name = "name")
@DynamicSerializeElement

View file

@ -10,7 +10,6 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -23,6 +22,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20 Oct, 2012 1163 dhladky Initial creation
* 07 Nov, 2013 2361 njensen Remove ISerializableObject
*
* </pre>
*
@ -33,7 +33,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement(name = "unitLookup")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class UnitLookup implements ISerializableObject {
public class UnitLookup {
@XmlElements({ @XmlElement(name = "unitConfig", type = UnitConfig.class) })
@DynamicSerializeElement

View file

@ -0,0 +1,2 @@
com.raytheon.uf.common.dataplugin.bufrua.UAObs
com.raytheon.uf.common.dataplugin.bufrua.UAObsLevel

View file

@ -20,10 +20,21 @@
package com.raytheon.uf.common.dataplugin.bufrua;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.measure.quantity.Angle;
import javax.measure.quantity.Length;
import javax.measure.quantity.Temperature;
import javax.measure.quantity.Velocity;
import javax.measure.unit.NonSI;
import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
@ -33,9 +44,15 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
@ -46,6 +63,7 @@ import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
import com.vividsolutions.jts.geom.Geometry;
/**
@ -77,7 +95,6 @@ import com.vividsolutions.jts.geom.Geometry;
* Jul 19, 2013 1992 bsteffen Remove redundant time columns from
* bufrua.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Oct 22, 2013 2361 njensen Remove XML annotations and IDecoderGettable
*
* </pre>
*
@ -93,9 +110,11 @@ import com.vividsolutions.jts.geom.Geometry;
*/
@org.hibernate.annotations.Table(appliesTo = UAObs.PLUGIN_NAME, indexes = { @Index(name = "bufrua_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class UAObs extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData, IPersistable {
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
@ -120,6 +139,33 @@ public class UAObs extends PersistablePluginDataObject implements
public static final String PLUGIN_NAME = "bufrua";
public static final Unit<Length> DISTANCE_UNIT = SI.METER;
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.KELVIN;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
static {
PARM_MAP.put("GH", UA_GEOHGT);
PARM_MAP.put("Px", UA_PRESSURE);
PARM_MAP.put("T", SFC_TEMP);
PARM_MAP.put("DpT", SFC_DWPT);
PARM_MAP.put("WS", SFC_WNDSPD);
PARM_MAP.put("WD", SFC_WNDDIR);
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
}
public static final String UA_PARAM_PTRN = ".*:PRESS=\\d{2,4}";
// Non persisted value. Hold the last requested parameter name.
@Transient
private String parameterName = null;
@ -131,17 +177,20 @@ public class UAObs extends PersistablePluginDataObject implements
// The observation report type.
@DataURI(position = 1)
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer reportType;
@Embedded
@DataURI(position = 4, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
// Correction indicator from wmo header
@DataURI(position = 2)
@Column
@XmlAttribute
@DynamicSerializeElement
private String corIndicator;
@ -152,40 +201,48 @@ public class UAObs extends PersistablePluginDataObject implements
// Text of the WMO header
@DataURI(position = 3)
@Column
@XmlAttribute
@DynamicSerializeElement
private String wmoHeader;
// Station pressure in Pascals.
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer pressure_station;
// The total cloud cover in 1/8s coverage.
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer totalCloudCover;
// The platform directio in angular degrees.
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer platformDirection;
// The platform movement in meters per second.
@Column
@XmlAttribute
@DynamicSerializeElement
private Double platformMovement;
// ICAO of station if known.
@Column
@XmlAttribute
@DynamicSerializeElement
private String stationName;
// The level data for this observation.
@Transient
@XmlElement
@DynamicSerializeElement
private List<UAObsLevel> levels;
@Column(insertable = false, updatable = false)
@XmlAttribute
@DynamicSerializeElement
private Integer idx;
@ -488,6 +545,15 @@ public class UAObs extends PersistablePluginDataObject implements
}
/**
* Get the IDecoderGettable reference for this record.
*
* @return The IDecoderGettable reference for this record.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return this;
}
/**
*
*/
@ -504,6 +570,203 @@ public class UAObs extends PersistablePluginDataObject implements
this.pointDataView = pointDataView;
}
/**
* Get the value of a parameter that is represented as a String.
*
* @param paramName
* The name of the parameter value to retrieve.
* @return The String value of the parameter. If the parameter is unknown, a
* null reference is returned.
*/
@Override
public String getString(String paramName) {
if ("STA".matches(paramName)) {
return this.getStationId();
}
return null;
}
/**
* Get the value and units of a named parameter within this observation. The
* parameter name may include level information for these observation data.
* The format for parameter is:
*
* <pre>
* &quot;parameterName&quot; may be one of
* &quot;GH&quot; geopotential height
* &quot;Px&quot; pressure
* &quot;T&quot; temperature
* &quot;DpT&quot; dewpoint
* &quot;WS&quot; wind speed
* &quot;WD&quot; wind direction
* followed by a level specification &quot;:PRESS=xxxx&quot; where xxxx is a level
* in hPa (millibars). To retrieve the temperature from the 850hPa level
* use the following getValue(&quot;T:PRESS=850&quot;);
*
* Some data is specific to the observation, latitude/longitude for
* example. These data may be retrieved using the parameter minus any level
* information as follows
* &quot;NLAT&quot; station latitude
* &quot;NLON&quot; station longitude
* </pre>
*
* If the sounding data defines a surface level, and a request for a level
* below surface is requested, a null value is returned.
*
* @param paramName
* The name of the parameter value to retrieve.
* @return An Amount with value and units. If the parameter is unknown, a
* null reference is returned.
*/
@Override
public Amount getValue(String paramName) {
Amount a = null;
if (parseParameter(paramName)) {
String pName = PARM_MAP.get(parameterName);
if ((pName != null) && (levels != null) && (levels.size() > 0)) {
UAObsLevel obsLevel = getLevel(levelId);
if (obsLevel != null) {
Integer iValue = null;
Double dValue = null;
if (UA_GEOHGT.equals(pName)) {
iValue = obsLevel.getGeoHeight();
if (iValue != null) {
a = new Amount(iValue, DISTANCE_UNIT);
}
} else if (SFC_TEMP.equals(pName)) {
dValue = obsLevel.getTemp();
if (dValue != null) {
a = new Amount(dValue, TEMPERATURE_UNIT);
}
} else if (SFC_DWPT.equals(pName)) {
dValue = obsLevel.getDwpt();
if (dValue != null) {
a = new Amount(dValue, TEMPERATURE_UNIT);
}
} else if (SFC_WNDSPD.equals(pName)) {
dValue = obsLevel.getWindSpeed();
if (dValue != null) {
a = new Amount(dValue, WIND_SPEED_UNIT);
}
} else if (SFC_WNDDIR.equals(pName)) {
iValue = obsLevel.getWindDirection();
if (iValue != null) {
a = new Amount(iValue, WIND_DIR_UNIT);
}
}
}
}
} else {
// Assume we are trying to get an observation attribute.
String pName = PARM_MAP.get(paramName);
if (STA_LAT.equals(pName)) {
a = new Amount(this.getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(this.getLongitude(), LOCATION_UNIT);
}
}
return a;
}
/**
* Get the value of a parameter that is represented as a String.
*
* @param paramName
* The name of the parameter value to retrieve.
* @return The String value of the parameter. If the parameter is unknown, a
* null reference is returned.
*/
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/**
* Determine if the parameter is a level request, and parse out the pressure
* level and parameter name if so.
*
* @param parameter
* The parameter string to parse.
* @return This is a level parameter.
*/
private boolean parseParameter(String parameter) {
boolean goodParse = false;
Pattern p = Pattern.compile(UA_PARAM_PTRN);
Matcher m = p.matcher(parameter);
if (m.find()) {
int start = parameter.indexOf(":PRESS=");
if (start > 0) {
parameterName = parameter.substring(0, start);
start += ":PRESS=".length();
levelId = Integer.parseInt(parameter.substring(start));
}
goodParse = true;
}
return goodParse;
}
/**
* Get a specified pressure level data if it exists. If the specified level
* is below the declared surface pressure a null reference is returned.
*
* @param level
* A pressure level to get.
* @return The requested level, if found, null reference if not.
*/
private UAObsLevel getLevel(Integer level) {
UAObsLevel retValue = null;
if (level != null) {
level = level * 100;
for (UAObsLevel l : levels) {
if (IDecoderConstants.MANPRE_LEVEL.equals(l.getVertSig())
|| IDecoderConstants.SIGPRE_LEVEL
.equals(l.getVertSig())) {
if (level.equals(l.getPressure())) {
retValue = l;
break;
}
}
}
}
if (retValue != null) {
UAObsLevel sfc = getSurfaceLevel();
if (sfc != null) {
if (LayerTools.isLowerThan(sfc, retValue)) {
retValue = null;
}
}
}
return retValue;
}
/**
* Get the defined surface level. If a surface level cannot be found, then
* return null.
*
* @return The surface level found, or null.
*/
private UAObsLevel getSurfaceLevel() {
UAObsLevel retValue = null;
if (levels != null) {
for (UAObsLevel level : levels) {
if (IDecoderConstants.SFC_LEVEL.equals(level.getVertSig())) {
retValue = level;
break;
}
}
}
return retValue;
}
@Override
public String[] getStrings(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;

View file

@ -21,6 +21,11 @@ package com.raytheon.uf.common.dataplugin.bufrua;
import java.io.Serializable;
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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,14 +42,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 20071127 382 jkorman Initial Coding.
* 20080630 1215 jkorman Implemented Serializable.
* 20131022 2361 njensen Remove XML annotations
* </pre>
*
* @author jkorman
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class UAObsLevel implements Serializable {
public class UAObsLevel implements Serializable, ISerializableObject {
private static final long serialVersionUID = 1L;
@ -58,41 +63,50 @@ public class UAObsLevel implements Serializable {
// 5 Significant level, temperature and/or relative humidity
// 6 Significant level, wind
// All 7 Missing value
@XmlAttribute
@DynamicSerializeElement
private Integer vertSig = null;
// Observation pressure in Pascals
@XmlAttribute
@DynamicSerializeElement
private Integer pressure = null;
// Observation geopotential height in meters.
@XmlAttribute
@DynamicSerializeElement
private Integer geoHeight = null;
// Observation dry air temperature in degrees Kelvin.
@XmlAttribute
@DynamicSerializeElement
private Double temp = null;
// Observation dewpoint temperature in degrees Kelvin.
@XmlAttribute
@DynamicSerializeElement
private Double dwpt = null;
// Observation wind direction in angular degrees. Integer
@XmlAttribute
@DynamicSerializeElement
private Integer windDirection = null;
// Observation wind speed in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double windSpeed = null;
// Observation 1 KM below level wind shear in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double loShear = null;
// Observation 1 KM above level wind shear in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double hiShear = null;

View file

@ -0,0 +1 @@
com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord

View file

@ -1,7 +1,18 @@
package com.raytheon.uf.common.dataplugin.fssobs;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashMap;
import javax.measure.quantity.Angle;
import javax.measure.quantity.DataAmount;
import javax.measure.quantity.Length;
import javax.measure.quantity.Pressure;
import javax.measure.quantity.Temperature;
import javax.measure.quantity.Velocity;
import javax.measure.unit.NonSI;
import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
@ -11,9 +22,14 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
@ -26,24 +42,6 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* Fog, Safeseas, Snow Observation record
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 13, 2010 skorolev Initial creation
* Oct 14, 2013 2361 njensen Removed XML annotations and IDecoderGettable
*
* </pre>
*
* @author njensen
* @version 1.0
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "fssobsseq")
@Table(name = FSSObsRecord.PLUGIN_NAME, uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@ -53,23 +51,69 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@org.hibernate.annotations.Table(appliesTo = FSSObsRecord.PLUGIN_NAME, indexes = { @Index(name = "fssobs_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class FSSObsRecord extends PersistablePluginDataObject implements
ISpatialEnabled, IPersistable, IPointData {
ISpatialEnabled, IDecoderGettable, IPersistable, IPointData {
private static final long serialVersionUID = 1L;
public static final String PLUGIN_NAME = "fssobs";
private static final int MISSING = -9999;
// UNITS
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.CELSIUS;
public static final Unit<Velocity> WIND_SPEED_UNIT = NonSI.KNOT;
public static final Unit<Length> HEIGHT_UNIT = SI.METER;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Pressure> PRESSURE_UNIT = SI.HECTO(SI.PASCAL);
public static final Unit<Length> PRECIP_UNIT = NonSI.INCH;
public static final Unit<Length> WAVE_UNIT = SI.METER;
public static final Unit<Length> VISIBILITY_UNIT = NonSI.MILE;
public static final Unit<DataAmount> CLOUD_COVER = NonSI.OCTET;
/** Metar specific parameter keys */
public static final class ParameterKey {
public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER";
public static final String PRESSURE_CHANGE = "PCHNG";
public static final String VISIBILITY = "VIS";
public static final String PRECIPITATION_1HR = "PR1HR";
}
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
static {
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
PARM_MAP.put("rawMessage", "rawMessage");
}
/** is feature new **/
@Transient
@DynamicSerializeElement
@XmlElement
public boolean isNew = true;
// Current CWA (WFO)
@Column
@DataURI(position = 2)
@DynamicSerializeElement
@XmlElement(nillable = false)
private String cwa;
// Monitor which should use this station record
@ -79,15 +123,18 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
@Column
@DataURI(position = 4)
@DynamicSerializeElement
@XmlElement
private String monitorUse = "";
// Station name
@Column
@DynamicSerializeElement
@XmlElement
private String stnName;
/* From ============ObReport================= */
@XmlElement
@DynamicSerializeElement
@Column
@DataURI(position = 1)
@ -95,25 +142,30 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
@Embedded
@DataURI(position = 3, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
// Observing platform identifier (same as stationID)
@Transient
@XmlElement
@DynamicSerializeElement
private String platformId;
// Indicator of whether observing platform is stationary
@Transient
@DynamicSerializeElement
@XmlElement
private boolean isStationary;
// Actual time of the observation
@Transient
@DynamicSerializeElement
@XmlElement
private Calendar timeObs;
// Time of the observation to the nearest hour.
@XmlElement
@DynamicSerializeElement
@Column
private Calendar refHour;
@ -121,178 +173,214 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
// Raw message
@Transient
@DynamicSerializeElement
@XmlElement
private String rawMessage;
// Observed wind speed in knots
@Transient
@DynamicSerializeElement
@XmlElement
private float windSpeed = -9999;;
// Wind gust in knots
@Transient
@DynamicSerializeElement
@XmlElement
private float windGust = -9999;;
// Observed maximum wind speed in knots
@Transient
@DynamicSerializeElement
@XmlElement
private float maxWindSpeed = -9999;
// Observed wind direction in azimuth degrees
@Transient
@DynamicSerializeElement
@XmlElement
private float windDir;
// Observed wind chill in Fahrenheit
@Transient
@DynamicSerializeElement
@XmlElement
private float windChill = -9999;
// Observed high resolution wave height in
@Transient
@DynamicSerializeElement
@XmlElement
private float highResWaveHeight = -9999;
// Observed wave steepness in seconds ??? None
@Transient
@DynamicSerializeElement
@XmlElement
private float waveSteepness = -9999;
// Observed visibility in Statute miles
@Transient
@DynamicSerializeElement
@XmlElement
private float visibility = -9999;
// Observed visibility in meters for Maritime obs.
@Transient
@DynamicSerializeElement
@XmlElement
private float horzVisibility = -9999;
// Observed temperature in degrees in Farenheit
@Transient
@DynamicSerializeElement
@XmlElement
private float temperature = -9999;
// in feet
@Transient
@XmlElement
@DynamicSerializeElement
private Double waveHeight = -9999.0;
// in seconds
@Transient
@XmlElement
@DynamicSerializeElement
private Integer wavePeriod = -9999;
// in Azimuth degrees
@Transient
@XmlElement
@DynamicSerializeElement
private Double primarySwellWaveDir = -9999.0;
// in seconds
@Transient
@XmlElement
@DynamicSerializeElement
private Integer primarySwellWavePeriod = -9999;
// in feet
@Transient
@XmlElement
@DynamicSerializeElement
private Double primarySwellWaveHeight = -9999.0;
// in Azimuth degrees
@Transient
@XmlElement
@DynamicSerializeElement
private Double secondarySwellWaveDir = -9999.0;
// in seconds
@Transient
@XmlElement
@DynamicSerializeElement
private Integer secondarySwellWavePeriod = -9999;
// in feet
@Transient
@XmlElement
@DynamicSerializeElement
private Double secondarySwellWaveHeight = -9999.0;
// Three-hour pressure change in thousandths of an inch of mercury ????
@Transient
@DynamicSerializeElement
@XmlElement
private float pressChange3Hour = -9999f;
// Pressure change character for metar plot model
/** A string denoting the pressure tendency(rising or falling) */
@Transient
@DynamicSerializeElement
@XmlElement
private String pressChangeChar;
// Observed dewpoint in degrees Farenheit
@Transient
@DynamicSerializeElement
@XmlElement
private float dewpoint = -9999f;
// Observed sea surface temperature in degrees in Farenheit
@Transient
@DynamicSerializeElement
@XmlElement
private float seaSurfaceTemp = -9999f;
// the sea level pressure in hPa
@XmlElement
@DynamicSerializeElement
@Transient
private float seaLevelPress = -9999f;
// Altimeter setting in mm Hg.
@Transient
@XmlElement
@DynamicSerializeElement
private float pressureAltimeter = -9999f;
// Observed hourly precipitation in inches
@Transient
@DynamicSerializeElement
@XmlElement
private float hourlyPrecip = -9999f;
// Observed snow depth in inch
@Transient
@DynamicSerializeElement
@XmlElement
private float snowDepth = -9999f;
// Observed snow increasing rapidly, hourly total in inches
@Transient
@DynamicSerializeElement
@XmlElement
private float snincrHourly = -9999f;
// Observed snow increasing rapidly, total in inches
@Transient
@DynamicSerializeElement
@XmlElement
private float snincrTotal = -9999f;
// Observed frostbite time in minutes
@Transient
@DynamicSerializeElement
@XmlElement
private float frostbiteTime;
// present weather conditions for metar plot model
@Transient
@DynamicSerializeElement
@XmlElement
private String[] presWeather;
// Observed relative humidity in percent
@Transient
@DynamicSerializeElement
@XmlElement
private float relativeHumidity = -9999f;
// Observed ceiling in feet above ground level
@Transient
@DynamicSerializeElement
@XmlElement
private float ceiling = -9999f;
// Observed dewpoint depression in Farenheit
@Transient
@DynamicSerializeElement
@XmlElement
private float dewpointDepr = -9999f;
@XmlElement
@DynamicSerializeElement
@Transient
private String[] skyCover;
@XmlElement
@DynamicSerializeElement
@Transient
private int totCloudAmount = -9999;
@ -309,6 +397,58 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
super(uri);
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public Amount getValue(String paramName) {
Amount a = null;
String pName = PARM_MAP.get(paramName);
if (SFC_TEMP.equals(pName) && (temperature != -9999f)) {
a = new Amount(temperature, TEMPERATURE_UNIT);
} else if (SFC_DWPT.equals(pName) && (dewpoint != -9999f)) {
a = new Amount(dewpoint, TEMPERATURE_UNIT);
} else if (SFC_WNDSPD.equals(pName) && (windSpeed != -9999f)) {
a = new Amount(windSpeed, WIND_SPEED_UNIT);
} else if (SFC_WNDDIR.equals(pName) && (windDir != -9999f)) {
a = new Amount(windDir, WIND_DIR_UNIT);
} else if (SFC_WNDGST.equals(pName) && (windGust != -9999f)) {
a = new Amount(windGust, WIND_SPEED_UNIT);
} else if (PRES_SLP.equals(pName) && (seaLevelPress != -9999f)) {
a = new Amount(seaLevelPress, PRESSURE_UNIT);
// } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter !=
// -9999f)) {
// a = new Amount(pressureAltimeter, PRESSURE_UNIT);
} else if (STA_LAT.equals(pName)) {
a = new Amount(this.getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(this.getLongitude(), LOCATION_UNIT);
} else if ("WT".equals(pName) && (this.seaSurfaceTemp != -9999f)) {
a = new Amount(this.seaSurfaceTemp, TEMPERATURE_UNIT);
} else if ("WH".equals(pName)) {
a = new Amount(waveHeight, WAVE_UNIT);
} else if ("SWP".equals(pName)) {
a = new Amount(primarySwellWavePeriod, WAVE_UNIT);
} else if ("SWH".equals(pName)) {
a = new Amount(primarySwellWaveHeight, WAVE_UNIT);
// } else if ("PCHNG".equals(pName) && pressChange3Hour != MISSING)
// {
// a = new Amount(pressChange3Hour, PRESSURE_UNIT);
} else if ("PKWND".equals(paramName) && (maxWindSpeed != MISSING)) {
a = new Amount(maxWindSpeed, WIND_SPEED_UNIT);
} else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) {
a = new Amount(1, WIND_SPEED_UNIT);
} else if ("SWD".equals(paramName) && (primarySwellWaveDir != MISSING)) {
a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT);
}
return a;
}
/**
* @return the isNew
*/
@ -1032,6 +1172,21 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
return totCloudAmount;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public ISpatialObject getSpatialObject() {
return location;

View file

@ -1227,6 +1227,9 @@
<parameter>TP48hr</parameter>
<parameter>TPrun</parameter>
<parameter>TP120hr</parameter>
<parameter>TP6hr_std</parameter>
<parameter>TP6hr_avg</parameter>
<parameter>TP24hr_avg</parameter>
</paramLevelMatches>
<imageStyle>
<!-- filterLow="true" -->

View file

@ -0,0 +1,2 @@
com.raytheon.uf.common.dataplugin.profiler.ProfilerObs
com.raytheon.uf.common.dataplugin.profiler.ProfilerLevel

View file

@ -21,6 +21,11 @@ package com.raytheon.uf.common.dataplugin.profiler;
import java.io.Serializable;
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;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -32,7 +37,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* Oct 15, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -40,41 +44,53 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* @version 1.0
*/
@DynamicSerialize
public class ProfilerLevel implements Serializable, Comparable<ProfilerLevel> {
@XmlAccessorType(XmlAccessType.NONE)
public class ProfilerLevel implements Serializable, ISerializableObject, Comparable<ProfilerLevel> {
private static final long serialVersionUID = 1L;
@DynamicSerializeElement
@XmlAttribute
private Integer modeInfo;
@DynamicSerializeElement
@XmlAttribute
private Integer levelQualCode;
@DynamicSerializeElement
@XmlAttribute
private Double peakPower;
@DynamicSerializeElement
@XmlAttribute
private Integer levelHeight;
@DynamicSerializeElement
@XmlAttribute
private Double ucWind;
@DynamicSerializeElement
@XmlAttribute
private Double vcWind;
@DynamicSerializeElement
@XmlAttribute
private Double horzStdDev;
@DynamicSerializeElement
@XmlAttribute
private Integer horzConsensus;
@DynamicSerializeElement
@XmlAttribute
private Double wcWind;
@DynamicSerializeElement
@XmlAttribute
private Double vertStdDev;
@DynamicSerializeElement
@XmlAttribute
private Integer vertConsensus;
/**
@ -323,5 +339,5 @@ public class ProfilerLevel implements Serializable, Comparable<ProfilerLevel> {
}
return result;
}
}

Some files were not shown because too many files have changed in this diff Show more