Merge "Issue #2537 Use PointDataAccessFactory for multiple point data types. Change-Id: I655091f116cde662933ed96d926372a14a435dfc" into development

Former-commit-id: 648e5bff2e85d00cf5bcee923f2a137aa76117fc
This commit is contained in:
Nate Jensen 2013-12-05 12:59:58 -06:00 committed by Gerrit Code Review
commit ae0bd2a86f
54 changed files with 480 additions and 740 deletions

View file

@ -34,13 +34,13 @@
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="true"/>
<plugin
id="com.raytheon.uf.common.dataplugin.sfcobs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="true"/>
</feature>

View file

@ -147,7 +147,7 @@
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
unpack="true"/>
<plugin
id="com.raytheon.uf.common.dataplugin.qc"

View file

@ -0,0 +1,41 @@
<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="bufrmosDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosAVN"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosETA"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosGFS"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosHPC"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosLAMP"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosMRF"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosNGM"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
</beans>

View file

@ -2,37 +2,26 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modelsounding Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding
Bundle-Version: 1.13.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Version: 1.13.1.qualifier
Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.edex.core,
com.raytheon.uf.edex.database,
com.raytheon.uf.edex.pointdata,
com.raytheon.uf.edex.decodertools,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.site
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.plugin
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",
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
com.raytheon.uf.common.site;bundle-version="1.12.1174",
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
com.raytheon.uf.edex.pointdata;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"
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.exception,
com.raytheon.edex.plugin,
org.apache.commons.logging

View file

@ -1,3 +1 @@
com.raytheon.edex.plugin.modelsounding.common.SoundingSite
com.raytheon.edex.plugin.modelsounding.common.SoundingLevel
com.raytheon.edex.plugin.modelsounding.common.SoilLevel

View file

@ -2,7 +2,7 @@
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 id="mdlsndDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="modelsounding"/>

View file

@ -28,12 +28,10 @@ import java.util.Map;
import java.util.Set;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.status.IUFStatusHandler;
@ -58,7 +56,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 25, 2008 1684 chammack Camel Refactor
@ -77,6 +75,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* destroyed during spring container
* destruction.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 02, 2013 2537 bsteffen Remove dead/deprecated code.
*
*
* </pre>
*
@ -140,8 +140,7 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
* @return A single decoded observation. May return null if the observation
* is a duplicate in the database or is invalid.
*/
public PluginDataObject[] decode(byte[] data, Headers headers)
throws DecoderException {
public PluginDataObject[] decode(byte[] data, Headers headers) {
String traceId = "";
if (headers != null) {
traceId = (String) headers.get("traceId");
@ -222,12 +221,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
soundingTemporalData);
if (soundingData != null) {
soundingData.setTraceId(traceId);
try {
soundingData.constructDataURI();
} catch (PluginException e) {
logger.error(traceId
+ "- Unable to construct dataURI", e);
}
String uri = soundingData.getDataURI();
if (dataSet.add(uri)) {
container.addPdo(soundingData);

View file

@ -22,15 +22,14 @@ package com.raytheon.edex.plugin.modelsounding;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.plugin.AbstractRecordSeparator;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
/**
* The ProfilerSeparator takes a potential weather message and attempts to
* The ModelSoundingSeparator takes a potential weather message and attempts to
* determine the WMO header and data type of the enclosed data. Normal usage is
* to create an instance and set the message data using the setData method. When
* complete the separator contains the WMO header, and all of the data decoded.
@ -40,8 +39,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -50,7 +50,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
*/
public class ModelSoundingSeparator extends AbstractRecordSeparator {
private Log logger = LogFactory.getLog(getClass());
private static final IUFStatusHandler logger = UFStatus
.getHandler(ModelSoundingSeparator.class);
// List of report start locations.
private List<Integer> reportLocations = null;

View file

@ -25,18 +25,18 @@ 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;
/**
* ProfilerLevel contains the data for a single vertical level observation.
* SoilLevel contains the data for a single soil level forecast.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class SoilLevel implements Serializable, ISerializableObject {
public class SoilLevel implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -25,18 +25,18 @@ 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;
/**
* ProfilerLevel contains the data for a single vertical level observation.
* SoundingLevel contains the data for a single vertical level forecast.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class SoundingLevel implements Serializable, ISerializableObject {
public class SoundingLevel implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -20,7 +20,6 @@
package com.raytheon.edex.plugin.modelsounding.common;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@ -40,7 +39,6 @@ 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;
@ -54,14 +52,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.vividsolutions.jts.geom.Geometry;
/**
* The ProfilerObs class encapsulates the location and time information for a
* profiler observation as well as providing a container for the vertical level
* data above the location.
* The SoundingSite class encapsulates the location and time information for a
* model sounding forecast as well as providing a container for the vertical
* level data above the location.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
@ -69,6 +67,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 02, 2013 2537 bsteffen Remove IDecoderGettable
*
* </pre>
*
@ -88,7 +87,7 @@ import com.vividsolutions.jts.geom.Geometry;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SoundingSite extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
ISpatialEnabled, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
@ -828,17 +827,6 @@ public class SoundingSite extends PersistablePluginDataObject implements
this.snowWaterEquiv = snowWaterEquiv;
}
/**
* Get the IDecoderGettable interface implementation. This class does not
* currently support this interface.
*
* @return Returns null.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
@ -852,58 +840,6 @@ public class SoundingSite extends PersistablePluginDataObject implements
this.location = location;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getString(java.lang
* .String)
*/
@Override
public String getString(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getStrings(java.lang
* .String)
*/
@Override
public String[] getStrings(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang
* .String)
*/
@Override
public Amount getValue(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getValues(java.lang
* .String)
*/
@Override
public Collection<Amount> getValues(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;

View file

@ -25,9 +25,6 @@ import java.io.File;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.plugin.modelsounding.SoundingModelTemporalData;
import com.raytheon.edex.plugin.modelsounding.common.SoundingModels;
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
@ -42,6 +39,8 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.descriptors.BUFRDescriptor;
@ -57,12 +56,13 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 17, 2008 1026 jkorman Initial implementation.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI.
* 20130703 2161 bkowal Relocated the logic used to retrieve
* Jul 03, 2013 2161 bkowal Relocated the logic used to retrieve
* temporal information into its own function.
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -71,8 +71,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/
public class ModelSoundingDataAdapter {
private static Log logger = LogFactory
.getLog(ModelSoundingDataAdapter.class);
private static final IUFStatusHandler logger = UFStatus
.getHandler(ModelSoundingDataAdapter.class);
private static final Object LOCK = new Object();

View file

@ -31,24 +31,24 @@ import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/**
*
* Loads a map from a file for mapping wmo numbers to icaos.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Aug 10, 2009 jkorman Initial creation
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -60,9 +60,10 @@ public class SoundingStations {
private static final String STATION_LIST = "modelBufrStationList.txt";
private static Map<String, String> stationMap;
private static final IUFStatusHandler logger = UFStatus
.getHandler(SoundingStations.class);
private Log logger = LogFactory.getLog(getClass());
private static Map<String, String> stationMap;
public SoundingStations(String path) {
stationMap = new HashMap<String, String>();

View file

@ -22,12 +22,10 @@ package com.raytheon.edex.plugin.modelsounding.ingest;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
import com.raytheon.uf.common.localization.IPathManager;
@ -42,15 +40,17 @@ import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
/**
* TODO Add Description
* Subscriber to update the local model sounding sites whenever the national spi
* file changes.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Jan 29, 2011 bfarmer Initial creation
* Dec 02, 2013 2537 bsteffen Ensure streams are closed.
*
* </pre>
*
@ -70,8 +70,6 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(ModelBufrSubscriber.class);
private Thread combineThread = null;
@Override
public void notify(String fileName, File file) {
@ -190,6 +188,16 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber {
}
}
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioe) {
statusHandler.handle(
Priority.SIGNIFICANT,
"modelBufr:Error closing input file ["
+ file.getName() + "]");
}
}
if(fos != null) {
try {
fos.close();

View file

@ -2,18 +2,20 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Profiler Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.profiler
Bundle-Version: 1.12.1174.qualifier
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.edex.common,
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
com.raytheon.uf.common.pointdata;bundle-version="1.11.8",
com.raytheon.uf.edex.pointdata;bundle-version="1.11.8",
org.geotools,
javax.persistence,
javax.measure,
com.raytheon.uf.common.localization;bundle-version="1.11.16"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.dataplugin.profiler,
com.raytheon.uf.common.dataplugin.profiler.dao,
org.apache.commons.logging
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.common.dataplugin.profiler,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.time,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.status,
com.raytheon.uf.edex.database,
com.raytheon.uf.edex.pointdata,
com.raytheon.uf.edex.decodertools
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.plugin

View file

@ -10,7 +10,7 @@
<bean id="profilerProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" ref="profilerPluginName" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.profiler" />
<property name="dao" value="com.raytheon.uf.common.dataplugin.profiler.dao.ProfilerDAO" />
<property name="dao" value="com.raytheon.edex.plugin.profiler.ProfilerDAO" />
<property name="record" value="com.raytheon.uf.common.dataplugin.profiler.ProfilerObs" />
</bean>

View file

@ -17,14 +17,10 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.profiler.dao;
import java.util.List;
package com.raytheon.edex.plugin.profiler;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
/**
@ -33,8 +29,9 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Move to edex plugin.
*
* </pre>
*
@ -52,46 +49,6 @@ public class ProfilerDAO extends PointDataPluginDao<ProfilerObs> {
super(pluginName);
}
/**
* Retrieves an MOS report using the datauri .
*
* @param dataURI
* The dataURI to match against.
* @return The report record if it exists.
*/
public ProfilerObs queryByDataURI(String dataURI) {
ProfilerObs report = null;
List<?> obs = null;
try {
obs = queryBySingleCriteria("dataURI", dataURI);
} catch (DataAccessLayerException e) {
e.printStackTrace();
}
if ((obs != null) && (obs.size() > 0)) {
report = (ProfilerObs) obs.get(0);
}
return report;
}
/**
* Queries for to determine if a given data uri exists on the profiler
* table.
*
* @param dataUri
* The DataURI to find.
* @return An array of objects. If not null, there should only be a single
* element.
*/
public Object[] queryDataUriColumn(final String dataUri) {
String sql = "select datauri from awips.prodata where datauri='"
+ dataUri + "';";
Object[] results = executeSQLQuery(sql);
return results;
}
@Override
public String[] getKeysRequiredForFileName() {
return new String[] { "dataTime.refTime" };

View file

@ -23,19 +23,15 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.edex.plugin.profiler.decoder.ProfilerDataAdapter;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRFile;
@ -55,10 +51,11 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -72,7 +69,8 @@ public class ProfilerDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "profiler";
/** The logger */
private final Log logger = LogFactory.getLog(getClass());
private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDecoder.class);
private PointDataDescription pdd;
@ -119,8 +117,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
* @return A single decoded observation. May return array of size 0 if the
* observation is a duplicate in the database or is invalid.
*/
public PluginDataObject[] decode(byte[] data, Headers headers)
throws DecoderException {
public PluginDataObject[] decode(byte[] data, Headers headers) {
String traceId = "";
if (headers != null) {
@ -161,14 +158,6 @@ public class ProfilerDecoder extends AbstractDecoder implements
container, traceId);
if (soundingData != null) {
soundingData.setTraceId(traceId);
try {
soundingData.constructDataURI();
PointDataView view = soundingData
.getPointDataView();
} catch (PluginException e) {
logger.error(traceId
+ "- Unable to construct dataURI", e);
}
pdoList.add(soundingData);
}
}

View file

@ -22,11 +22,10 @@ package com.raytheon.edex.plugin.profiler;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.plugin.AbstractRecordSeparator;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRFile;
@ -47,8 +46,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -58,7 +58,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
public class ProfilerSeparator extends AbstractRecordSeparator implements
IDescriptorFactorySelector {
private Log logger = LogFactory.getLog(getClass());
private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerSeparator.class);
private WMOHeader wmoHeader = null;

View file

@ -26,9 +26,6 @@ import java.util.Calendar;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerSite;
import com.raytheon.uf.common.dataplugin.profiler.Profilers;
@ -41,6 +38,8 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket;
@ -56,10 +55,11 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI.
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -68,7 +68,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/
public class ProfilerDataAdapter {
private static Log logger = LogFactory.getLog(ProfilerDataAdapter.class);
private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDataAdapter.class);
private static final String PROFILER_SITES = "profilerSites.xml";

View file

@ -26,4 +26,6 @@
<parameter name="reportType" queryName="reportType" type="INT" />
<parameter name="corIndicator" queryName="corIndicator" type="STRING" />
<parameter name="dataURI" queryName="dataURI" type="STRING" />
<parameter name="refTime" queryName="dataTime.refTime" numDims="1" type="LONG" unit="ms"/>
<parameter name="forecastHr" queryName="dataTime.fcstTime" numDims="1" type="INT" unit="h" dbunit="s"/>
</pointDataDbDescription>

View file

@ -20,7 +20,7 @@
import PointDataQuery
from java.util import ArrayList
from com.raytheon.uf.common.dataplugin.sfcobs.dao import SfcObsPointDataTransform
from com.raytheon.edex.plugin.sfcobs import SfcObsPointDataTransform
from com.raytheon.uf.common.message.response import ResponseMessageGeneric
#
@ -34,6 +34,7 @@ from com.raytheon.uf.common.message.response import ResponseMessageGeneric
# 06/03/09 chammack Initial Creation.
# 10/28/10 5705 cjeanbap Updated SfcObsPointDataTransform.MAN_PARAMS_LISTs
# 01/13/11 5705 cjeanbap Added makeNullResponse method.
# 12/05/13 2537 bsteffen Update package for the transform.
#
#

View file

@ -2,24 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Obs
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.obs
Bundle-Version: 1.0.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.uf.common.dataplugin.obs.metar,
com.raytheon.uf.common.dataplugin.obs.metar.util
Import-Package: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.annotations,
com.raytheon.uf.common.dataplugin.persist,
com.raytheon.uf.common.geospatial,
Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.pointdata.spatial,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.annotations,
com.raytheon.uf.common.time,
com.raytheon.uf.common.time.util,
javax.measure.quantity,
javax.measure.unit,
javax.persistence
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
org.hibernate;bundle-version="1.0.0"
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.dataaccess,
javax.measure

View file

@ -1,3 +1 @@
com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord
com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover
com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
res/

View file

@ -0,0 +1,12 @@
<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="obsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="obs"/>
<constructor-arg ref="obsDataAccessFactory"/>
</bean>
</beans>

View file

@ -32,7 +32,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -44,10 +43,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/2007 139 Phillippe initial creation
* 20080414 996 jkorman Added cloud genus field.
* 20090511 2338 jsanchez Implemented the Comparable interface.
* ------------- -------- ----------- --------------------------
* Feb 14, 2007 139 Phillippe initial creation
* Apr 14, 2008 996 jkorman Added cloud genus field.
* May 11, 2009 2338 jsanchez Implemented the Comparable interface.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
*
* </pre>
*
@ -56,7 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class SkyCover implements Serializable, ISerializableObject,
public class SkyCover implements Serializable,
Comparable<SkyCover> {
private static final long serialVersionUID = 1L;

View file

@ -36,7 +36,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -48,8 +47,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/2007 139 Phillippe Initial creation
* ------------- -------- ----------- --------------------------
* Feb 14, 2007 139 Phillippe Initial creation
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -58,7 +58,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class WeatherCondition implements Serializable, ISerializableObject {
public class WeatherCondition implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -2,23 +2,18 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Profiler Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.profiler
Bundle-Version: 1.12.1174.qualifier
Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.uf.common.dataplugin.profiler,
com.raytheon.uf.common.dataplugin.profiler.dao
Require-Bundle: com.raytheon.uf.common.dataplugin;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",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
com.raytheon.uf.common.status;bundle-version="1.12.1174",
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.edex.decodertools;bundle-version="1.12.1174",
org.springframework;bundle-version="3.1.4",
javax.persistence;bundle-version="1.0.0",
org.hibernate;bundle-version="1.0.0",
javax.measure;bundle-version="1.0.0"
Import-Package: org.apache.commons.logging
Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status,
com.raytheon.uf.common.dataaccess,
javax.measure

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
res/

View file

@ -0,0 +1,32 @@
<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="profilerDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="profiler"/>
<constructor-arg ref="profilerDataAccessFactory"/>
</bean>
<bean factory-bean="profilerDataAccessFactory" factory-method="register2D">
<constructor-arg value="numProfLvls"/>
<constructor-arg value="height"/>
<constructor-arg value="FHAG"/>
<constructor-arg>
<list>
<value>height</value>
<value>uComponent</value>
<value>vComponent</value>
<value>HorizSpStdDev</value>
<value>wComponent</value>
<value>VertSpStdDev</value>
<value>peakPower</value>
<value>levelMode</value>
<value>uvQualityCode</value>
<value>consensusNum</value>
</list>
</constructor-arg>
</bean>
</beans>

View file

@ -25,7 +25,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;
@ -35,8 +34,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class ProfilerLevel implements Serializable, ISerializableObject, Comparable<ProfilerLevel> {
public class ProfilerLevel implements Serializable, Comparable<ProfilerLevel> {
private static final long serialVersionUID = 1L;
@ -327,13 +327,9 @@ public class ProfilerLevel implements Serializable, ISerializableObject, Compara
*/
@Override
public int compareTo(ProfilerLevel other) {
final int BEFORE = -1;
final int EQUAL = 0;
final int AFTER = 1;
int result = 0;
if (this == other) {
result = EQUAL;
result = 0;
} else {
result = levelHeight.compareTo(other.levelHeight);
}

View file

@ -21,17 +21,8 @@ package com.raytheon.uf.common.dataplugin.profiler;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
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.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;
@ -49,7 +40,6 @@ 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;
@ -70,7 +60,7 @@ import com.vividsolutions.jts.geom.Geometry;
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation.
* Apr 13, 2009 2251 jsanchez Implemented IDecoderGettable methods and
* plotted Profiler plots.
@ -81,6 +71,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 03, 2013 2537 bsteffen Remove IDecoderGettable
*
* </pre>
*
@ -100,53 +91,13 @@ import com.vividsolutions.jts.geom.Geometry;
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ProfilerObs extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable,
ISpatialEnabled, IPointData, IPersistable,
Comparable<ProfilerObs> {
private static final long serialVersionUID = 1L;
public static final String PLUGIN_NAME = "profiler";
private static final HashMap<Integer, Integer> HGT_MAP = new HashMap<Integer, Integer>();
static {
HGT_MAP.put(100, 16180);
HGT_MAP.put(150, 13608);
HGT_MAP.put(200, 11784);
HGT_MAP.put(250, 10363);
HGT_MAP.put(300, 9164);
HGT_MAP.put(400, 7185);
HGT_MAP.put(500, 5574);
HGT_MAP.put(700, 3012);
HGT_MAP.put(850, 1457);
HGT_MAP.put(925, 766);
};
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
private static final String PROF_ID = "profid";
static {
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
PARM_MAP.put("WS", SFC_WNDSPD);
PARM_MAP.put("WD", SFC_WNDDIR);
PARM_MAP.put("PROF_ID", PROF_ID);
}
private static final String PRESS = "PRESS";
private static final String AGL = "AGL";
public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}";
public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}";
@Transient
private String parameterName = null;
@ -383,75 +334,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
return wmoHeader;
}
@Override
public String getString(String paramName) {
String value = null;
String pName = PARM_MAP.get(paramName);
if (PROF_ID.equals(pName)) {
value = profilerId;
}
return value;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
Amount a = null;
if (parseParameter(paramName)) {
String pName = PARM_MAP.get(parameterName);
if (unit.equals(AGL) && (levelId == 0)) {
Double dValue = null;
if (SFC_WNDSPD.equals(pName)) {
dValue = getSfcWindSpeed();
if (dValue != null) {
a = new Amount(dValue, WIND_SPEED_UNIT);
}
} else if (SFC_WNDDIR.equals(pName)) {
dValue = getSfcWindDir();
if (dValue != null) {
a = new Amount(dValue, WIND_DIR_UNIT);
}
}
} else {
if ((pName != null) && (levels != null) && (levels.size() > 0)) {
profLevel = getLevel(levelId);
if (profLevel != null) {
Double dValue = null;
if (SFC_WNDSPD.equals(pName)) {
dValue = getWindSpeed();
if (dValue != null) {
a = new Amount(dValue, WIND_SPEED_UNIT);
}
} else if (SFC_WNDDIR.equals(pName)) {
dValue = getWindDirection();
if (dValue != null) {
a = new Amount(dValue, WIND_DIR_UNIT);
}
}
}
}
}
} else {
String pName = PARM_MAP.get(paramName);
if (STA_LAT.equals(pName)) {
a = new Amount(getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(getLongitude(), LOCATION_UNIT);
}
}
return a;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/**
* Get the WMOHeader of the file that contained this data.
*
@ -508,17 +390,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
this.levels = levels;
}
/**
* Get the IDecoderGettable interface implementation. This class does not
* currently support this interface.
*
* @return Returns null.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return this;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
@ -554,86 +425,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
this.pointDataView = pointDataView;
}
private Double getWindSpeed() {
if (windSpeed == null) {
double u = profLevel.getUcWind().doubleValue();
double v = profLevel.getVcWind().doubleValue();
// equation from ProfilerUtils.getWindSpeed
windSpeed = Math.sqrt((u * u) + (v * v));
}
return windSpeed;
}
/**
*
* @return
*/
private Double getWindDirection() {
if (windDirection == null) {
double ucw = profLevel.getUcWind().doubleValue();
double vcw = profLevel.getVcWind().doubleValue();
windDirection = Math.toDegrees(Math.atan2(-ucw, -vcw));
if (windDirection < 0) {
windDirection += 360.0;
}
}
return windDirection;
}
private ProfilerLevel getLevel(Integer level) {
ProfilerLevel retValue = null;
if (level != null) {
Integer stdHgt = HGT_MAP.get(level);
if ((unit.equals(PRESS)) && (stdHgt != null)) {
int diff = 99999;
for (ProfilerLevel l : levels) {
Integer height = l.getLevelHeight();
if (height != null) {
int d = Math.abs(stdHgt - height);
if (d < diff) {
// Track of the closest level
diff = d;
retValue = l;
}
}
} // for
} else if (unit.equals(AGL)) {
for (ProfilerLevel l : levels) {
if ((l.getLevelHeight() != null)
&& (getElevation() != null)) {
// Adjust to agl heights!
Integer height = l.getLevelHeight() - getElevation();
if ((level == 1500) && (height <= 1500)
&& (height >= 1250)) {
retValue = l;
} else if ((level == 1250) && (height <= 1500)
&& (height > 1125)) {
retValue = l;
} else if ((level == 1000) && (height <= 1125)
&& (height > 875)) {
retValue = l;
} else if ((level == 750) && (height <= 875)
&& (height > 625)) {
retValue = l;
} else if ((level == 500) && (height <= 625)
&& (height > 0)) {
retValue = l;
}
// No need to go higher than this.
if (height > 2000) {
break;
}
}
}
}
}
return retValue;
}
/**
*
*/
@ -642,51 +433,12 @@ public class ProfilerObs extends PersistablePluginDataObject implements
return (profilerId != null) ? profilerId : "UNKN";
}
/**
* Determine if the parameter is a level request, and parse out the pressure
* level or the AGL 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;
int start = 0;
Pattern p = Pattern.compile(PRESS_PARAM_PTRN);
Pattern h = Pattern.compile(AGL_PARAM_PTRN);
Matcher m = p.matcher(parameter);
if (m.find()) {
start = parameter.indexOf(":PRESS=");
if (start > 0) {
unit = PRESS;
parameterName = parameter.substring(0, start);
start += ":PRESS=".length();
levelId = Integer.parseInt(parameter.substring(start));
}
goodParse = true;
} else if ((m = h.matcher(parameter)).find()) {
start = parameter.indexOf(":AGL=");
if (start > 0) {
unit = AGL;
parameterName = parameter.substring(0, start);
start += ":AGL=".length();
levelId = Integer.parseInt(parameter.substring(start));
}
goodParse = true;
}
return goodParse;
}
@Override
public int compareTo(ProfilerObs other) {
final int BEFORE = -1;
final int EQUAL = 0;
final int AFTER = 1;
int result = 0;
if (this == other) {
result = EQUAL;
result = 0;
} else {
result = timeObs.compareTo(other.timeObs);
}

View file

@ -21,18 +21,18 @@ package com.raytheon.uf.common.dataplugin.profiler.dao;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerLevel;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.util.TimeUtil;
/**
* Transforms profiler {@link PointDataContainer}s into {@link ProfilerObs}
@ -42,8 +42,9 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Oct 28, 2009 jkorman Initial creation
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
*
* </pre>
*
@ -53,7 +54,8 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
public class ProfilerDataTransform {
private static Log logger = LogFactory.getLog(ProfilerDataTransform.class);
private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDataTransform.class);
public static final String[] HDR_PARAMS = new String[] { "stationId",
"profilerId", "profilerName", "validTime", "latitude", "longitude",
@ -102,7 +104,9 @@ public class ProfilerDataTransform {
obs = new ProfilerObs(uri);
long vt = pdv.getNumber("validTime").longValue();
obs.setTimeObs(TimeTools.newCalendar(vt));
Calendar timeObs = TimeUtil.newGmtCalendar();
timeObs.setTimeInMillis(vt);
obs.setTimeObs(timeObs);
SurfaceObsLocation location = new SurfaceObsLocation();

View file

@ -2,16 +2,16 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Sfcobs Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.sfcobs
Bundle-Version: 1.12.1174.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.common.serialization,
javax.persistence,
javax.measure,
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.geospatial
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status,
com.raytheon.uf.common.dataaccess,
javax.measure
Export-Package: com.raytheon.uf.common.dataplugin.sfcobs
Import-Package: com.raytheon.uf.common.status,
org.apache.commons.logging

View file

@ -1,7 +1 @@
com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon
com.raytheon.uf.common.dataplugin.sfcobs.AncCloud
com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip
com.raytheon.uf.common.dataplugin.sfcobs.AncPressure
com.raytheon.uf.common.dataplugin.sfcobs.AncTemp
com.raytheon.uf.common.dataplugin.sfcobs.AncWave
com.raytheon.uf.common.dataplugin.sfcobs.AncWind

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
res/

View file

@ -0,0 +1,12 @@
<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="sfcobsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="sfcobs"/>
<constructor-arg ref="sfcobsDataAccessFactory"/>
</bean>
</beans>

View file

@ -25,7 +25,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;
@ -38,8 +37,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -47,7 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public abstract class AncBase implements ISerializableObject {
public abstract class AncBase {
// Type of the observation.
@DynamicSerializeElement

View file

@ -25,7 +25,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;
@ -35,8 +34,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -44,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class AncCloud implements Serializable, ISerializableObject {
public class AncCloud implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,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;
@ -35,8 +34,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -44,8 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class AncPrecip extends AncBase implements Serializable,
ISerializableObject {
public class AncPrecip extends AncBase implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,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,8 +36,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class AncTemp extends AncBase implements Serializable,
ISerializableObject {
public class AncTemp extends AncBase implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,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,8 +36,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -46,7 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class AncWave implements Serializable, ISerializableObject {
public class AncWave implements Serializable {
public static final Integer T_WIND_WAVE = 1000;

View file

@ -25,7 +25,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,8 +36,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* ------------- -------- ----------- --------------------------
* Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
* @author jkorman
@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class AncWind extends AncBase implements Serializable,
ISerializableObject {
public class AncWind extends AncBase implements Serializable {
private static final long serialVersionUID = 1L;

View file

@ -2,30 +2,24 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PointData
Bundle-SymbolicName: com.raytheon.uf.common.pointdata
Bundle-Version: 1.12.1174.qualifier
Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.status,
com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataaccess,
javax.measure
Export-Package: com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.pointdata.accumulate,
com.raytheon.uf.common.pointdata.dataaccess,
com.raytheon.uf.common.pointdata.elements,
com.raytheon.uf.common.pointdata.requests,
com.raytheon.uf.common.pointdata.spatial,
com.raytheon.uf.common.pointdata.vadriver
Import-Package: com.raytheon.uf.common.dataquery.requests,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.datastorage.records,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.adapters,
com.raytheon.uf.common.serialization.annotations,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status,
com.raytheon.uf.common.time,
javax.measure,
javax.measure.unit
Require-Bundle: net.sf.cglib;bundle-version="2.1.3",
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.geospatial,
javax.persistence,
org.hibernate,
org.geotools

View file

@ -23,8 +23,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;
/**
* Provides metadata (primarily the size) of a named dimension
*
@ -32,8 +30,9 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Jul 27, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -41,7 +40,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
public class Dimension implements ISerializableObject {
public class Dimension {
@XmlAttribute(name = "name")
private String dimensionName;

View file

@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -40,9 +39,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Apr 27, 2009 chammack Initial creation
* Jun 22, 2009 2538 jsanchez Added missing DynamicSerializeElement.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -51,7 +51,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ParameterDescription implements ISerializableObject {
public class ParameterDescription {
@XmlAttribute(name = "name", required = true)
@DynamicSerializeElement

View file

@ -46,7 +46,6 @@ import com.raytheon.uf.common.pointdata.elements.FloatPointDataObject;
import com.raytheon.uf.common.pointdata.elements.IntPointDataObject;
import com.raytheon.uf.common.pointdata.elements.LongPointDataObject;
import com.raytheon.uf.common.pointdata.elements.StringPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -58,8 +57,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 8, 2009 chammack Initial creation
* ------------- -------- ----------- --------------------------
* Apr 08, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -69,7 +69,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PointDataContainer implements ISerializableObject {
public class PointDataContainer {
protected static final int DEFAULT_SZ = 2048;

View file

@ -19,7 +19,6 @@
**/
package com.raytheon.uf.common.pointdata;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -31,8 +30,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Jan 20, 2010 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -40,7 +40,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* @version 1.0
*/
@DynamicSerialize
public class PointDataRequestMessageConstraint implements ISerializableObject {
public class PointDataRequestMessageConstraint {
@DynamicSerializeElement
private String parameter;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.pointdata.elements.AbstractPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
/**
* A serialization helper class for serializing pointdata maps
@ -34,8 +33,9 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Apr 16, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -43,13 +43,12 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
public class PointDataSerializable implements ISerializableObject {
public class PointDataSerializable {
@XmlElement(name = "item")
public PointDataItemSerializable[] items;
public static class PointDataItemSerializable implements
ISerializableObject {
public static class PointDataItemSerializable {
@XmlAttribute
public String key;

View file

@ -28,7 +28,6 @@ import com.raytheon.uf.common.pointdata.elements.FloatPointDataObject;
import com.raytheon.uf.common.pointdata.elements.IntPointDataObject;
import com.raytheon.uf.common.pointdata.elements.LongPointDataObject;
import com.raytheon.uf.common.pointdata.elements.StringPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -42,10 +41,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Jan 14, 2010 chammack Initial creation
*
* 10/30/2012 15448 Xiaochuan Check if container != null first in from().
* Oct 30, 2012 15448 Xiaochuan Check if container != null first in from().
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -53,7 +52,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* @version 1.0
*/
@DynamicSerialize
public class PointDataThriftContainer implements ISerializableObject {
public class PointDataThriftContainer {
@DynamicSerializeElement
FloatPointDataObject[] floatData;

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.edex.plugin.modelsounding.dataaccess;
package com.raytheon.uf.common.pointdata.dataaccess;
import java.util.ArrayList;
import java.util.Arrays;

View file

@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.pointdata.ParameterDescription;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -39,8 +38,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 8, 2009 chammack Initial creation
* ------------- -------- ----------- --------------------------
* Apr 08, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
*
* </pre>
*
@ -49,7 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public abstract class AbstractPointDataObject<A> implements ISerializableObject {
public abstract class AbstractPointDataObject<A> {
static final int STORAGE_CHUNK_SIZE = 1024;

View file

@ -37,15 +37,17 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
import com.vividsolutions.jts.geom.Coordinate;
/**
* TODO Add Description
* Driver for using the VA_Advanced progressive disclosure to generate
* localizaed spi files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ------------- -------- ----------- --------------------------
* Feb 24, 2011 bfarmer Initial creation
* Dec 02, 2013 2537 bsteffen Ensure streams are closed.
*
* </pre>
*
@ -128,8 +130,11 @@ public class VA_Driver {
String line;
String[] splitLine;
ns = 0;
BufferedReader fis = null;
BufferedReader pis = null;
BufferedWriter fos = null;
try {
BufferedReader fis = new BufferedReader(new InputStreamReader(
fis = new BufferedReader(new InputStreamReader(
new FileInputStream(goodnessFile)));
for (line = fis.readLine(); line != null; line = fis.readLine()) {
if (line.startsWith("#"))
@ -180,7 +185,7 @@ public class VA_Driver {
++ns;
}
if (primary != null) {
BufferedReader pis = new BufferedReader(new InputStreamReader(
pis = new BufferedReader(new InputStreamReader(
new FileInputStream(primary)));
int g = 0x7FFFFFFF;
for (String pline = pis.readLine(); pline != null; pline = pis
@ -205,7 +210,7 @@ public class VA_Driver {
distInput = vaa
.getVaAdvanced(latLonInput, goodnessInput, distInput);
// Write the output.
BufferedWriter fos = new BufferedWriter(new OutputStreamWriter(
fos = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(output)));
String nameFormat = String.format("%s%ds", "%", max_name);
for (int i = 0; i < ns; ++i) {
@ -216,12 +221,40 @@ public class VA_Driver {
distInput[i]));
fos.newLine();
}
fos.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block. Please revise as appropriate.
statusHandler.handle(Priority.PROBLEM, "Could not read File ", e);
} catch (IOException e) {
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioe) {
statusHandler.handle(Priority.SIGNIFICANT,
"Error closing input file ["
+ goodnessFile.getName() + "]");
}
}
if (pis != null) {
try {
pis.close();
} catch (IOException ioe) {
statusHandler.handle(
Priority.SIGNIFICANT,
"Error closing input file ["
+ primary.getName() + "]");
}
}
if (fos != null) {
try {
fos.close();
} catch (IOException ioe) {
statusHandler.handle(Priority.SIGNIFICANT,
"Error closing output file [" + output.getName()
+ "]");
}
}
}
}