Issue #181 integrating ncep edex code

Change-Id: Iaf11559e4cdb4f846d02283c5d2038474c0118e3

Former-commit-id: 3aa13bd49e23ef963127f7efbc91054c06808f1c
This commit is contained in:
Nate Jensen 2012-01-24 09:59:50 -06:00
parent a015cc136b
commit 33756de9c8
250 changed files with 80163 additions and 78106 deletions

View file

@ -89,7 +89,8 @@ public class AirmetDataAdapter extends AbstractAdvisoryDataAdapter {
if (airmetRecord.getAirmetReport() != null) {
for (AirmetReport report : airmetRecord.getAirmetReport()) {
if (isValidReport(report)) {
AdvisoryRecord oRecord = convertReport(report);
AdvisoryRecord oRecord = convertReport(airmetRecord,
report);
if (oRecord != null) {
result.add(oRecord);
}
@ -100,17 +101,17 @@ public class AirmetDataAdapter extends AbstractAdvisoryDataAdapter {
return result;
}
public AdvisoryRecord convertReport(AirmetReport report) {
public AdvisoryRecord convertReport(AirmetRecord parent, AirmetReport report) {
Set<AirmetLocation> locations = report.getAirmetLocation();
if (locations == null || locations.size() == 0) {
return null;
}
Coordinate[] coords = new Coordinate[locations.size()];
for (AirmetLocation loc : locations) {
coords[loc.getIndex() - 1] = new Coordinate(loc.getLongitude(), loc
.getLatitude());
coords[loc.getIndex() - 1] = new Coordinate(loc.getLongitude(),
loc.getLatitude());
}
int updateNumber = report.getParentID().getUpdateNumber();
int updateNumber = parent.getUpdateNumber();
String sequenceId = report.getSequenceID();
if (sequenceId == null) {
sequenceId = "";

View file

@ -47,20 +47,23 @@
<exclude>ncgrib-ingest.xml</exclude>
<!-- ncep excludes until tested -->
<exclude>aww-ingest.xml</exclude>
<exclude>ncairep-ingest.xml</exclude>
<exclude>ncccfp-ingest.xml</exclude>
<exclude>ncgrib-distribution.xml</exclude>
<exclude>ncep-util-on-edex-ingest</exclude>
<exclude>ncep-util-on-edex-ingestGrib</exclude>
<exclude>h5uair-ingest.xml</exclude>
<exclude>h5scd-ingest.xml</exclude>
<exclude>pafm-ingest.xml</exclude>
<exclude>uair-ingest.xml</exclude>
<exclude>ncscd-ingest.xml</exclude>
<exclude>ncpafm-ingest.xml</exclude>
<exclude>ncpirep-ingest.xml</exclude>
<exclude>nctaf-ingest.xml</exclude>
<exclude>ncuair-ingest.xml</exclude>
<!-- end of ncep excludes -->
</mode>
<!-- In high memory mode, DAT runs in its own jvm -->
<mode name="ingestHighMem">
<exclude>.*request.*</exclude>
<exclude>grib-ingest.xml</exclude>
<exclude>ncairep-ingest.xml</exclude>
<exclude>ncgrib-ingest.xml</exclude>
<exclude>ffmp-ingest.*.xml</exclude>
<exclude>scan-ingest.*.xml</exclude>
@ -78,10 +81,11 @@
<exclude>ncgrib-distribution.xml</exclude>
<exclude>ncep-util-on-edex-ingest</exclude>
<exclude>ncep-util-on-edex-ingestGrib</exclude>
<exclude>h5uair-ingest.xml</exclude>
<exclude>h5scd-ingest.xml</exclude>
<exclude>pafm-ingest.xml</exclude>
<exclude>uair-ingest.xml</exclude>
<exclude>ncscd-ingest.xml</exclude>
<exclude>ncpafm-ingest.xml</exclude>
<exclude>ncpirep-ingest.xml</exclude>
<exclude>nctaf-ingest.xml</exclude>
<exclude>ncuair-ingest.xml</exclude>
<!-- end of ncep excludes -->
</mode>
<mode name="ingestGrib">

View file

@ -22,11 +22,11 @@ pkey SERIAL PRIMARY KEY,
DROP TABLE IF EXISTS stns.BUOYS CASCADE;
CREATE TABLE stns.BUOYS (
PKEY SERIAL PRIMARY KEY,
STNUM int,
STATION_NUM int,
NAME varchar(32),
COUNTRY char(2),
LAT double precision,
LON double precision
LATITUDE double precision,
LONGITUDE double precision
);
-- Create cities table
@ -43,6 +43,20 @@ pkey SERIAL PRIMARY KEY,
priority smallint NOT NULL
);
-- Create climo_data table
DROP TABLE IF EXISTS stns.climo_data CASCADE;
CREATE TABLE stns.climo_data(
pkey SERIAL PRIMARY KEY,
station_id varchar(8) NOT NULL,
month smallint NOT NULL,
day smallint NOT NULL,
TDYF double precision,
TNTF double precision,
PPNT double precision,
PPDY double precision,
PP24 double precision
);
-- Create climreg table
DROP TABLE IF EXISTS stns.climreg CASCADE;
CREATE TABLE stns.climreg(
@ -114,13 +128,13 @@ pkey SERIAL PRIMARY KEY,
DROP TABLE IF EXISTS stns.countynam CASCADE;
CREATE TABLE stns.countynam (
PKEY SERIAL PRIMARY KEY,
STID varchar(8),
STNUM int,
STATION_ID varchar(8),
STATION_NUM int,
NAME varchar(32),
STATE char(2),
COUNTRY char(2),
LAT double precision,
LON double precision,
LATITUDE double precision,
LONGITUDE double precision,
WFO varchar(3)
);
@ -142,13 +156,13 @@ pkey SERIAL PRIMARY KEY,
DROP TABLE IF EXISTS stns.CPCSTNS CASCADE;
CREATE TABLE stns.CPCSTNS (
PKEY SERIAL PRIMARY KEY,
STID varchar(4),
STNUM int,
STATION_ID varchar(4),
STATION_NUM int,
NAME varchar(32),
STATE char(2),
COUNTRY char(2),
LAT double precision,
LON double precision,
LATITUDE double precision,
LONGITUDE double precision,
ELEV int,
PRI int
);
@ -156,13 +170,13 @@ CREATE TABLE stns.CPCSTNS (
DROP TABLE IF EXISTS stns.DLWX CASCADE;
CREATE TABLE stns.DLWX (
PKEY SERIAL PRIMARY KEY,
STID varchar(4),
STNUM int,
STATION_ID varchar(4),
STATION_NUM int,
NAME varchar(32),
STATE char(2),
COUNTRY char(2),
LAT double precision,
LON double precision,
LATITUDE double precision,
LONGITUDE double precision,
ELEV int,
PRI int
);
@ -170,26 +184,26 @@ CREATE TABLE stns.DLWX (
DROP TABLE IF EXISTS stns.FFGZON CASCADE;
CREATE TABLE stns.FFGZON (
PKEY SERIAL PRIMARY KEY,
STID varchar(8),
STNUM int,
STATION_ID varchar(8),
STATION_NUM int,
NAME varchar(32),
STATE char(2),
COUNTRY char(2),
LAT double precision,
LON double precision,
LATITUDE double precision,
LONGITUDE double precision,
WFO varchar(8)
);
-- Create firezones table
DROP TABLE IF EXISTS stns.FIREZONES CASCADE;
CREATE TABLE stns.FIREZONES (
PKEY SERIAL PRIMARY KEY,
STID varchar(8),
STNUM int,
STATION_ID varchar(8),
STATION_NUM int,
NAME varchar(32),
STATE char(2),
COUNTRY char(2),
LAT double precision,
LON double precision,
LATITUDE double precision,
LONGITUDE double precision,
WFO varchar(8)
);
@ -578,28 +592,28 @@ pkey SERIAL PRIMARY KEY,
DROP TABLE IF EXISTS stns.SNWORLD CASCADE;
CREATE TABLE stns.SNWORLD
( PKEY SERIAL PRIMARY KEY,
STID varchar(4) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(4) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL,
PRI int NOT NULL
);
-- Create spcwatch table
DROP TABLE IF EXISTS stns.SPCWATCH CASCADE;
CREATE TABLE stns.SPCWATCH (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL
);
-- Create state table
DROP TABLE IF EXISTS stns.STATE CASCADE;
@ -612,53 +626,53 @@ CREATE TABLE stns.STATE (
DROP TABLE IF EXISTS stns.STNS_II90 CASCADE;
CREATE TABLE stns.STNS_II90 (
PKEY SERIAL PRIMARY KEY,
STNUM int NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL ,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL ,
PRI int NOT NULL
);
-- Create systns table
DROP TABLE IF EXISTS stns.SYSTNS CASCADE;
CREATE TABLE stns.SYSTNS (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL
);
-- Create syworld table
DROP TABLE IF EXISTS stns.SYWORLD CASCADE;
CREATE TABLE stns.SYWORLD (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL
);
-- Create tafstn table
DROP TABLE IF EXISTS stns.TAFSTN CASCADE;
CREATE TABLE stns.TAFSTN (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL,
PRI int NOT NULL,
MISC char(3) NOT NULL
);
@ -666,13 +680,13 @@ CREATE TABLE stns.TAFSTN (
DROP TABLE IF EXISTS stns.TCABKPT CASCADE;
CREATE TABLE stns.TCABKPT (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL ,
TBCHRS varchar(20) NOT NULL
);
@ -680,39 +694,39 @@ CREATE TABLE stns.TCABKPT (
DROP TABLE IF EXISTS stns.TCABKPT_ISLAND CASCADE;
CREATE TABLE stns.TCABKPT_ISLAND (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL
);
-- Create tcabkpt_land table
DROP TABLE IF EXISTS stns.TCABKPT_LAND CASCADE;
CREATE TABLE stns.TCABKPT_LAND (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL
);
-- Create tcabkptlz table
DROP TABLE IF EXISTS stns.TCABKPTLZ CASCADE;
CREATE TABLE stns.TCABKPTLZ (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL,
TBCHRS varchar(20) NOT NULL
);
@ -720,26 +734,26 @@ CREATE TABLE stns.TCABKPTLZ (
DROP TABLE IF EXISTS stns.TCABKPT_OVL CASCADE;
CREATE TABLE stns.TCABKPT_OVL (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL
);
-- Create tcabkpt_water table
DROP TABLE IF EXISTS stns.TCABKPT_WATER CASCADE;
CREATE TABLE stns.TCABKPT_WATER (
PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
PRI int NOT NULL
);
-- Create tpc_countries table
@ -750,8 +764,8 @@ CREATE TABLE stns.TPC_COUNTRIES (
FIPS int NOT NULL,
NAME varchar(32) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL
);
-- Create tpc_states table
DROP TABLE IF EXISTS stns.TPC_STATES CASCADE;
@ -762,98 +776,98 @@ CREATE TABLE stns.TPC_STATES (
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL
);
-- Create volcano table
DROP TABLE IF EXISTS stns.VOLCANO CASCADE;
CREATE TABLE stns.VOLCANO
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL,
LOCATION varchar(20) NOT NULL
);
-- Create volcano_small table
DROP TABLE IF EXISTS stns.VOLCANO_SMALL CASCADE;
CREATE TABLE stns.VOLCANO_SMALL
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL
);
-- Create vors table
DROP TABLE IF EXISTS stns.VORS CASCADE;
CREATE TABLE stns.VORS
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL
);
-- Create wfo table
DROP TABLE IF EXISTS stns.WFO CASCADE;
CREATE TABLE stns.WFO
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL
);
-- Create wrqpf table
DROP TABLE IF EXISTS stns.WRQPF CASCADE;
CREATE TABLE stns.WRQPF
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL,
PRI int NOT NULL
);
-- Create xrainsort table
DROP TABLE IF EXISTS stns.XRAINSORT CASCADE;
CREATE TABLE stns.XRAINSORT
( PKEY SERIAL PRIMARY KEY,
STID varchar(4) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(4) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
ELEV int NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
ELEVATION int NOT NULL,
PRI int NOT NULL
);
-- Create zones table
DROP TABLE IF EXISTS stns.ZONES CASCADE;
CREATE TABLE stns.ZONES
( PKEY SERIAL PRIMARY KEY,
STID varchar(8) NOT NULL,
STNUM int NOT NULL,
STATION_ID varchar(8) NOT NULL,
STATION_NUM int NOT NULL,
NAME varchar(32) NOT NULL,
STATE char(2) NOT NULL,
COUNTRY char(2) NOT NULL,
LAT double precision NOT NULL,
LON double precision NOT NULL,
LATITUDE double precision NOT NULL,
LONGITUDE double precision NOT NULL,
WFO char(3) NOT NULL
);

View file

@ -43,6 +43,10 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do
|| $base == 'Asctropfirs' \
|| $base == 'Asctweb' \
|| $base == 'Ascwrzones' \
|| $base == 'Awcartcc' \
|| $base == 'Awcccfcan' \
|| $base == 'Awcfaarea' \
|| $base == 'Atlbasin' \
|| $base == 'Bwus_bnd' \
|| $base == 'Bwus_label' \
|| $base == 'Bwx1224' \
@ -57,6 +61,7 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do
|| $base == 'Firbnds' \
|| $base == 'Firebnds' \
|| $base == 'FireWxAOR' \
|| $base == 'FirKzoaAwc' \
|| $base == 'G2t_atl_bnd' \
|| $base == 'G2t_nwc' \
|| $base == 'G2t_pac_bnd' \
@ -74,6 +79,7 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do
|| $base == 'Npsabnds' \
|| $base == 'Opcbnds' \
|| $base == 'Opcbnds_nomex' \
|| $base == 'PacBasin' \
|| $base == 'Pfzbnds' \
|| $base == 'Rfcbnds' \
|| $base == 'Sig_high' \

View file

@ -1,4 +1,4 @@
COPY stns.BUOYS(PKEY, STNUM, NAME, COUNTRY, LAT, LON) FROM stdin with delimiter as ',';
COPY stns.BUOYS(PKEY, STATION_NUM, NAME, COUNTRY, LATITUDE, LONGITUDE) FROM stdin with delimiter as ',';
1,44004,Hotel,US,38.5,-70.7
2,41001,East_Hatteras,US,34.7,-72.6
3,41002,South_Hatteras,US,32.3,-75.2

View file

@ -1,4 +1,4 @@
COPY stns.countynam(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, WFO) FROM stdin with delimiter as ',';
COPY stns.countynam(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, WFO) FROM stdin with delimiter as ',';
1,Saipan,69110,Saipan,GU,US,15.19,145.76,GUM
2,Northern,69085,Northern_Islands,GU,US,18.11,145.76,GUM
3,Tinian,69120,Tinian,GU,US,15.01,145.63,GUM

View file

@ -1,4 +1,4 @@
COPY stns.CPCSTNS(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.CPCSTNS(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
1,ABI,72266,ABILENE,TX,US,32.5,-99.7,0,0
2,ABQ,72365,ALBUQUERQUE_INTL,NM,US,35.05,-106.62,1620,0
3,ADK,70454,ADAK_NAS/MITCHELL,AK,US,51.88,-176.65,4,0

View file

@ -1,4 +1,4 @@
COPY stns.DLWX(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.DLWX(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
1,EYW,722010,KEY_WEST_INTL_ARPT_(ASOS),FL,US,24.55,-81.75,6,99
2,MIA,722020,MIAMI_INTL_AIRPORT_(ASOS),FL,US,25.82,-80.28,4,99
3,MCO,722050,ORLANDO_JETPORT___(ASOS),FL,US,28.43,-81.32,32,99

View file

@ -1,4 +1,4 @@
COPY stns.FFGZON(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, WFO) FROM stdin with delimiter as ',';
COPY stns.FFGZON(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, WFO) FROM stdin with delimiter as ',';
1,ALZ001,10010,Lauderdale,AL,US,34.89,-87.78, BMX
2,ALZ002,10020,Colbert,AL,US,34.65,-87.83, BMX
3,ALZ003,10030,Franklin,AL,US,34.43,-87.84, BMX

View file

@ -1,4 +1,4 @@
COPY stns.FIREZONES(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, WFO) FROM stdin with delimiter as ',';
COPY stns.FIREZONES(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, WFO) FROM stdin with delimiter as ',';
1,AKZ191,21910,Western_Aleutians,AK,US,51.51,179.05,AFC
2,GUZ004,540040,Saipan,GU,US,15.19,145.76,GUM
3,GUZ003,540030,Tinian,GU,US,15.01,145.63,GUM

View file

@ -12,6 +12,7 @@
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadAirepWaypnts.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadBuoys.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadClimReg.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadClimodata.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadCities.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadCntyclst.sql >> ${5} 2>&1
${1}/bin/psql -d ncep -U ${3} -q -p ${2} -f ${4}/loadCoastal.sql >> ${5} 2>&1

View file

@ -1,4 +1,4 @@
COPY stns.SNWORLD(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.SNWORLD(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
1,ENJA,1001,JAN MAYEN ISLAN, ,NO,70.93,-8.67,9,1
2,ENBJ,1028,BJORNOYA ISLAND, ,NO,74.52,19.02,14,1
3,ENBO,1152,BODO VI, ,NO,67.27,14.37,13,1

View file

@ -1,4 +1,4 @@
COPY stns.SPCWATCH (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV) FROM stdin with delimiter as ',';
COPY stns.SPCWATCH (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION) FROM stdin with delimiter as ',';
1,EPM,504,EASTPORT,ME,US,44.92,-67.02,0
2,HUL,501,HOULTON,ME,US,46.12,-67.8,0
3,CAR,500,CARIBOU,ME,US,46.87,-68.02,0

View file

@ -1,4 +1,4 @@
COPY stns.STNS_II90 (PKEY, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.STNS_II90 (PKEY, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
1,69002, HUNTER_LIGGET/TUSI&,CA,US,36,-121.23,310,0
2,69007, FORT_ORD/FRITZSCHE&,CA,US,36.68,-121.77,41,0
3,69008, CAMP_ROBERTS,CA,US,35.75,-120.7,220,0

View file

@ -1,4 +1,4 @@
COPY stns.SYSTNS (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV) FROM stdin with delimiter as ',';
COPY stns.SYSTNS (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION) FROM stdin with delimiter as ',';
1,BRW,70026,BARROW/POST-ROGERS,AK,US,7130,-15678,4
2,OME,70200,NOME,AK,US,6450,-16543,7
3,MCG,70231,MCGRATH,AK,US,6297,-15562,103

View file

@ -1,4 +1,4 @@
COPY stns.SYWORLD (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV) FROM stdin with delimiter as ',';
COPY stns.SYWORLD (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION) FROM stdin with delimiter as ',';
1,ENJA,1001,JAN MAYEN(NOR-NAVY, ,NO,70.93,-8.67,9
2,ENSB,1008,SVALBARD/LONGYEAR, ,NO,78.25,15.47,29
3,ENAN,1010,ANDOYA/ANDENES(AFB, ,NO,69.3,16.15,14

View file

@ -1,4 +1,4 @@
COPY stns.TAFSTN (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI, MISC) FROM stdin with delimiter as ',';
COPY stns.TAFSTN (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI, MISC) FROM stdin with delimiter as ',';
1,KDYS,690190,DYESS_AFB/ABILENE_&,TX,US,32.43,-99.85,545,0,
2,KNUW,690230,WHIDBEY_ISLAND_NAS&,WA,US,48.35,-122.65,14,0,
3,KNYL,699604,YUMA_MCAS_________&,AZ,US,32.65,-114.62,65,0,

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPT (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI, TBCHRS) FROM stdin with delimiter as ',';
COPY stns.TCABKPT (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI, TBCHRS) FROM stdin with delimiter as ',';
1,MTH_RIO,100100,Mouth_of_the_Rio_Grande_River,TX,US,25.96,-97.15,10, TX061 G150
2,"",100112,"",TX,US,26.06,-97.17,12, G130G170
3,PORT_ISA,100120,Port_Isabel,TX,US,26.07,-97.21,19,""

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPT_ISLAND (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI ) FROM stdin with delimiter as ',';
COPY stns.TCABKPT_ISLAND (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI ) FROM stdin with delimiter as ',';
1,ANTIGUA/,500100,Antigua/Barbuda,--,AD,17.35,-61.8,50
2,ARUBA\,_B,500200,Aruba\,_Bonaire\,_Curacao,--,AC,12.35,-69,50
3,BAHAMA_C,500300,Bahamas_(Central),--,BA,24,-75.5,50

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPT_LAND (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI) FROM stdin with delimiter as ',';
COPY stns.TCABKPT_LAND (PKEY, STATION_ID ,STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI) FROM stdin with delimiter as ',';
1,MTH_RIO,100100,Mouth_of_the_Rio_Grande_River,TX,US,25.96,-97.15,10
2,PT_MANSF,100200,Port_Mansfield,TX,US,26.6,-97.29,10
3,BAFFN_BY,100300,Baffin_Bay,TX,US,27.29,-97.38,10

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPT_OVL (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI ) FROM stdin with delimiter as ',';
COPY stns.TCABKPT_OVL (PKEY, STATION_ID ,STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI ) FROM stdin with delimiter as ',';
1,MTH_RIO,100100,Mouth_of_the_Rio_Grande_River,TX,US,25.96,-97.15,10
2,PT_MANSF,100200,Port_Mansfield,TX,US,26.6,-97.29,10
3,BAFFN_BY,100300,Baffin_Bay,TX,US,27.29,-97.37,10

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPT_WATER (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI) FROM stdin with delimiter as ',';
COPY stns.TCABKPT_WATER (PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI) FROM stdin with delimiter as ',';
1,FLA_BAY,800010,Florida_Bay,FL,US,24.95,-80.9,80
2,L_MAUREP,808080,Lake_Maurepas,LA,US,30.25,-90.54,80
3,L_OKEECH,800020,Lake_Okeechobee,FL,US,26.95,-80.8,80

View file

@ -1,4 +1,4 @@
COPY stns.TCABKPTLZ (PKEY, STID ,STNUM, NAME, STATE, COUNTRY, LAT, LON, PRI, TBCHRS) FROM stdin with delimiter as ',';
COPY stns.TCABKPTLZ (PKEY, STATION_ID ,STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, PRI, TBCHRS) FROM stdin with delimiter as ',';
1,MTH_RIO,100100,Mouth_of_the_Rio_Grande_River,TX,US,25.96,-97.15,10,TX256
2,--,100112,--,TX,US,26.06,-97.17,12,""
3,PORT_ISA,100120,Port_Isabel,TX,US,26.07,-97.21,19,""

View file

@ -1,4 +1,4 @@
COPY stns.TPC_COUNTRIES (PKEY, ALPHA ,FIPS, NAME, COUNTRY, LAT, LON) FROM stdin with delimiter as ',';
COPY stns.TPC_COUNTRIES (PKEY, ALPHA ,FIPS, NAME, COUNTRY, LATITUDE, LONGITUDE) FROM stdin with delimiter as ',';
1,PR,72,Puerto Rico,PR,18.9,-65
2,BA,101,Bahamas,BA,24.5,-73.8
3,BE,102,Bermuda,BE,32,-63.7

View file

@ -1,4 +1,4 @@
COPY stns.TPC_STATES (PKEY, ALPHA ,FIPS, NAME, STATE, COUNTRY, LAT, LON) FROM stdin with delimiter as ',';
COPY stns.TPC_STATES (PKEY, ALPHA ,FIPS, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE) FROM stdin with delimiter as ',';
1,AL,1,Alabama,AL,US,32.5,-86.5
2,AK,2,Alaska,AK,US,63,-150
3,AZ,4,Arizona,AZ,US,34.5,-111

View file

@ -1,4 +1,4 @@
COPY stns.VOLCANO(PKEY, STID, STNUM, NAME, LAT, LON, ELEV, LOCATION) FROM stdin with delimiter as ',';
COPY stns.VOLCANO(PKEY, STATION_ID, STATION_NUM, NAME, LATITUDE, LONGITUDE, ELEVATION, LOCATION) FROM stdin with delimiter as ',';
1,1402-08,999999,Acatenango,14.5,-90.88,3976,Guatemala
2,1201-04,999999,Adams,46.13,-121.29,3742,US-Washington
3,0803-17,999999,Adatara,37.62,140.28,1718,Honshu-Japan

View file

@ -1,4 +1,4 @@
COPY stns.VOLCANO_SMALL(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV) FROM stdin with delimiter as ',';
COPY stns.VOLCANO_SMALL(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION) FROM stdin with delimiter as ',';
1,AVACHINS,999999,AVACHINSKY,--,BY,53.25,158.83,0
2,BEZYMIAN,999999,BEZYMIANNY,--,BY,55.97,160.58,0
3,KARYMSKY,999999,KARYMSKY,--,BY,54.05,159.43,0

View file

@ -1,4 +1,4 @@
COPY stns.VORS(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON) FROM stdin with delimiter as ',';
COPY stns.VORS(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE) FROM stdin with delimiter as ',';
1,YSJ,395,ST_JOHN,NB,CN,45.32,-65.88
2,HUL,341,HOULTON,ME,US,46.04,-67.83
3,PQI,367,PRESQUE_ISLE,ME,US,46.77,-68.09

View file

@ -1,4 +1,4 @@
COPY stns.WFO(PKEY, STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV) FROM stdin with delimiter as ',';
COPY stns.WFO(PKEY, STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION) FROM stdin with delimiter as ',';
1,ABQ,50,ALBUQUERQUE,NM,US,35.03,-106.62,0
2,ABR,76,ABERDEEN,SD,US,45.45,-98.41,0
3,AFC,112,ANCHORAGE,AK,US,61.15,-149.98,0

View file

@ -1,4 +1,4 @@
COPY stns.WRQPF(STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.WRQPF(STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
0E4,999999,PAYSON,AZ,US,34.14,-111.2,4913,1
4BK,999999,BROOKINGS-2SE,OR,US,42.03,-124.25,46,1
4HV,999999,HANKSVILLE,UT,US,38.22,-110.43,4308,1

View file

@ -1,4 +1,4 @@
COPY stns.XRAINSORT(STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, ELEV, PRI) FROM stdin with delimiter as ',';
COPY stns.XRAINSORT(STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, ELEVATION, PRI) FROM stdin with delimiter as ',';
PASY,704140,SHEMYA_AFB,AK,US,52.72,174.12,30,0
YYT,718010,SAINT_JOHN'S_ARPT,NF,CN,47.62,-52.73,140,0
XSW,715870,ST.-JOHN'S-WEST_CDA_CS,NF,CN,47.52,-52.79,114,0

View file

@ -1,4 +1,4 @@
COPY stns.ZONES(STID, STNUM, NAME, STATE, COUNTRY, LAT, LON, WFO) FROM stdin with delimiter as ',';
COPY stns.ZONES(STATION_ID, STATION_NUM, NAME, STATE, COUNTRY, LATITUDE, LONGITUDE, WFO) FROM stdin with delimiter as ',';
AKZ187,21870,Central_Aleutians,AK,US,52.22,-174.23,AFC
AKZ213,22130,St_Lawrence_I_and_Bering_St_Cst,AK,US,63.36,-170.27,AFG
AKZ195,21950,Pribilof_Islands,AK,US,57.18,-170.26,AFC

View file

@ -1,10 +1,6 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.airmet">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />

View file

@ -11,34 +11,31 @@
* 05/2009 39 L. Lin Initial creation
* 07/2009 39 L. Lin Migration to TO11
* 09/2009 39 L. Lin Add latitude/longitude to location table
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.common.dataplugin.airmet;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name = "airmet_location")
@XmlAccessorType(XmlAccessType.NONE)
@Table(name="airmet_location")
@DynamicSerialize
public class AirmetLocation implements Serializable, ISerializableObject {
@ -48,38 +45,29 @@ public class AirmetLocation implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
// The consigmet record this object belongs to
@ManyToOne
@JoinColumn(name = "parentID", nullable = false)
private AirmetReport parentID;
// Collection of locations
@Column(length = 480)
@XmlElement
@Column(length=480)
@DynamicSerializeElement
private String locationLine;
// Each location of a airmet forecast area
@Column(length = 48)
@XmlElement
@Column(length=48)
@DynamicSerializeElement
private String location;
// Each latitude of an airmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double latitude;
// Each longitude of an airmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double longitude;
// Index for the order of a complete location set
@Column
@XmlElement
@DynamicSerializeElement
private Integer index;
@ -87,11 +75,12 @@ public class AirmetLocation implements Serializable, ISerializableObject {
* No-Arg Convstructor.
*/
public AirmetLocation() {
this.locationLine = "";
this.location = "";
this.index = IDecoderConstantsN.INTEGER_MISSING;
this.locationLine="";
this.location="";
this.index=IDecoderConstantsN.INTEGER_MISSING;
}
/**
* @return the serialVersionUID
*/
@ -101,18 +90,17 @@ public class AirmetLocation implements Serializable, ISerializableObject {
/**
* @return the parentID
*/
*
public AirmetReport getParentID() {
return parentID;
}
}*/
/**
* @param parentID
* to set
*/
* @param parentID to set
*
public void setParentID(AirmetReport parentID) {
this.parentID = parentID;
}
}*/
/**
* @return the index
@ -122,8 +110,7 @@ public class AirmetLocation implements Serializable, ISerializableObject {
}
/**
* @param index
* to set
* @param index to set
*/
public void setIndex(Integer index) {
this.index = index;
@ -137,8 +124,7 @@ public class AirmetLocation implements Serializable, ISerializableObject {
}
/**
* @param locationLine
* to set
* @param locationLine to set
*/
public void setLocationLine(String locationLine) {
this.locationLine = locationLine;
@ -152,8 +138,7 @@ public class AirmetLocation implements Serializable, ISerializableObject {
}
/**
* @param location
* to set
* @param location to set
*/
public void setLocation(String location) {
this.location = location;
@ -167,8 +152,7 @@ public class AirmetLocation implements Serializable, ISerializableObject {
}
/**
* @param latitude
* to set
* @param latitude to set
*/
public void setLatitude(double latitude) {
this.latitude = latitude;
@ -182,8 +166,7 @@ public class AirmetLocation implements Serializable, ISerializableObject {
}
/**
* @param longitude
* to set
* @param longitude to set
*/
public void setLongitude(double longitude) {
this.longitude = longitude;
@ -200,7 +183,6 @@ public class AirmetLocation implements Serializable, ISerializableObject {
/**
* Set the record id.
*
* @param record
*/
public void setRecordId(Integer recordId) {

View file

@ -15,6 +15,8 @@
* ------------ ---------- ----------- --------------------------
* 05/2009 39 L. Lin Initial coding
* 07/2009 39 L. Lin Migration to TO11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -24,35 +26,32 @@ package gov.noaa.nws.ncep.common.dataplugin.airmet;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "airmet", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AirmetRecord extends PluginDataObject {
public class AirmetRecord extends PluginDataObject{
/**
*
@ -60,100 +59,92 @@ public class AirmetRecord extends PluginDataObject {
private static final long serialVersionUID = 1L;
// reportType is AIRMET.
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String reportType;
// reportName will be SIERRA, TANGO, or ZULU
@Column(length = 32)
@DataURI(position = 1)
@XmlElement
@Column(length=32)
@DataURI(position=1)
@DynamicSerializeElement
private String reportName;
// WMO header
@Column(length = 32)
@DataURI(position = 2)
@XmlElement
@Column(length=32)
@DataURI(position=2)
@DynamicSerializeElement
private String wmoHeader;
// The issue office where the report from
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String issueOffice;
// Update number as: 1, 2, 3, ...
@Column
@DataURI(position = 3)
@XmlElement
@DataURI(position=3)
@DynamicSerializeElement
private Integer updateNumber;
// Issue time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
// The designator
@Column(length = 8)
@XmlElement
@Column(length=8)
@DynamicSerializeElement
private String designatorBBB;
// CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, and 3
// for TEST
// CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, and 3 for TEST
/*
* CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, 3 for
* TEST, and 4 for NIL report
* CorrectionFlag is a flag:
* 0 for normal, 1 for COR or CC, 2 for AMD, 3 for TEST, and 4 for NIL report
*/
@Column
@XmlElement
@DynamicSerializeElement
private Integer correctionFlag;
// The entire report
@Column(length = 15000)
@XmlElement
@Column(length=15000)
@DynamicSerializeElement
private String bullMessage;
/**
* Airmet report
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@Index(name = "airmet_report_parentid_idex")
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "airmetReport_parentid_idex")
private Set<AirmetReport> airmetReport = new HashSet<AirmetReport>();
/**
* Default Convstructor
*/
public AirmetRecord() {
this.issueOffice = "";
this.wmoHeader = "";
this.bullMessage = "";
this.designatorBBB = "";
this.updateNumber = 0;
this.reportType = "";
this.reportName = null;
this.correctionFlag = 0;
this.issueOffice="";
this.wmoHeader="";
this.bullMessage="";
this.designatorBBB="";
this.updateNumber=0;
this.reportType="";
this.reportName=null;
this.correctionFlag=0;
}
/**
* Convstructs an airmet record from a dataURI
*
* @param uri
* The dataURI
* @param uri The dataURI
*/
public AirmetRecord(String uri) {
super(uri);
}
@Override
public IDecoderGettable getDecoderGettable() {
// TODO Auto-generated method stub
@ -163,46 +154,43 @@ public class AirmetRecord extends PluginDataObject {
/**
* @return the issueOffice
*/
public String getIssueOffice() {
public String getIssueOffice(){
return issueOffice;
}
/**
* @param issueOffice
* to set
* @param issueOffice to set
*/
public void setIssueOffice(String issueOffice) {
this.issueOffice = issueOffice;
public void setIssueOffice(String issueOffice){
this.issueOffice=issueOffice;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
public String getWmoHeader(){
return wmoHeader;
}
/**
* @param wnoHeader
* to set
* @param wnoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
public void setWmoHeader(String wmoHeader){
this.wmoHeader=wmoHeader;
}
/**
* @return the issueTime
*/
public Calendar getIssueTime() {
public Calendar getIssueTime(){
return issueTime;
}
/**
* @param issueTime
* to set
* @param issueTime to set
*/
public void setIssueTime(Calendar issueTime) {
this.issueTime = issueTime;
public void setIssueTime(Calendar issueTime){
this.issueTime=issueTime;
}
/**
@ -213,8 +201,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param reportType
* to set
* @param reportType to set
*/
public void setReportType(String reportType) {
this.reportType = reportType;
@ -228,8 +215,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param designatorBBB
* to set
* @param designatorBBB to set
*/
public void setDesignatorBBB(String designatorBBB) {
this.designatorBBB = designatorBBB;
@ -243,8 +229,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param correctionFlag
* to set
* @param correctionFlag to set
*/
public void setCorrectionFlag(Integer correctionFlag) {
this.correctionFlag = correctionFlag;
@ -258,8 +243,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param updateNumber
* to set
* @param updateNumber to set
*/
public void setUpdateNumber(Integer updateNumber) {
this.updateNumber = updateNumber;
@ -273,8 +257,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param bullMessage
* to set
* @param bullMessage to set
*/
public void setBullMessage(String bullMessage) {
this.bullMessage = bullMessage;
@ -288,8 +271,7 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param reportName
* to set
* @param reportName to set
*/
public void setReportName(String reportName) {
this.reportName = reportName;
@ -303,38 +285,37 @@ public class AirmetRecord extends PluginDataObject {
}
/**
* @param airmet
* the report to set
* @param airmet the report to set
*/
public void setAirmetReport(Set<AirmetReport> curReport) {
this.airmetReport = curReport;
}
/**
* @param add
* AirmetReport to set
* @param add AirmetReport to set
*/
public void addAirmetReport(AirmetReport curReport) {
public void addAirmetReport(AirmetReport curReport){
airmetReport.add(curReport);
curReport.setParentID(this);
//curReport.setParentID(this);
}
/**
* Override existing set method to modify any classes that use the dataURI
* as a foreign key
* Override existing set method to modify any
* classes that use the dataURI as a foreign key
*/
@Override
public void setIdentifier(Object dataURI) {
public void setIdentifier(Object dataURI)
{
this.identifier = dataURI;
if (this.getAirmetReport() != null && this.getAirmetReport().size() > 0) {
for (Iterator<AirmetReport> iter = this.getAirmetReport()
.iterator(); iter.hasNext();) {
/*
if(this.getAirmetReport() != null && this.getAirmetReport().size() > 0)
{
for (Iterator<AirmetReport> iter = this.getAirmetReport().iterator(); iter.hasNext();) {
AirmetReport cs = iter.next();
cs.setParentID(this);
}
}
}*/
}

View file

@ -9,6 +9,8 @@
* Date Author Description
* ------------ ---------- ----------- --------------------------
* 05/2009 L. Lin Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -16,24 +18,21 @@
package gov.noaa.nws.ncep.common.dataplugin.airmet;
import java.io.Serializable;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import org.hibernate.annotations.Index;
@ -42,8 +41,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "airmet_report")
@XmlAccessorType(XmlAccessType.NONE)
@Table(name="airmet_report")
@DynamicSerialize
public class AirmetReport implements Serializable, ISerializableObject {
@ -54,89 +52,82 @@ public class AirmetReport implements Serializable, ISerializableObject {
private Integer recordId = null;
// The AIRMET record this object belongs to
@ManyToOne
@JoinColumn(name = "parentID", nullable = false)
private AirmetRecord parentID;
//@ManyToOne
//@JoinColumn(name="parentID", nullable=false)
// private AirmetRecord parentID;
/*
* hazard type as: Instrument Flight Rules(IR), Mountain Obscuration(MO),
* Turbulence(TB), Icing(IC), Sustained SFC Winds(SW), Low Level Wind
* Shear(LLWS), or CANCEL. If a report is outlook, then an "OUTLOOK: will be
* added.
* Turbulence(TB), Icing(IC), Sustained SFC Winds(SW),
* Low Level Wind Shear(LLWS), or CANCEL. If a report is outlook, then
* an "OUTLOOK: will be added.
*/
@Column(length = 40)
@XmlElement
@Column(length=40)
@DynamicSerializeElement
private String hazardType;
// The report indicator will be AIRMET or OUTLOOK.
@Column(length = 16)
@XmlElement
//The report indicator will be AIRMET or OUTLOOK.
@Column(length=16)
@DynamicSerializeElement
private String reportIndicator;
// Sequence ID of an AIRMET report
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String sequenceID;
// Start time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar startTime;
// End time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar endTime;
// Flight level 1
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String flightLevel1;
// Flight level 2
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String flightLevel2;
// cancelFlag is a flag indicating a cancellation (0 or 1)
@Column
@XmlElement
@DynamicSerializeElement
private Integer cancelFlag;
// The information of a complete report
@Column(length = 1440)
@XmlElement
@Column(length=1440)
@DynamicSerializeElement
private String segment;
/**
* Airmet location
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@Index(name = "airmet_location_parentid_idex")
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "airmetLocation_parentid_idex")
private Set<AirmetLocation> airmetLocation = new HashSet<AirmetLocation>();
/**
* No-Arg Convstructor
*/
public AirmetReport() {
this.flightLevel1 = null;
this.flightLevel2 = null;
this.segment = null;
this.hazardType = null;
this.reportIndicator = null;
this.sequenceID = null;
this.cancelFlag = 0;
this.flightLevel2=null;
this.segment=null;
this.hazardType=null;
this.reportIndicator=null;
this.sequenceID=null;
this.cancelFlag=0;
}
/**
@ -169,45 +160,41 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param airmet
* the location to set
* @param airmet the location to set
*/
public void setAirmetLocation(Set<AirmetLocation> curLocation) {
this.airmetLocation = curLocation;
}
/**
* @param add
* airmet location to set
* @param add airmet location to set
*/
public void addAirmetLocation(AirmetLocation plocation) {
public void addAirmetLocation(AirmetLocation plocation){
airmetLocation.add(plocation);
}
/**
* @return the parentID
*/
// public String getParentID() {
*
//public String getParentID() {
public AirmetRecord getParentID() {
return parentID;
}
}*/
/**
* @param parentID
* the parentID to set
*/
* @param parentID the parentID to set
*
public void setParentID(AirmetRecord parentID) {
this.parentID = parentID;
if (this.getAirmetLocation() != null
&& this.getAirmetLocation().size() > 0) {
for (Iterator<AirmetLocation> iter = this.getAirmetLocation()
.iterator(); iter.hasNext();) {
//this.parentID = parentID;
if(this.getAirmetLocation() != null && this.getAirmetLocation().size() > 0)
{
for (Iterator<AirmetLocation> iter = this.getAirmetLocation().iterator(); iter.hasNext();) {
AirmetLocation cond = iter.next();
cond.setParentID(this);
}
}
}
}*/
/**
* @return the report
@ -217,8 +204,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param segment
* to set
* @param segment to set
*/
public void setSegment(String segment) {
this.segment = segment;
@ -232,8 +218,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param startTime
* to set
* @param startTime to set
*/
public void setStartTime(Calendar startTime) {
this.startTime = startTime;
@ -247,8 +232,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param endTIme
* to set
* @param endTIme to set
*/
public void setEndTime(Calendar endTime) {
this.endTime = endTime;
@ -262,8 +246,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param flightLevel1
* to set
* @param flightLevel1 to set
*/
public void setFlightLevel1(String flightLevel1) {
this.flightLevel1 = flightLevel1;
@ -277,8 +260,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param flightLevel2
* to set
* @param flightLevel2 to set
*/
public void setFlightLevel2(String flightLevel2) {
this.flightLevel2 = flightLevel2;
@ -295,7 +277,6 @@ public class AirmetReport implements Serializable, ISerializableObject {
/**
* Set the record id.
*
* @param record
*/
public void setRecordId(Integer recordId) {
@ -310,8 +291,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param cancelFlag
* to set
* @param cancelFlag to set
*/
public void setCancelFlag(Integer cancelFlag) {
this.cancelFlag = cancelFlag;
@ -325,8 +305,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param hazardType
* to set
* @param hazardType to set
*/
public void setHazardType(String hazardType) {
this.hazardType = hazardType;
@ -340,8 +319,7 @@ public class AirmetReport implements Serializable, ISerializableObject {
}
/**
* @param reportIndicator
* to set
* @param reportIndicator to set
*/
public void setReportIndicator(String reportIndicator) {
this.reportIndicator = reportIndicator;

View file

@ -1,31 +1,13 @@
/**
* 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 gov.noaa.nws.ncep.common.dataplugin.airmet.dao;
import gov.noaa.nws.ncep.common.dataplugin.airmet.AirmetRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
/**
* TODO Add Description
@ -36,6 +18,8 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 23, 2009 jkorman Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* </pre>
*
@ -43,7 +27,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* @version 1.0
*/
public class AirmetDao extends NcepDefaultPluginDao {
public class AirmetDao extends PluginDao {
/**
* Creates a new ReccoDao
@ -92,4 +76,11 @@ public class AirmetDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,6 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.atcf">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.atcf">
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />

View file

@ -1,10 +1,6 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.aww">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.aww">
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />

View file

@ -8,6 +8,8 @@
* Date Author Description
* ------------ ---------- ----------- --------------------------
* 12/2008 L. Lin Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -20,12 +22,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -33,7 +30,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name="aww_fips")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwFips implements Serializable, ISerializableObject {
@ -44,19 +40,17 @@ public class AwwFips implements Serializable, ISerializableObject {
private Integer recordId = null;
// The AWW record this object belongs to.
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private AwwUgc parentID;
//@ManyToOne
//@JoinColumn(name="parentID", nullable=false)
//private AwwUgc parentID;
// The county FIPS
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String fips;
// The universal geographic code
@Column(length=640)
@XmlElement
@DynamicSerializeElement
private String ugc;
@ -94,19 +88,7 @@ public class AwwFips implements Serializable, ISerializableObject {
this.recordId = recordId;
}
/**
* @return the parentID
*/
public AwwUgc getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(AwwUgc parentID) {
this.parentID = parentID;
}
/**
* @return the fips

View file

@ -9,6 +9,8 @@
* ------------ ---------- ----------- --------------------------
* 12/2008 L. Lin Initial creation
* 04/2009 L. Lin Convert to to10
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -23,12 +25,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -36,7 +33,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name="aww_hvtec")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwHVtec implements Serializable, ISerializableObject {
@ -47,55 +43,47 @@ public class AwwHVtec implements Serializable, ISerializableObject {
private Integer recordId = null;
// The AWW HVTEC record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private AwwVtec parentID;
//@ManyToOne
//@JoinColumn(name="parentID", nullable=false)
//private AwwVtec parentID;
// NWS location Identifier
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String locationIdentifier;
// Flood severity such as 0, N, 1, 2, 3, U
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String floodSeverity;
// Immediate Cause such as ER, SM, ...etc
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String immediateCause;
// Flood record such as NO, NR, UU, OO
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String floodRecord;
// HVTEC event start time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar eventStartTime;
// HVTEC event crest time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar eventCrestTime;
// HVTEC event end time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar eventEndTime;
// Text information for HVTEC line
@Column(length=128)
@XmlElement
@DynamicSerializeElement
private String hvtecLine;
@ -139,19 +127,7 @@ public class AwwHVtec implements Serializable, ISerializableObject {
this.recordId = recordId;
}
/**
* @return the parentID
*/
public AwwVtec getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(AwwVtec parentID) {
this.parentID = parentID;
}
/**
* @return the floodSeverity

View file

@ -9,6 +9,8 @@
* ------------ ---------- ----------- --------------------------
* 12/2008 L. Lin Initial creation
* 04/2009 L. Lin Convert to to10
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -17,18 +19,11 @@ package gov.noaa.nws.ncep.common.dataplugin.aww;
import java.io.Serializable;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import gov.noaa.nws.ncep.common.dataplugin.aww.AwwRecord;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -36,7 +31,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name="aww_latlons")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwLatlons implements Serializable, ISerializableObject {
@ -46,26 +40,19 @@ public class AwwLatlons implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
// The AWW Latlons record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private AwwUgc parentID;
// Latitude
@Column
@XmlElement
@DynamicSerializeElement
private Float lat;
// longitude
@Column
@XmlElement
@DynamicSerializeElement
private Float lon;
// Index for the order of a complete "lat/lon" set
@Column
@XmlElement
@DynamicSerializeElement
private int index;
@ -104,19 +91,7 @@ public class AwwLatlons implements Serializable, ISerializableObject {
this.recordId = recordId;
}
/**
* @return the parentID
*/
public AwwUgc getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(AwwUgc parentID) {
this.parentID = parentID;
}
/**
* @return the latitude

View file

@ -21,6 +21,8 @@
* when the aww record is inserted into relational DB
* The reason mndTime is used is because the combination
* of original 5 elements is not unique in some scenarios.
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -40,6 +42,7 @@ import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
@ -48,6 +51,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
@ -57,8 +61,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "aww", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwRecord extends PluginDataObject{
@ -101,69 +103,60 @@ public class AwwRecord extends PluginDataObject{
*/
@Column(length=40)
@DataURI(position=1)
@XmlElement
@DynamicSerializeElement
private String reportType;
// The issue office where the report from
@Column(length=32)
@DataURI(position=2)
@XmlElement
@DynamicSerializeElement
private String issueOffice;
// The collection of watch numbers in the report
@Column(length=160)
@DataURI(position=5)
@XmlElement
@DynamicSerializeElement
private String watchNumber;
// WMO header
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String wmoHeader;
// Issue time of the report
@Column
@DataURI(position=3)
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
// The designator
@Column(length=8)
@DataURI(position=4)
@XmlElement
@DynamicSerializeElement
private String designatorBBB;
// The designator
@Column(length=72)
@DataURI(position=6)
@XmlElement
@DynamicSerializeElement
private String mndTime;
// Attention WFO
@Column(length=72)
@XmlElement
@DynamicSerializeElement
private String attentionWFO;
// The entire report
@Column(length=40000)
@XmlElement
@DynamicSerializeElement
private String bullMessage;
// AWW UGC Table
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "awwUGC_parentid_idex")
private Set<AwwUgc> awwUGC = new HashSet<AwwUgc>();
@ -258,7 +251,7 @@ public class AwwRecord extends PluginDataObject{
*/
public void addAwwUGC(AwwUgc pugc){
awwUGC.add(pugc);
pugc.setParentID(this);
//pugc.setParentID(this);
}
/**
@ -270,13 +263,7 @@ public class AwwRecord extends PluginDataObject{
this.identifier = dataURI;
if(this.getAwwUGC() != null && this.getAwwUGC().size() > 0)
{
for (Iterator<AwwUgc> iter = this.getAwwUGC().iterator(); iter.hasNext();) {
AwwUgc cond = iter.next();
cond.setParentID(this);
}
}
}

View file

@ -9,6 +9,8 @@
* ------------ ---------- ----------- --------------------------
* 12/2008 L. Lin Initial creation
* 04/2009 L. Lin Convert to to10
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -24,7 +26,6 @@ import gov.noaa.nws.ncep.common.dataplugin.aww.AwwLatlons;
import java.util.HashSet;
import java.util.Set;
import java.util.Iterator;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@ -35,22 +36,15 @@ import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name="aww_ugc")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwUgc implements Serializable, ISerializableObject {
@ -61,31 +55,27 @@ public class AwwUgc implements Serializable, ISerializableObject {
private Integer recordId = null;
// The AWW record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private AwwRecord parentID;
//@ManyToOne
//@JoinColumn(name="parentID", nullable=false)
//private AwwRecord parentID;
// The universal geographic code
@Column(length=640)
@XmlElement
@DynamicSerializeElement
private String ugc;
// The product purge time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar prodPurgeTime;
// A collection of VTEC event tracking numbers under this UGC
@Column(length=40)
@XmlElement
@DynamicSerializeElement
private String eventTrackingNumber;
// Text information for this segment
@Column(length=12000)
@XmlElement
@DynamicSerializeElement
private String segment;
@ -93,27 +83,27 @@ public class AwwUgc implements Serializable, ISerializableObject {
* AWW VTEC Table
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "awwVtecLine_parentid_idex")
private Set<AwwVtec> awwVtecLine = new HashSet<AwwVtec>();
/**
* Aww FIPS Table
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "awwFIPS_parentid_idex")
private Set<AwwFips> awwFIPS = new HashSet<AwwFips>();
/**
* Aww LatLon Table
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "awwLatLon_parentid_idex")
private Set<AwwLatlons> awwLatLon = new HashSet<AwwLatlons>();
/**
@ -152,44 +142,7 @@ public class AwwUgc implements Serializable, ISerializableObject {
return serialVersionUID;
}
/**
* @return the parentID
*/
public AwwRecord getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(AwwRecord parentID) {
this.parentID = parentID;
if(this.getAwwVtecLine() != null && this.getAwwVtecLine().size() > 0)
{
for (Iterator<AwwVtec> iter = this.getAwwVtecLine().iterator(); iter.hasNext();) {
AwwVtec cond = iter.next();
cond.setParentID(this);
}
}
if (this.getAwwFIPS() !=null && this.getAwwFIPS().size() >0 )
{
for (Iterator<AwwFips> iter = this.getAwwFIPS().iterator(); iter.hasNext();) {
AwwFips cond = iter.next();
cond.setParentID(this);
cond.setUgc(ugc);
}
}
if (this.getAwwLatLon() !=null && this.getAwwLatLon().size() >0 )
{
for (Iterator<AwwLatlons> iter = this.getAwwLatLon().iterator(); iter.hasNext();) {
AwwLatlons cond = iter.next();
cond.setParentID(this);
}
}
}
/**
* @return the ugc

View file

@ -9,6 +9,8 @@
* ------------ ---------- ----------- --------------------------
* 12/2008 L. Lin Initial creation
* 04/2009 L. Lin Convert to to10.
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -19,7 +21,6 @@ import java.io.Serializable;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Set;
import java.util.Iterator;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@ -30,14 +31,9 @@ import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -45,7 +41,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name="aww_vtec")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class AwwVtec implements Serializable, ISerializableObject {
@ -56,61 +51,52 @@ public class AwwVtec implements Serializable, ISerializableObject {
private Integer recordId = null;
// The AWW VTEC record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private AwwUgc parentID;
//@ManyToOne
//@JoinColumn(name="parentID", nullable=false)
//private AwwUgc parentID;
// VTEC office ID
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String officeID;
// Action such as NEW, CON, CAN, EXT, ....
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String action;
// VTEC event start time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar eventStartTime;
// VTEC event end time
@Column
@XmlElement
@DynamicSerializeElement
private Calendar eventEndTime;
// VTEC event tracking number
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String eventTrackingNumber;
// Significance such as W-warning, A-watch, Y-advisory, S-statement
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String significance;
// product class such as O-operational product, T-test product, E-experimental...
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String productClass;
// phenomena - two character string PP
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String phenomena;
// Text information for VTEC
@Column(length=128)
@XmlElement
@DynamicSerializeElement
private String vtecLine;
@ -118,9 +104,9 @@ public class AwwVtec implements Serializable, ISerializableObject {
* AWW HVTEC Table
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "awwHVtecLine_parentid_idex")
private Set<AwwHVtec> awwHVtecLine = new HashSet<AwwHVtec>();
/**
@ -163,26 +149,7 @@ public class AwwVtec implements Serializable, ISerializableObject {
this.recordId = recordId;
}
/**
* @return the parentID
*/
public AwwUgc getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(AwwUgc parentID) {
this.parentID = parentID;
if (this.getAwwHVtecLine() != null && this.getAwwHVtecLine().size() > 0)
{
for (Iterator<AwwHVtec> iter = this.getAwwHVtecLine().iterator(); iter.hasNext();) {
AwwHVtec cond = iter.next();
cond.setParentID(this);
}
}
}
/**
* @return the vtecLine

View file

@ -8,20 +8,23 @@
* Date Author Description
* ------------ ---------- ----------- --------------------------
* 05/2010 L. Lin Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.common.dataplugin.aww.dao;
import gov.noaa.nws.ncep.common.dataplugin.aww.AwwRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
public class AwwDao extends NcepDefaultPluginDao {
public class AwwDao extends PluginDao {
/**
* Creates a new AwwDao
@ -70,4 +73,11 @@ public class AwwDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,6 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.convsigmet">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.convsigmet">
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />

View file

@ -12,6 +12,8 @@
* 06/2009 87/114 L. Lin Enlarge size of locationLine and location.
* 07/2009 87/114 L. Lin Migration to TO11
* 09/2009 87/114 L. Lin Add latitude/longitude to location table
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -24,12 +26,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,7 +34,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="convsigmet_location")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ConvSigmetLocation implements Serializable, ISerializableObject {
@ -47,38 +43,29 @@ public class ConvSigmetLocation implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
// The consigmet record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private ConvSigmetSection parentID;
// Collection of locations
@Column(length=480)
@XmlElement
@DynamicSerializeElement
private String locationLine;
// Each location of a convective sigmet forecast area
@Column(length=48)
@XmlElement
@DynamicSerializeElement
private String location;
// Each latitude of a convective sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double latitude;
// Each longitude of a convective sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double longitude;
// Index for the order of a complete location set
@Column
@XmlElement
@DynamicSerializeElement
private Integer index;
@ -99,19 +86,6 @@ public class ConvSigmetLocation implements Serializable, ISerializableObject {
return serialVersionUID;
}
/**
* @return the parentID
*/
public ConvSigmetSection getParentID() {
return parentID;
}
/**
* @param parentID to set
*/
public void setParentID(ConvSigmetSection parentID) {
this.parentID = parentID;
}
/**
* @return the index

View file

@ -9,6 +9,8 @@
* ------------ ---------- ----------- --------------------------
* 03/2009 87/114 L. Lin Initial coding
* 07/2009 87/114 L. Lin Migration to TO11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -16,39 +18,36 @@
package gov.noaa.nws.ncep.common.dataplugin.convsigmet;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "convsigmet", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ConvSigmetRecord extends PluginDataObject {
public class ConvSigmetRecord extends PluginDataObject{
/**
*
@ -56,88 +55,82 @@ public class ConvSigmetRecord extends PluginDataObject {
private static final long serialVersionUID = 1L;
// reportType is "convective sigmet".
@Column(length = 32)
@DataURI(position = 1)
@XmlElement
@Column(length=32)
@DataURI(position=1)
@DynamicSerializeElement
private String reportType;
// WMO header
@Column(length = 32)
@DataURI(position = 2)
@XmlElement
@Column(length=32)
@DataURI(position=2)
@DynamicSerializeElement
private String wmoHeader;
// forecastRegion as: SIGW, SIGC, or SIGE
@Column(length = 8)
@DataURI(position = 3)
@XmlElement
@Column(length=8)
@DataURI(position=3)
@DynamicSerializeElement
private String forecastRegion;
// The issue office where the report from
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String issueOffice;
// Issue time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
// The designator
@Column(length = 8)
@XmlElement
@Column(length=8)
@DynamicSerializeElement
private String designatorBBB;
// CorrectionFlag is a flag indicating a cancellation (0 or 1)
@Column
@XmlElement
@DynamicSerializeElement
private Integer correctionFlag;
// The entire report
@Column(length = 15000)
@XmlElement
@Column(length=15000)
@DynamicSerializeElement
private String bullMessage;
/**
* Convsigmet section
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@Index(name = "convsigmet_section_parentid_idex")
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "convSigmetSection_parentid_idex")
private Set<ConvSigmetSection> convSigmetSection = new HashSet<ConvSigmetSection>();
/**
* Default Convstructor
*/
public ConvSigmetRecord() {
this.issueOffice = "";
this.wmoHeader = "";
this.bullMessage = "";
this.designatorBBB = "";
this.forecastRegion = "";
this.reportType = "";
this.correctionFlag = IDecoderConstantsN.INTEGER_MISSING;
this.issueOffice="";
this.wmoHeader="";
this.bullMessage="";
this.designatorBBB="";
this.forecastRegion="";
this.reportType="";
this.correctionFlag=IDecoderConstantsN.INTEGER_MISSING;
}
/**
* Convstructs a consigmet record from a dataURI
*
* @param uri
* The dataURI
* @param uri The dataURI
*/
public ConvSigmetRecord(String uri) {
super(uri);
}
@Override
public IDecoderGettable getDecoderGettable() {
// TODO Auto-generated method stub
@ -147,46 +140,43 @@ public class ConvSigmetRecord extends PluginDataObject {
/**
* @return the issueOffice
*/
public String getIssueOffice() {
public String getIssueOffice(){
return issueOffice;
}
/**
* @param issueOffice
* to set
* @param issueOffice to set
*/
public void setIssueOffice(String issueOffice) {
this.issueOffice = issueOffice;
public void setIssueOffice(String issueOffice){
this.issueOffice=issueOffice;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
public String getWmoHeader(){
return wmoHeader;
}
/**
* @param wnoHeader
* to set
* @param wnoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
public void setWmoHeader(String wmoHeader){
this.wmoHeader=wmoHeader;
}
/**
* @return the issueTime
*/
public Calendar getIssueTime() {
public Calendar getIssueTime(){
return issueTime;
}
/**
* @param issueTime
* to set
* @param issueTime to set
*/
public void setIssueTime(Calendar issueTime) {
this.issueTime = issueTime;
public void setIssueTime(Calendar issueTime){
this.issueTime=issueTime;
}
/**
@ -197,8 +187,7 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param reportType
* to set
* @param reportType to set
*/
public void setReportType(String reportType) {
this.reportType = reportType;
@ -212,8 +201,7 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param designatorBBB
* to set
* @param designatorBBB to set
*/
public void setDesignatorBBB(String designatorBBB) {
this.designatorBBB = designatorBBB;
@ -227,8 +215,7 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param correctionFlag
* to set
* @param correctionFlag to set
*/
public void setCorrectionFlag(Integer correctionFlag) {
this.correctionFlag = correctionFlag;
@ -242,8 +229,7 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param forecastRegion
* to set
* @param forecastRegion to set
*/
public void setForecastRegion(String forecastRegion) {
this.forecastRegion = forecastRegion;
@ -257,13 +243,13 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param bullMessage
* to set
* @param bullMessage to set
*/
public void setBullMessage(String bullMessage) {
this.bullMessage = bullMessage;
}
/**
* @return the set of convective Sigmet section
*/
@ -272,40 +258,30 @@ public class ConvSigmetRecord extends PluginDataObject {
}
/**
* @param convsigmet
* the section to set
* @param convsigmet the section to set
*/
public void setConvSigmetSection(Set<ConvSigmetSection> convSection) {
this.convSigmetSection = convSection;
}
/**
* @param add
* convective Sigmet Section to set
* @param add convective Sigmet Section to set
*/
public void addConvSigmetSection(ConvSigmetSection psection) {
public void addConvSigmetSection(ConvSigmetSection psection){
convSigmetSection.add(psection);
psection.setParentID(this);
}
/**
* Override existing set method to modify any classes that use the dataURI
* as a foreign key
* Override existing set method to modify any
* classes that use the dataURI as a foreign key
*/
@Override
public void setIdentifier(Object dataURI) {
public void setIdentifier(Object dataURI)
{
this.identifier = dataURI;
if (this.getConvSigmetSection() != null
&& this.getConvSigmetSection().size() > 0) {
for (Iterator<ConvSigmetSection> iter = this.getConvSigmetSection()
.iterator(); iter.hasNext();) {
ConvSigmetSection cs = iter.next();
cs.setParentID(this);
}
}
}
}

View file

@ -10,6 +10,8 @@
* ------------ ---------- ----------- --------------------------
* 03/2009 87/114 L. Lin Initial coding
* 07/2009 87/114 L. Lin Migration to TO11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -17,37 +19,30 @@
package gov.noaa.nws.ncep.common.dataplugin.convsigmet;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.io.Serializable;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name = "convsigmet_section")
@XmlAccessorType(XmlAccessType.NONE)
@Table(name="convsigmet_section")
@DynamicSerialize
public class ConvSigmetSection implements Serializable, ISerializableObject {
@ -57,103 +52,90 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
// The CONVSIGMET record this object belongs to
@ManyToOne
@JoinColumn(name = "parentID", nullable = false)
private ConvSigmetRecord parentID;
// Class type such as: LINE, AREA, ISOL, CS, and OUTLOOK
@Column(length = 8)
@XmlElement
@Column(length=8)
@DynamicSerializeElement
private String classType;
// Sequence ID of a convective sigmet report
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String sequenceID;
// Start time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar startTime;
// End time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar endTime;
/*
* Intensity is DMSHG (weakening), DSIPTG (ending) INTSFYG (strengthening),
* DVLPG (beginning/growing)
* Intensity is DMSHG (weakening), DSIPTG (ending)
* INTSFYG (strengthening), DVLPG (beginning/growing)
*/
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String intensity;
// To where flight level from tops
@Column
@XmlElement
@DynamicSerializeElement
private int flightLevel;
// TOPS TO or TOPS ABV for flight level
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String cloudTop;
// Direction of weather report heads to
@Column
@XmlElement
@DynamicSerializeElement
private int direction;
// wind speed in knots
@Column
@XmlElement
@DynamicSerializeElement
private int speed;
// Distance is the Distance or Area diameter of the area or line
@Column
@XmlElement
@DynamicSerializeElement
private int distance;
// The information of a complete section
@Column(length = 720)
@XmlElement
@Column(length=720)
@DynamicSerializeElement
private String segment;
/**
* Convsigmet location
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@Index(name = "convsigmet_location_parentid_idex")
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "convSigmetLocation_parentid_idex")
private Set<ConvSigmetLocation> convSigmetLocation = new HashSet<ConvSigmetLocation>();
/**
* No-Arg Convstructor
*/
public ConvSigmetSection() {
this.intensity = null;
this.cloudTop = null;
this.segment = null;
this.classType = null;
this.sequenceID = null;
this.cloudTop=null;
this.segment=null;
this.classType=null;
this.sequenceID=null;
this.direction = IDecoderConstantsN.INTEGER_MISSING;
this.speed = IDecoderConstantsN.INTEGER_MISSING;
this.distance = IDecoderConstantsN.INTEGER_MISSING;
this.flightLevel = IDecoderConstantsN.INTEGER_MISSING;
this.direction=IDecoderConstantsN.INTEGER_MISSING;
this.speed=IDecoderConstantsN.INTEGER_MISSING;
this.distance=IDecoderConstantsN.INTEGER_MISSING;
this.flightLevel=IDecoderConstantsN.INTEGER_MISSING;
}
/**
@ -186,8 +168,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param intensity
* to set
* @param intensity to set
*/
public void setIntensity(String intensity) {
this.intensity = intensity;
@ -201,8 +182,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param direction
* to set
* @param direction to set
*/
public void setDirection(int direction) {
this.direction = direction;
@ -216,8 +196,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param speed
* to set
* @param speed to set
*/
public void setSpeed(int speed) {
this.speed = speed;
@ -231,8 +210,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param distance
* to set
* @param distance to set
*/
public void setDistance(int distance) {
this.distance = distance;
@ -246,45 +224,20 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param convsigmet
* the location to set
* @param convsigmet the location to set
*/
public void setConvSigmetLocation(Set<ConvSigmetLocation> convLocation) {
this.convSigmetLocation = convLocation;
}
/**
* @param add
* conv Sigmet location to set
* @param add conv Sigmet location to set
*/
public void addConvSigmetLocation(ConvSigmetLocation plocation) {
public void addConvSigmetLocation(ConvSigmetLocation plocation){
convSigmetLocation.add(plocation);
}
/**
* @return the parentID
*/
// public String getParentID() {
public ConvSigmetRecord getParentID() {
return parentID;
}
/**
* @param parentID
* the parentID to set
*/
public void setParentID(ConvSigmetRecord parentID) {
this.parentID = parentID;
if (this.getConvSigmetLocation() != null
&& this.getConvSigmetLocation().size() > 0) {
for (Iterator<ConvSigmetLocation> iter = this
.getConvSigmetLocation().iterator(); iter.hasNext();) {
ConvSigmetLocation cond = iter.next();
cond.setParentID(this);
}
}
}
/**
* @return the classType
@ -294,8 +247,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param classType
* to set
* @param classType to set
*/
public void setClassType(String classType) {
this.classType = classType;
@ -309,8 +261,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param segment
* to set
* @param segment to set
*/
public void setSegment(String segment) {
this.segment = segment;
@ -324,8 +275,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param startTime
* to set
* @param startTime to set
*/
public void setStartTime(Calendar startTime) {
this.startTime = startTime;
@ -339,8 +289,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param endTIme
* to set
* @param endTIme to set
*/
public void setEndTime(Calendar endTime) {
this.endTime = endTime;
@ -354,8 +303,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param cloudTop
* to set
* @param cloudTop to set
*/
public void setCloudTop(String cloudTop) {
this.cloudTop = cloudTop;
@ -369,8 +317,7 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
}
/**
* @param flightLevel
* to set
* @param flightLevel to set
*/
public void setFlightLevel(int flightLevel) {
this.flightLevel = flightLevel;
@ -387,7 +334,6 @@ public class ConvSigmetSection implements Serializable, ISerializableObject {
/**
* Set the record id.
*
* @param record
*/
public void setRecordId(Integer recordId) {

View file

@ -1,31 +1,14 @@
/**
* 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 gov.noaa.nws.ncep.common.dataplugin.convsigmet.dao;
import gov.noaa.nws.ncep.common.dataplugin.convsigmet.ConvSigmetRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
/**
* TODO Add Description
@ -36,6 +19,8 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 23, 2009 jkorman Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* </pre>
*
@ -43,7 +28,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* @version 1.0
*/
public class ConvSigmetDao extends NcepDefaultPluginDao {
public class ConvSigmetDao extends PluginDao {
/**
* Creates a new ReccoDao
@ -92,4 +77,11 @@ public class ConvSigmetDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,8 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.ffg">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.ffg">
<!-- property name="component.name" value="plugin-ffg" /-->
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -13,6 +13,8 @@
* 03/2009 14 T. Lee Migration to TO10
* 11/2009 14 T. Lee Migration to TO11D6
* 05/2010 14 T. Lee Migration to TO11DR11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -26,21 +28,15 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import gov.noaa.nws.ncep.common.dataplugin.ffg.FfgRecord;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="ffg_precip")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class FfgPrecip implements Serializable, ISerializableObject {
@ -50,11 +46,6 @@ public class FfgPrecip implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
/** The FFG record this object belongs to **/
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private FfgRecord parentID;
/** The zone ID **/
@Column(length=32)
@XmlElement
@ -113,17 +104,17 @@ public class FfgPrecip implements Serializable, ISerializableObject {
/**
* @return the parentID
*/
*
public FfgRecord getParentID() {
return parentID;
}
}*/
/**
* @param parentID the parentID to set
*/
*
public void setParentID(FfgRecord parentID) {
this.parentID = parentID;
}
}*/
/**
* @return the zoneID

View file

@ -13,6 +13,8 @@
* 12/2008 14 T. Lee Initialized variable
* 03/2009 14 T. Lee Migration to TO10
* 07/2009 14 T. Lee Migration to TO11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -23,23 +25,17 @@ package gov.noaa.nws.ncep.common.dataplugin.ffg;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
@ -49,8 +45,6 @@ import gov.noaa.nws.ncep.common.dataplugin.ffg.FfgPrecip;
@Entity
@Table(name = "ffg", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class FfgRecord extends PluginDataObject {
@ -58,58 +52,50 @@ public class FfgRecord extends PluginDataObject {
/** Report type */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String reportType;
/** FFG AWIPS identifier */
@Column(length=32)
@DataURI(position=1)
@XmlElement
@DynamicSerializeElement
private String awipsID;
/** Bulletin insurance time */
@Column
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
/** Station ID */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String issueOffice;
/** Designator BBB */
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String designatorBBB;
/** Bulletin messages */
@Column(length=10000)
@XmlElement
@DynamicSerializeElement
private String bullMessage;
/** Mass News Disseminator (MND) */
@Column(length=72)
@XmlElement
@DynamicSerializeElement
private String mndTime;
/** WMO header */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String wmoHeader;
/** FFG precipitation */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "ffgP_parentid_idex")
private Set<FfgPrecip> ffgP = new HashSet<FfgPrecip>();
/**
@ -270,7 +256,7 @@ public class FfgRecord extends PluginDataObject {
*/
public void addPrecip(FfgPrecip precip){
ffgP.add(precip);
precip.setParentID (this);
//precip.setParentID (this);
}
/**
@ -281,11 +267,11 @@ public class FfgRecord extends PluginDataObject {
public void setIdentifier(Object dataURI) {
this.identifier = dataURI;
if (this.getFfgP() != null && this.getFfgP().size() > 0) {
/*if (this.getFfgP() != null && this.getFfgP().size() > 0) {
for (Iterator<FfgPrecip> iter = this.getFfgP().iterator(); iter.hasNext();) {
FfgPrecip fp = iter.next();
fp.setParentID(this);
}
//fp.setParentID(this);
}
}*/
}
}

View file

@ -10,6 +10,8 @@
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 05/2010 14 T. Lee Migration to TO11DR11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -19,15 +21,14 @@
package gov.noaa.nws.ncep.common.dataplugin.ffg.dao;
import gov.noaa.nws.ncep.common.dataplugin.ffg.FfgRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.edex.db.dao.DefaultPluginDao;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
public class FfgDao extends NcepDefaultPluginDao {
public class FfgDao extends PluginDao {
/**
* FfgDao constructor.
@ -76,4 +77,11 @@ public class FfgDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,6 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.idft">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.idft">
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />

View file

@ -1,10 +1,7 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.intlsigmet">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -11,6 +11,8 @@
* 05/2009 113 L. Lin Initial creation
* 07/2009 113 L. Lin Migration to TO11
* 09/2009 113 L. Lin modify lat/lon float to latitude/longitude double
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -24,12 +26,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,7 +34,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="intlsigmet_location")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class IntlSigmetLocation implements Serializable, ISerializableObject {
@ -47,38 +43,29 @@ public class IntlSigmetLocation implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
// The intlsigmet record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private IntlSigmetRecord parentID;
// Collection of locations
@Column(length=480)
@XmlElement
@DynamicSerializeElement
private String locationLine;
// Each location of an international sigmet forecast area
@Column(length=48)
@XmlElement
@DynamicSerializeElement
private String locationName;
// Each latitude of an international sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double latitude;
// Each longitude of an international sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double longitude;
// Index for the order of a complete location set
@Column
@XmlElement
@DynamicSerializeElement
private Integer index;
@ -101,19 +88,6 @@ public class IntlSigmetLocation implements Serializable, ISerializableObject {
return serialVersionUID;
}
/**
* @return the parentID
*/
public IntlSigmetRecord getParentID() {
return parentID;
}
/**
* @param parentID to set
*/
public void setParentID(IntlSigmetRecord parentID) {
this.parentID = parentID;
}
/**
* @return the index

View file

@ -11,6 +11,8 @@
* 06/2009 113 L. Lin Initial coding
* 07/2009 113 L. Lin Migration to TO11
* 05/2010 113 L. Lin Migration to TO11DR11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -20,7 +22,6 @@ package gov.noaa.nws.ncep.common.dataplugin.intlsigmet;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
@ -31,25 +32,18 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "intlsigmet", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -63,100 +57,84 @@ public class IntlSigmetRecord extends PluginDataObject{
// reportType is "international sigmet".
@Column(length=32)
@DataURI(position=1)
@XmlElement
@DynamicSerializeElement
private String reportType;
// hazardType is weather phenomena.
@Column(length=48)
@DataURI(position=2)
@XmlElement
@DynamicSerializeElement
private String hazardType;
// WMO header
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String wmoHeader;
// The issue office where the report from
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String issueOffice;
// Issue time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
// Start time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar startTime;
// End time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar endTime;
// The message ID
@Column(length=16)
@DataURI(position=3)
@XmlElement
@DynamicSerializeElement
private String messageID;
// The sequence number
@Column(length=8)
@DataURI(position=4)
@XmlElement
@DynamicSerializeElement
private String sequenceNumber;
// The air traffic services unit
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String atsu;
// The location indicator of the meteorological watch office originator
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String omwo;
// Flight level 1
@Column
@XmlElement
@DynamicSerializeElement
private Integer flightlevel1;
// Flight level 2
@Column
@XmlElement
@DynamicSerializeElement
private Integer flightlevel2;
// Distance
@Column
@XmlElement
@DynamicSerializeElement
private Integer distance;
// Direction
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String direction;
// Speed
@Column
@XmlElement
@DynamicSerializeElement
private Integer speed;
@ -167,7 +145,6 @@ public class IntlSigmetRecord extends PluginDataObject{
*/
@Column(length=48)
@XmlElement
@DynamicSerializeElement
private String nameLocation;
@ -175,25 +152,21 @@ public class IntlSigmetRecord extends PluginDataObject{
* remarks such as: correction, remarks, ...etc.
*/
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String remarks;
// The changes in intensity; using as "INTSF", "WKN", or "NC".
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String intensity;
// The polygon indicator as "WI", "WTN", "EITHER SIDE", or "E OF".
@Column(length=16)
@XmlElement
@DynamicSerializeElement
private String polygonExtent;
// The entire report
@Column(length=5000)
@XmlElement
@DynamicSerializeElement
private String bullMessage;
@ -202,9 +175,9 @@ public class IntlSigmetRecord extends PluginDataObject{
* Intlsigmet location
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "intlSigmetLocation_parentid_idex")
private Set<IntlSigmetLocation> intlSigmetLocation = new HashSet<IntlSigmetLocation>();
@ -565,7 +538,7 @@ public class IntlSigmetRecord extends PluginDataObject{
*/
public void addIntlSigmetLocation(IntlSigmetLocation psection){
intlSigmetLocation.add(psection);
psection.setParentID(this);
}
/**
@ -578,13 +551,7 @@ public class IntlSigmetRecord extends PluginDataObject{
this.identifier = dataURI;
if(this.getIntlSigmetLocation() != null && this.getIntlSigmetLocation().size() > 0)
{
for (Iterator<IntlSigmetLocation> iter = this.getIntlSigmetLocation().iterator(); iter.hasNext();) {
IntlSigmetLocation cs = iter.next();
cs.setParentID(this);
}
}
}

View file

@ -1,31 +1,13 @@
/**
* 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 gov.noaa.nws.ncep.common.dataplugin.intlsigmet.dao;
import java.util.List;
import gov.noaa.nws.ncep.common.dataplugin.intlsigmet.IntlSigmetRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
/**
* Set of DAO methods for AIREP Observation data.
@ -37,6 +19,8 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author jkorman
@ -59,7 +43,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* @version 1.0
*/
public class IntlSigmetDao extends NcepDefaultPluginDao {
public class IntlSigmetDao extends PluginDao {
/**
* Creates a new ReccoDao
@ -108,4 +92,11 @@ public class IntlSigmetDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,8 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.mcidas">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<!-- property name="component.name" value="plugin-mcidas" /-->
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -199,6 +199,11 @@ INSERT INTO awips.mcidas_area_names VALUES (324,'VAAC|SouthWestAtlantic');
INSERT INTO awips.mcidas_area_names VALUES (325,'VAAC|SouthEastPacific');
INSERT INTO awips.mcidas_area_names VALUES (326,'VAAC|Mexico-CentralAmerica');
INSERT INTO awips.mcidas_area_names VALUES (327,'VAAC|SouthEastPacific');
INSERT INTO awips.mcidas_area_names VALUES (328,'VAAC|CentralPacific');
INSERT INTO awips.mcidas_area_names VALUES (329,'VAAC|CentralPacific');
INSERT INTO awips.mcidas_area_names VALUES (330,'VAAC|CentralPacific');
INSERT INTO awips.mcidas_area_names VALUES (331,'VAAC|CentralPacific');
INSERT INTO awips.mcidas_area_names VALUES (332,'VAAC|CentralPacific');
INSERT INTO awips.mcidas_area_names VALUES (1805,'WashDC');
INSERT INTO awips.mcidas_area_names VALUES (1810,'NAtlantic');
INSERT INTO awips.mcidas_area_names VALUES (1815,'US');
@ -295,7 +300,7 @@ INSERT INTO awips.mcidas_area_names VALUES (8065,'World-10km');
INSERT INTO awips.mcidas_area_names VALUES (8066,'World');
INSERT INTO awips.mcidas_area_names VALUES (8067,'World-T');
INSERT INTO awips.mcidas_area_names VALUES (8069,'World');
INSERT INTO awips.mcidas_area_names VALUES (8070,'World');
INSERT INTO awips.mcidas_area_names VALUES (8070,'NHem');
INSERT INTO awips.mcidas_area_names VALUES (8072,'NPS-65E');
INSERT INTO awips.mcidas_area_names VALUES (8073,'NPS-45W');
INSERT INTO awips.mcidas_area_names VALUES (8074,'NPS-155W');

View file

@ -129,3 +129,9 @@ INSERT INTO awips.mcidas_image_type VALUES (167, 'VIS', '1', '85');
INSERT INTO awips.mcidas_image_type VALUES (168, 'IR', '2', '85');
INSERT INTO awips.mcidas_image_type VALUES (169, 'WV', '8', '85');
INSERT INTO awips.mcidas_image_type VALUES (170, 'IR2', '16', '85');
INSERT INTO awips.mcidas_image_type VALUES (171, 'VIS', '1', '184');
INSERT INTO awips.mcidas_image_type VALUES (172, 'IR2', '2', '184');
INSERT INTO awips.mcidas_image_type VALUES (173, 'WV', '4', '184');
INSERT INTO awips.mcidas_image_type VALUES (174, 'IR', '8', '184');
INSERT INTO awips.mcidas_image_type VALUES (175, 'IR3', '128', '184');
INSERT INTO awips.mcidas_image_type VALUES (176, 'IR4', '16', '184');

View file

@ -7,6 +7,7 @@ INSERT INTO awips.mcidas_satellite_names VALUES (31,'GOES6');
INSERT INTO awips.mcidas_satellite_names VALUES (32,'GOES7');
INSERT INTO awips.mcidas_satellite_names VALUES (33,'GOES7');
INSERT INTO awips.mcidas_satellite_names VALUES (35,'FYC');
INSERT INTO awips.mcidas_satellite_names VALUES (36,'FYC');
INSERT INTO awips.mcidas_satellite_names VALUES (51,'METEOSAT8');
INSERT INTO awips.mcidas_satellite_names VALUES (52,'METEOSAT9');
INSERT INTO awips.mcidas_satellite_names VALUES (53,'METEOSAT10');
@ -25,3 +26,4 @@ INSERT INTO awips.mcidas_satellite_names VALUES (83,'GMS');
INSERT INTO awips.mcidas_satellite_names VALUES (84,'MTS');
INSERT INTO awips.mcidas_satellite_names VALUES (85,'MTSAT2');
INSERT INTO awips.mcidas_satellite_names VALUES (180,'GOES13');
INSERT INTO awips.mcidas_satellite_names VALUES (184,'GOES15');

View file

@ -223,7 +223,7 @@ public class McidasAreaProjection extends MapProjection {
static final ParameterDescriptorGroup PARAMETERS = new DefaultParameterDescriptorGroup(
"MCIDAS_AREA_NAV",
new ParameterDescriptor[] { SEMI_MAJOR, SEMI_MINOR, NAV_BLOCK_BASE64 }
new ParameterDescriptor[] { SEMI_MAJOR, SEMI_MINOR, CENTRAL_MERIDIAN, NAV_BLOCK_BASE64 }
);
/**

View file

@ -43,8 +43,8 @@ import org.hibernate.annotations.Type;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.ProjectedCRS;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.adapters.GeometryAdapter;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -56,18 +56,16 @@ import com.vividsolutions.jts.geom.Polygon;
@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class McidasMapCoverage extends PersistableDataObject implements
ISpatialObject {
public class McidasMapCoverage extends PersistableDataObject implements ISpatialObject {
private static final long serialVersionUID = 1;
@Id
private int pid;
/**
* The projection of the map coverage 1 = Mercator, 3 = Lambert Conformal or
* TANC 5 = Polar Stereographic 7585 = native satellite navigation e.g.
* GVAR, ...
* The projection of the map coverage 1 = Mercator, 3 = Lambert Conformal or TANC
* 5 = Polar Stereographic
* 7585 = native satellite navigation e.g. GVAR, ...
*/
@Column
@XmlAttribute
@ -105,11 +103,10 @@ public class McidasMapCoverage extends PersistableDataObject implements
private Float clon;
/**
* The standard latitude 1. For the Lambert Conformal projection this is the
* latitude of the proection cone intersects the earth. For the Polar
* Stereographic this is the latitude at which projection plan intersects
* the earth. For Mercator this is the latitude at which the Mercator
* projection cylinder intersects the earth.
* The standard latitude 1. For the Lambert Conformal projection this is the latitude
* of the proection cone intersects the earth. For the Polar Stereographic this is the
* latitude at which projection plan intersects the earth. For Mercator this is the
* latitude at which the Mercator projection cylinder intersects the earth.
*/
@Column
@XmlAttribute
@ -117,8 +114,8 @@ public class McidasMapCoverage extends PersistableDataObject implements
private Float stdlat1;
/**
* The standard latitude 2 is the second latitude of a secant cone which
* intersects the earth for the Lambert Conformal projection.
* The standard latitude 2 is the second latitude of a secant cone which intersects the
* earth for the Lambert Conformal projection.
*/
@Column
@XmlAttribute
@ -223,10 +220,9 @@ public class McidasMapCoverage extends PersistableDataObject implements
* @param geometry
* The geometry
*/
public McidasMapCoverage(Integer projection, Integer nx, Integer ny,
Float dx, Float dy, Float clon, Float stdlat1, Float stdlat2,
Float lllat, Float lllon, Float urlat, Float urlon,
CoordinateReferenceSystem crs, Geometry geometry) {
public McidasMapCoverage(Integer projection, Integer nx, Integer ny, Float dx,
Float dy, Float clon, Float stdlat1, Float stdlat2, Float lllat, Float lllon,
Float urlat,Float urlon, CoordinateReferenceSystem crs, Geometry geometry) {
this.projection = projection;
this.nx = nx;
this.ny = ny;
@ -253,22 +249,14 @@ public class McidasMapCoverage extends PersistableDataObject implements
* Constructs a new SatMapCoverage Object for native satellite navigation
*
* @param mapProjection
* @param nx
* The number of horizontal scan lines
* @param ny
* The number vertical scan lines
* @param reflon
* Reference Longitude
* @param upperLeftElement
* image element coordinate of area line 0, element 0
* @param upperLeftLine
* image line coordinate of area line 0, element 0
* @param xres
* Element resolution
* @param yres
* Line resolution
* @param crs
* The coordinate reference system
* @param nx The number of horizontal scan lines
* @param ny The number vertical scan lines
* @param reflon Reference Longitude
* @param upperLeftElement image element coordinate of area line 0, element 0
* @param upperLeftLine image line coordinate of area line 0, element 0
* @param xres Element resolution
* @param yres Line resolution
* @param crs The coordinate reference system
* @param geometry
*/
public McidasMapCoverage(Integer projection, Integer nx, Integer ny,
@ -332,35 +320,33 @@ public class McidasMapCoverage extends PersistableDataObject implements
// ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(crsWKT);
} catch (Exception e) {
/*
* parseWKT() doesn't recognize PROJCS PARAMETERS whose value is
* a "String" (it assumes all PARAMETER values are doubles.) If
* this crsWKT is a MCIDAS NAV, use McidasSpatialFactory
* instead.
* parseWKT() doesn't recognize PROJCS PARAMETERS whose value is a "String" (it
* assumes all PARAMETER values are doubles.)
* If this crsWKT is a MCIDAS NAV, use McidasSpatialFactory instead.
*/
// e.printStackTrace();
Pattern p = Pattern
.compile("PROJCS\\[\"MCIDAS\\sAREA\\s(.*)\"");
//e.printStackTrace();
Pattern p = Pattern.compile("PROJCS\\[\"MCIDAS\\sAREA\\s(.*)\"");
Matcher m = p.matcher(crsWKT);
m.find();
if (m.groupCount() == 1) {
if ( m.groupCount() == 1 ) {
String type = m.group(1);
// System.out.println("FOUND PROJCS:"+m.group(0)+":"+type);
p = Pattern
.compile("\\[\"NAV_BLOCK_BASE64\",\\s\"(.*)\"\\]");
//System.out.println("FOUND PROJCS:"+m.group(0)+":"+type);
p = Pattern.compile("\\[\"NAV_BLOCK_BASE64\",\\s\"(.*)\"\\]");
m = p.matcher(crsWKT);
boolean found = m.find();
// System.out.println(m.group());
// System.out.println(m.groupCount()+m.group(1));
if (found) {
//System.out.println(m.group());
//System.out.println(m.groupCount()+m.group(1));
if ( found ) {
String navBlock = m.group(1);
crsObject = McidasSpatialFactory.getInstance()
.constructCRS(type, navBlock);
} else {
crsObject = McidasSpatialFactory.getInstance().constructCRS(type, navBlock);
}
else {
crsObject = null;
}
} else {
}
else {
crsObject = null;
}
@ -475,6 +461,7 @@ public class McidasMapCoverage extends PersistableDataObject implements
this.ny = ny;
}
/**
* @return the upperLeftElement
*/
@ -483,8 +470,7 @@ public class McidasMapCoverage extends PersistableDataObject implements
}
/**
* @param upperLeftElement
* the upperLeftElement to set
* @param upperLeftElement the upperLeftElement to set
*/
public void setUpperLeftElement(int upperLeftElement) {
this.upperLeftElement = upperLeftElement;
@ -498,8 +484,7 @@ public class McidasMapCoverage extends PersistableDataObject implements
}
/**
* @param upperLeftLine
* the upperLeftLine to set
* @param upperLeftLine the upperLeftLine to set
*/
public void setUpperLeftLine(int upperLeftLine) {
this.upperLeftLine = upperLeftLine;
@ -513,8 +498,7 @@ public class McidasMapCoverage extends PersistableDataObject implements
}
/**
* @param elementRes
* the elementRes to set
* @param elementRes the elementRes to set
*/
public void setElementRes(int elementRes) {
this.elementRes = elementRes;
@ -528,8 +512,7 @@ public class McidasMapCoverage extends PersistableDataObject implements
}
/**
* @param lineRes
* the lineRes to set
* @param lineRes the lineRes to set
*/
public void setLineRes(int lineRes) {
this.lineRes = lineRes;
@ -540,13 +523,11 @@ public class McidasMapCoverage extends PersistableDataObject implements
}
public void setCrsWKT(String crsWKT) {
// TODO new 2.6 version of geotools adds \r\n to long String parameters
// in WKT format
// this temp hack removes the extraneous characters, but we may want to
// investigate
//TODO new 2.6 version of geotools adds \r\n to long String parameters in WKT format
// this temp hack removes the extraneous characters, but we may want to investigate
// using a specific formatter to keep this consistent and in our control
this.crsWKT = crsWKT.replaceAll("\r\n", "");
// this.crsWKT = crsWKT;
//this.crsWKT = crsWKT;
}
public Polygon getLocation() {

View file

@ -411,6 +411,7 @@ public class McidasSpatialFactory {
*/
pvg.parameter("semi_major").setValue(1.0);
pvg.parameter("semi_minor").setValue(1.0);
pvg.parameter("central_meridian").setValue(0.0);
//pvg.parameter("scale_factor").setValue(1.0);
pvg.parameter("NAV_BLOCK_BASE64").setValue(encoded);

View file

@ -1,10 +1,10 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.ncccfp">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<!--
<property name="component.name" value="plugin-ncccfp" />
-->
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -1,3 +1,4 @@
package gov.noaa.nws.ncep.common.dataplugin.ncccfp;
import javax.persistence.Column;
@ -10,8 +11,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.hibernate.annotations.Type;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.adapters.GeometryAdapter;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -43,14 +44,14 @@ public class NcccfpLocation implements ISpatialObject {
private static final long serialVersionUID = 8890315829188793187L;
@DataURI(position = 0)
@DataURI(position=0)
@Column(name = "location", columnDefinition = "geometry")
@Type(type = "com.raytheon.edex.db.objects.hibernate.GeometryType")
@XmlJavaTypeAdapter(value = GeometryAdapter.class)
@DynamicSerializeElement
private Geometry geometry;
@Column(length = 600)
@Column(length=600)
@DynamicSerializeElement
@XmlElement
private String locationAll;
@ -105,11 +106,11 @@ public class NcccfpLocation implements ISpatialObject {
this.geometry = geometry;
}
public void setLocationAll(String locationAll) {
public void setLocationAll (String locationAll) {
this.locationAll = locationAll;
}
public String getLocationAll() {
public String getLocationAll () {
return locationAll;
}
}

View file

@ -22,9 +22,11 @@ Require-Bundle: javax.measure,
gov.noaa.nws.ncep.common;bundle-version="1.0.0",
gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0"
Import-Package: com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.derivparam.tree,
com.raytheon.uf.common.geospatial
Export-Package: gov.noaa.nws.ncep.common.dataplugin.ncgrib,
gov.noaa.nws.ncep.common.dataplugin.ncgrib.exception,
gov.noaa.nws.ncep.common.dataplugin.ncgrib.ncdatatree,
gov.noaa.nws.ncep.common.dataplugin.ncgrib.request,
gov.noaa.nws.ncep.common.dataplugin.ncgrib.spatial.projections,
gov.noaa.nws.ncep.common.dataplugin.ncgrib.subgrid,

View file

@ -1,10 +1,7 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.ncgrib">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -61,6 +61,8 @@ import gov.noaa.nws.ncep.common.dataplugin.ncgrib.util.NcgridModel;
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 1/31/11 M. Li Add eventName for dynamic model name
* 9/08/11 X. Guo Check file size to create hash code
* 11/17/11 X. Guo Fixed hash generator problem
*
* </pre>
*
@ -316,8 +318,12 @@ public class NcgribModel extends PersistableDataObject {
public int hashCode(String afileName) {
HashCodeBuilder builder = new HashCodeBuilder();
String[] tokens = afileName.split("\\.");
builder.append(modelName + "_" + tokens[0] + "_"+ tokens[1] + "_" + tokens[3]);
// String[] tokens = afileName.split("\\.");
String tmp = afileName;
if ( tmp.contains(".")) {
tmp = tmp.replace(".", "_");
}
builder.append(modelName + "_" + tmp);
builder.append(eventName);
builder.append(parameterName);
builder.append(parameterAbbreviation);

View file

@ -37,6 +37,8 @@ import com.raytheon.uf.common.dataplugin.persist.IPersistable;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/24/09 1994 bphillip Initial Creation
* 1/12/12 xguo Create new HDF5 file name
* yyyy-MM-dd-HH-fhrs-ensNumber.h5
*
* </pre>
*
@ -46,7 +48,7 @@ import com.raytheon.uf.common.dataplugin.persist.IPersistable;
public class NcgribPathProvider extends DefaultPathProvider {
private static final SimpleDateFormat gribHdf5FileNameFormat = new SimpleDateFormat(
"yyyy-MM-dd-HHmm");
"yyyy-MM-dd-HH");
static {
gribHdf5FileNameFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
}
@ -102,11 +104,18 @@ public class NcgribPathProvider extends DefaultPathProvider {
StringBuffer sb = new StringBuffer();
Date refTime = pdo.getDataTime().getRefTime();
int fhrs = pdo.getDataTime().getFcstTime()/3600;
String refTimeString = null;
synchronized (gribHdf5FileNameFormat) {
refTimeString = gribHdf5FileNameFormat.format(refTime);
}
int pbNum = 0;
if ( pdo.getModelInfo().getPerturbationNumber() != null){
pbNum = pdo.getModelInfo().getPerturbationNumber();
}
sb.append(refTimeString);
sb.append(String.format("-%d", fhrs));
sb.append(String.format("-%d", pbNum));
sb.append(".h5");
return sb.toString();
}

View file

@ -96,26 +96,26 @@ public class NcgribRecord extends PersistablePluginDataObject implements
@DynamicSerializeElement
private int localTableVersion;
/**
* Significance of reference time (See Table 1.2) 0 for analysis, 1 for
* forecast, 2 for verifying time, and 3 for observation time
/** Significance of reference time (See Table 1.2)
* 0 for analysis, 1 for forecast, 2 for verifying time,
* and 3 for observation time
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int refTimeSignificance;
/**
* Processed data type in this GRIB message (See Table 1.4) 0 for analysis,
* 1 for forecast, 2 for both, .... or PDT in table 4.3 This refers to PDT#
* in GEMPAK output
/** Processed data type in this GRIB message (See Table 1.4)
* 0 for analysis, 1 for forecast, 2 for both, ....
* or PDT in table 4.3
* This refers to PDT# in GEMPAK output
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int processedDataType;
/** Denotes if local section is present (currently false) */
/** Denotes if local section is present (currently false)*/
@Column
@XmlAttribute
@DynamicSerializeElement
@ -160,7 +160,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements
@DynamicSerializeElement
private float[] hybridCoordList;
/** The model information in ncgrib_models child table */
/** The model information in ncgrib_models child table*/
@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
@PrimaryKeyJoinColumn
@Fetch(FetchMode.SELECT)
@ -171,12 +171,13 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private boolean isVector = false;
/**
* The short model name (i.e.NAM80) This should be interpreted from the
* generating process number and grid id : 96 for gfs, 114 for NAEFS, 84 for
* meso NAM 12KM, 86 for RUC, 81 for GFS analysis, 82 for analysis GDAS,
* etc... information form ON388 - table A Generating Process or Model from
* originating center 7 which is NCEP
/** The short model name (i.e.NAM80) This should be interpreted from
* the generating process number and grid id : 96 for gfs,
* 114 for NAEFS, 84 for meso NAM 12KM, 86 for RUC, 81 for GFS analysis,
* 82 for analysis GDAS, etc...
* information form ON388 - table A
* Generating Process or Model from originating center 7
* which is NCEP
*/
@Column
@XmlAttribute
@ -190,8 +191,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements
@DataURI(position = 3)
private int gridVersion = 0;
/**
* The name of ingested file
/** The name of ingested file
*/
@Column
@XmlAttribute
@ -199,16 +199,15 @@ public class NcgribRecord extends PersistablePluginDataObject implements
@DataURI(position = 4)
private String fileName;
/**
* The name of event such as Hurricane or Volcano
/** The name of event such as Hurricane or
* Volcano
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private String eventName;
/**
* Type of Generating Process
/** Type of Generating Process
*/
@Column
@XmlAttribute
@ -216,8 +215,8 @@ public class NcgribRecord extends PersistablePluginDataObject implements
@DataURI(position = 7)
private int processType;
/**
* Resolution and componet flags (See Table 3.3)
/** Resolution and componet flags
* (See Table 3.3)
*/
@Column
@XmlAttribute
@ -225,9 +224,10 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private Integer resCompFlags;
/**
* Indicate the discipline of the processed data contained within a GRIB
* message - 0 for Meteorological products in table 0.0 This refers to DIS#
* in GEMPAK output
* Indicate the discipline of the processed
* data contained within a GRIB message -
* 0 for Meteorological products in table 0.0
* This refers to DIS# in GEMPAK output
*/
@Column
@XmlAttribute
@ -235,8 +235,8 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private int discipline;
/**
* Parameter category by product discipline 0 for temperature in table 4.1
* by discipline 0
* Parameter category by product discipline
* 0 for temperature in table 4.1 by discipline 0
*/
@Column
@XmlAttribute
@ -244,17 +244,17 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private int category;
/**
* Parameter number by product discipline and parameter category 9 for
* temperature anomaly in table 4.2-0-0 for discipline 0 and category 0 This
* refers to ID# in GEMPAK output
* Parameter number by product discipline and parameter category
* 9 for temperature anomaly in table 4.2-0-0 for discipline 0
* and category 0
* This refers to ID# in GEMPAK output
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int parameterId;
/**
* pdt - Product definition template number.
/** pdt - Product definition template number.
*/
@Column
@XmlAttribute
@ -262,9 +262,11 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private int pdt;
/**
* Fixed surface types or vertical coordinate ID 1 2 for cloud base level
* and 100 for isobaric surface in table 4.5 or VCRDGRID1.TBL for NCEP This
* refers to VCD# in GEMPAK output The location in pds[9]
* Fixed surface types or vertical coordinate ID 1
* 2 for cloud base level and 100 for isobaric surface
* in table 4.5 or VCRDGRID1.TBL for NCEP
* This refers to VCD# in GEMPAK output
* The location in pds[9]
*/
@Column
@XmlAttribute
@ -272,9 +274,11 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private int vcrdId1;
/**
* Fixed surface types or vertical coordinate ID 2 2 for cloud base level
* and 100 for isobaric surface in table 4.5 or VCRDGRID1.TBL for NCEP This
* refers to VCD# in GEMPAK output The location in pds[12]
* Fixed surface types or vertical coordinate ID 2
* 2 for cloud base level and 100 for isobaric surface
* in table 4.5 or VCRDGRID1.TBL for NCEP
* This refers to VCD# in GEMPAK output
* The location in pds[12]
*/
@Column
@XmlAttribute
@ -282,23 +286,27 @@ public class NcgribRecord extends PersistablePluginDataObject implements
private int vcrdId2;
/**
* Scaled value of first fixed surface in GRIB2- TEMPLATE 4.1 This refers to
* LEVEL1 in GEMPAK output
* Scaled value of first fixed surface in GRIB2- TEMPLATE 4.1
* This refers to LEVEL1 in GEMPAK output
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int glevel1;
private float decodedLevel1;
/**
* Scaled value of second fixed surface in GRIB2- TEMPLATE 4.1 This refers
* to LEVEL2 in GEMPAK output
* Scaled value of second fixed surface in GRIB2- TEMPLATE 4.1
* This refers to LEVEL2 in GEMPAK output
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int glevel2;
private float decodedLevel2;
/**
* The gempak vertical coordinate grid name
*/
@ -399,7 +407,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements
this.pdt = recordToCopy.pdt;
this.vcrdId1 = recordToCopy.vcrdId1;
this.vcrdId2 = recordToCopy.vcrdId2;
this.vcord = vcord;
this.vcord = recordToCopy.vcord;
this.glevel1 = recordToCopy.glevel1;
this.glevel2 = recordToCopy.glevel2;
this.parm = recordToCopy.parm;
@ -438,9 +446,9 @@ public class NcgribRecord extends PersistablePluginDataObject implements
}
/**
* public void setSpatialObject(NcgridCoverage location) {
* modelInfo.setLocation(location); }
*/
public void setSpatialObject(NcgridCoverage location) {
modelInfo.setLocation(location);
}*/
/**
* Gets the model information
@ -781,4 +789,32 @@ public class NcgribRecord extends PersistablePluginDataObject implements
this.interval = interval;
}
/**
* @return the decodedLevel1
*/
public float getDecodedLevel1() {
return decodedLevel1;
}
/**
* @param decodedLevel1 the decodedLevel1 to set
*/
public void setDecodedLevel1(float decodedLevel1) {
this.decodedLevel1 = decodedLevel1;
}
/**
* @return the decodedLevel2
*/
public float getDecodedLevel2() {
return decodedLevel2;
}
/**
* @param decodedLevel2 the decodedLevel2 to set
*/
public void setDecodedLevel2(float decodedLevel2) {
this.decodedLevel2 = decodedLevel2;
}
}

View file

@ -60,6 +60,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 9/08/11 X. Guo Skip correct Lon value after add new column
*
* </pre>
*
@ -154,10 +155,16 @@ public class LatLonNcgridCoverage extends NcgridCoverage {
@Override
public void initialize() throws GribException {
double maxLon;
double minLat = MapUtil.correctLat(la1);
double maxLat = MapUtil.correctLat(la2);
double minLon = MapUtil.correctLon(lo1);
double maxLon = MapUtil.correctLon(lo2);
if ( lo2 >= 360.0) {
maxLon = lo2;
}
else {
maxLon = MapUtil.correctLon(lo2);
}
if (maxLon < minLon) {
maxLon += 360.0;
}

View file

@ -20,9 +20,6 @@
package gov.noaa.nws.ncep.common.dataplugin.ncgrib.spatial.projections;
import gov.noaa.nws.ncep.common.dataplugin.ncgrib.exception.GribException;
import gov.noaa.nws.ncep.common.dataplugin.ncgrib.subgrid.SubNcgrid;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
@ -41,6 +38,8 @@ import org.hibernate.annotations.Type;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import gov.noaa.nws.ncep.common.dataplugin.ncgrib.exception.GribException;
import gov.noaa.nws.ncep.common.dataplugin.ncgrib.subgrid.SubNcgrid;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.geospatial.MapUtil;
@ -167,12 +166,10 @@ public abstract class NcgridCoverage extends PersistableDataObject implements
*/
public abstract NcgridCoverage trim(SubNcgrid subGrid);
@Override
public Polygon getGeometry() {
return geometry;
}
@Override
public CoordinateReferenceSystem getCrs() {
if (crs == null) {
try {

View file

@ -45,6 +45,7 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
* ------------ ---------- ----------- --------------------------
* 3/12/10 4758 bphillip Initial creation
* 10/13/10 276 llin Modified for NC GRIB.
* 11/02/11 xguo Updated gridid
* </pre>
*
* @author njensen
@ -173,7 +174,7 @@ public class NcgribModelLookup {
modelsByName.put(model.getName(), model);
Integer center = model.getCenter();
Integer subCenter = Integer.parseInt(model.getSubCenter());
String grid = String.valueOf(model.getGrid());
String grid = model.getGrid();
for (int process : model.getProcess()) {
models.put(toHash(center, subCenter, grid, process), model);
}

View file

@ -45,7 +45,7 @@ public class NcgridModel implements ISerializableObject {
/** The NCEP grid associated with this model */
@XmlElement
private Integer grid;
private String grid;
@XmlElement
private String subcenter;
@ -80,11 +80,11 @@ public class NcgridModel implements ISerializableObject {
this.name = name;
}
public Integer getGrid() {
public String getGrid() {
return grid;
}
public void setGrid(Integer grid) {
public void setGrid(String grid) {
this.grid = grid;
}

View file

@ -1,10 +1,8 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.ncscat">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.ncscat">
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -1,10 +1,7 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -9,6 +9,8 @@
* Date Author Description
* ------------ ---------- ----------- --------------------------
* 06/2009 Uma Josyula Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
@ -21,12 +23,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,7 +34,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="nonconvsigmet_location")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class NonConvSigmetLocation implements Serializable, ISerializableObject {
@ -46,38 +42,30 @@ public class NonConvSigmetLocation implements Serializable, ISerializableObject
@GeneratedValue
private Integer recordId = null;
// The nonconvsigmet record this object belongs to
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private NonConvSigmetRecord parentID;
// Collection of locations
@Column(length=120)
@XmlElement
@DynamicSerializeElement
private String locationLine;
// Each location of a nonconvective sigmet forecast area
@Column(length=40)
@XmlElement
@DynamicSerializeElement
private String location;
// Each latitude of a nonconvective sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double latitude;
// Each longitude of a nonconvective sigmet forecast area
@Column
@XmlElement
@DynamicSerializeElement
private double longitude;
// Index for the order of a complete location set
@Column
@XmlElement
@DynamicSerializeElement
private Integer index;
@ -104,19 +92,7 @@ public class NonConvSigmetLocation implements Serializable, ISerializableObject
this.recordId = recordId;
}
/**
* @return the parentID
*/
public NonConvSigmetRecord getParentID() {
return parentID;
}
/**
* @param parentID to set
*/
public void setParentID(NonConvSigmetRecord parentID) {
this.parentID = parentID;
}
/**
* @return the locationLine

View file

@ -8,43 +8,44 @@
* Date Author Description
* ------------ ---------- ----------- --------------------------
* 06/2009 Uma Josyula Initial creation
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "nonconvsigmet", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class NonConvSigmetRecord extends PluginDataObject {
public class NonConvSigmetRecord extends PluginDataObject{
/**
*
@ -52,158 +53,141 @@ public class NonConvSigmetRecord extends PluginDataObject {
private static final long serialVersionUID = 1L;
// reportType is "non-convective sigmet".
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String reportType;
// WMO header
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String wmoHeader;
// forecastRegion as: SL
@Column(length = 8)
@DataURI(position = 2)
@XmlElement
@Column(length=8)
@DataURI(position=2)
@DynamicSerializeElement
private String forecastRegion;
// The issue office where the report from
@Column(length = 32)
@DataURI(position = 1)
@XmlElement
@Column(length=32)
@DataURI(position=1)
@DynamicSerializeElement
private String issueOffice;
// Issue time of the report
@Column
@DataURI(position = 3)
@XmlElement
@DataURI(position=3)
@DynamicSerializeElement
private Calendar issueTime;
// The designator
@Column(length = 8)
@XmlElement
@Column(length=8)
@DynamicSerializeElement
private String designatorBBB;
// CorrectionFlag is a flag with values (1 or 2 or 3)
@Column(length = 8)
@XmlElement
@Column(length=8)
@DynamicSerializeElement
private String correctionRemarks;
// The awipsId from the report
@Column(length = 32)
@DataURI(position = 4)
@XmlElement
@Column(length=32)
@DataURI(position=4)
@DynamicSerializeElement
private String awipsId;
// The state list from the report
@Column(length = 256)
@XmlElement
@Column(length=256)
@DynamicSerializeElement
private String stateList;
// Start time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar startTime;
// End time of the report
@Column
@XmlElement
@DynamicSerializeElement
private Calendar endTime;
// The type of the hazard from the report
@Column(length = 16)
@XmlElement
@Column(length=16)
@DynamicSerializeElement
private String hazardType;
// The intensity of the hazard from the report
@Column(length = 64)
@XmlElement
@Column(length=64)
@DynamicSerializeElement
private String hazardIntensity;
// The cause for the hazard from the report
@Column(length = 128)
@XmlElement
@Column(length=128)
@DynamicSerializeElement
private String hazardCause;
// The conditions stated about the hazard from the report
@Column(length = 128)
@XmlElement
@Column(length=128)
@DynamicSerializeElement
private String hazardCondition;
// The lower flight level from the report
@Column
@XmlElement
@DynamicSerializeElement
private int flightLevel1;
// The upper flight level from the report
@Column
@XmlElement
@DynamicSerializeElement
private int flightLevel2;
// The sigmet Identifier from the report
@Column(length = 32)
@XmlElement
@Column(length=32)
@DynamicSerializeElement
private String sigmetId;
// The entire report
@Column(length = 3000)
@XmlElement
@Column(length=3000)
@DynamicSerializeElement
private String bullMessage;
/**
* Convsigmet location
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "nonConvSigmetLocation_parentid_idex")
private Set<NonConvSigmetLocation> nonConvSigmetLocation = new HashSet<NonConvSigmetLocation>();
/**
* Default Constructor
*/
public NonConvSigmetRecord() {
this.issueOffice = "";
this.wmoHeader = "";
this.bullMessage = "";
this.designatorBBB = "";
this.forecastRegion = "";
this.reportType = "";
this.correctionRemarks = "";
this.awipsId = "";
this.flightLevel1 = IDecoderConstantsN.INTEGER_MISSING;
this.flightLevel2 = IDecoderConstantsN.INTEGER_MISSING;
this.hazardCause = "";
this.hazardCondition = "";
this.hazardIntensity = "";
this.hazardType = "UNKNOWN";
this.stateList = "";
this.sigmetId = "";
this.issueOffice ="";
this.wmoHeader ="";
this.bullMessage ="";
this.designatorBBB ="";
this.forecastRegion ="";
this.reportType ="";
this.correctionRemarks ="";
this.awipsId ="";
this.flightLevel1 =IDecoderConstantsN.INTEGER_MISSING;
this.flightLevel2 =IDecoderConstantsN.INTEGER_MISSING;
this.hazardCause ="";
this.hazardCondition ="";
this.hazardIntensity ="";
this.hazardType ="UNKNOWN";
this.stateList ="";
this.sigmetId ="";
}
/**
* Convstructs a non-consigmet record from a dataURI
*
* @param uri
* The dataURI
* @param uri The dataURI
*/
public NonConvSigmetRecord(String uri) {
super(uri);
@ -215,6 +199,7 @@ public class NonConvSigmetRecord extends PluginDataObject {
return null;
}
/**
* @return the reportType
*/
@ -222,14 +207,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return reportType;
}
/**
* @param reportType
* to set
* @param reportType to set
*/
public void setReportType(String reportType) {
this.reportType = reportType;
}
/**
* @return the wmoHeader
*/
@ -237,14 +223,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return wmoHeader;
}
/**
* @param wmoHeader
* to set
* @param wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the forecastRegion
*/
@ -252,14 +239,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return forecastRegion;
}
/**
* @param forecastRegion
* to set
* @param forecastRegion to set
*/
public void setForecastRegion(String forecastRegion) {
this.forecastRegion = forecastRegion;
}
/**
* @return the issueOffice
*/
@ -267,14 +255,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return issueOffice;
}
/**
* @param issueOffice
* to set
* @param issueOffice to set
*/
public void setIssueOffice(String issueOffice) {
this.issueOffice = issueOffice;
}
/**
* @return the issueTime
*/
@ -282,14 +271,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return issueTime;
}
/**
* @param issueTime
* to set
* @param issueTime to set
*/
public void setIssueTime(Calendar issueTime) {
this.issueTime = issueTime;
}
/**
* @return the designatorBBB
*/
@ -297,14 +287,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return designatorBBB;
}
/**
* @param designatorBBB
* to set
* @param designatorBBB to set
*/
public void setDesignatorBBB(String designatorBBB) {
this.designatorBBB = designatorBBB;
}
/**
* @return the correctionFlag
*/
@ -312,14 +303,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return correctionRemarks;
}
/**
* @param correctionFlag
* to set
* @param correctionFlag to set
*/
public void setCorrectionRemarks(String correctionRemarks) {
this.correctionRemarks = correctionRemarks;
}
/**
* @return the awipsId
*/
@ -327,14 +319,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return awipsId;
}
/**
* @param awipsId
* to set
* @param awipsId to set
*/
public void setAwipsId(String awipsId) {
this.awipsId = awipsId;
}
/**
* @return the stateList
*/
@ -342,14 +335,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return stateList;
}
/**
* @param stateList
* to set
* @param stateList to set
*/
public void setStateList(String stateList) {
this.stateList = stateList;
}
/**
* @return the startTime
*/
@ -357,14 +351,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return startTime;
}
/**
* @param startTime
* to set
* @param startTime to set
*/
public void setStartTime(Calendar startTime) {
this.startTime = startTime;
}
/**
* @return the endTime
*/
@ -372,14 +367,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return endTime;
}
/**
* @param endTime
* to set
* @param endTime to set
*/
public void setEndTime(Calendar endTime) {
this.endTime = endTime;
}
/**
* @return the hazardType
*/
@ -387,14 +383,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return hazardType;
}
/**
* @param hazardType
* to set
* @param hazardType to set
*/
public void setHazardType(String hazardType) {
this.hazardType = hazardType;
}
/**
* @return the hazardIntensity
*/
@ -402,14 +399,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return hazardIntensity;
}
/**
* @param hazardIntensity
* to set
* @param hazardIntensity to set
*/
public void setHazardIntensity(String hazardIntensity) {
this.hazardIntensity = hazardIntensity;
}
/**
* @return the hazardCause
*/
@ -417,14 +415,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return hazardCause;
}
/**
* @param hazardCause
* to set
* @param hazardCause to set
*/
public void setHazardCause(String hazardCause) {
this.hazardCause = hazardCause;
}
/**
* @return the hazardCondition
*/
@ -432,14 +431,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return hazardCondition;
}
/**
* @param hazardCondition
* to set
* @param hazardCondition to set
*/
public void setHazardCondition(String hazardCondition) {
this.hazardCondition = hazardCondition;
}
/**
* @return the flightLevel1
*/
@ -447,14 +447,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return flightLevel1;
}
/**
* @param flightLevel1
* to set
* @param flightLevel1 to set
*/
public void setFlightLevel1(int flightLevel1) {
this.flightLevel1 = flightLevel1;
}
/**
* @return the flightLevel2
*/
@ -462,14 +463,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return flightLevel2;
}
/**
* @param flightLevel2
* to set
* @param flightLevel2 to set
*/
public void setFlightLevel2(int flightLevel2) {
this.flightLevel2 = flightLevel2;
}
/**
* @return the sigmetId
*/
@ -477,14 +479,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return sigmetId;
}
/**
* @param sigmetId
* to set
* @param sigmetId to set
*/
public void setSigmetId(String sigmetId) {
this.sigmetId = sigmetId;
}
/**
* @return the bullMessage
*/
@ -492,14 +495,15 @@ public class NonConvSigmetRecord extends PluginDataObject {
return bullMessage;
}
/**
* @param bullMessage
* to set
* @param bullMessage to set
*/
public void setBullMessage(String bullMessage) {
this.bullMessage = bullMessage;
}
/**
* @return the set of nonconvective sigmet location
*/
@ -508,41 +512,35 @@ public class NonConvSigmetRecord extends PluginDataObject {
}
/**
* @param nonconvsigmet
* the location to set
* @param nonconvsigmet the location to set
*/
public void setNonConvSigmetLocation(
Set<NonConvSigmetLocation> nonConvLocation) {
public void setNonConvSigmetLocation(Set<NonConvSigmetLocation> nonConvLocation) {
this.nonConvSigmetLocation = nonConvLocation;
}
/**
* @param add
* conv Sigmet location to set
* @param add conv Sigmet location to set
*/
public void addNonConvSigmetLocation(NonConvSigmetLocation pLocation) {
public void addNonConvSigmetLocation(NonConvSigmetLocation pLocation){
nonConvSigmetLocation.add(pLocation);
pLocation.setParentID(this);
}
/**
* Override existing set method to modify any classes that use the dataURI
* as a foreign key
* Override existing set method to modify any
* classes that use the dataURI as a foreign key
*/
@Override
public void setIdentifier(Object dataURI) {
public void setIdentifier(Object dataURI)
{
this.identifier = dataURI;
if (this.getNonConvSigmetLocation() != null
&& this.getNonConvSigmetLocation().size() > 0) {
for (Iterator<NonConvSigmetLocation> iter = this
.getNonConvSigmetLocation().iterator(); iter.hasNext();) {
NonConvSigmetLocation cl = iter.next();
cl.setParentID(this);
}
}
}
}

View file

@ -1,31 +1,14 @@
/**
* 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 gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet.dao;
import gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet.NonConvSigmetRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
/**
* TODO Add Description
@ -36,14 +19,15 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 23, 2009 jkorman Initial creation
*
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author jkorman
* @version 1.0
*/
public class NonConvSigmetDao extends NcepDefaultPluginDao {
public class NonConvSigmetDao extends PluginDao {
/**
* Creates a new ReccoDao
@ -92,4 +76,11 @@ public class NonConvSigmetDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,8 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.edex.plugin.tcm">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.tcm">
<!-- property name="component.name" value="plugin-tcm" /-->
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -1,37 +0,0 @@
package gov.noaa.nws.ncep.common.dataplugin.tcm;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
* )
*/
@Override
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
}

View file

@ -12,6 +12,8 @@
* ------------ ---------- ----------- --------------------------
* 06/2009 128 T. Lee Initial coding
* 11/2009 128 T. Lee Migrated to TO11D6
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -26,21 +28,14 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import gov.noaa.nws.ncep.common.dataplugin.tcm.TcmRecord;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="tcm_position_winds")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class TcmPositionWinds implements Serializable, ISerializableObject {
private static final long serialVersionUID = 1L;
@ -49,128 +44,105 @@ public class TcmPositionWinds implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
/** The TCM record this object belongs to **/
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private TcmRecord parentID;
/** The forecast valid time **/
@Column
@XmlElement
@DynamicSerializeElement
private Calendar validTime;
/** The forecast hour **/
@Column
@XmlElement
@DynamicSerializeElement
private String fcstHour;
/** The latitude of the storm center **/
@Column
@XmlElement
@DynamicSerializeElement
private Float clat;
/** The longitude of the storm center **/
@Column
@XmlElement
@DynamicSerializeElement
private Float clon;
/** The maximum wind of the storm **/
@Column
@XmlElement
@DynamicSerializeElement
private Integer windMax;
/** The wind gust of the storm **/
@Column
@XmlElement
@DynamicSerializeElement
private Integer gust;
/** Storm moving direction in compass direction */
@Column
@XmlElement
@DynamicSerializeElement
private Integer stormDrct;
/** Storm moving speed */
@Column
@XmlElement
@DynamicSerializeElement
private Integer stormSped;
/** The extent of 34kts wind at NE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String ne34k;
/** The extent of 34kts wind at SE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String se34k;
/** The extent of 34kts wind at SW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String sw34k;
/** The extent of 34kts wind at NW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String nw34k;
/** The extent of 50kts wind at NE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String ne50k;
/** The extent of 50kts wind at SE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String se50k;
/** The extent of 50kts wind at SW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String sw50k;
/** The extent of 50kts wind at NW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String nw50k;
/** The extent of 64kts wind at NE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String ne64k;
/** The extent of 64kts wind at SE quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String se64k;
/** The extent of 64kts wind at SW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String sw64k;
/** The extent of 64kts wind at NW quadrant of the storm **/
@Column(length=8)
@XmlElement
@DynamicSerializeElement
private String nw64k;
@ -199,19 +171,7 @@ public class TcmPositionWinds implements Serializable, ISerializableObject {
return serialVersionUID;
}
/**
* @return the parentID
*/
public TcmRecord getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(TcmRecord parentID) {
this.parentID = parentID;
}
/**
* @return the recordId

View file

@ -12,6 +12,8 @@
* 06/2009 128 T. Lee Initial coding
* 07/2009 128 T. Lee Migrated to TO11
* 11/2009 128 T. Lee Migrated to TO11D6
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -22,23 +24,18 @@ package gov.noaa.nws.ncep.common.dataplugin.tcm;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
@ -49,8 +46,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name = "tcm", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class TcmRecord extends PluginDataObject {
@ -59,122 +54,104 @@ public class TcmRecord extends PluginDataObject {
/** Report type */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String reportType;
/** Storm name */
@Column(length=32)
@DataURI(position=2)
@XmlElement
@DynamicSerializeElement
private String stormName;
/** Tropical storm basin */
@Column(length=8)
@DataURI(position=1)
@XmlElement
@DynamicSerializeElement
private String basin;
/** Storm number */
@Column(length=8)
@DataURI(position=3)
@XmlElement
@DynamicSerializeElement
private String stormNumber;
/** Advisory number */
@Column(length=8)
@DataURI(position=4)
@XmlElement
@DynamicSerializeElement
private String advisoryNumber;
/** Correction flag */
@Column
@DataURI(position=5)
@XmlElement
@DynamicSerializeElement
private Boolean corr;
/** Bulletin insurance time */
@Column
@XmlElement
@DynamicSerializeElement
private Calendar issueTime;
/** Storm observation time **/
@Column
@XmlElement
@DynamicSerializeElement
private Calendar obsTime;
/** Storm type */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String stormType;
/** Eye size */
@Column
@XmlElement
@DynamicSerializeElement
private Integer eyeSize;
/** Minimum central pressure */
@Column
@XmlElement
@DynamicSerializeElement
private Integer centralPressure;
/** Position accuracy */
@Column
@XmlElement
@DynamicSerializeElement
private Integer positionAccuracy;
/** Twelve-foot wave height radii at the NE quadrant */
@Column
@XmlElement
@DynamicSerializeElement
private String ne12ft;
/** Twelve-foot wave height radii at the SE quadrant */
@Column
@XmlElement
@DynamicSerializeElement
private String se12ft;
/** Twelve-foot wave height radii at the SW quadrant */
@Column
@XmlElement
@DynamicSerializeElement
private String sw12ft;
/** Twelve-foot wave height radii at the NW quadrant */
@Column
@XmlElement
@DynamicSerializeElement
private String nw12ft;
/** Mass news disseminator (MND) */
@Column(length=72)
@XmlElement
@DynamicSerializeElement
private String mndTime;
/** Bulletin messages */
@Column(length=8000)
@XmlElement
@DynamicSerializeElement
private String bullMessage;
/** TCM position and winds */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "tcmPosWinds_parentid_idex")
private Set<TcmPositionWinds> tcmPosWinds = new HashSet<TcmPositionWinds>();
/**
@ -479,7 +456,7 @@ public class TcmRecord extends PluginDataObject {
*/
public void addPosWinds(TcmPositionWinds poswinds){
tcmPosWinds.add(poswinds);
poswinds.setParentID (this);
}
/**
@ -489,12 +466,7 @@ public class TcmRecord extends PluginDataObject {
@Override
public void setIdentifier(Object dataURI) {
this.identifier = dataURI;
if (this.getTcmPosWinds() != null && this.getTcmPosWinds().size() > 0) {
for (Iterator<TcmPositionWinds> iter = this.getTcmPosWinds().iterator(); iter.hasNext();) {
TcmPositionWinds tpw = iter.next();
tpw.setParentID(this);
}
}
}
@Override

View file

@ -10,6 +10,8 @@
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 05/2010 128 T. Lee Migration to TO11DR11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author T.Lee
@ -19,13 +21,15 @@
package gov.noaa.nws.ncep.common.dataplugin.tcm.dao;
import gov.noaa.nws.ncep.common.dataplugin.tcm.TcmRecord;
import gov.noaa.nws.ncep.edex.common.dao.NcepDefaultPluginDao;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
public class TcmDao extends NcepDefaultPluginDao {
public class TcmDao extends PluginDao {
/**
* FfgDao constructor.
@ -74,4 +78,11 @@ public class TcmDao extends NcepDefaultPluginDao {
return results;
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,10 +1,7 @@
<project basedir="." default="deploy" name="gov.noaa.nws.ncep.common.dataplugin.wcp">
<available file="../../edexOsgi/build.edex"
property="build.dir.location"
value="../../edexOsgi/build.edex"/>
<available file="../../../../../build.edex"
property="build.dir.location"
value="../../../../../build.edex"/>
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -14,6 +14,8 @@
* 12Dec2008 37 F. J. Yen Initial
* 17Apr2009 37 F. J. Yen Redesigned table and refactored for TO10
* 17May2010 37 F. J. Yen Refactored to dataplugin for migration to to11dr11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
*
* </pre>
*
@ -27,12 +29,7 @@ import java.io.Serializable;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -40,7 +37,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
@Entity
@Table(name="wcp_latlons")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class WcpLatlons implements Serializable, ISerializableObject {
@ -53,26 +49,19 @@ public class WcpLatlons implements Serializable, ISerializableObject {
@GeneratedValue
private Integer recordId = null;
/** The wcp record this object belongs to **/
@ManyToOne
@JoinColumn(name="parentID", nullable=false)
private WcpSevrln parentID;
/** The latitude of the index-th position **/
//@DataURI(position=2)
@XmlElement
@DynamicSerializeElement
private Float lat;
/** The longitude of the index-th position **/
//@DataURI(position=3)
@XmlElement
@DynamicSerializeElement
private Float lon;
/** index for the order of lat/lons */
//@DataURI(position=4)
@XmlElement
@DynamicSerializeElement
private Integer index;
@ -92,19 +81,7 @@ public class WcpLatlons implements Serializable, ISerializableObject {
return serialVersionUID;
}
/**
* @return the parentID
*/
public WcpSevrln getParentID() {
return parentID;
}
/**
* @param parentID the parentID to set
*/
public void setParentID(WcpSevrln parentID) {
this.parentID = parentID;
}
/**
* @return The recordId. If not set returns to null.

View file

@ -1,52 +1,3 @@
/*
*
* WcpRecord
*
* This class performs the mapping to the database tables for the Watch Corner Point
* (WCP) Decoder Plug-In
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ----------- -------------- -----------------------------------
* 02Dec2008 37 F. J. Yen Initial creation
* 03Apr2009 37 F. J. Yen Refactored for TO10
* *
* This code has been develped by the SIB for use in the AWIPS2 system.
* </pre>
*
* @author F. J. Yen, SIB
* @version 1
*/
package gov.noaa.nws.ncep.common.dataplugin.wcp;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import gov.noaa.nws.ncep.common.dataplugin.wcp.WcpSevrln;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* WcpRecord is the Data Access component for WCP Watch Corner Point data.
@ -63,15 +14,39 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 17Apr2009 37 F. J. Yen Refactored for TO10
* 24Aug2009 37 F. J. Yen Refactored for TO11
* 17May2010 37 F. J. Yen Refactored to dataplugin for migration to to11dr11
* 09/2011 Chin Chen changed to improve purge performance and
* removed xml serialization as well
* </pre>
*
* @author F. J. Yen, SIB
* @version 1.0
*/
package gov.noaa.nws.ncep.common.dataplugin.wcp;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Set;
import gov.noaa.nws.ncep.common.dataplugin.wcp.WcpSevrln;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "wcp", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class WcpRecord extends PluginDataObject{
@ -80,33 +55,29 @@ public class WcpRecord extends PluginDataObject{
/** Report type */
@Column(length=32)
@XmlElement
@DynamicSerializeElement
private String reportType;
//@DataURI(position = 1)
@Column
@DynamicSerializeElement
@XmlElement
private Calendar issueTime;
//@DataURI(position = 2)
@DataURI(position = 1)
@Column(length = 8)
@DynamicSerializeElement
@XmlElement
private String designatorBBB;
@Column(length = 2500)
@DynamicSerializeElement
@XmlElement
private String bullMessage;
/** WcpSevrln */
@XmlElement
@DynamicSerializeElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "parentID", nullable = false)
@Index(name = "wcpSevrLn_parentid_idex")
private Set<WcpSevrln> wcpSevrLn = new HashSet<WcpSevrln>();
/**
@ -178,18 +149,12 @@ public class WcpRecord extends PluginDataObject{
*/
public void addWcpSevrLn(WcpSevrln psevrln) {
wcpSevrLn.add(psevrln);
psevrln.setParentID(this);
}
public void setIdentifier(Object dataURI){
this.identifier = dataURI;
if(this.getWcpSevrLn() != null && this.getWcpSevrLn().size() > 0)
{
for (Iterator<WcpSevrln> iter = this.getWcpSevrLn().iterator(); iter.hasNext();) {
WcpSevrln ws = iter.next();
ws.setParentID(this);
}
}
}

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