Issue #2907 split edex.redbook plugin into common and edex redbook plugins
Change-Id: If9f56b7891276410d54880387701cf6ff6291ffe Former-commit-id: 62923fbae80131fab6256923bc32bc46e46940ba
This commit is contained in:
parent
27625eb93a
commit
cc1cb28eed
41 changed files with 456 additions and 293 deletions
|
@ -185,7 +185,7 @@
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="com.raytheon.edex.plugin.redbook"
|
id="com.raytheon.uf.common.dataplugin.redbook"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Redbook Plug-in
|
Bundle-Name: Redbook Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.viz.redbook;singleton:=true
|
Bundle-SymbolicName: com.raytheon.viz.redbook;singleton:=true
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.viz.redbook.Activator
|
Bundle-Activator: com.raytheon.viz.redbook.Activator
|
||||||
Bundle-Vendor: Raytheon
|
Bundle-Vendor: Raytheon
|
||||||
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.common.serialization
|
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.common.serialization
|
||||||
|
@ -14,10 +14,10 @@ Require-Bundle: org.apache.batik,
|
||||||
com.raytheon.viz.ui,
|
com.raytheon.viz.ui,
|
||||||
org.apache.commons.lang,
|
org.apache.commons.lang,
|
||||||
com.raytheon.uf.common.serialization,
|
com.raytheon.uf.common.serialization,
|
||||||
com.raytheon.edex.plugin.redbook,
|
|
||||||
com.raytheon.uf.common.pointdata;bundle-version="1.11.26",
|
com.raytheon.uf.common.pointdata;bundle-version="1.11.26",
|
||||||
com.raytheon.viz.pointdata;bundle-version="1.11.26",
|
com.raytheon.viz.pointdata,
|
||||||
com.raytheon.uf.viz.productbrowser;bundle-version="1.11.31"
|
com.raytheon.uf.viz.productbrowser;bundle-version="1.11.31",
|
||||||
|
com.raytheon.uf.common.dataplugin.redbook;bundle-version="1.14.0"
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.raytheon.viz.redbook,
|
Export-Package: com.raytheon.viz.redbook,
|
||||||
com.raytheon.viz.redbook.blocks,
|
com.raytheon.viz.redbook.blocks,
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
<resource
|
<resource
|
||||||
class="com.raytheon.viz.redbook.rsc.RedbookResource"
|
class="com.raytheon.viz.redbook.rsc.RedbookResource"
|
||||||
name="RedbookResource"
|
name="RedbookResource"
|
||||||
recordClass="com.raytheon.edex.plugin.redbook.common.RedbookRecord"
|
recordClass="com.raytheon.uf.common.dataplugin.redbook.RedbookRecord"
|
||||||
renderingOrderId="PLOT"
|
renderingOrderId="PLOT"
|
||||||
resourceType="PLAN_VIEW">
|
resourceType="PLAN_VIEW">
|
||||||
</resource>
|
</resource>
|
||||||
<resource
|
<resource
|
||||||
class="com.raytheon.viz.redbookua.rsc.RedbookUpperAirResource"
|
class="com.raytheon.viz.redbookua.rsc.RedbookUpperAirResource"
|
||||||
name="RedbookUpperAirResource"
|
name="RedbookUpperAirResource"
|
||||||
recordClass="com.raytheon.edex.plugin.redbook.common.RedbookRecord"
|
recordClass="com.raytheon.uf.common.dataplugin.redbook.RedbookRecord"
|
||||||
renderingOrderId="PLOT"
|
renderingOrderId="PLOT"
|
||||||
resourceType="PLAN_VIEW">
|
resourceType="PLAN_VIEW">
|
||||||
</resource>
|
</resource>
|
||||||
|
|
|
@ -21,8 +21,8 @@ package com.raytheon.viz.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlock;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlock;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.raytheon.viz.redbook.rsc.RedbookLegend;
|
import com.raytheon.viz.redbook.rsc.RedbookLegend;
|
||||||
import com.raytheon.viz.redbook.rsc.RedbookLegend.Type;
|
import com.raytheon.viz.redbook.rsc.RedbookLegend.Type;
|
||||||
|
|
||||||
|
@ -33,8 +33,10 @@ import com.raytheon.viz.redbook.rsc.RedbookLegend.Type;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 18, 2010 #3260 dfriedma Initial creation
|
* Mar 18, 2010 3260 dfriedma Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -45,6 +47,7 @@ import com.raytheon.viz.redbook.rsc.RedbookLegend.Type;
|
||||||
public abstract class AbstractTextBlock extends RedbookBlock {
|
public abstract class AbstractTextBlock extends RedbookBlock {
|
||||||
|
|
||||||
protected int origXPos;
|
protected int origXPos;
|
||||||
|
|
||||||
protected int origYPos;
|
protected int origYPos;
|
||||||
|
|
||||||
public AbstractTextBlock(RedbookBlockHeader header, ByteBuffer data) {
|
public AbstractTextBlock(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
|
@ -55,7 +58,8 @@ public abstract class AbstractTextBlock extends RedbookBlock {
|
||||||
|
|
||||||
public TextBlock determineTextBlockType(RedbookLegend legend) {
|
public TextBlock determineTextBlockType(RedbookLegend legend) {
|
||||||
TextBlock textBlock = getTextBlock();
|
TextBlock textBlock = getTextBlock();
|
||||||
RedbookLegend.Type type = legend.isLegend(textBlock.text, origXPos, origYPos);
|
RedbookLegend.Type type = legend.isLegend(textBlock.text, origXPos,
|
||||||
|
origYPos);
|
||||||
textBlock.isLegend = type == Type.LEGEND;
|
textBlock.isLegend = type == Type.LEGEND;
|
||||||
if (type == Type.GRAPHIC)
|
if (type == Type.GRAPHIC)
|
||||||
legend.addCoordinate(origXPos, origYPos);
|
legend.addCoordinate(origXPos, origYPos);
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.nio.ByteBuffer;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,8 +34,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 22, 2008 #1162 chammack Initial creation
|
* May 22, 2008 1162 chammack Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -93,6 +95,7 @@ public class AlphaNumBlock extends AbstractTextBlock {
|
||||||
/**
|
/**
|
||||||
* @return the textBlock
|
* @return the textBlock
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TextBlock getTextBlock() {
|
public TextBlock getTextBlock() {
|
||||||
return this.textBlock;
|
return this.textBlock;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.nio.ByteBuffer;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,8 +37,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 22, 2008 #1162 chammack Initial creation
|
* May 22, 2008 1162 chammack Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -102,6 +104,7 @@ public class PlotDataBlock extends AbstractTextBlock {
|
||||||
/**
|
/**
|
||||||
* @return the textBlock
|
* @return the textBlock
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TextBlock getTextBlock() {
|
public TextBlock getTextBlock() {
|
||||||
return this.textBlock;
|
return this.textBlock;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,20 @@ package com.raytheon.viz.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlock;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlock;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the redbook plot parameter block
|
* Implements the redbook plot parameter block
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 22, 2008 #1162 chammack Initial creation
|
* May 22, 2008 1162 chammack Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,8 +31,8 @@ import org.opengis.referencing.datum.PixelInCell;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.Block_004_017;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.Block_004_017;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||||
|
@ -43,10 +43,12 @@ import com.vividsolutions.jts.geom.Point;
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 27, 2008 #1162 chammack Initial creation
|
* May 27, 2008 1162 chammack Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -96,8 +98,8 @@ public class RedbookProjectionBlock extends Block_004_017 {
|
||||||
MathTransform mt2 = gg.getGridToCRS(PixelInCell.CELL_CENTER);
|
MathTransform mt2 = gg.getGridToCRS(PixelInCell.CELL_CENTER);
|
||||||
|
|
||||||
DefaultMathTransformFactory dmtf = new DefaultMathTransformFactory();
|
DefaultMathTransformFactory dmtf = new DefaultMathTransformFactory();
|
||||||
MathTransform mt = dmtf.createConcatenatedTransform(mt2, toProj
|
MathTransform mt = dmtf.createConcatenatedTransform(mt2,
|
||||||
.inverse());
|
toProj.inverse());
|
||||||
|
|
||||||
return mt;
|
return mt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlock;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlock;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.raytheon.viz.redbook.rsc.RedbookLegend;
|
import com.raytheon.viz.redbook.rsc.RedbookLegend;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
@ -40,8 +40,10 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 22, 2008 #1162 chammack Initial creation
|
* May 22, 2008 1162 chammack Initial creation
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -54,8 +56,8 @@ public class ShortLongVectorsBlock extends RedbookBlock {
|
||||||
protected Geometry geometry;
|
protected Geometry geometry;
|
||||||
|
|
||||||
public ShortLongVectorsBlock(RedbookBlockHeader header,
|
public ShortLongVectorsBlock(RedbookBlockHeader header,
|
||||||
java.nio.ByteBuffer data, MathTransform mt,
|
java.nio.ByteBuffer data, MathTransform mt, int maxX, int maxY,
|
||||||
int maxX, int maxY, RedbookLegend legend) {
|
RedbookLegend legend) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
|
|
||||||
List<Geometry> geometries = new ArrayList<Geometry>();
|
List<Geometry> geometries = new ArrayList<Geometry>();
|
||||||
|
|
|
@ -36,10 +36,10 @@ import org.opengis.referencing.datum.PixelInCell;
|
||||||
import org.opengis.referencing.operation.MathTransform;
|
import org.opengis.referencing.operation.MathTransform;
|
||||||
import org.opengis.referencing.operation.TransformException;
|
import org.opengis.referencing.operation.TransformException;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.Block_004_016;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.Block_004_016;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.DefaultBlock;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.DefaultBlock;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockBuilder;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockBuilder;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockHeader;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockHeader;
|
||||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||||
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
|
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
|
||||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||||
|
@ -88,11 +88,12 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 29, 2008 1162 chammack Initial creation
|
* May 29, 2008 1162 chammack Initial creation
|
||||||
* Jan 28, 2010 4224 M. Huang Added Line Style, Line Width
|
* Jan 28, 2010 4224 M. Huang Added Line Style, Line Width menu choice
|
||||||
* menu choice
|
|
||||||
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
* Apr 29, 2013 1958 bgonzale New class RedbookBlockHeader.
|
||||||
* May 21, 2013 2001 njensen Fixed error handling
|
* May 21, 2013 2001 njensen Fixed error handling
|
||||||
* Jul 19, 2013 DR 16401 D. Friedman Fix unknown block processing.
|
* Jul 19, 2013 16401 D. Friedman Fix unknown block processing.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -329,12 +330,10 @@ public class RedbookFrame implements IRenderable {
|
||||||
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
|
|
||||||
target.drawWireframeShape(
|
target.drawWireframeShape(this.wireframeShape, this.redbookResource
|
||||||
this.wireframeShape,
|
.getCapability(ColorableCapability.class).getColor(),
|
||||||
this.redbookResource.getCapability(ColorableCapability.class)
|
this.redbookResource.getCapability(OutlineCapability.class)
|
||||||
.getColor(),
|
.getOutlineWidth(),
|
||||||
(float) this.redbookResource.getCapability(
|
|
||||||
OutlineCapability.class).getOutlineWidth(),
|
|
||||||
this.redbookResource.getCapability(OutlineCapability.class)
|
this.redbookResource.getCapability(OutlineCapability.class)
|
||||||
.getLineStyle());
|
.getLineStyle());
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ import java.util.Set;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||||
|
@ -66,6 +66,8 @@ import com.raytheon.viz.redbook.rsc.RedbookFrame.RedbookStatus;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 28, 2008 1162 chammack Initial creation
|
* May 28, 2008 1162 chammack Initial creation
|
||||||
* May 21, 2013 2001 njensen Fixed display of messages
|
* May 21, 2013 2001 njensen Fixed display of messages
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
|
||||||
|
* and edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,8 +25,8 @@ import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||||
|
@ -39,7 +39,9 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Feb 18, 2009 chammack Initial creation
|
* Feb 18, 2009 chammack Initial creation
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||||
|
@ -86,6 +86,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 24, 2010 1029 dfriedma Initial creation
|
* Mar 24, 2010 1029 dfriedma Initial creation
|
||||||
* Jul 24, 2013 2203 njensen Synchronized init and dispose of frames
|
* Jul 24, 2013 2203 njensen Synchronized init and dispose of frames
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,8 +24,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||||
import com.raytheon.viz.redbook.rsc.RedbookResourceData;
|
import com.raytheon.viz.redbook.rsc.RedbookResourceData;
|
||||||
|
@ -39,6 +39,8 @@ import com.raytheon.viz.redbook.rsc.RedbookResourceData;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 24, 2010 1029 dfriedma Initial creation
|
* Mar 24, 2010 1029 dfriedma Initial creation
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Redbook Plug-in
|
Bundle-Name: Redbook Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.edex.plugin.redbook
|
Bundle-SymbolicName: com.raytheon.edex.plugin.redbook
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
|
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Require-Bundle: com.raytheon.edex.common,
|
Require-Bundle: com.raytheon.edex.common,
|
||||||
|
@ -11,10 +11,8 @@ Require-Bundle: com.raytheon.edex.common,
|
||||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
||||||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||||
com.raytheon.uf.edex.ndm;bundle-version="1.14.0",
|
com.raytheon.uf.edex.ndm;bundle-version="1.14.0",
|
||||||
com.raytheon.uf.edex.menus;bundle-version="1.0.0"
|
com.raytheon.uf.edex.menus;bundle-version="1.0.0",
|
||||||
|
com.raytheon.uf.common.dataplugin.redbook;bundle-version="1.14.0"
|
||||||
Export-Package: com.raytheon.edex.plugin.redbook,
|
Export-Package: com.raytheon.edex.plugin.redbook,
|
||||||
com.raytheon.edex.plugin.redbook.common,
|
|
||||||
com.raytheon.edex.plugin.redbook.common.blocks,
|
|
||||||
com.raytheon.edex.plugin.redbook.decoder
|
com.raytheon.edex.plugin.redbook.decoder
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
Import-Package: org.apache.commons.logging
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
001_001=com.raytheon.edex.plugin.redbook.common.blocks.ProductIdBlock
|
|
||||||
001_002=com.raytheon.edex.plugin.redbook.common.blocks.EndOfProductBlock
|
|
||||||
004_016=com.raytheon.edex.plugin.redbook.common.blocks.Block_004_016
|
|
||||||
004_017=com.raytheon.edex.plugin.redbook.common.blocks.Block_004_017
|
|
|
@ -10,7 +10,7 @@
|
||||||
<property name="pluginName" ref="redbookPluginName" />
|
<property name="pluginName" ref="redbookPluginName" />
|
||||||
<property name="pluginFQN" value="com.raytheon.edex.plugin.redbook" />
|
<property name="pluginFQN" value="com.raytheon.edex.plugin.redbook" />
|
||||||
<property name="dao" value="com.raytheon.edex.plugin.redbook.dao.RedbookDao" />
|
<property name="dao" value="com.raytheon.edex.plugin.redbook.dao.RedbookDao" />
|
||||||
<property name="record" value="com.raytheon.edex.plugin.redbook.common.RedbookRecord" />
|
<property name="record" value="com.raytheon.uf.common.dataplugin.redbook.RedbookRecord" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean factory-bean="pluginRegistry" factory-method="register">
|
<bean factory-bean="pluginRegistry" factory-method="register">
|
||||||
|
|
|
@ -25,13 +25,15 @@ import java.util.Date;
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.exception.DecoderException;
|
import com.raytheon.edex.exception.DecoderException;
|
||||||
import com.raytheon.edex.plugin.AbstractDecoder;
|
import com.raytheon.edex.plugin.AbstractDecoder;
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.edex.plugin.redbook.dao.RedbookDao;
|
import com.raytheon.edex.plugin.redbook.dao.RedbookDao;
|
||||||
import com.raytheon.edex.plugin.redbook.decoder.RedbookParser;
|
import com.raytheon.edex.plugin.redbook.decoder.RedbookParser;
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
|
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
|
||||||
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.PerformanceStatus;
|
import com.raytheon.uf.common.status.PerformanceStatus;
|
||||||
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.time.util.ITimer;
|
import com.raytheon.uf.common.time.util.ITimer;
|
||||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
import com.raytheon.uf.edex.database.plugin.PluginFactory;
|
import com.raytheon.uf.edex.database.plugin.PluginFactory;
|
||||||
|
@ -56,6 +58,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||||
* Mar 19, 2013 1785 bgonzale Added performance status handler and
|
* Mar 19, 2013 1785 bgonzale Added performance status handler and
|
||||||
* added status to decode.
|
* added status to decode.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
|
@ -94,6 +98,9 @@ public class RedbookDecoder extends AbstractDecoder {
|
||||||
// Name of the plugin controlling this decoder.
|
// Name of the plugin controlling this decoder.
|
||||||
private final String PLUGIN_NAME;
|
private final String PLUGIN_NAME;
|
||||||
|
|
||||||
|
private static final IUFStatusHandler logger = UFStatus
|
||||||
|
.getHandler(RedbookDecoder.class);
|
||||||
|
|
||||||
private final IPerformanceStatusHandler perfLog = PerformanceStatus
|
private final IPerformanceStatusHandler perfLog = PerformanceStatus
|
||||||
.getHandler("Redbook:");
|
.getHandler("Redbook:");
|
||||||
|
|
||||||
|
@ -150,8 +157,6 @@ public class RedbookDecoder extends AbstractDecoder {
|
||||||
if (report != null) {
|
if (report != null) {
|
||||||
report.setPersistenceTime(new Date());
|
report.setPersistenceTime(new Date());
|
||||||
try {
|
try {
|
||||||
report.constructDataURI();
|
|
||||||
|
|
||||||
reports = createMergedRecordList(report);
|
reports = createMergedRecordList(report);
|
||||||
} catch (PluginException e) {
|
} catch (PluginException e) {
|
||||||
logger.error(traceId + "- Error constructing datauri",
|
logger.error(traceId + "- Error constructing datauri",
|
||||||
|
@ -220,7 +225,6 @@ public class RedbookDecoder extends AbstractDecoder {
|
||||||
// and the Wes2Bridge archiver properly finds these backdated
|
// and the Wes2Bridge archiver properly finds these backdated
|
||||||
// records
|
// records
|
||||||
backDatedRecord.setPersistenceTime(new Date());
|
backDatedRecord.setPersistenceTime(new Date());
|
||||||
backDatedRecord.constructDataURI();
|
|
||||||
} catch (PluginException e) {
|
} catch (PluginException e) {
|
||||||
logger.error(traceId + "Could not create back-dated copy of "
|
logger.error(traceId + "Could not create back-dated copy of "
|
||||||
+ record.getDataURI(), e);
|
+ record.getDataURI(), e);
|
||||||
|
|
|
@ -22,11 +22,10 @@ package com.raytheon.edex.plugin.redbook;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.plugin.AbstractRecordSeparator;
|
import com.raytheon.edex.plugin.AbstractRecordSeparator;
|
||||||
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,14 +38,17 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* 20080512 1131 jkorman Initial implementation.
|
||||||
* 20080529 1131 jkorman Added traceId constructor and getter
|
* 20080529 1131 jkorman Added traceId constructor and getter
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public class RedbookSeparator extends AbstractRecordSeparator {
|
public class RedbookSeparator extends AbstractRecordSeparator {
|
||||||
/** The logger */
|
|
||||||
private Log logger = LogFactory.getLog(getClass());
|
private static final IUFStatusHandler logger = UFStatus
|
||||||
|
.getHandler(RedbookSeparator.class);
|
||||||
|
|
||||||
private WMOHeader wmoHeader = null;
|
private WMOHeader wmoHeader = null;
|
||||||
|
|
||||||
|
@ -68,6 +70,7 @@ public class RedbookSeparator extends AbstractRecordSeparator {
|
||||||
* @return The next observation record as a String.
|
* @return The next observation record as a String.
|
||||||
*/
|
*/
|
||||||
// @Override
|
// @Override
|
||||||
|
@Override
|
||||||
public Object next() {
|
public Object next() {
|
||||||
byte[] data = null;
|
byte[] data = null;
|
||||||
if (hasNext()) {
|
if (hasNext()) {
|
||||||
|
|
|
@ -22,9 +22,9 @@ package com.raytheon.edex.plugin.redbook.dao;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||||
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
||||||
|
@ -43,7 +43,9 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
|
|
|
@ -26,13 +26,12 @@ import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.ProductIdBlock;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlock;
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlockBuilder;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.ProductIdBlock;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlock;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlockBuilder;
|
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
import com.raytheon.uf.common.time.DataTime;
|
||||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||||
|
@ -47,11 +46,13 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* 20080529 1131 jkorman Added traceId, implemented in logger.
|
* May 29, 2008 1131 jkorman Added traceId, implemented in logger.
|
||||||
* 20101022 6424 kshrestha Added fcsttime
|
* Oct 22, 2010 6424 kshrestha Added fcsttime
|
||||||
* 20110516 8296 mhuang fixed fcsttime problem
|
* May 16, 2011 8296 mhuang fixed fcsttime problem
|
||||||
* Apr 29, 2013 1958 bgonzale Refactored to improve performance.
|
* Apr 29, 2013 1958 bgonzale Refactored to improve performance.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
|
@ -61,7 +62,8 @@ public class RedbookParser {
|
||||||
|
|
||||||
private static final RedbookBlockBuilder blockBuilder = new RedbookBlockBuilder();
|
private static final RedbookBlockBuilder blockBuilder = new RedbookBlockBuilder();
|
||||||
|
|
||||||
private final Log logger = LogFactory.getLog(getClass());
|
private static final IUFStatusHandler logger = UFStatus
|
||||||
|
.getHandler(RedbookParser.class);
|
||||||
|
|
||||||
// private Calendar issueDate = null;
|
// private Calendar issueDate = null;
|
||||||
|
|
||||||
|
@ -99,14 +101,15 @@ public class RedbookParser {
|
||||||
wmoTime.set(Calendar.HOUR_OF_DAY, hour);
|
wmoTime.set(Calendar.HOUR_OF_DAY, hour);
|
||||||
wmoTime.set(Calendar.MINUTE, min);
|
wmoTime.set(Calendar.MINUTE, min);
|
||||||
|
|
||||||
long binnedTime = getBinnedTime(traceId, hdr, wmoTime.getTimeInMillis());
|
long binnedTime = getBinnedTime(traceId, hdr,
|
||||||
|
wmoTime.getTimeInMillis());
|
||||||
|
|
||||||
DataTime dt = null;
|
DataTime dt = null;
|
||||||
|
|
||||||
if ( fcstTime > 0 )
|
if (fcstTime > 0)
|
||||||
dt = new DataTime(new Date(binnedTime), fcstTime);
|
dt = new DataTime(new Date(binnedTime), fcstTime);
|
||||||
else
|
else
|
||||||
dt = new DataTime(new Date(binnedTime));
|
dt = new DataTime(new Date(binnedTime));
|
||||||
|
|
||||||
rRecord.setDataTime(dt);
|
rRecord.setDataTime(dt);
|
||||||
|
|
||||||
|
@ -132,7 +135,8 @@ public class RedbookParser {
|
||||||
* @param hdr
|
* @param hdr
|
||||||
* @param separator
|
* @param separator
|
||||||
*/
|
*/
|
||||||
private RedbookRecord internalParse(String traceId, byte[] redbookMsg, WMOHeader hdr) {
|
private RedbookRecord internalParse(String traceId, byte[] redbookMsg,
|
||||||
|
WMOHeader hdr) {
|
||||||
|
|
||||||
RedbookRecord record = null;
|
RedbookRecord record = null;
|
||||||
|
|
||||||
|
@ -216,7 +220,7 @@ public class RedbookParser {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getBinnedTime(String traceId, WMOHeader hdr, long timeMillis) {
|
public long getBinnedTime(String traceId, WMOHeader hdr, long timeMillis) {
|
||||||
try {
|
try {
|
||||||
long period = 43200 * 1000; // default period is 12 hours
|
long period = 43200 * 1000; // default period is 12 hours
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -239,6 +243,6 @@ public class RedbookParser {
|
||||||
logger.error(traceId + " - Error in parser - mappingFCST: ", e);
|
logger.error(traceId + " - Error in parser - mappingFCST: ", e);
|
||||||
}
|
}
|
||||||
return timeMillis;
|
return timeMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
28
edexOsgi/com.raytheon.uf.common.dataplugin.redbook/.project
Normal file
28
edexOsgi/com.raytheon.uf.common.dataplugin.redbook/.project
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.raytheon.uf.common.dataplugin.redbook</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,7 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,14 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Redbook
|
||||||
|
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.redbook
|
||||||
|
Bundle-Version: 1.14.0.qualifier
|
||||||
|
Bundle-Vendor: RAYTHEON
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
|
Export-Package: com.raytheon.uf.common.dataplugin.redbook,
|
||||||
|
com.raytheon.uf.common.dataplugin.redbook.blocks
|
||||||
|
Require-Bundle: com.raytheon.uf.common.serialization,
|
||||||
|
javax.persistence,
|
||||||
|
com.raytheon.uf.common.dataplugin,
|
||||||
|
com.raytheon.uf.common.status
|
||||||
|
Import-Package: com.raytheon.uf.common.util
|
|
@ -0,0 +1,5 @@
|
||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.,\
|
||||||
|
res/
|
|
@ -0,0 +1,4 @@
|
||||||
|
001_001=com.raytheon.uf.common.dataplugin.redbook.blocks.ProductIdBlock
|
||||||
|
001_002=com.raytheon.uf.common.dataplugin.redbook.blocks.EndOfProductBlock
|
||||||
|
004_016=com.raytheon.uf.common.dataplugin.redbook.blocks.Block_004_016
|
||||||
|
004_017=com.raytheon.uf.common.dataplugin.redbook.blocks.Block_004_017
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common;
|
package com.raytheon.uf.common.dataplugin.redbook;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -68,6 +68,8 @@ import com.raytheon.uf.common.time.DataTime;
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
* Nov 04, 2013 2361 njensen Remove XML annotations
|
* Nov 04, 2013 2361 njensen Remove XML annotations
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
|
@ -17,11 +17,12 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
/**TODO Add Description
|
/**
|
||||||
|
* TODO Add Description
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -29,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,13 +60,13 @@ public class Block_004_004 extends RedbookBlock {
|
||||||
public Block_004_004(RedbookBlockHeader header, ByteBuffer data) {
|
public Block_004_004(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
populate(data);
|
populate(data);
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populate(ByteBuffer data) {
|
private void populate(ByteBuffer data) {
|
||||||
if(hasLength()) {
|
if (hasLength()) {
|
||||||
dropShortsFromTheBuffer(data);
|
dropShortsFromTheBuffer(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,6 +74,7 @@ public class Block_004_004 extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@ -30,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -58,7 +60,7 @@ public class Block_004_005 extends RedbookBlock {
|
||||||
public Block_004_005(RedbookBlockHeader header, ByteBuffer data) {
|
public Block_004_005(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
populate(data);
|
populate(data);
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +74,7 @@ public class Block_004_005 extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@ -30,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -43,30 +45,42 @@ import java.nio.ByteBuffer;
|
||||||
public class Block_004_016 extends RedbookBlock {
|
public class Block_004_016 extends RedbookBlock {
|
||||||
|
|
||||||
private int piSet;
|
private int piSet;
|
||||||
|
|
||||||
private int coordinateFlag;
|
private int coordinateFlag;
|
||||||
|
|
||||||
private int scaleFactor;
|
private int scaleFactor;
|
||||||
|
|
||||||
private int areaCode;
|
private int areaCode;
|
||||||
|
|
||||||
private int labelCode;
|
private int labelCode;
|
||||||
|
|
||||||
private int refM1coord;
|
private int refM1coord;
|
||||||
|
|
||||||
private int refN1coord;
|
private int refN1coord;
|
||||||
|
|
||||||
private int refM2coord;
|
private int refM2coord;
|
||||||
|
|
||||||
private int refN2coord;
|
private int refN2coord;
|
||||||
|
|
||||||
private int refM3coord;
|
private int refM3coord;
|
||||||
|
|
||||||
private int refN3coord;
|
private int refN3coord;
|
||||||
|
|
||||||
private int vtMonth;
|
private int vtMonth;
|
||||||
|
|
||||||
private int vtDay;
|
private int vtDay;
|
||||||
|
|
||||||
private int vtHour;
|
private int vtHour;
|
||||||
|
|
||||||
private int vtMinute;
|
private int vtMinute;
|
||||||
|
|
||||||
private int evtMonth;
|
private int evtMonth;
|
||||||
private int evtDay;
|
|
||||||
private int evtHour;
|
|
||||||
private int evtMinute;
|
|
||||||
|
|
||||||
|
private int evtDay;
|
||||||
|
|
||||||
|
private int evtHour;
|
||||||
|
|
||||||
|
private int evtMinute;
|
||||||
|
|
||||||
public static class Factory implements RedbookBlockFactory {
|
public static class Factory implements RedbookBlockFactory {
|
||||||
@Override
|
@Override
|
||||||
|
@ -84,7 +98,7 @@ public class Block_004_016 extends RedbookBlock {
|
||||||
public Block_004_016(RedbookBlockHeader header, ByteBuffer data) {
|
public Block_004_016(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
populate(data);
|
populate(data);
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,24 +134,27 @@ public class Block_004_016 extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
sb.append(" piSet=");
|
sb.append(" piSet=");
|
||||||
sb.append(piSet);
|
sb.append(piSet);
|
||||||
sb.append(":CF_");
|
sb.append(":CF_");
|
||||||
if(coordinateFlag == 0) {
|
if (coordinateFlag == 0) {
|
||||||
sb.append("LL");
|
sb.append("LL");
|
||||||
} else if(coordinateFlag == 1) {
|
} else if (coordinateFlag == 1) {
|
||||||
sb.append("IJ");
|
sb.append("IJ");
|
||||||
} else if(coordinateFlag == 2) {
|
} else if (coordinateFlag == 2) {
|
||||||
sb.append("XY");
|
sb.append("XY");
|
||||||
} else {
|
} else {
|
||||||
sb.append("??");
|
sb.append("??");
|
||||||
}
|
}
|
||||||
sb.append(":TM_");
|
sb.append(":TM_");
|
||||||
sb.append(String.format("%02d%02d%02d%02d",vtMonth,vtDay,vtHour,vtMinute));
|
sb.append(String.format("%02d%02d%02d%02d", vtMonth, vtDay, vtHour,
|
||||||
|
vtMinute));
|
||||||
sb.append(":");
|
sb.append(":");
|
||||||
sb.append(String.format("%02d%02d%02d%02d",evtMonth,evtDay,evtHour,evtMinute));
|
sb.append(String.format("%02d%02d%02d%02d", evtMonth, evtDay, evtHour,
|
||||||
|
evtMinute));
|
||||||
|
|
||||||
return sb;
|
return sb;
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@ -30,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -43,21 +45,29 @@ import java.nio.ByteBuffer;
|
||||||
public class Block_004_017 extends RedbookBlock {
|
public class Block_004_017 extends RedbookBlock {
|
||||||
|
|
||||||
private float ulLat;
|
private float ulLat;
|
||||||
|
|
||||||
private float ulLon;
|
private float ulLon;
|
||||||
|
|
||||||
private float urLat;
|
private float urLat;
|
||||||
|
|
||||||
private float urLon;
|
private float urLon;
|
||||||
|
|
||||||
private float lrLat;
|
private float lrLat;
|
||||||
|
|
||||||
private float lrLon;
|
private float lrLon;
|
||||||
|
|
||||||
private float llLat;
|
private float llLat;
|
||||||
|
|
||||||
private float llLon;
|
private float llLon;
|
||||||
|
|
||||||
private float lon1;
|
private float lon1;
|
||||||
|
|
||||||
private float lat1;
|
private float lat1;
|
||||||
|
|
||||||
private float lat2;
|
private float lat2;
|
||||||
|
|
||||||
private String projName;
|
private String projName;
|
||||||
|
|
||||||
|
|
||||||
public static class Factory implements RedbookBlockFactory {
|
public static class Factory implements RedbookBlockFactory {
|
||||||
@Override
|
@Override
|
||||||
public RedbookBlock createBlock(RedbookBlockHeader header,
|
public RedbookBlock createBlock(RedbookBlockHeader header,
|
||||||
|
@ -74,7 +84,7 @@ public class Block_004_017 extends RedbookBlock {
|
||||||
public Block_004_017(RedbookBlockHeader header, ByteBuffer data) {
|
public Block_004_017(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
populateProj(data);
|
populateProj(data);
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,19 +94,19 @@ public class Block_004_017 extends RedbookBlock {
|
||||||
data.get();
|
data.get();
|
||||||
|
|
||||||
int sel = (data.get() & 0xFF);
|
int sel = (data.get() & 0xFF);
|
||||||
if(sel >= 1) {
|
if (sel >= 1) {
|
||||||
ulLat = getFloat2(data);
|
ulLat = getFloat2(data);
|
||||||
ulLon = getFloat2(data);
|
ulLon = getFloat2(data);
|
||||||
}
|
}
|
||||||
if(sel >= 2) {
|
if (sel >= 2) {
|
||||||
urLat = getFloat2(data);
|
urLat = getFloat2(data);
|
||||||
urLon = getFloat2(data);
|
urLon = getFloat2(data);
|
||||||
}
|
}
|
||||||
if(sel >= 3) {
|
if (sel >= 3) {
|
||||||
lrLat = getFloat2(data);
|
lrLat = getFloat2(data);
|
||||||
lrLon = getFloat2(data);
|
lrLon = getFloat2(data);
|
||||||
}
|
}
|
||||||
if(sel >= 4) {
|
if (sel >= 4) {
|
||||||
llLat = getFloat2(data);
|
llLat = getFloat2(data);
|
||||||
llLon = getFloat2(data);
|
llLon = getFloat2(data);
|
||||||
}
|
}
|
||||||
|
@ -105,9 +115,9 @@ public class Block_004_017 extends RedbookBlock {
|
||||||
lat1 = getFloat2(data);
|
lat1 = getFloat2(data);
|
||||||
lat2 = getFloat2(data);
|
lat2 = getFloat2(data);
|
||||||
|
|
||||||
char [] c = new char [6];
|
char[] c = new char[6];
|
||||||
for(int i = 0;i < c.length;i++) {
|
for (int i = 0; i < c.length; i++) {
|
||||||
c[i] = (char)(data.get() & 0xFF);
|
c[i] = (char) (data.get() & 0xFF);
|
||||||
}
|
}
|
||||||
projName = new String(c);
|
projName = new String(c);
|
||||||
|
|
||||||
|
@ -118,12 +128,13 @@ public class Block_004_017 extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
sb.append(String.format(" ul[%2.2f:%2.2f]", ulLat,ulLon));
|
sb.append(String.format(" ul[%2.2f:%2.2f]", ulLat, ulLon));
|
||||||
sb.append(String.format(",ur[%2.2f:%2.2f]", urLat,urLon));
|
sb.append(String.format(",ur[%2.2f:%2.2f]", urLat, urLon));
|
||||||
sb.append(String.format(",ll[%2.2f:%2.2f]", llLat,llLon));
|
sb.append(String.format(",ll[%2.2f:%2.2f]", llLat, llLon));
|
||||||
sb.append(String.format(",ur[%2.2f:%2.2f]", urLat,urLon));
|
sb.append(String.format(",ur[%2.2f:%2.2f]", urLat, urLon));
|
||||||
|
|
||||||
sb.append(projName);
|
sb.append(projName);
|
||||||
return sb;
|
return sb;
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@ -30,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +59,7 @@ public class DefaultBlock extends RedbookBlock {
|
||||||
*/
|
*/
|
||||||
public DefaultBlock(RedbookBlockHeader header, ByteBuffer data) {
|
public DefaultBlock(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
if(hasLength()) {
|
if (hasLength()) {
|
||||||
dropShortsFromTheBuffer(data);
|
dropShortsFromTheBuffer(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +67,7 @@ public class DefaultBlock extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
return sb;
|
return sb;
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@ -30,9 +30,11 @@ import java.nio.ByteBuffer;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +59,7 @@ public class EndOfProductBlock extends RedbookBlock {
|
||||||
*/
|
*/
|
||||||
public EndOfProductBlock(RedbookBlockHeader header, ByteBuffer data) {
|
public EndOfProductBlock(RedbookBlockHeader header, ByteBuffer data) {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +75,7 @@ public class EndOfProductBlock extends RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
return sb;
|
return sb;
|
|
@ -17,12 +17,12 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* TODO Add Description
|
||||||
|
@ -33,9 +33,11 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory class.
|
* nested Factory class.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -46,6 +48,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||||
public class ProductIdBlock extends RedbookBlock {
|
public class ProductIdBlock extends RedbookBlock {
|
||||||
|
|
||||||
private static final String TM_FMT = "%04d%02d%02d%02d%02d";
|
private static final String TM_FMT = "%04d%02d%02d%02d%02d";
|
||||||
|
|
||||||
private static final int BLOCK_LEN = 34;
|
private static final int BLOCK_LEN = 34;
|
||||||
|
|
||||||
private static final int ORIG_ID_SIZE = 4;
|
private static final int ORIG_ID_SIZE = 4;
|
||||||
|
@ -84,11 +87,11 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
super(header, data);
|
super(header, data);
|
||||||
|
|
||||||
int blockLen = (hasChkSum()) ? BLOCK_LEN : BLOCK_LEN - 2;
|
int blockLen = (hasChkSum()) ? BLOCK_LEN : BLOCK_LEN - 2;
|
||||||
if(data.remaining() >= blockLen) {
|
if (data.remaining() >= blockLen) {
|
||||||
char [] pId = new char [ORIG_ID_SIZE];
|
char[] pId = new char[ORIG_ID_SIZE];
|
||||||
for(int i = 0;i < pId.length;i++) {
|
for (int i = 0; i < pId.length; i++) {
|
||||||
char c = (char) (data.get() & 0xFF);
|
char c = (char) (data.get() & 0xFF);
|
||||||
if(c > 0) {
|
if (c > 0) {
|
||||||
pId[i] = c;
|
pId[i] = c;
|
||||||
} else {
|
} else {
|
||||||
pId[i] = '.';
|
pId[i] = '.';
|
||||||
|
@ -104,10 +107,10 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
fileIndicator = (data.get() & 0xFF);
|
fileIndicator = (data.get() & 0xFF);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
pId = new char [PRODM_ID_SIZE];
|
pId = new char[PRODM_ID_SIZE];
|
||||||
for(int i = 0;i < pId.length;i++) {
|
for (int i = 0; i < pId.length; i++) {
|
||||||
char c = (char) (data.get() & 0xFF);
|
char c = (char) (data.get() & 0xFF);
|
||||||
if(c > 0) {
|
if (c > 0) {
|
||||||
pId[i] = c;
|
pId[i] = c;
|
||||||
} else {
|
} else {
|
||||||
pId[i] = '.';
|
pId[i] = '.';
|
||||||
|
@ -121,20 +124,24 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
int hour = (data.get() & 0xFF);
|
int hour = (data.get() & 0xFF);
|
||||||
int minute = (data.get() & 0xFF);
|
int minute = (data.get() & 0xFF);
|
||||||
|
|
||||||
prodFileTime = String.format(TM_FMT,year,month,day,hour,minute);
|
prodFileTime = String
|
||||||
|
.format(TM_FMT, year, month, day, hour, minute);
|
||||||
|
|
||||||
Calendar t = TimeTools.getBaseCalendar(year, month, day);
|
Calendar t = TimeUtil.newGmtCalendar();
|
||||||
if(t != null) {
|
t.set(Calendar.YEAR, year);
|
||||||
t.set(Calendar.HOUR_OF_DAY,hour);
|
t.set(Calendar.MONTH, month);
|
||||||
t.set(Calendar.MINUTE,minute);
|
t.set(Calendar.DAY_OF_MONTH, day);
|
||||||
|
t.set(Calendar.HOUR_OF_DAY, hour);
|
||||||
|
t.set(Calendar.MINUTE, minute);
|
||||||
|
t.set(Calendar.SECOND, 0);
|
||||||
|
t.set(Calendar.MILLISECOND, 0);
|
||||||
|
|
||||||
productFileTime = t;
|
productFileTime = t;
|
||||||
}
|
|
||||||
|
|
||||||
pId = new char [PRODC_ID_SIZE];
|
pId = new char[PRODC_ID_SIZE];
|
||||||
for(int i = 0;i < pId.length;i++) {
|
for (int i = 0; i < pId.length; i++) {
|
||||||
char c = (char) (data.get() & 0xFF);
|
char c = (char) (data.get() & 0xFF);
|
||||||
if(c > 0) {
|
if (c > 0) {
|
||||||
pId[i] = c;
|
pId[i] = c;
|
||||||
} else {
|
} else {
|
||||||
pId[i] = '.';
|
pId[i] = '.';
|
||||||
|
@ -145,23 +152,23 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
parseFcstHours();
|
parseFcstHours();
|
||||||
|
|
||||||
// Just read over the checksum for now.
|
// Just read over the checksum for now.
|
||||||
if(hasChkSum()) {
|
if (hasChkSum()) {
|
||||||
data.getShort();
|
data.getShort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseFcstHours() {
|
private void parseFcstHours() {
|
||||||
if((productId != null) && (productId.length() > 7)) {
|
if ((productId != null) && (productId.length() > 7)) {
|
||||||
|
|
||||||
Integer fcstHour = null;
|
Integer fcstHour = null;
|
||||||
try {
|
try {
|
||||||
fcstHour = new Integer(productId.substring(4,7));
|
fcstHour = new Integer(productId.substring(4, 7));
|
||||||
} catch(NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
if(fcstHour != null) {
|
if (fcstHour != null) {
|
||||||
if(fcstHour < 300) {
|
if (fcstHour < 300) {
|
||||||
fcstHours = fcstHour;
|
fcstHours = fcstHour;
|
||||||
} else if (fcstHour < 400) {
|
} else if (fcstHour < 400) {
|
||||||
|
|
||||||
|
@ -174,11 +181,10 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
sb = super.toString(sb);
|
sb = super.toString(sb);
|
||||||
sb.append(":");
|
sb.append(":");
|
||||||
|
@ -196,7 +202,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param originatorId the originatorId to set
|
* @param originatorId
|
||||||
|
* the originatorId to set
|
||||||
*/
|
*/
|
||||||
public void setOriginatorId(String originatorId) {
|
public void setOriginatorId(String originatorId) {
|
||||||
this.originatorId = originatorId;
|
this.originatorId = originatorId;
|
||||||
|
@ -210,7 +217,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param productId the productId to set
|
* @param productId
|
||||||
|
* the productId to set
|
||||||
*/
|
*/
|
||||||
public void setProductId(String productId) {
|
public void setProductId(String productId) {
|
||||||
this.productId = productId;
|
this.productId = productId;
|
||||||
|
@ -224,7 +232,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param retentionHours the retentionHours to set
|
* @param retentionHours
|
||||||
|
* the retentionHours to set
|
||||||
*/
|
*/
|
||||||
public void setRetentionHours(Integer retentionHours) {
|
public void setRetentionHours(Integer retentionHours) {
|
||||||
this.retentionHours = retentionHours;
|
this.retentionHours = retentionHours;
|
||||||
|
@ -238,7 +247,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param productFileTime the productFileTime to set
|
* @param productFileTime
|
||||||
|
* the productFileTime to set
|
||||||
*/
|
*/
|
||||||
public void setProductFileTime(Calendar productFileTime) {
|
public void setProductFileTime(Calendar productFileTime) {
|
||||||
this.productFileTime = productFileTime;
|
this.productFileTime = productFileTime;
|
||||||
|
@ -252,7 +262,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fileIndicator the fileIndicator to set
|
* @param fileIndicator
|
||||||
|
* the fileIndicator to set
|
||||||
*/
|
*/
|
||||||
public void setFileIndicator(Integer fileIndicator) {
|
public void setFileIndicator(Integer fileIndicator) {
|
||||||
this.fileIndicator = fileIndicator;
|
this.fileIndicator = fileIndicator;
|
||||||
|
@ -266,7 +277,8 @@ public class ProductIdBlock extends RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fcstHours the fcstHours to set
|
* @param fcstHours
|
||||||
|
* the fcstHours to set
|
||||||
*/
|
*/
|
||||||
public void setFcstHours(Integer fcstHours) {
|
public void setFcstHours(Integer fcstHours) {
|
||||||
this.fcstHours = fcstHours;
|
this.fcstHours = fcstHours;
|
|
@ -17,13 +17,10 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -34,10 +31,12 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080512 1131 jkorman Initial implementation.
|
* May 12, 2008 1131 jkorman Initial implementation.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and
|
||||||
* and nested Factory interface.
|
* nested Factory interface.
|
||||||
* May 06, 2013 1979 bgonzale Catch Header at the end of buffer.
|
* May 06, 2013 1979 bgonzale Catch Header at the end of buffer.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -47,9 +46,6 @@ import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
public abstract class RedbookBlock {
|
public abstract class RedbookBlock {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private final Log logger = LogFactory.getLog(getClass());
|
|
||||||
|
|
||||||
private static final int LEN_MASK = 0x8000;
|
private static final int LEN_MASK = 0x8000;
|
||||||
|
|
||||||
private static final int CHKSUM_MASK = 0x4000;
|
private static final int CHKSUM_MASK = 0x4000;
|
||||||
|
@ -117,7 +113,8 @@ public abstract class RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param hasLength the hasLength to set
|
* @param hasLength
|
||||||
|
* the hasLength to set
|
||||||
*/
|
*/
|
||||||
public void setHasLength(boolean hasLength) {
|
public void setHasLength(boolean hasLength) {
|
||||||
this.hasLength = hasLength;
|
this.hasLength = hasLength;
|
||||||
|
@ -131,21 +128,23 @@ public abstract class RedbookBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param hasChkSum the hasChkSum to set
|
* @param hasChkSum
|
||||||
|
* the hasChkSum to set
|
||||||
*/
|
*/
|
||||||
public void setHasChkSum(boolean hasChkSum) {
|
public void setHasChkSum(boolean hasChkSum) {
|
||||||
this.hasChkSum = hasChkSum;
|
this.hasChkSum = hasChkSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringBuilder toString(StringBuilder sb) {
|
public StringBuilder toString(StringBuilder sb) {
|
||||||
if(sb == null) {
|
if (sb == null) {
|
||||||
sb = new StringBuilder();
|
sb = new StringBuilder();
|
||||||
}
|
}
|
||||||
sb.append((hasLength) ? 'L' : '.');
|
sb.append((hasLength) ? 'L' : '.');
|
||||||
sb.append((hasChkSum) ? 'C' : '.');
|
sb.append((hasChkSum) ? 'C' : '.');
|
||||||
sb.append(':');
|
sb.append(':');
|
||||||
|
|
||||||
sb.append(String.format("%05d:mode=%02X:submode=%02X",length,header.mode,header.subMode));
|
sb.append(String.format("%05d:mode=%02X:submode=%02X", length,
|
||||||
|
header.mode, header.subMode));
|
||||||
|
|
||||||
return sb;
|
return sb;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +152,7 @@ public abstract class RedbookBlock {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return toString((StringBuilder) null).toString();
|
return toString((StringBuilder) null).toString();
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ public abstract class RedbookBlock {
|
||||||
public static float getFloat2(ByteBuffer dataBuf) {
|
public static float getFloat2(ByteBuffer dataBuf) {
|
||||||
float f = Float.NaN;
|
float f = Float.NaN;
|
||||||
|
|
||||||
if(dataBuf.remaining() >= 2) {
|
if (dataBuf.remaining() >= 2) {
|
||||||
|
|
||||||
short s = dataBuf.getShort();
|
short s = dataBuf.getShort();
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
@ -25,12 +25,10 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.redbook.common.blocks.RedbookBlock.RedbookBlockFactory;
|
import com.raytheon.uf.common.dataplugin.redbook.blocks.RedbookBlock.RedbookBlockFactory;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.util.PropertiesUtil;
|
import com.raytheon.uf.common.util.PropertiesUtil;
|
||||||
import com.raytheon.uf.common.util.ReflectionException;
|
|
||||||
import com.raytheon.uf.common.util.ReflectionUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -42,12 +40,14 @@ import com.raytheon.uf.common.util.ReflectionUtil;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080516 1131 jkorman Initial Coding.
|
* May 16, 2008 1131 jkorman Initial Coding.
|
||||||
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader,
|
* Apr 29, 2013 1958 bgonzale Added class RedbookBlockHeader, and moved
|
||||||
* and moved reflective calls to the
|
* reflective calls to the mapping
|
||||||
* mapping population method. Map now
|
* population method. Map now contains
|
||||||
* contains factory objects.
|
* factory objects.
|
||||||
* Jul 19, 2013 DR 16401 D. Friedman Fix end-of-product block decoding.
|
* Jul 19, 2013 16401 D. Friedman Fix end-of-product block decoding.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -55,6 +55,7 @@ import com.raytheon.uf.common.util.ReflectionUtil;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public class RedbookBlockBuilder {
|
public class RedbookBlockBuilder {
|
||||||
|
|
||||||
private static final IUFStatusHandler statusHandler = UFStatus
|
private static final IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(RedbookBlockBuilder.class);
|
.getHandler(RedbookBlockBuilder.class);
|
||||||
|
|
||||||
|
@ -100,11 +101,12 @@ public class RedbookBlockBuilder {
|
||||||
byte rawMode = dataBuffer.get();
|
byte rawMode = dataBuffer.get();
|
||||||
byte rawSubMode = dataBuffer.get();
|
byte rawSubMode = dataBuffer.get();
|
||||||
|
|
||||||
/* Must have at least MIN_REMAINING,
|
/*
|
||||||
* but allow the the end-of-product block (mode=1,sub=2)
|
* Must have at least MIN_REMAINING, but allow the the end-of-product
|
||||||
|
* block (mode=1,sub=2)
|
||||||
*/
|
*/
|
||||||
if (dataBuffer.remaining() >= MIN_REMAINING ||
|
if (dataBuffer.remaining() >= MIN_REMAINING
|
||||||
(rawMode == 1 && rawSubMode == 2)) {
|
|| (rawMode == 1 && rawSubMode == 2)) {
|
||||||
header = new RedbookBlockHeader(rawHdr, rawMode, rawSubMode);
|
header = new RedbookBlockHeader(rawHdr, rawMode, rawSubMode);
|
||||||
} else {
|
} else {
|
||||||
header = RedbookBlockHeader.DEFAULT;
|
header = RedbookBlockHeader.DEFAULT;
|
||||||
|
@ -127,12 +129,11 @@ public class RedbookBlockBuilder {
|
||||||
+ FACTORY_NAME;
|
+ FACTORY_NAME;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
RedbookBlockFactory factory = ReflectionUtil
|
Class<?> factoryClass = Class.forName(factoryClassName);
|
||||||
.newInstanceOfAssignableType(
|
RedbookBlockFactory factory = (RedbookBlockFactory) factoryClass
|
||||||
RedbookBlockFactory.class, factoryClassName);
|
.newInstance();
|
||||||
|
blockFactoryMap.put(key, factory);
|
||||||
blockFactoryMap.put((String) key, factory);
|
} catch (Exception e) {
|
||||||
} catch (ReflectionException e) {
|
|
||||||
statusHandler.error("Could not instantiate "
|
statusHandler.error("Could not instantiate "
|
||||||
+ factoryClassName, e);
|
+ factoryClassName, e);
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.redbook.common.blocks;
|
package com.raytheon.uf.common.dataplugin.redbook.blocks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -31,6 +31,8 @@ package com.raytheon.edex.plugin.redbook.common.blocks;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 25 APR 2013 bgonzale Initial Coding.
|
* 25 APR 2013 bgonzale Initial Coding.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
|
@ -220,6 +220,13 @@
|
||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.raytheon.uf.common.dataplugin.redbook"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="com.raytheon.edex.plugin.sfcobs"
|
id="com.raytheon.edex.plugin.sfcobs"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
|
|
|
@ -162,5 +162,6 @@
|
||||||
<classpathentry kind="lib" path="lib/servlet-api-2.5.jar"/>
|
<classpathentry kind="lib" path="lib/servlet-api-2.5.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jetty-security-7.6.14.v20131031.jar"/>
|
<classpathentry kind="lib" path="lib/jetty-security-7.6.14.v20131031.jar"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.edex.plugin.taf"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.edex.plugin.taf"/>
|
||||||
|
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.dataplugin.redbook"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -43,8 +43,8 @@ import org.junit.Test;
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.exception.DecoderException;
|
import com.raytheon.edex.exception.DecoderException;
|
||||||
import com.raytheon.edex.plugin.redbook.common.RedbookRecord;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
|
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||||
import com.raytheon.uf.common.localization.PathManagerFactoryTest;
|
import com.raytheon.uf.common.localization.PathManagerFactoryTest;
|
||||||
import com.raytheon.uf.common.util.FileUtil;
|
import com.raytheon.uf.common.util.FileUtil;
|
||||||
|
|
||||||
|
@ -58,8 +58,10 @@ import com.raytheon.uf.common.util.FileUtil;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 22, 2013 1958 bgonzale Initial creation
|
* Apr 22, 2013 1958 bgonzale Initial creation
|
||||||
* May 08, 2013 2000 djohnson Ignore broken test.
|
* May 08, 2013 2000 djohnson Ignore broken test.
|
||||||
|
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common and
|
||||||
|
* edex redbook plugins
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue