Merge "Issue #3001 Created com.raytheon.uf.common.dataplugin.ccfp. Moved CcfpLocation and CcfpRecord to that project. Updated feature and manifest references." into development

Former-commit-id: 6e49d78e0d [formerly 6e49d78e0d [formerly 6d713f6a8a563b49bd1e2fa8151591657bd6735c]]
Former-commit-id: d26c150aa9
Former-commit-id: 8bf12cc32a
This commit is contained in:
Nate Jensen 2014-04-17 09:04:52 -05:00 committed by Gerrit Code Review
commit e28da969c6
20 changed files with 132 additions and 110 deletions

View file

@ -2,13 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Ccfp Plug-in Bundle-Name: Ccfp Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.ccfp;singleton:=true Bundle-SymbolicName: com.raytheon.uf.viz.ccfp;singleton:=true
Bundle-Version: 1.12.1174.qualifier Bundle-Version: 1.14.0
Bundle-Activator: com.raytheon.uf.viz.ccfp.Activator
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.viz.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.edex.plugin.ccfp, Import-Package: com.raytheon.edex.plugin.ccfp,
com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.ccfp,
com.raytheon.uf.common.geospatial, com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status, com.raytheon.uf.common.status,
com.raytheon.uf.common.time, com.raytheon.uf.common.time,
@ -28,5 +27,4 @@ Import-Package: com.raytheon.edex.plugin.ccfp,
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Require-Bundle: com.raytheon.uf.viz.core, Require-Bundle: com.raytheon.uf.viz.core,
org.geotools;bundle-version="2.5.2" org.geotools;bundle-version="2.5.2"
Export-Package: com.raytheon.uf.viz.ccfp, Export-Package: com.raytheon.uf.viz.ccfp.rsc
com.raytheon.uf.viz.ccfp.rsc

View file

@ -1,81 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.ccfp;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 22, 2009 3072 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.raytheon.uf.viz.ccfp";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}

View file

@ -32,8 +32,8 @@ import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.graphics.Rectangle;
import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.edex.plugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IExtent;

View file

@ -25,8 +25,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.edex.plugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord;
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.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;

View file

@ -100,6 +100,13 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="com.raytheon.uf.common.dataplugin.ccfp"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin <plugin
id="com.raytheon.uf.common.dataplugin.cwa" id="com.raytheon.uf.common.dataplugin.cwa"
download-size="0" download-size="0"
@ -191,13 +198,6 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="com.raytheon.edex.plugin.ccfp"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin <plugin
id="com.raytheon.edex.plugin.bufrmos" id="com.raytheon.edex.plugin.bufrmos"
download-size="0" download-size="0"

View file

@ -42,8 +42,8 @@ Export-Package: com.raytheon.viz.aviation,
com.raytheon.viz.aviation.xml com.raytheon.viz.aviation.xml
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.edex.plugin.bufrmos.common, Import-Package: com.raytheon.edex.plugin.bufrmos.common,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.dataplugin.acarssounding, com.raytheon.uf.common.dataplugin.acarssounding,
com.raytheon.uf.common.dataplugin.ccfp,
com.raytheon.uf.common.dataplugin.gfe.point, com.raytheon.uf.common.dataplugin.gfe.point,
com.raytheon.uf.common.dataplugin.gfe.request, com.raytheon.uf.common.dataplugin.gfe.request,
com.raytheon.uf.common.dataplugin.gfe.server.message, com.raytheon.uf.common.dataplugin.gfe.server.message,
@ -54,6 +54,7 @@ Import-Package: com.raytheon.edex.plugin.bufrmos.common,
com.raytheon.uf.common.dataplugin.text, com.raytheon.uf.common.dataplugin.text,
com.raytheon.uf.common.dataplugin.text.db, com.raytheon.uf.common.dataplugin.text.db,
com.raytheon.uf.common.dissemination, com.raytheon.uf.common.dissemination,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.message, com.raytheon.uf.common.message,
com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.serialization.comm,
javax.measure.converter, javax.measure.converter,

View file

@ -29,7 +29,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TimeZone; import java.util.TimeZone;
import com.raytheon.edex.plugin.ccfp.CcfpRecord; import com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord;
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.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;

View file

@ -28,10 +28,10 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TimeZone; import java.util.TimeZone;
import com.raytheon.edex.plugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord; import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord;
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord; import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
import com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord; import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest; import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint;

View file

@ -8,7 +8,9 @@ Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.edex.common, Require-Bundle: com.raytheon.edex.common,
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0", com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
org.geotools, org.geotools,
javax.persistence javax.persistence,
com.raytheon.uf.common.status
Export-Package: com.raytheon.edex.plugin.ccfp Export-Package: com.raytheon.edex.plugin.ccfp
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.apache.commons.logging Import-Package: com.raytheon.uf.common.dataplugin.ccfp,
com.raytheon.uf.common.status

View file

@ -6,7 +6,7 @@
<bean id="ccfpProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties"> <bean id="ccfpProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="ccfp" /> <property name="pluginName" value="ccfp" />
<property name="pluginFQN" value="com.raytheon.edex.plugin.ccfp" /> <property name="pluginFQN" value="com.raytheon.edex.plugin.ccfp" />
<property name="record" value="com.raytheon.edex.plugin.ccfp.CcfpRecord" /> <property name="record" value="com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord" />
</bean> </bean>
<bean factory-bean="pluginRegistry" factory-method="register"> <bean factory-bean="pluginRegistry" factory-method="register">

View file

@ -29,6 +29,10 @@ import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.AbstractDecoder;
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.ccfp.CcfpLocation;
import com.raytheon.uf.common.dataplugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.edex.decodertools.time.TimeTools; import com.raytheon.uf.edex.decodertools.time.TimeTools;
@ -49,6 +53,7 @@ import com.vividsolutions.jts.io.WKTReader;
* Sep 21, 2009 3072 bsteffen Fixed Decoding of Line Records * Sep 21, 2009 3072 bsteffen Fixed Decoding of Line Records
* Jan 02, 2013 DCS 135 tk handle coverage value Line records * Jan 02, 2013 DCS 135 tk handle coverage value Line records
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Apr 16, 2014 3001 bgonzale Use UfStatus for logging.
* *
* </pre> * </pre>
* *
@ -60,6 +65,9 @@ public class CcfpDecoder extends AbstractDecoder {
private static final String PLUGIN_NAME = "ccfp"; private static final String PLUGIN_NAME = "ccfp";
private static final IUFStatusHandler theLogger = UFStatus
.getHandler(CcfpDecoder.class);
/** Match the product returned from separator */ /** Match the product returned from separator */
private static final String PARSE_STRING = "[A-Z]{4}[0-9]{1,2} [A-Z]{4} [0-9]{6}(?: [A-Z]{3})?\n" private static final String PARSE_STRING = "[A-Z]{4}[0-9]{1,2} [A-Z]{4} [0-9]{6}(?: [A-Z]{3})?\n"
+ "CFP[\\p{Alnum} ]{3}\n" // awips header + "CFP[\\p{Alnum} ]{3}\n" // awips header
@ -226,7 +234,7 @@ public class CcfpDecoder extends AbstractDecoder {
} }
} catch (Exception e) { } catch (Exception e) {
record = null; record = null;
logger.error("Unable to decode CCFP", e); theLogger.error("Unable to decode CCFP", e);
} }
data = EMPTY_PDO; data = EMPTY_PDO;
if (record != null) { if (record != null) {
@ -235,7 +243,7 @@ public class CcfpDecoder extends AbstractDecoder {
record.setInsertTime(baseTime); record.setInsertTime(baseTime);
data = new PluginDataObject[] { record }; data = new PluginDataObject[] { record };
} catch (PluginException e) { } catch (PluginException e) {
logger.error("Error constructing datauri", e); theLogger.error("Error constructing datauri", e);
} }
} }
return data; return data;

View file

@ -27,11 +27,10 @@ import java.util.NoSuchElementException;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
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.common.util.StringUtil; import com.raytheon.uf.common.util.StringUtil;
/** /**
@ -44,8 +43,9 @@ import com.raytheon.uf.common.util.StringUtil;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 03/03/2007 908 bwoodle initial creation * 03/03/2007 908 bwoodle initial creation
* 12/03/2008 chammack Camel refactor * 12/03/2008 chammack Camel refactor
* 09/16/2009 3027 njensen Static patterns * 09/16/2009 3027 njensen Static patterns
* 01/02/2013 DCS 135 tk use \\r* for testing end of line * 01/02/2013 DCS 135 tk use \\r* for testing end of line
* 04/16/2014 3001 bgonzale Use UfStatus for logging.
* *
* </pre> * </pre>
* *
@ -55,7 +55,8 @@ import com.raytheon.uf.common.util.StringUtil;
public class CcfpSeparator extends AbstractRecordSeparator { public class CcfpSeparator extends AbstractRecordSeparator {
private final Log theLogger = LogFactory.getLog(getClass()); private static final IUFStatusHandler theLogger = UFStatus
.getHandler(CcfpSeparator.class);
/** Regex used for separating multi-record files */ /** Regex used for separating multi-record files */
private static final Pattern DATASET = Pattern private static final Pattern DATASET = Pattern

View file

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

View file

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

View file

@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CCFP common Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.ccfp
Bundle-Version: 1.14.0
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.raytheon.uf.common.dataplugin.ccfp
Require-Bundle: javax.persistence;bundle-version="1.0.0",
org.hibernate;bundle-version="3.5.6",
com.raytheon.uf.common.geospatial;bundle-version="1.14.0",
com.raytheon.uf.common.serialization;bundle-version="1.12.1174"
Import-Package: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.annotations

View file

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

View file

@ -18,7 +18,7 @@
* further licensing information. * further licensing information.
**/ **/
package com.raytheon.edex.plugin.ccfp; package com.raytheon.uf.common.dataplugin.ccfp;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
@ -46,6 +46,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate- * Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate-
* spatial * spatial
* Nov 01, 2013 2361 njensen Remove XML annotations * Nov 01, 2013 2361 njensen Remove XML annotations
* Apr 15, 2014 3001 bgonzale Refactored to common package,
* com.raytheon.uf.common.dataplugin.ccfp.
* *
* *
* </pre> * </pre>

View file

@ -18,7 +18,7 @@
* further licensing information. * further licensing information.
**/ **/
package com.raytheon.edex.plugin.ccfp; package com.raytheon.uf.common.dataplugin.ccfp;
import javax.persistence.Access; import javax.persistence.Access;
import javax.persistence.AccessType; import javax.persistence.AccessType;
@ -56,6 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* PluginDataObject. * PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Nov 01, 2013 2361 njensen Remove XML annotations * Nov 01, 2013 2361 njensen Remove XML annotations
* Apr 15, 2014 3001 bgonzale Refactored to common package,
* com.raytheon.uf.common.dataplugin.ccfp.
* *
* *
* </pre> * </pre>

View file

@ -38,6 +38,13 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="com.raytheon.uf.common.dataplugin.ccfp"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin <plugin
id="com.raytheon.uf.common.dataplugin.cwa" id="com.raytheon.uf.common.dataplugin.cwa"
download-size="0" download-size="0"

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.edex.plugin.ccfp</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>