Merge "Omaha #2714 created satellite.gini edex plugin" into omaha_14.4.1

Former-commit-id: da81f4d7ceeb5251b69e72cfddde9e59de5a2da1
This commit is contained in:
Nate Jensen 2014-11-06 11:26:10 -06:00 committed by Gerrit Code Review
commit a943e8e9e0
44 changed files with 1022 additions and 1467 deletions

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Omaha #2714 find all satellite distribution files in localization and rename to match plugin
for x in $(find /awips2/edex/data/utility/edex_static -regex '^.*distribution/satellite.xml$')
do
target=${x/satellite.xml/satellite-gini.xml}
echo Renaming $x to $target
mv "$x" "$target"
done
echo Done

View file

@ -0,0 +1,22 @@
#!/bin/bash
# Omaha #2714 static tables have been replaced by XML backed in-memory lookup tables
DBUSER="awips"
DBNAME="metadata"
PSQL="/awips2/psql/bin/psql"
for table in satellite_creating_entities satellite_geostationary_positions satellite_physical_elements satellite_sector_ids satellite_sources satellite_units
do
echo Dropping table: $table
command="DROP TABLE $table"
if ${PSQL} -U ${DBUSER} -d ${DBNAME} -c "$command"
then
echo $table dropped successfully
else
echo problem dropping table: $table
fi
done
echo Done

View file

@ -1,7 +0,0 @@
#Thu Mar 26 10:24:53 CDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Satellite Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.satellite
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.14.1.qualifier
Bundle-Vendor: RAYTHEON
Export-Package: com.raytheon.edex.plugin.satellite,
com.raytheon.edex.plugin.satellite.dao,
@ -23,5 +23,3 @@ Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
com.raytheon.uf.edex.menus;bundle-version="1.0.0",
com.raytheon.uf.common.numeric;bundle-version="1.14.0"
Import-Package: com.raytheon.edex.exception,
org.apache.commons.logging

View file

@ -1,40 +0,0 @@
/**
* 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.
**/
INSERT INTO awips.satellite_creating_entities VALUES (2,'Miscellaneous');
INSERT INTO awips.satellite_creating_entities VALUES (3,'JERS');
INSERT INTO awips.satellite_creating_entities VALUES (4,'ERS-QuickSCAT-Scatterometer');
INSERT INTO awips.satellite_creating_entities VALUES (5,'POES-NPOESS');
INSERT INTO awips.satellite_creating_entities VALUES (6,'Composite');
INSERT INTO awips.satellite_creating_entities VALUES (7,'DMSP');
INSERT INTO awips.satellite_creating_entities VALUES (8,'GMS');
INSERT INTO awips.satellite_creating_entities VALUES (9,'METEOSAT');
INSERT INTO awips.satellite_creating_entities VALUES (10,'GOES-7(H) Reserved for future use.');
INSERT INTO awips.satellite_creating_entities VALUES (11,'GOES-8(I)');
INSERT INTO awips.satellite_creating_entities VALUES (12,'GOES-9(J)');
INSERT INTO awips.satellite_creating_entities VALUES (13,'GOES-10(K)');
INSERT INTO awips.satellite_creating_entities VALUES (14,'GOES-11(L)');
INSERT INTO awips.satellite_creating_entities VALUES (15,'GOES-12(M)');
INSERT INTO awips.satellite_creating_entities VALUES (16,'GOES-13(N)');
INSERT INTO awips.satellite_creating_entities VALUES (17,'GOES-14(O)');
INSERT INTO awips.satellite_creating_entities VALUES (18,'GOES-15(P)');
INSERT INTO awips.satellite_creating_entities VALUES (26,'NOAA16');
INSERT INTO awips.satellite_creating_entities VALUES (27,'NOAA17');
INSERT INTO awips.satellite_creating_entities VALUES (28,'NOAA18');
INSERT INTO awips.satellite_creating_entities VALUES (29,'NOAA19');

View file

@ -1,23 +0,0 @@
/**
* 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.
**/
INSERT INTO awips.satellite_geostationary_positions (satelliteName,height,latitude,longitude) VALUES ('GOES-11(L)',35794,0,-135);
INSERT INTO awips.satellite_geostationary_positions (satelliteName,height,latitude,longitude) VALUES ('GOES-12(M)',35794,0,-75);
INSERT INTO awips.satellite_geostationary_positions (satelliteName,height,latitude,longitude) VALUES ('GOES-13(N)',35794,0,-75);
INSERT INTO awips.satellite_geostationary_positions (satelliteName,height,latitude,longitude) VALUES ('GOES-15(P)',35794,0,-135);

View file

@ -1,83 +0,0 @@
/**
* 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.
**/
INSERT INTO awips.satellite_physical_elements VALUES (1,'Imager Visible');
INSERT INTO awips.satellite_physical_elements VALUES (2,'Imager 3.9 micron IR');
INSERT INTO awips.satellite_physical_elements VALUES (3,'Imager 6.7-6.5 micron IR (WV)');
INSERT INTO awips.satellite_physical_elements VALUES (4,'Imager 11 micron IR');
INSERT INTO awips.satellite_physical_elements VALUES (5,'Imager 12 micron IR');
INSERT INTO awips.satellite_physical_elements VALUES (6,'Imager 13 micron (IR)');
INSERT INTO awips.satellite_physical_elements VALUES (7,'Imager 1.3 micron (IR)');
INSERT INTO awips.satellite_physical_elements VALUES (8,'Reserved for future use');
INSERT INTO awips.satellite_physical_elements VALUES (9,'Reserved for future use');
INSERT INTO awips.satellite_physical_elements VALUES (10,'Reserved for future use');
INSERT INTO awips.satellite_physical_elements VALUES (11,'Reserved for future use');
INSERT INTO awips.satellite_physical_elements VALUES (12,'Reserved for future use');
INSERT INTO awips.satellite_physical_elements VALUES (13,'Imager Based Derived Lifted Index (LI)');
INSERT INTO awips.satellite_physical_elements VALUES (14,'Imager Based Derived Precipitable Water (PW)');
INSERT INTO awips.satellite_physical_elements VALUES (15,'Imager Based Derived Surface Skin Temp (SFC Skin)');
INSERT INTO awips.satellite_physical_elements VALUES (16,'Sounder Based Derived Lifted Index (LI)');
INSERT INTO awips.satellite_physical_elements VALUES (17,'Sounder Based Derived Precipitable Water (PW)');
INSERT INTO awips.satellite_physical_elements VALUES (18,'Sounder Based Derived Surface Skin Temp (SFC Skin)');
INSERT INTO awips.satellite_physical_elements VALUES (19,'Derived Convective Available Potential Energy (CAPE)');
INSERT INTO awips.satellite_physical_elements VALUES (20,'Derived land-sea temp');
INSERT INTO awips.satellite_physical_elements VALUES (21,'Derived Wind Index(WINDEX)');
INSERT INTO awips.satellite_physical_elements VALUES (22,'Derived Dry Microburst Potential Index (DMPI)');
INSERT INTO awips.satellite_physical_elements VALUES (23,'Derived Microburst Day Potential Index (MDPI)');
INSERT INTO awips.satellite_physical_elements VALUES (24,'Derived Convective Inhibition');
INSERT INTO awips.satellite_physical_elements VALUES (25,'Derived Volcano Imagery');
INSERT INTO awips.satellite_physical_elements VALUES (26,'Scatterometer Data');
INSERT INTO awips.satellite_physical_elements VALUES (27,'Gridded Cloud Top Pressure or Height');
INSERT INTO awips.satellite_physical_elements VALUES (28,'Gridded Cloud Amount');
INSERT INTO awips.satellite_physical_elements VALUES (29,'Rain fall rate');
INSERT INTO awips.satellite_physical_elements VALUES (30,'Surface wind speeds over oceans and Great Lakes');
INSERT INTO awips.satellite_physical_elements VALUES (31,'Surface wetness');
INSERT INTO awips.satellite_physical_elements VALUES (32,'Ice concentrations');
INSERT INTO awips.satellite_physical_elements VALUES (33,'Ice type');
INSERT INTO awips.satellite_physical_elements VALUES (34,'Ice edge');
INSERT INTO awips.satellite_physical_elements VALUES (35,'Cloud water content');
INSERT INTO awips.satellite_physical_elements VALUES (36,'Surface type');
INSERT INTO awips.satellite_physical_elements VALUES (37,'Snow indicator');
INSERT INTO awips.satellite_physical_elements VALUES (38,'Snow-water content');
INSERT INTO awips.satellite_physical_elements VALUES (39,'Derived volcano imagery');
INSERT INTO awips.satellite_physical_elements VALUES (40,'Low cloud base imagery');
INSERT INTO awips.satellite_physical_elements VALUES (41,'Sounder 14.71 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (42,'Sounder 14.37 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (43,'Sounder 14.06 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (44,'Sounder 13.64 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (45,'Sounder 13.37 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (46,'Sounder 12.66 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (47,'Sounder 12.02 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (48,'Sounder 11.03 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (49,'Sounder 9.71 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (50,'Sounder 7.43 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (51,'Sounder 7.02 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (52,'Sounder 6.51 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (53,'Sounder 4.57 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (54,'Sounder 4.52 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (55,'Sounder 4.45 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (56,'Sounder 4.13 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (57,'Sounder 3.98 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (58,'Sounder 3.74 micron imagery');
INSERT INTO awips.satellite_physical_elements VALUES (59,'Sounder Visible imagery');
INSERT INTO awips.satellite_physical_elements VALUES (60,'Percent of Normal TPW');
INSERT INTO awips.satellite_physical_elements VALUES (61,'Polar Vis');
INSERT INTO awips.satellite_physical_elements VALUES (62,'Polar 3.9u');
INSERT INTO awips.satellite_physical_elements VALUES (63,'Polar 3.7u');
INSERT INTO awips.satellite_physical_elements VALUES (64,'Polar IR');

View file

@ -1,30 +0,0 @@
/**
* 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.
**/
INSERT INTO awips.satellite_sector_ids VALUES (0,'Northern Hemisphere Composite');
INSERT INTO awips.satellite_sector_ids VALUES (1,'East CONUS');
INSERT INTO awips.satellite_sector_ids VALUES (2,'West CONUS');
INSERT INTO awips.satellite_sector_ids VALUES (3,'Alaska Regional');
INSERT INTO awips.satellite_sector_ids VALUES (4,'Alaska National');
INSERT INTO awips.satellite_sector_ids VALUES (5,'Hawaii Regional');
INSERT INTO awips.satellite_sector_ids VALUES (6,'Hawaii National');
INSERT INTO awips.satellite_sector_ids VALUES (7,'Puerto Rico Regional');
INSERT INTO awips.satellite_sector_ids VALUES (8,'Puerto Rico National');
INSERT INTO awips.satellite_sector_ids VALUES (9,'Supernational');
INSERT INTO awips.satellite_sector_ids VALUES (10,'NH Composite - Meteosat-GOES E-GOES W-GMS');

View file

@ -1,20 +0,0 @@
/**
* 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.
**/
insert into awips.satellite_sources values (1,'NESDIS')

View file

@ -1,36 +0,0 @@
/**
* 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.
**/
insert into awips.satellite_units values (2,'IRPixel');
insert into awips.satellite_units values (4,'IRPixel');
insert into awips.satellite_units values (5,'IRPixel');
insert into awips.satellite_units values (6,'IRPixel');
insert into awips.satellite_units values (7,'IRPixel');
insert into awips.satellite_units values (16,'SounderLiftedIndexPixel');
insert into awips.satellite_units values (17,'SounderPrecipWaterPixel');
insert into awips.satellite_units values (18,'SounderSkinTempPixel');
insert into awips.satellite_units values (27,'SounderCloudTopHeightPixel');
insert into awips.satellite_units values (28,'SounderCloudAmountPixel');
insert into awips.satellite_units values (29,'RainfallRatePixel');
insert into awips.satellite_units values (43,'IRPixel');
insert into awips.satellite_units values (48,'IRPixel');
insert into awips.satellite_units values (55,'IRPixel');
insert into awips.satellite_units values (57,'IRPixel');
insert into awips.satellite_units values (60,'PercentOfNormalTPWPixel');
insert into awips.satellite_units values (64,'IRPixel');

View file

@ -1,62 +0,0 @@
<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
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean class="com.raytheon.uf.common.status.logback.ThreadBasedAppender" factory-method="registerThreadPattern">
<constructor-arg value="satellite" />
<constructor-arg value="Ingest.Satellite.*" />
</bean>
<bean id="satelliteDecoder" class="com.raytheon.edex.plugin.satellite.SatelliteDecoder">
<property name="dao" ref="satelliteDao" />
</bean>
<bean id="satelliteDao" class="com.raytheon.edex.plugin.satellite.dao.SatelliteDao" depends-on="satelliteProperties">
<constructor-arg ref="satellitePluginName" />
</bean>
<bean id="satDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="satellite" />
<constructor-arg value="jms-durable:queue:Ingest.Satellite" />
<constructor-arg value="true" /> <!-- require valid distribution file for startup -->
</bean>
<camelContext id="sat-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!--
<endpoint id="satFileEndpoint" uri="file:${edex.home}/data/sbn/sat?noop=true&amp;idempotent=false" />
<route id="satFileConsumerRoute">
<from ref="satFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>satellite</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.Satellite" />
</route>
-->
<!-- Begin Sat routes -->
<route id="satIngestRoute">
<from uri="jms-durable:queue:Ingest.Satellite"/>
<setHeader headerName="pluginName">
<constant>satellite</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="satelliteDecoder" method="decode" />
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:sat?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -17,33 +17,42 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.edex.plugin.satellite.dao;
import com.raytheon.edex.plugin.satellite.gini.SatellitePosition;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
package com.raytheon.edex.plugin.satellite;
/**
* Data Access Object for retrieving satellie positions
* Exception thrown when errors happen decoding satellite data
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 1/10/2010 4335 bphillip Initial Creation
* Nov 05, 2014 2714 bclement Initial creation
*
* </pre>
*
* @author bphillip
* @author bclement
* @version 1.0
*/
public class SatellitePositionDao extends CoreDao {
public class SatelliteDecoderException extends Exception {
public SatellitePositionDao(){
super(DaoConfig.forClass(SatellitePosition.class));
private static final long serialVersionUID = -1935587862793689258L;
public SatelliteDecoderException() {
super();
}
public SatellitePosition queryById(String satelliteName){
return (SatellitePosition)super.queryById(satelliteName);
public SatelliteDecoderException(String message, Throwable cause) {
super(message, cause);
}
public SatelliteDecoderException(String message) {
super(message);
}
public SatelliteDecoderException(Throwable cause) {
super(cause);
}
}

View file

@ -1,56 +0,0 @@
/**
* 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.satellite.dao;
import com.raytheon.edex.plugin.satellite.gini.SatelliteCreatingEntity;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
/**
* Data Access Object for interacting with satellite creating entities
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
public class SatelliteCreatingEntityDao extends CoreDao {
/**
* Constructs a new SatelliteCreatingEntityDao
*/
public SatelliteCreatingEntityDao() {
super(DaoConfig.forClass(SatelliteCreatingEntity.class));
}
public SatelliteCreatingEntity queryById(int entityId) {
return (SatelliteCreatingEntity) super.queryById(entityId);
}
public String getCreatingEntityName(int entityId){
return queryById(entityId).getEntityName();
}
}

View file

@ -25,12 +25,6 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import com.raytheon.edex.plugin.satellite.gini.SatelliteCreatingEntity;
import com.raytheon.edex.plugin.satellite.gini.SatellitePhysicalElement;
import com.raytheon.edex.plugin.satellite.gini.SatellitePosition;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSectorId;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSource;
import com.raytheon.edex.plugin.satellite.gini.SatelliteUnit;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
@ -72,6 +66,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* Nov 14, 2013 2393 bclement moved interpolation code to parent class
* Mar 07, 2014 2791 bsteffen Move Data Source/Destination to numeric
* plugin.
* Nov 04, 2014 2714 bclement removed GINI specific DAOs
* </pre>
*
* @author bphillip
@ -79,24 +74,6 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
*/
public class SatelliteDao extends PluginDao {
/** The creating entity data access object */
private SatelliteCreatingEntityDao creatingEntityDao = new SatelliteCreatingEntityDao();
/** The physical element data access object */
private SatellitePhysicalElementDao physicalElementDao = new SatellitePhysicalElementDao();
/** The sector ID data access object */
private SatelliteSectorIdDao sectorIdDao = new SatelliteSectorIdDao();
/** The source data access object */
private SatelliteSourceDao sourceDao = new SatelliteSourceDao();
/** The satellite unit data access object */
private SatelliteUnitDao unitDao = new SatelliteUnitDao();
/** The satellite position data access object */
private SatellitePositionDao positionDao = new SatellitePositionDao();
/**
* Creates a new satellite data access object
*
@ -387,122 +364,6 @@ public class SatelliteDao extends PluginDao {
return times;
}
/**
* Gets a SatelliteCreatingEntity with the given id
*
* @param entityId
* The entity id
* @return The SatelliteCreatingEntity with the given id
*/
public SatelliteCreatingEntity getCreatingEntity(int entityId) {
return creatingEntityDao.queryById(entityId);
}
/**
* Gets a SatellitePhysicalElement with the given id
*
* @param elementId
* The physical element id
* @return The SatellitePhysicalElement with the given id
*/
public SatellitePhysicalElement getPhysicalElement(int elementId) {
return physicalElementDao.queryById(elementId);
}
/**
* Gets a SatelliteSectorId with the given id
*
* @param sectorId
* The sector id
* @return The SatelliteSectorId with the given id
*/
public SatelliteSectorId getSectorId(int sectorId) {
return sectorIdDao.queryById(sectorId);
}
/**
* Gest a SatelliteSource with the given id
*
* @param sourceId
* The source id
* @return The SatelliteSource with the given id
*/
public SatelliteSource getSource(int sourceId) {
return sourceDao.queryById(sourceId);
}
/**
* Gets a SatelliteUnit with the given id
*
* @param unitId
* The unit id
* @return The SatelliteUnit with the given id
*/
public SatelliteUnit getUnit(int unitId) {
return unitDao.queryById(unitId);
}
/**
* Gets a SatellitePosition object for the given satellite name
*
* @param satelliteName
* The satellite name to get the SatellitePosition for
* @return The SatellitePosition for this given satellite name
*/
public SatellitePosition getSatellitePosition(String satelliteName) {
return positionDao.queryById(satelliteName);
}
public SatelliteCreatingEntityDao getCreatingEntityDao() {
return creatingEntityDao;
}
public void setCreatingEntityDao(
SatelliteCreatingEntityDao creatingEntityDao) {
this.creatingEntityDao = creatingEntityDao;
}
public SatellitePhysicalElementDao getPhysicalElementDao() {
return physicalElementDao;
}
public void setPhysicalElementDao(
SatellitePhysicalElementDao physicalElementDao) {
this.physicalElementDao = physicalElementDao;
}
public SatelliteSectorIdDao getSectorIdDao() {
return sectorIdDao;
}
public void setSectorIdDao(SatelliteSectorIdDao sectorIdDao) {
this.sectorIdDao = sectorIdDao;
}
public SatelliteSourceDao getSourceDao() {
return sourceDao;
}
public void setSourceDao(SatelliteSourceDao sourceDao) {
this.sourceDao = sourceDao;
}
public SatelliteUnitDao getUnitDao() {
return unitDao;
}
public void setUnitDao(SatelliteUnitDao unitDao) {
this.unitDao = unitDao;
}
public SatellitePositionDao getPositionDao() {
return positionDao;
}
public void setPositionDao(SatellitePositionDao positionDao) {
this.positionDao = positionDao;
}
/**
* Create the {@link IDataRecord} from the {@link DataDestination} using the
* original satellite data, size and

View file

@ -1,62 +0,0 @@
/**
* 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.satellite.dao;
import com.raytheon.edex.plugin.satellite.gini.SatellitePhysicalElement;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
/**
* A satellite creating entity
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
public class SatellitePhysicalElementDao extends CoreDao {
/**
* Constructs a new SatellitePhysicalElementDao
*/
public SatellitePhysicalElementDao() {
super(DaoConfig.forClass(SatellitePhysicalElement.class));
}
/**
* Retrieves a SatellitePhysicalElementDao by the given id
*
* @param elementId
* The physical element id
* @return The physical element
*/
public SatellitePhysicalElement queryById(int elementId) {
return (SatellitePhysicalElement) super.queryById(elementId);
}
public String getPhysicalElementName(int elementId){
return queryById(elementId).getElementName();
}
}

View file

@ -1,64 +0,0 @@
/**
* 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.satellite.dao;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSectorId;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
/**
* A satellite creating entity
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
public class SatelliteSectorIdDao extends CoreDao {
/**
* Construcst a new SectorIdDao
*/
public SatelliteSectorIdDao() {
super(DaoConfig.forClass(SatelliteSectorId.class));
}
/**
* Retrieves a SatelliteSectorId based on the given sector id
*
* @param sectorId
* The sector id number
* @return The satellite sector
*/
public SatelliteSectorId queryById(int sectorId) {
return (SatelliteSectorId) super.queryById(sectorId);
}
public String getSectorIdName(int sectorId){
return queryById(sectorId).getSectorName();
}
}

View file

@ -1,100 +0,0 @@
/**
* 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.satellite.dao;
import java.util.List;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSource;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
import com.raytheon.uf.edex.database.query.DatabaseQuery;
/**
* Data Access Object for interacting with satellite sources
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
public class SatelliteSourceDao extends CoreDao {
/**
* Constructs a new SatelliteSourceDao
*/
public SatelliteSourceDao() {
super(DaoConfig.forClass(SatelliteSource.class));
}
/**
* Retrieves a SatelliteSource given an id
*
* @param sourceId
* The source id
* @return The Satellite source with the given ID
*/
public SatelliteSource queryById(int sourceId) {
return (SatelliteSource) super.queryById(sourceId);
}
/**
* Gets the source id given the name
*
* @param sourceName
* The source name
* @return The source id corresponding to the given name
* @throws DataAccessLayerException
* If errors occur during query
*/
@SuppressWarnings("unchecked")
public Integer getSourceId(String sourceName)
throws DataAccessLayerException {
DatabaseQuery query = new DatabaseQuery(daoClass.getName());
query.addReturnedField("sourceId");
query.addQueryParam("sourceName", sourceName);
List<Integer> sources = (List<Integer>) this.queryByCriteria(query);
if (sources.isEmpty()) {
return null;
} else {
return sources.get(0);
}
}
/**
* Gets the source name given the id
*
* @param sourceId
* The source id
* @return The source name
* @throws DataAccessLayerException
* If errors occur during query
*/
@SuppressWarnings("unchecked")
public String getSourceName(int sourceId){
return queryById(sourceId).getSourceName();
}
}

View file

@ -1,36 +0,0 @@
/**
* 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.satellite.dao;
import com.raytheon.edex.plugin.satellite.gini.SatelliteUnit;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
public class SatelliteUnitDao extends CoreDao {
public SatelliteUnitDao() {
super(DaoConfig.forClass(SatelliteUnit.class));
}
public SatelliteUnit queryById(int id){
return (SatelliteUnit) super.queryById(id);
}
}

View file

@ -1,100 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* A satellite creating entity
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
@Entity
@Table(name = "satellite_creating_entities")
public class SatelliteCreatingEntity extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = -4678013903413236803L;
/** The id of the creating entity */
@Id
private int entityId;
/** The name of the creating entity */
@Column(length = 64)
private String entityName;
/**
* Constructs and empty SatelliteCreatingEntity
*/
public SatelliteCreatingEntity() {
}
/**
* Constructs a new creating entity
*
* @param entityId
* The entity id
* @param entityName
* The entity name
*/
public SatelliteCreatingEntity(int entityId, String entityName) {
this.entityId = entityId;
this.entityName = entityName;
}
public int getEntityId() {
return entityId;
}
public void setEntityId(int entityId) {
this.entityId = entityId;
}
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String toString() {
return entityName;
}
}

View file

@ -1,99 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* A satellite physical element
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
@Entity
@Table(name = "satellite_physical_elements")
public class SatellitePhysicalElement extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = 8429844485032687146L;
/** The physical element id */
@Id
private int elementId;
/** The physical element name */
@Column(length = 64)
private String elementName;
/**
* Constructs an empty SatellitePhysicalElement
*/
public SatellitePhysicalElement() {
}
/**
* Constructs a new SatellitePhysicalElement
*
* @param elementId
* The element id
* @param elementName
* The element name
*/
public SatellitePhysicalElement(int elementId, String elementName) {
this.elementId = elementId;
this.elementName = elementName;
}
public int getElementId() {
return elementId;
}
public void setElementId(int elementId) {
this.elementId = elementId;
}
public String getElementName() {
return elementName;
}
public void setElementName(String elementName) {
this.elementName = elementName;
}
public String toString() {
return elementName;
}
}

View file

@ -1,169 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* Object describing the position of a geostationary satellite.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/22/2010 4335 bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
@Entity
@Table(name = "satellite_geostationary_positions")
public class SatellitePosition extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = 1854243110517231052L;
/** The name of the satellite */
@Id
private String satelliteName;
/** The height in km of the satellite above the earth's surface */
@Column
private int height;
/** The latitude sub point of the satellite */
@Column
private float latitude;
/** The longitude sub point of the satellite */
@Column
private float longitude;
/**
* Constructs an empty SatellitePosition
*/
public SatellitePosition() {
}
/**
* Constructs a SatellitePosition
*
* @param satelliteName
* The satellite name
* @param height
* The height in km of the satellite above the earth's surface
* @param latitude
* The latitude sub point of the satellite
* @param longitude
* The longitude sub point of the satellite
*/
public SatellitePosition(String satelliteName, int height, float latitude,
float longitude) {
this.satelliteName = satelliteName;
this.height = height;
this.latitude = latitude;
this.longitude = longitude;
}
/**
* Gets the satellite name
*
* @return The satellite name
*/
public String getSatelliteName() {
return satelliteName;
}
/**
* Sets the satellite name
*
* @param satelliteName
* The satellite name
*/
public void setSatelliteName(String satelliteName) {
this.satelliteName = satelliteName;
}
/**
* Gets the satellite height
*
* @return The satellite height
*/
public int getHeight() {
return height;
}
/**
* Sets the satellite height
*
* @param height
* The satellite height
*/
public void setHeight(int height) {
this.height = height;
}
/**
* Gets the satellite's latitude sub point
*
* @return The latitude sub point
*/
public float getLatitude() {
return latitude;
}
/**
* Sets the satellite's latitude sub point
*
* @param latitude
* The latitude sub point
*/
public void setLatitude(float latitude) {
this.latitude = latitude;
}
/**
* Gets the satellite's longitude sub point
*
* @return The satellite's longitude sub point
*/
public float getLongitude() {
return longitude;
}
/**
* Sets the satellite's longitude sub point
*
* @param longitude
* The satellite's longitude sub point
*/
public void setLongitude(float longitude) {
this.longitude = longitude;
}
}

View file

@ -1,100 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* A satellite sector id
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
@Entity
@Table(name = "satellite_sector_ids")
public class SatelliteSectorId extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = 2745578024205645114L;
/** The sector id number */
@Id
private int sectorId;
/** The sector id name */
@Column(length = 64)
private String sectorName;
/**
* Constructs and empty SatelliteSectorId
*/
public SatelliteSectorId() {
}
/**
* Constructs a new SatelliteSectorId
*
* @param sectorId
* The sector id number
* @param sectorName
* The sector name
*/
public SatelliteSectorId(int sectorId, String sectorName) {
this.sectorId = sectorId;
this.sectorName = sectorName;
}
public int getSectorId() {
return sectorId;
}
public void setSectorId(int sectorId) {
this.sectorId = sectorId;
}
public String getSectorName() {
return sectorName;
}
public void setSectorName(String sectorName) {
this.sectorName = sectorName;
}
public String toString() {
return sectorName;
}
}

View file

@ -1,100 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* A satellite source i.e. NESDIS
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* bphillip Initial Creation
* </pre>
*
* @author bphillip
* @version 1.0
*/
@Entity
@Table(name = "satellite_sources")
public class SatelliteSource extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = 5855029407853840979L;
/** The source id number */
@Id
private int sourceId;
/** The source name */
@Column(length = 64)
private String sourceName;
/**
* Constructs an empty SatelliteSource
*/
public SatelliteSource() {
}
/**
* Constructs a new SatelliteSource
*
* @param id
* The source id
* @param name
* The source name
*/
public SatelliteSource(int id, String name) {
this.sourceId = id;
this.sourceName = name;
}
public int getSourceId() {
return sourceId;
}
public void setSourceId(int sourceId) {
this.sourceId = sourceId;
}
public String getSourceName() {
return sourceName;
}
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
public String toString() {
return sourceName;
}
}

View file

@ -1,68 +0,0 @@
/**
* 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.satellite.gini;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
@Entity
@Table(name = "satellite_units")
public class SatelliteUnit extends PersistableDataObject implements
Serializable {
private static final long serialVersionUID = 1L;
@Id
private int unitNumber;
@Column(length = 32)
private String unitName;
public SatelliteUnit() {
}
public SatelliteUnit(int number, String name) {
this.unitNumber = number;
this.unitName = name;
}
public int getUnitNumber() {
return unitNumber;
}
public void setUnitNumber(int unitNumber) {
this.unitNumber = unitNumber;
}
public String getUnitName() {
return unitName;
}
public void setUnitName(String unitName) {
this.unitName = unitName;
}
}

View file

@ -24,7 +24,7 @@ import org.geotools.geometry.DirectPosition2D;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.operation.MathTransform;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.satellite.SatelliteDecoderException;
import com.raytheon.edex.plugin.satellite.dao.SatMapCoverageDao;
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.geospatial.MapUtil;
@ -45,6 +45,7 @@ import com.vividsolutions.jts.geom.Envelope;
* either one corner + dx/dy or two corners.
* Jun 05, 2014 3243 bsteffen Remove deprecated lambert conformal call.
* Sep 15, 2014 DR 17303 jgerth Support for second standard latitude
* Nov 05, 2014 2714 bclement replaced DecoderException with SatelliteDecoderException
*
* </pre>
*/
@ -168,7 +169,7 @@ public class SatSpatialFactory {
*/
public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny,
double lov, double latin, double latin2, double la1, double lo1, double dx,
double dy) throws DecoderException {
double dy) throws SatelliteDecoderException {
try {
ProjectedCRS crs = createCRS(crsType, lov, latin, latin2, 0.0);
DirectPosition2D corner = new DirectPosition2D(lo1, la1);
@ -193,7 +194,7 @@ public class SatSpatialFactory {
buf.append("lo1=" + lo1).append("\n\t");
buf.append("dx=" + dx).append("\n\t");
buf.append("dy=" + dy).append("\n");
throw new DecoderException(buf.toString(), e);
throw new SatelliteDecoderException(buf.toString(), e);
}
}
@ -202,7 +203,7 @@ public class SatSpatialFactory {
*/
public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double dx,
double dy) throws DecoderException {
double dy) throws SatelliteDecoderException {
return getCoverageSingleCorner(crsType, nx, ny, lov, latin, latin, la1, lo1, dx, dy);
}
@ -242,7 +243,7 @@ public class SatSpatialFactory {
*/
public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny,
double lov, double latin, double latin2, double la1, double lo1, double la2,
double lo2) throws DecoderException {
double lo2) throws SatelliteDecoderException {
try {
double cm = 0.0;
if ((lo1 > 0.0) && (lo2 < 0.0)) {
@ -273,7 +274,7 @@ public class SatSpatialFactory {
buf.append("lo1=" + lo1).append("\n\t");
buf.append("la2=" + la2).append("\n\t");
buf.append("lo2=" + lo2).append("\n");
throw new DecoderException(buf.toString(), e);
throw new SatelliteDecoderException(buf.toString(), e);
}
}
@ -282,7 +283,7 @@ public class SatSpatialFactory {
*/
public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double la2,
double lo2) throws DecoderException {
double lo2) throws SatelliteDecoderException {
return getCoverageTwoCorners(crsType, nx, ny, lov, latin, latin, la1, lo1, la2, lo2);
}

View file

@ -53,6 +53,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Derived Products Imagery Display
* Nov 01, 2012 15346 kshresth Added Satellite Products for OCONUS
* Jun 05, 2014 3243 bsteffen Remove deprecated lambert conformal call.
* Nov 05, 2014 2714 bclement made constants protected to remove warnings
*
*
* </pre>
@ -70,16 +71,16 @@ public class SatelliteMenuUtil extends AbstractMenuUtil {
MapUtil.AWIPS_EARTH_RADIUS, 25, 25, -95, 25);
// The western edge of the west conus satellite image in conusCRS
private static final double westConusWestEdge = -4226066.525608903;
protected static final double westConusWestEdge = -4226066.525608903;
// The eastern edge of the west conus satellite image in conusCRS
private static final double westConusEastEdge = 243783.47439109907;
protected static final double westConusEastEdge = 243783.47439109907;
// The eastern edge of the east conus satellite image in conusCRS
private static final double eastConusEastEdge = 3250785.858985792;
protected static final double eastConusEastEdge = 3250785.858985792;
// The western edge of the east conus satellite image in conusCRS
private static final double eastConusWestEdge = -1950494.1410142092;
protected static final double eastConusWestEdge = -1950494.1410142092;
@Override
public void createMenus() {

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.edex.plugin.satellite.gini</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: EDEX Satellite Gini
Bundle-SymbolicName: com.raytheon.uf.edex.plugin.satellite.gini
Bundle-Version: 1.14.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: com.raytheon.edex.plugin.satellite;bundle-version="1.14.1",
com.raytheon.uf.common.status;bundle-version="1.14.1",
com.raytheon.uf.common.time;bundle-version="1.14.0",
com.raytheon.uf.common.dataplugin;bundle-version="1.14.0",
com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.14.0",
com.raytheon.uf.common.serialization;bundle-version="1.14.2",
com.raytheon.uf.common.localization;bundle-version="1.14.1",
com.raytheon.uf.common.util;bundle-version="1.14.1",
com.raytheon.uf.edex.core;bundle-version="1.14.1",
com.raytheon.uf.common.datastorage;bundle-version="1.14.0"

View file

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

View file

@ -0,0 +1,44 @@
<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
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean class="com.raytheon.uf.common.status.logback.ThreadBasedAppender" factory-method="registerThreadPattern">
<constructor-arg value="satellite" />
<constructor-arg value="Ingest.Gini.*" />
</bean>
<bean id="giniDecoder" class="com.raytheon.uf.edex.plugin.satellite.gini.GiniSatelliteDecoder" />
<bean id="giniDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="satellite.gini" />
<constructor-arg value="jms-durable:queue:Ingest.Gini" />
<constructor-arg value="true" /> <!-- require valid distribution file for startup -->
</bean>
<camelContext id="gini-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!-- Begin Gini routes -->
<route id="giniIngestRoute">
<from uri="jms-durable:queue:Ingest.Gini"/>
<setHeader headerName="pluginName">
<constant>satellite</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="giniDecoder" method="decode" />
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gini?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -18,7 +18,7 @@
* further licensing information.
**/
package com.raytheon.edex.plugin.satellite;
package com.raytheon.uf.edex.plugin.satellite.gini;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -26,19 +26,13 @@ import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.util.Calendar;
import java.util.Map;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.satellite.dao.SatelliteDao;
import com.raytheon.edex.plugin.satellite.gini.SatelliteCreatingEntity;
import com.raytheon.edex.plugin.satellite.gini.SatellitePhysicalElement;
import com.raytheon.edex.plugin.satellite.gini.SatellitePosition;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSectorId;
import com.raytheon.edex.plugin.satellite.gini.SatelliteSource;
import com.raytheon.edex.plugin.satellite.gini.SatelliteUnit;
import com.raytheon.edex.plugin.satellite.SatelliteDecoderException;
import com.raytheon.edex.util.satellite.SatSpatialFactory;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.exception.UnrecognizedDataException;
@ -46,6 +40,10 @@ import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteMessageData;
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.PerformanceStatus;
@ -54,7 +52,11 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.util.ITimer;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.ArraysUtil;
import com.raytheon.uf.common.util.FileUtil;
import com.raytheon.uf.common.util.header.WMOHeaderFinder;
import com.raytheon.uf.edex.plugin.satellite.gini.lookup.GeostationaryPosition;
import com.raytheon.uf.edex.plugin.satellite.gini.lookup.GeostationaryPositionTable;
import com.raytheon.uf.edex.plugin.satellite.gini.lookup.NumericLookupTable;
/**
* Decodes GINI formatted satelitte data into {@link SatelliteRecord}s.
@ -92,13 +94,16 @@ import com.raytheon.uf.common.util.header.WMOHeaderFinder;
* Jan 20, 2014 2359 njensen Better error handling when fields are not
* recognized
* Apr 15, 2014 3017 bsteffen Call new methods in SatSpatialFactory
* Nov 04, 2014 2714 bclement moved from satellite to satellite.gini
* renamed from SatelliteDecoder to GiniDecoder
* replaced database lookups with in memory tables
*
* </pre>
*
* @author bphillip
* @version 1
*/
public class SatelliteDecoder {
public class GiniSatelliteDecoder {
private IUFStatusHandler statusHandler = UFStatus.getHandler(getClass());
@ -115,9 +120,101 @@ public class SatelliteDecoder {
private final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("Satellite:");
private SatelliteDao dao;
public static final String LOOKUP_LOCALIZATION_DIR = System.getProperty(
"gini.lookup.table.dir", "satellite/gini/lookuptables");
public PluginDataObject[] decode(File file) throws Exception {
private static final String CREATING_ENTITY_TABLE_ID = "creatingEntities";
private static final String PHYSICAL_ELEMENT_TABLE_ID = "physicalElements";
private static final String SECTOR_ID_TABLE_ID = "sectorIds";
private static final String SOURCE_TABLE_ID = "sources";
private static final String UNIT_TABLE_ID = "units";
private static final String POSITION_TABLE_ID = "geostationaryPositions";
private final NumericLookupTable creatingEntityTable;
private final NumericLookupTable physicalElementTable;
private final NumericLookupTable sectorIdTable;
private final NumericLookupTable sourceTable;
private final NumericLookupTable unitTable;
private final Map<String, GeostationaryPosition> positionMap;
/**
* @throws Exception
* if lookup tables cannot be initialized
*/
public GiniSatelliteDecoder() throws Exception {
SingleTypeJAXBManager<NumericLookupTable> numericManager = new SingleTypeJAXBManager<>(
false, NumericLookupTable.class);
this.creatingEntityTable = createTable(numericManager,
CREATING_ENTITY_TABLE_ID);
this.physicalElementTable = createTable(numericManager,
PHYSICAL_ELEMENT_TABLE_ID);
this.sectorIdTable = createTable(numericManager, SECTOR_ID_TABLE_ID);
this.sourceTable = createTable(numericManager, SOURCE_TABLE_ID);
this.unitTable = createTable(numericManager, UNIT_TABLE_ID);
SingleTypeJAXBManager<GeostationaryPositionTable> positionManager = new SingleTypeJAXBManager<>(
false, GeostationaryPositionTable.class);
GeostationaryPositionTable positionTable = createTable(positionManager,
POSITION_TABLE_ID);
this.positionMap = positionTable.createMap();
}
/**
* Read in lookup table XML from localization and unmarshal into table
* object
*
* @param manager
* @param id
* @return
* @throws SatelliteDecoderException
*/
@SuppressWarnings("unchecked")
private <T> T createTable(SingleTypeJAXBManager<T> manager, String id)
throws SatelliteDecoderException {
T rval = null;
try {
IPathManager pathManager = PathManagerFactory.getPathManager();
String filename = FileUtil.join(LOOKUP_LOCALIZATION_DIR, id
+ ".xml");
LocalizationFile file = pathManager
.getStaticLocalizationFile(filename);
if (file != null) {
rval = (T) manager.unmarshalFromInputStream(file
.openInputStream());
}
if (rval == null) {
throw new SatelliteDecoderException(
"Unable to find table XML file: "
+ filename);
}
} catch (Exception e) {
throw new SatelliteDecoderException("Unable to initialize gini "
+ "satellite lookup table: " + id, e);
}
return rval;
}
/**
* Parses GINI satellite file and populates a SatelliteRecord
*
* @param file
* @return a pdo array with one entry on success or an empty array on parse
* error
* @throws IOException
* if file cannot be read
*/
public PluginDataObject[] decode(File file) throws IOException {
PluginDataObject[] retData = null;
@ -137,7 +234,7 @@ public class SatelliteDecoder {
try {
removeWmoHeader(byteBuffer);
} catch (DecoderException e) {
} catch (SatelliteDecoderException e) {
statusHandler.error("Error removing WMO header", e);
byteBuffer = null;
}
@ -182,47 +279,45 @@ public class SatelliteDecoder {
// read the source
byte sourceByte = byteBuffer.get(0);
SatelliteSource source = dao.getSource(sourceByte);
String source = sourceTable.lookup(sourceByte);
if (source == null) {
throw new UnrecognizedDataException(
"Unknown satellite source id: " + sourceByte);
}
record.setSource(source.getSourceName());
record.setSource(source);
// read the creating entity
byte entityByte = byteBuffer.get(1);
SatelliteCreatingEntity entity = dao
.getCreatingEntity(entityByte);
String entity = creatingEntityTable.lookup(entityByte);
if (entity == null) {
throw new UnrecognizedDataException(
"Unknown satellite entity id: " + entityByte);
}
record.setCreatingEntity(entity.getEntityName());
record.setCreatingEntity(entity);
// read the sector ID
byte sectorByte = byteBuffer.get(2);
SatelliteSectorId sector = dao.getSectorId(sectorByte);
String sector = sectorIdTable.lookup(sectorByte);
if (sector == null) {
throw new UnrecognizedDataException(
"Unknown satellite sector id: " + sectorByte);
}
record.setSectorID(sector.getSectorName());
record.setSectorID(sector);
// read the physical element
byte physByte = byteBuffer.get(3);
SatellitePhysicalElement physElem = dao
.getPhysicalElement(physByte);
String physElem = physicalElementTable.lookup(physByte);
if (physElem == null) {
throw new UnrecognizedDataException(
"Unknown satellite physical element id: "
+ physByte);
}
record.setPhysicalElement(physElem.getElementName());
record.setPhysicalElement(physElem);
// read the units
SatelliteUnit unit = dao.getUnit(byteBuffer.get(3));
String unit = unitTable.lookup(byteBuffer.get(3));
if (unit != null) {
record.setUnits(unit.getUnitName());
record.setUnits(unit);
}
// read the century
@ -300,8 +395,8 @@ public class SatelliteDecoder {
record.setSatSubPointLon(lonSub);
record.setSatHeight(satHeight);
} else {
SatellitePosition position = dao
.getSatellitePosition(record.getCreatingEntity());
GeostationaryPosition position = positionMap.get(record
.getCreatingEntity());
if (position == null) {
statusHandler
.info("Unable to determine geostationary location of ["
@ -414,8 +509,7 @@ public class SatelliteDecoder {
*/
mapCoverage = SatSpatialFactory.getInstance()
.getCoverageSingleCorner(mapProjection, nx, ny,
lov,
latin, la1, lo1, dx, dy);
lov, latin, la1, lo1, dx, dy);
}
// Do specialized decoding and retrieve spatial data for
// Mercator projection
@ -435,7 +529,7 @@ public class SatelliteDecoder {
latin, la1, lo1, la2, lo2);
} else {
throw new DecoderException(
throw new SatelliteDecoderException(
"Unable to decode GINI Satellite: Encountered Unknown projection: "
+ mapProjection);
}
@ -479,7 +573,7 @@ public class SatelliteDecoder {
* position is set the beginning of the GINI header.
*/
private void removeWmoHeader(ByteBuffer messageData)
throws DecoderException {
throws SatelliteDecoderException {
// Copy to a char [], carefully, as creating a string from
// a byte [] with binary data can create erroneous data
@ -497,11 +591,12 @@ public class SatelliteDecoder {
messageData.position(startOfSatellite);
messageData.limit(messageData.capacity());
} else {
throw new DecoderException(
throw new SatelliteDecoderException(
"First character of the WMO header must be 'T'");
}
} else {
throw new DecoderException("Cannot decode an empty WMO header");
throw new SatelliteDecoderException(
"Cannot decode an empty WMO header");
}
}
@ -536,7 +631,7 @@ public class SatelliteDecoder {
* @throws DecoderException
*/
private byte[][] decompressSatellite(byte[] messageData)
throws DecoderException {
throws SatelliteDecoderException {
byte[] retVal = null;
boolean firstCall = true;
@ -575,7 +670,7 @@ public class SatelliteDecoder {
// check to see if the decompression used the buffer w/o
// finishing - this indicates a truncated file
if (inflatedBytes == 0) {
throw new DecoderException(
throw new SatelliteDecoderException(
"Unable to decompress satellite data - input data appears to be truncated");
}
// retrieve the total compressed bytes input so far
@ -612,7 +707,8 @@ public class SatelliteDecoder {
decompressor.reset();
}
} catch (DataFormatException e) {
throw new DecoderException("Unable to decompress satellite data", e);
throw new SatelliteDecoderException(
"Unable to decompress satellite data", e);
} finally {
decompressor.end();
inputArray = null;
@ -732,11 +828,4 @@ public class SatelliteDecoder {
return longitude / 10000;
}
public SatelliteDao getDao() {
return dao;
}
public void setDao(SatelliteDao dao) {
this.dao = dao;
}
}

View file

@ -0,0 +1,125 @@
/**
* 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.edex.plugin.satellite.gini.lookup;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Config XML object for GINI satellite geostationary position table entry
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 4, 2014 2714 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class GeostationaryPosition {
@XmlAttribute(required = true)
private String id;
@XmlAttribute(required = true)
private int height;
@XmlAttribute(required = true)
private float latitude;
@XmlAttribute(required = true)
private float longitude;
/**
*
*/
public GeostationaryPosition() {
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the height
*/
public int getHeight() {
return height;
}
/**
* @param height
* the height to set
*/
public void setHeight(int height) {
this.height = height;
}
/**
* @return the latitude
*/
public float getLatitude() {
return latitude;
}
/**
* @param latitude
* the latitude to set
*/
public void setLatitude(float latitude) {
this.latitude = latitude;
}
/**
* @return the longitude
*/
public float getLongitude() {
return longitude;
}
/**
* @param longitude
* the longitude to set
*/
public void setLongitude(float longitude) {
this.longitude = longitude;
}
}

View file

@ -0,0 +1,92 @@
/**
* 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.edex.plugin.satellite.gini.lookup;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Config XML object for GINI satellite geostationary position table
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 4, 2014 2714 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class GeostationaryPositionTable {
@XmlElement(name = "entry")
private List<GeostationaryPosition> entries;
/**
*
*/
public GeostationaryPositionTable() {
}
/**
* @return table entries mapped by id
*/
public Map<String, GeostationaryPosition> createMap() {
Map<String, GeostationaryPosition> rval;
if (entries == null) {
rval = Collections.emptyMap();
} else {
rval = new ConcurrentHashMap<>(entries.size());
for (GeostationaryPosition pos : entries) {
rval.put(pos.getId(), pos);
}
}
return rval;
}
/**
* @return the entries
*/
public List<GeostationaryPosition> getEntries() {
return entries;
}
/**
* @param entries
* the entries to set
*/
public void setEntries(List<GeostationaryPosition> entries) {
this.entries = entries;
}
}

View file

@ -0,0 +1,137 @@
/**
* 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.edex.plugin.satellite.gini.lookup;
import java.util.List;
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;
/**
* Config XML object for GINI satellite numerically indexed table
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 4, 2014 2714 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class NumericLookupTable {
@XmlAttribute(required = true)
private String id;
@XmlElement(name = "entry")
private List<NumericTableEntry> entries;
private transient volatile String[] indexedValues;
/**
*
*/
public NumericLookupTable() {
}
/**
* @param key
* @return value associated with key or null if not found
*/
public String lookup(int key) {
if (entries == null || entries.isEmpty()) {
return null;
}
if (indexedValues == null) {
synchronized (this) {
if (indexedValues == null) {
indexedValues = indexEntries(entries);
}
}
}
String rval = null;
if (key > -1 && key < indexedValues.length) {
rval = indexedValues[key];
}
return rval;
}
/**
* Create an array large enough to fit all table elements and populate from
* entries. Array may have null values.
*
* @param entries
* @return
*/
private String[] indexEntries(List<NumericTableEntry> entries) {
/* loop to account for out of place entries */
int max = Integer.MIN_VALUE;
for (NumericTableEntry entry : entries) {
max = Math.max(max, entry.getIndex());
}
/* populate lookup table which may have holes */
String[] rval = new String[max + 1];
for (NumericTableEntry entry : entries) {
rval[entry.getIndex()] = entry.getValue();
}
return rval;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the entries
*/
public List<NumericTableEntry> getEntries() {
return entries;
}
/**
* @param entries
* the entries to set
*/
public void setEntries(List<NumericTableEntry> entries) {
this.entries = entries;
}
}

View file

@ -0,0 +1,106 @@
/**
* 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.edex.plugin.satellite.gini.lookup;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Config XML object for GINI satellite numerically indexed table entry
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 4, 2014 2714 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class NumericTableEntry implements Comparable<NumericTableEntry> {
@XmlAttribute(required = true)
private int index;
@XmlAttribute
private String value;
/**
*
*/
public NumericTableEntry() {
}
/**
* @return the index
*/
public int getIndex() {
return index;
}
/**
* @param index
* the index to set
*/
public void setIndex(int index) {
this.index = index;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value
* the value to set
*/
public void setValue(String value) {
this.value = value;
}
/*
* (non-Javadoc)
*
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override
public int compareTo(NumericTableEntry o) {
int rval;
if (o == null) {
rval = 1;
} else {
rval = Integer.compare(index, o.index);
}
return rval;
}
}

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<numericLookupTable id="creatingEntities">
<entry index="2" value="Miscellaneous" />
<entry index="3" value="JERS" />
<entry index="4" value="ERS-QuickSCAT-Scatterometer" />
<entry index="5" value="POES-NPOESS" />
<entry index="6" value="Composite" />
<entry index="7" value="DMSP" />
<entry index="8" value="GMS" />
<entry index="9" value="METEOSAT" />
<entry index="10" value="GOES-7(H) Reserved for future use." />
<entry index="11" value="GOES-8(I)" />
<entry index="12" value="GOES-9(J)" />
<entry index="13" value="GOES-10(K)" />
<entry index="14" value="GOES-11(L)" />
<entry index="15" value="GOES-12(M)" />
<entry index="16" value="GOES-13(N)" />
<entry index="17" value="GOES-14(O)" />
<entry index="18" value="GOES-15(P)" />
<entry index="26" value="NOAA16" />
<entry index="27" value="NOAA17" />
<entry index="28" value="NOAA18" />
<entry index="29" value="NOAA19" />
</numericLookupTable>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<geostationaryPositionTable>
<entry id="GOES-11(L)" height="35794" latitude="0" longitude="-135" />
<entry id="GOES-12(M)" height="35794" latitude="0" longitude="-75" />
<entry id="GOES-13(N)" height="35794" latitude="0" longitude="-75" />
<entry id="GOES-15(P)" height="35794" latitude="0" longitude="-135" />
</geostationaryPositionTable>

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<numericLookupTable id="physicalElements">
<entry index="1" value="Imager Visible" />
<entry index="2" value="Imager 3.9 micron IR" />
<entry index="3" value="Imager 6.7-6.5 micron IR (WV)" />
<entry index="4" value="Imager 11 micron IR" />
<entry index="5" value="Imager 12 micron IR" />
<entry index="6" value="Imager 13 micron (IR)" />
<entry index="7" value="Imager 1.3 micron (IR)" />
<entry index="8" value="Reserved for future use" />
<entry index="9" value="Reserved for future use" />
<entry index="10" value="Reserved for future use" />
<entry index="11" value="Reserved for future use" />
<entry index="12" value="Reserved for future use" />
<entry index="13" value="Imager Based Derived Lifted Index (LI)" />
<entry index="14" value="Imager Based Derived Precipitable Water (PW)" />
<entry index="15" value="Imager Based Derived Surface Skin Temp (SFC Skin)" />
<entry index="16" value="Sounder Based Derived Lifted Index (LI)" />
<entry index="17" value="Sounder Based Derived Precipitable Water (PW)" />
<entry index="18" value="Sounder Based Derived Surface Skin Temp (SFC Skin)" />
<entry index="19" value="Derived Convective Available Potential Energy (CAPE)" />
<entry index="20" value="Derived land-sea temp" />
<entry index="21" value="Derived Wind Index(WINDEX)" />
<entry index="22" value="Derived Dry Microburst Potential Index (DMPI)" />
<entry index="23" value="Derived Microburst Day Potential Index (MDPI)" />
<entry index="24" value="Derived Convective Inhibition" />
<entry index="25" value="Derived Volcano Imagery" />
<entry index="26" value="Scatterometer Data" />
<entry index="27" value="Gridded Cloud Top Pressure or Height" />
<entry index="28" value="Gridded Cloud Amount" />
<entry index="29" value="Rain fall rate" />
<entry index="30" value="Surface wind speeds over oceans and Great Lakes" />
<entry index="31" value="Surface wetness" />
<entry index="32" value="Ice concentrations" />
<entry index="33" value="Ice type" />
<entry index="34" value="Ice edge" />
<entry index="35" value="Cloud water content" />
<entry index="36" value="Surface type" />
<entry index="37" value="Snow indicator" />
<entry index="38" value="Snow-water content" />
<entry index="39" value="Derived volcano imagery" />
<entry index="40" value="Low cloud base imagery" />
<entry index="41" value="Sounder 14.71 micron imagery" />
<entry index="42" value="Sounder 14.37 micron imagery" />
<entry index="43" value="Sounder 14.06 micron imagery" />
<entry index="44" value="Sounder 13.64 micron imagery" />
<entry index="45" value="Sounder 13.37 micron imagery" />
<entry index="46" value="Sounder 12.66 micron imagery" />
<entry index="47" value="Sounder 12.02 micron imagery" />
<entry index="48" value="Sounder 11.03 micron imagery" />
<entry index="49" value="Sounder 9.71 micron imagery" />
<entry index="50" value="Sounder 7.43 micron imagery" />
<entry index="51" value="Sounder 7.02 micron imagery" />
<entry index="52" value="Sounder 6.51 micron imagery" />
<entry index="53" value="Sounder 4.57 micron imagery" />
<entry index="54" value="Sounder 4.52 micron imagery" />
<entry index="55" value="Sounder 4.45 micron imagery" />
<entry index="56" value="Sounder 4.13 micron imagery" />
<entry index="57" value="Sounder 3.98 micron imagery" />
<entry index="58" value="Sounder 3.74 micron imagery" />
<entry index="59" value="Sounder Visible imagery" />
<entry index="60" value="Percent of Normal TPW" />
<entry index="61" value="Polar Vis" />
<entry index="62" value="Polar 3.9u" />
<entry index="63" value="Polar 3.7u" />
<entry index="64" value="Polar IR" />
</numericLookupTable>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<numericLookupTable id="sectorIds">
<entry index="0" value="Northern Hemisphere Composite" />
<entry index="1" value="East CONUS" />
<entry index="2" value="West CONUS" />
<entry index="3" value="Alaska Regional" />
<entry index="4" value="Alaska National" />
<entry index="5" value="Hawaii Regional" />
<entry index="6" value="Hawaii National" />
<entry index="7" value="Puerto Rico Regional" />
<entry index="8" value="Puerto Rico National" />
<entry index="9" value="Supernational" />
<entry index="10" value="NH Composite - Meteosat-GOES E-GOES W-GMS" />
</numericLookupTable>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<numericLookupTable id="sources">
<entry index="1" value="NESDIS" />
</numericLookupTable>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<numericLookupTable id="units">
<entry index="2" value="IRPixel" />
<entry index="4" value="IRPixel" />
<entry index="5" value="IRPixel" />
<entry index="6" value="IRPixel" />
<entry index="7" value="IRPixel" />
<entry index="16" value="SounderLiftedIndexPixel" />
<entry index="17" value="SounderPrecipWaterPixel" />
<entry index="18" value="SounderSkinTempPixel" />
<entry index="27" value="SounderCloudTopHeightPixel" />
<entry index="28" value="SounderCloudAmountPixel" />
<entry index="29" value="RainfallRatePixel" />
<entry index="43" value="IRPixel" />
<entry index="48" value="IRPixel" />
<entry index="55" value="IRPixel" />
<entry index="57" value="IRPixel" />
<entry index="60" value="PercentOfNormalTPWPixel" />
<entry index="64" value="IRPixel" />
</numericLookupTable>

View file

@ -38,4 +38,11 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.satellite.gini"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>