Merge branch 'development' into development_on_RHEL6

Former-commit-id: 1a9ff8df10 [formerly 2e0db025f3] [formerly a956fd7f4d [formerly 1e8e1f73bdbb02ee2f8c91d4a2128ea0d77cf084]]
Former-commit-id: a956fd7f4d
Former-commit-id: 6d20cd89ff
This commit is contained in:
Steve Harris 2013-11-04 20:29:07 -06:00
commit 02907147b6
254 changed files with 5727 additions and 4954 deletions

View file

@ -1,25 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Collaboratioin
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.comm
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.comm;singleton:=true
Bundle-Version: 1.13.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.collaboration.comm.Activator
Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ecf;bundle-version="3.1.300";visibility:=reexport,
org.eclipse.ecf.presence;bundle-version="2.0.0",
org.eclipse.ecf.provider.xmpp;bundle-version="3.2.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.google.guava;bundle-version="1.0.0";visibility:=reexport,
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
com.raytheon.uf.common.status;bundle-version="1.12.1174",
org.jivesoftware.smack;bundle-version="3.1.100",
org.eclipse.swt;bundle-version="3.6.1",
com.raytheon.uf.common.comm,
com.raytheon.uf.common.localization
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ecf,
org.eclipse.ecf.presence,
org.eclipse.ecf.provider.xmpp,
org.apache.commons.lang,
com.google.guava;visibility:=reexport,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.status,
org.jivesoftware.smack,
org.eclipse.swt,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.localization,
com.raytheon.uf.viz.core
Export-Package: com.raytheon.uf.viz.collaboration.comm,
com.raytheon.uf.viz.collaboration.comm.compression,
com.raytheon.uf.viz.collaboration.comm.identity,

View file

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

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="com.raytheon.uf.viz.collaboration.xml" name="Collaboration Xml Objects" schema="schema/com.raytheon.uf.viz.collaboration.xml.exsd"/>
</plugin>

View file

@ -0,0 +1,78 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="com.raytheon.uf.viz.collaboration.comm" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="com.raytheon.uf.viz.collaboration.comm" id="com.raytheon.uf.viz.collaboration.xml" name="Collaboration Xml Objects"/>
</appinfo>
<documentation>
Extension point for specifying what types of objects can be the xml root of a collaboraton xml object.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="xmlRoot"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="xmlRoot">
<complexType>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
1.13.0
</documentation>
</annotation>
</schema>

View file

@ -0,0 +1,155 @@
/**
* 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.collaboration.comm.provider;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.JAXBException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import com.raytheon.uf.common.serialization.JAXBManager;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.jaxb.JAXBClassLocator;
import com.raytheon.uf.common.serialization.jaxb.JaxbDummyObject;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager;
import com.raytheon.uf.viz.core.reflect.SubClassLocator;
/**
* Loads the XML context for all collaboration objects by using the xmlRoot
* objects defined in an extension point.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Oct 31, 2013 2491 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class CollaborationXmlManager {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(CollaborationXmlManager.class);
private static final String EXTENSION_ID = "com.raytheon.uf.viz.collaboration.xml";
private static CollaborationXmlManager instance;
private final JAXBManager manager;
private CollaborationXmlManager() {
manager = initManager();
}
private JAXBManager initManager() {
List<Class<?>> baseClasses = new ArrayList<Class<?>>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
if (point != null) {
IExtension[] extensions = point.getExtensions();
for (int i = 0; i < extensions.length; i++) {
IConfigurationElement[] config = extensions[i]
.getConfigurationElements();
for (int j = 0; j < config.length; j++) {
try {
baseClasses.add(config[j].createExecutableExtension(
"class").getClass());
} catch (CoreException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
}
}
}
SubClassLocator locator = new SubClassLocator();
Collection<Class<?>> classes = JAXBClassLocator.getJAXBClasses(locator,
baseClasses.toArray(new Class<?>[0]));
locator.save();
Class<?>[] jaxbClasses = new Class<?>[classes.size() + 1];
classes.toArray(jaxbClasses);
/*
* Add JaxbDummyObject at the begining so properties are loaded
* correctly
*/
jaxbClasses[jaxbClasses.length - 1] = jaxbClasses[0];
jaxbClasses[0] = JaxbDummyObject.class;
try {
return new JAXBManager(jaxbClasses);
} catch (JAXBException e) {
statusHandler.handle(Priority.PROBLEM,
ProcedureXmlManager.class.getSimpleName()
+ " Failed to initialize.", e);
}
return null;
}
private JAXBManager getManager() throws SerializationException {
if (manager == null) {
throw new SerializationException(
ProcedureXmlManager.class.getSimpleName()
+ " Failed to initialize.");
}
return manager;
}
public Object unmarshal(String xml) throws SerializationException {
try {
return getManager().unmarshalFromXml(xml);
} catch (JAXBException e) {
throw new SerializationException(e);
}
}
public String marshal(Object obj) throws SerializationException {
try {
return getManager().marshalToXml(obj);
} catch (JAXBException e) {
throw new SerializationException(e);
}
}
public static synchronized CollaborationXmlManager getInstance() {
if (instance == null) {
instance = new CollaborationXmlManager();
}
return instance;
}
}

View file

@ -19,8 +19,6 @@
**/
package com.raytheon.uf.viz.collaboration.comm.provider;
import javax.xml.bind.JAXBException;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.util.Base64;
@ -30,15 +28,18 @@ import com.raytheon.uf.viz.collaboration.comm.compression.CompressionUtil;
import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
/**
* TODO Add Description
* Provides some utility methods for parsing and serializing/deserializing data.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 7, 2012 jkorman Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Mar 07, 2012 jkorman Initial creation
* Oct 31, 2013 2491 bsteffen Use CollaborationXmlManager for xml
* serialization.
*
*
* </pre>
*
@ -55,9 +56,9 @@ public abstract class Tools {
public static final String PROP_SESSION_ID = "sessionId";
public static final String CMD_PREAMBLE = "[[COMMAND#";
public static final String CONFIG_PREAMBLE = "[[CONFIG#";
public static final String DIRECTIVE_SUFFIX = "]]";
private static final String ENV_THRIFT = CMD_PREAMBLE
@ -275,14 +276,16 @@ public abstract class Tools {
}
case JAXB: {
try {
CollaborationXmlManager jaxb = CollaborationXmlManager
.getInstance();
if (COMPRESSION_OFF) {
String s = SerializationUtil.marshalToXml(data);
String s = jaxb.marshal(data);
if (s != null) {
sb.append(ENV_JAXB);
sb.append(s);
}
} else {
String rawString = SerializationUtil.marshalToXml(data);
String rawString = jaxb.marshal(data);
marshalledBinary = CompressionUtil.compress(rawString
.getBytes());
sb.append(ENV_JAXB_COMPRESSED);
@ -334,7 +337,8 @@ public abstract class Tools {
String s = data.substring(ENV_THRIFT.length());
try {
byte[] b = decodeFromBase64(s);
unMarshalledData = SerializationUtil.transformFromThrift(b);
unMarshalledData = SerializationUtil.transformFromThrift(
Object.class, b);
} catch (SerializationException e) {
throw new CollaborationException(
"Could not deserialize object", e);
@ -346,8 +350,8 @@ public abstract class Tools {
byte[] uncompressedBytes = CompressionUtil
.uncompress(rawBytes);
unMarshalledData = SerializationUtil
.transformFromThrift(uncompressedBytes);
unMarshalledData = SerializationUtil.transformFromThrift(
Object.class, uncompressedBytes);
// unMarshalledData = SerializationUtil
// .transformFromThrift(createCompressionInputStream(rawBytes));
} catch (Exception e) {
@ -357,8 +361,9 @@ public abstract class Tools {
} else if (data.startsWith(ENV_JAXB)) {
String s = data.substring(ENV_JAXB.length());
try {
unMarshalledData = SerializationUtil.unmarshalFromXml(s);
} catch (JAXBException je) {
unMarshalledData = CollaborationXmlManager.getInstance()
.unmarshal(s);
} catch (SerializationException je) {
throw new CollaborationException(
"[JAXB] Could not deserialize object", je);
}
@ -366,9 +371,10 @@ public abstract class Tools {
String rawString = data.substring(ENV_JAXB_COMPRESSED.length());
try {
byte[] rawBytes = decodeFromBase64(rawString);
unMarshalledData = SerializationUtil
.unmarshalFromXml(new String(CompressionUtil
.uncompress(rawBytes)));
unMarshalledData = CollaborationXmlManager.getInstance()
.unmarshal(
new String(CompressionUtil
.uncompress(rawBytes)));
// unMarshalledData = SerializationUtil
// .unmarshalFromXml(createCompressionInputStream(rawBytes));
} catch (Exception je) {

View file

@ -1,26 +1,27 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Display
Bundle-Name: Collaboration Display
Bundle-SymbolicName: com.raytheon.uf.viz.collaboration.display;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.13.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.collaboration.display.Activator
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
Require-Bundle: org.eclipse.core.runtime,
com.raytheon.uf.viz.core,
com.raytheon.viz.ui,
org.eclipse.ui;bundle-version="3.6.1",
org.eclipse.ui,
org.eclipse.ecf,
com.raytheon.uf.viz.collaboration.comm,
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
com.raytheon.uf.viz.remote.graphics;bundle-version="1.0.0",
com.raytheon.uf.viz.drawing;bundle-version="1.0.0",
com.raytheon.uf.common.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.time;bundle-version="1.12.1174",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
com.raytheon.uf.common.util;bundle-version="1.12.1174",
com.raytheon.viz.core;bundle-version="1.12.1174"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
com.raytheon.uf.common.colormap,
com.raytheon.uf.viz.remote.graphics,
com.raytheon.uf.viz.drawing,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.time,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.util,
com.raytheon.viz.core
Export-Package: com.raytheon.uf.viz.collaboration.display,
com.raytheon.uf.viz.collaboration.display.data,
com.raytheon.uf.viz.collaboration.display.editor,

View file

@ -1,4 +0,0 @@
com.raytheon.uf.viz.collaboration.display.editor.CreateRemoteDisplay
com.raytheon.uf.viz.collaboration.display.rsc.event.SharedResource
com.raytheon.uf.viz.collaboration.display.rsc.event.ResourceCapabilityChanged
com.raytheon.uf.viz.collaboration.display.rsc.event.ResourcePropertiesChanged

View file

@ -21,4 +21,10 @@
class="com.raytheon.uf.viz.collaboration.display.rsc.rendering.PrimitiveRenderingHandler">
</renderingExtension>
</extension>
</plugin>
<extension point="com.raytheon.uf.viz.collaboration.xml">
<xmlRoot class="com.raytheon.uf.viz.collaboration.display.editor.CreateRemoteDisplay" />
<xmlRoot class="com.raytheon.uf.viz.collaboration.display.rsc.event.SharedResource" />
<xmlRoot class="com.raytheon.uf.viz.collaboration.display.rsc.event.ResourceCapabilityChanged" />
<xmlRoot class="com.raytheon.uf.viz.collaboration.display.rsc.event.ResourcePropertiesChanged" />
</extension>
</plugin>

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
/**
@ -37,9 +36,11 @@ import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 16, 2012 njensen Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Mar 16, 2012 njensen Initial creation
* Oct 31, 2013 2491 bsteffen Remove ISerializableObject
*
*
* </pre>
*
@ -49,7 +50,7 @@ import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class CreateRemoteDisplay implements ISerializableObject {
public class CreateRemoteDisplay {
@XmlAttribute
private int displayId;

View file

@ -24,7 +24,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
/**
@ -34,9 +33,10 @@ import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 26, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Sep 26, 2012 mschenke Initial creation
* Oct 31, 2013 2491 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -45,8 +45,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class ResourceCapabilityChanged extends AbstractResourceChangedEvent
implements ISerializableObject {
public class ResourceCapabilityChanged extends AbstractResourceChangedEvent {
@XmlElement
private AbstractCapability capability;

View file

@ -24,7 +24,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
/**
@ -34,9 +33,10 @@ import com.raytheon.uf.viz.core.rsc.ResourceProperties;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 28, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Sep 28, 2012 mschenke Initial creation
* Oct 31, 2013 2491 bsteffen Remove ISerializableObject
*
* </pre>
*
@ -45,8 +45,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceProperties;
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class ResourcePropertiesChanged extends AbstractResourceChangedEvent
implements ISerializableObject {
public class ResourcePropertiesChanged extends AbstractResourceChangedEvent {
@XmlElement
private ResourceProperties properties;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.viz.core.drawables.ResourcePair;
/**
@ -36,9 +35,11 @@ import com.raytheon.uf.viz.core.drawables.ResourcePair;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 10, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 10, 2012 mschenke Initial creation
* Oct 31, 2013 2491 bsteffen Remove ISerializableObject
*
*
* </pre>
*
@ -47,7 +48,7 @@ import com.raytheon.uf.viz.core.drawables.ResourcePair;
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SharedResource implements ISerializableObject {
public class SharedResource {
@XmlAttribute
private int displayId;

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.d2d.gfe.rsc.GFEGridResourceData

View file

@ -83,6 +83,7 @@ import com.raytheon.uf.viz.datadelivery.utils.NotificationHandler;
* Sep 16, 2013 2375 mpduff Removed initial sorting.
* Sep 26, 2013 2417 mpduff Fix the find all row selection.
* Oct 15, 2013 2451 skorolev Get highlighted rows after message update.
* Nov 01, 2013 2431 skorolev Changed labels on the table.
* </pre>
*
* @author lvenable
@ -512,6 +513,9 @@ public class NotificationTableComp extends TableComp implements ITableFind {
int endRow = endIndex + 1;
String selection = null;
// Total number of enable rows
int numTotal = this.getMasterTableList().getDataArray().size();
// Total number of rows in the filteredTableList used in bottom right
// hand corner
numRows = filteredTableList.getDataArray().size();
@ -565,18 +569,19 @@ public class NotificationTableComp extends TableComp implements ITableFind {
.setText("No rows to display. Please check the configuration and "
+ "filtering options.");
} else if (startIndex == endIndex) {
numRowsLbl.setText(ROW + startRow + " of " + numRows);
numRowsLbl.setText(ROW + startRow + " from " + numRows + " of "
+ numTotal);
// Initial Load with over the number of configured records per page
} else if (startIndex == 0 && (numRows > pageConfig)) {
numRowsLbl.setText(ROWS + startRow + " - " + pageConfig + " of "
+ numRows);
numRowsLbl.setText(ROWS + startRow + " - " + pageConfig + " from "
+ numRows + " of " + numTotal);
// Number of records are less than the page config
} else if (numRows < pageConfig) {
numRowsLbl.setText(ROWS + startRow + " - " + endRow + " of "
+ numRows);
numRowsLbl.setText(ROWS + startRow + " - " + endRow + " from "
+ numRows + " of " + numTotal);
} else if (numRowsLbl != null) {
numRowsLbl.setText(ROWS + startRow + " - " + endRow + " of "
+ numRows);
numRowsLbl.setText(ROWS + startRow + " - " + endRow + " from "
+ numRows + " of " + numTotal);
}
deleteFlag = false;

View file

@ -23,7 +23,9 @@ import java.util.ArrayList;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
@ -55,6 +57,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Oct 31, 2012 1278 mpduff Added functionality for other datasets in NOMADS.
* Jun 21, 2013 2132 mpduff Convert coordinates to East/West before drawing.
* Oct 10, 2013 2428 skorolev Fixed memory leak for Regions
* Oct 24, 2013 2486 skorolev Fixed an error of editing subset box.
*
* </pre>
*
@ -121,6 +124,9 @@ public class DrawBoxResource extends
/** The x value of the 360 degree longitude line */
private double x360;
/** Map pixel rectangle */
private Rectangle mapRctgl;
/**
* @param resourceData
* @param loadProperties
@ -137,9 +143,7 @@ public class DrawBoxResource extends
*/
@Override
protected void disposeInternal() {
for (Region i : regionList) {
i.dispose();
}
this.disposeRegions();
}
/*
@ -184,6 +188,20 @@ public class DrawBoxResource extends
c.y = 0;
double[] point360 = getResourceContainer().translateInverseClick(c);
this.x360 = Math.round(point360[0]);
getMapRectangle();
// Create initial regions
if ((c1 != null) && (c2 != null)) {
double[] luBox = getResourceContainer().translateInverseClick(c1);
x1 = (int) luBox[0];
y1 = (int) luBox[1];
double[] rbBox = getResourceContainer().translateInverseClick(c2);
x2 = (int) rbBox[0];
y2 = (int) rbBox[1];
createRegions();
}
}
/*
@ -217,15 +235,18 @@ public class DrawBoxResource extends
@Override
public boolean handleMouseDown(int x, int y, int mouseButton) {
if (mouseButton == 1) {
if (!resizingBox) {
x1 = x;
y1 = y;
c1 = getResourceContainer().translateClick(x, y);
if (c1 != null) {
c1.x = spatialUtils.convertToEasting(c1.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c1.x += 360;
// handle mouse only in the map space
if (mapRctgl.contains(x, y)) {
if (!resizingBox) {
x1 = x;
y1 = y;
c1 = getResourceContainer().translateClick(x, y);
if (c1 != null) {
c1.x = spatialUtils.convertToEasting(c1.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c1.x += 360;
}
}
}
}
@ -245,45 +266,51 @@ public class DrawBoxResource extends
public boolean handleMouseDownMove(int x, int y, int mouseButton) {
if (mouseButton == 1) {
drawingBox = true;
if (resizingBox) {
Coordinate c = getResourceContainer().translateClick(x, y);
if (c != null) {
if (boxSide == 0) {
c1.y = c.y;
} else if (boxSide == 1) {
c1.x = c.x;
c1.x = spatialUtils.convertToEasting(c1.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c1.x += 360;
// handle mouse only in the map space
if (mapRctgl.contains(x, y)) {
if (resizingBox) {
Coordinate c = getResourceContainer().translateClick(x,
y);
if (c != null) {
if (boxSide == 0) {
c1.y = c.y;
} else if (boxSide == 1) {
c1.x = c.x;
c1.x = spatialUtils.convertToEasting(c1.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c1.x += 360;
}
} else if (boxSide == 2) {
c2.y = c.y;
} else if (boxSide == 3) {
c2.x = c.x;
c2.x = spatialUtils.convertToEasting(c2.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c2.x += 360;
}
}
} else if (boxSide == 2) {
c2.y = c.y;
} else if (boxSide == 3) {
c2.x = c.x;
}
} else {
c2 = getResourceContainer().translateClick(x, y);
if (c2 != null) {
c2.x = spatialUtils.convertToEasting(c2.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c2.x += 360;
}
}
x2 = x;
y2 = y;
}
} else {
c2 = getResourceContainer().translateClick(x, y);
if (c2 != null) {
c2.x = spatialUtils.convertToEasting(c2.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c2.x += 360;
}
}
}
fireBoxChangedEvent();
createRegions();
target.setNeedsRefresh(true);
fireBoxChangedEvent();
target.setNeedsRefresh(true);
}
} else if (mouseButton == 2) {
super.handleMouseDownMove(x, y, 1);
}
return true;
@ -328,59 +355,72 @@ public class DrawBoxResource extends
@Override
public boolean handleMouseUp(int x, int y, int mouseButton) {
if (mouseButton == 1) {
if (resizingBox) {
Coordinate c = getResourceContainer().translateClick(x, y);
if (c != null) {
c.x = spatialUtils.convertToEasting(c.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c.x += 360;
}
if (boxSide == 0) {
c1.y = c.y;
y1 = y;
} else if (boxSide == 1) {
c1.x = c.x;
x1 = x;
} else if (boxSide == 2) {
c2.y = c.y;
y2 = y;
} else if (boxSide == 3) {
c2.x = c.x;
x2 = x;
}
createRegions();
fireBoxChangedEvent();
target.setNeedsRefresh(true);
drawingBox = false;
}
} else {
if (drawingBox) {
x2 = x;
y2 = y;
target.setNeedsRefresh(true);
c2 = getResourceContainer().translateClick(x, y);
if (c2 != null) {
c2.x = spatialUtils.convertToEasting(c2.x);
// handle mouse only in the map space
if (mapRctgl.contains(x, y)) {
if (resizingBox) {
Coordinate c = getResourceContainer().translateClick(x,
y);
if (c != null) {
c.x = spatialUtils.convertToEasting(c.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c2.x += 360;
c.x += 360;
}
if (boxSide == 0) {
c1.y = c.y;
y1 = y;
} else if (boxSide == 1) {
c1.x = c.x;
x1 = x;
} else if (boxSide == 2) {
c2.y = c.y;
y2 = y;
} else if (boxSide == 3) {
c2.x = c.x;
x2 = x;
}
}
createRegions();
fireBoxChangedEvent();
drawingBox = false;
} else {
c1 = getResourceContainer().translateClick(x, y);
if (drawingBox) {
x2 = x;
y2 = y;
c2 = getResourceContainer().translateClick(x, y);
if (c2 != null) {
c2.x = spatialUtils.convertToEasting(c2.x);
if (spatialUtils.getLongitudinalShift() > 0
&& x >= x360) {
c2.x += 360;
}
}
} else {
c1 = getResourceContainer().translateClick(x, y);
}
}
}
createRegions();
target.setNeedsRefresh(true);
fireBoxChangedEvent();
drawingBox = false;
} else if (mouseButton == 2) {
super.handleMouseDown(x, y, 1);
super.handleMouseUp(x, y, 1);
getMapRectangle();
}
return true;
}
/*
* Turn off mouse wheel.
*
* (non-Javadoc)
*
* @see
* com.raytheon.viz.ui.input.PanHandler#handleMouseWheel(org.eclipse
* .swt.widgets.Event, int, int)
*/
@Override
public boolean handleMouseWheel(Event event, int x, int y) {
return false;
}
}
/**
@ -424,7 +464,9 @@ public class DrawBoxResource extends
* Create the regions for the mouseover for resizing the existing box
*/
private void createRegions() {
regionList.clear();
if (!regionList.isEmpty()) {
disposeRegions();
}
int buffer = 10;
// Top
@ -520,4 +562,35 @@ public class DrawBoxResource extends
public void setSpatialUtils(SpatialUtils spatialUtils) {
this.spatialUtils = spatialUtils;
}
/**
* Dispose regions.
*/
private void disposeRegions() {
for (Region i : regionList) {
i.dispose();
}
regionList.clear();
}
/**
* Map's rectangle in pixels
*/
private void getMapRectangle() {
Coordinate top = new Coordinate();
top.x = spatialUtils.getUpperLeft().x;
top.y = spatialUtils.getUpperLeft().y;
double[] pointTop = getResourceContainer().translateInverseClick(top);
int xTop = (int) Math.round(pointTop[0]);
int yTop = (int) Math.round(pointTop[1]);
Coordinate bot = new Coordinate();
bot.x = spatialUtils.getLowerRight().x;
bot.y = spatialUtils.getLowerRight().y;
double[] pointBot = getResourceContainer().translateInverseClick(bot);
int xBottom = (int) Math.round(pointBot[0]);
int yBottom = (int) Math.round(pointBot[1]);
mapRctgl = new Rectangle(xTop, yTop, (xBottom - xTop), (yBottom - yTop));
}
}

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.gisdatastore.directory.rsc.DirectoryDataStoreResourceData

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.monitor.util.MonitorPlotInfoRetriever

View file

@ -405,6 +405,8 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
} else {
throw new VizException(msg, e);
}
} else {
serverResponse = responseContainer[0];
}
}

View file

@ -1,2 +0,0 @@
com.raytheon.viz.hydro.timeseries.ShefIssueXML
com.raytheon.viz.hydro.appsdefaults.SHEFAppsDefaultsXML

View file

@ -23,6 +23,8 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXB;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
@ -39,8 +41,6 @@ import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.ohd.AppsDefaults;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -57,7 +57,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* ------------ ---------- ----------- --------------------------
* Jan 26, 2011 mpduff Initial creation
* Dec 07, 2012 1353 rferrel Make non-blocking dialog.
* Aug 09, 2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR
* Aug 09, 2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR
* Nov 04, 2013 2361 njensen Use JAXB instead of SerializationUtil
*
* </pre>
*
@ -170,17 +171,14 @@ public class SHEFAppsDefaultsDlg extends CaveSWTDialog {
IPathManager pm = PathManagerFactory.getPathManager();
System.out.println("Searching for " + CONFIG_FILE_NAME);
File file = pm.getStaticFile(this.CONFIG_FILE_NAME);
String configPath = null;
if (file != null) {
configPath = file.getAbsolutePath();
try {
SHEFAppsDefaultsXML xml = SerializationUtil
.jaxbUnmarshalFromXmlFile(SHEFAppsDefaultsXML.class,
configPath);
SHEFAppsDefaultsXML xml = JAXB.unmarshal(file,
SHEFAppsDefaultsXML.class);
for (String token : xml.getTokenList()) {
tokenList.add(token);
}
} catch (SerializationException e) {
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage(), e);
}
} else {

View file

@ -28,7 +28,9 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/**
* Shef Issue Configuration Manager.
@ -39,7 +41,8 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 28, 2011 mpduff Initial creation
* Mar 28, 2011 mpduff Initial creation
* Nov 04, 2013 2361 njensen Use JAXBManager for XML
*
* </pre>
*
@ -48,6 +51,13 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
*/
public class ShefIssueMgr {
private static final SingleTypeJAXBManager<ShefIssueXML> jaxb = SingleTypeJAXBManager
.createWithoutException(ShefIssueXML.class);
private final IUFStatusHandler statusHandler = UFStatus
.getHandler(ShefIssueMgr.class);
private static ShefIssueMgr instance = null;
private ShefIssueXML xml = null;
@ -69,10 +79,11 @@ public class ShefIssueMgr {
}
private void readXML() {
LocalizationFile file = null;
try {
IPathManager pm = PathManagerFactory.getPathManager();
Map<LocalizationLevel, LocalizationFile> shefIssueMap = pm.getTieredLocalizationFile(LocalizationType.COMMON_STATIC, "hydro" + File.separatorChar + "shefIssue.xml");
LocalizationFile file = null;
if (shefIssueMap.containsKey(LocalizationLevel.SITE)) {
file = shefIssueMap.get(LocalizationLevel.SITE);
@ -81,13 +92,13 @@ public class ShefIssueMgr {
}
if (file != null) {
xml = (ShefIssueXML) SerializationUtil
.jaxbUnmarshalFromXmlFile(file.getFile().getAbsolutePath());
xml = jaxb
.unmarshalFromXmlFile(file.getFile());
} else {
xml = new ShefIssueXML();
}
} catch (Exception e) {
e.printStackTrace();
statusHandler.error("Error reading " + file.getName(), e);
}
}
@ -119,11 +130,11 @@ public class ShefIssueMgr {
if (xml == null) {
xml = new ShefIssueXML();
}
SerializationUtil.jaxbMarshalToXmlFile(xml, newXmlFile
jaxb.marshalToXmlFile(xml, newXmlFile
.getFile().getAbsolutePath());
newXmlFile.save();
} catch (Exception e) {
e.printStackTrace();
statusHandler.error("Error writing " + newXmlFile.getName(), e);
}
}
}

View file

@ -1,2 +0,0 @@
com.raytheon.viz.redbook.RedbookWMOMap
com.raytheon.viz.redbook.rsc.RedbookProductBrowserDataDefinition

View file

@ -22,14 +22,13 @@ package com.raytheon.viz.redbook;
import java.io.File;
import java.util.HashMap;
import javax.xml.bind.JAXB;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.SerializationUtil;
/**
* Returns the redbook WMO prefix to human readable name
@ -39,6 +38,7 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 30, 2008 chammack Initial creation
* Nov 04, 2013 2361 njensen Use JAXB instead of SerializationUtil
*
* </pre>
*
@ -47,10 +47,10 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RedbookWMOMap implements ISerializableObject {
public class RedbookWMOMap {
@XmlAccessorType(XmlAccessType.FIELD)
public static class Info implements ISerializableObject {
public static class Info {
public String name;
@XmlElement(required = false)
@ -63,8 +63,8 @@ public class RedbookWMOMap implements ISerializableObject {
File file = PathManagerFactory.getPathManager().getStaticFile(
"redbook/redbookMapping.xml");
try {
RedbookWMOMap map = (RedbookWMOMap) SerializationUtil
.jaxbUnmarshalFromXmlFile(file.getAbsolutePath());
RedbookWMOMap map = JAXB.unmarshal(file, RedbookWMOMap.class);
// add ability for comma separated values in xml file
RedbookWMOMap secondMap = new RedbookWMOMap();
secondMap.mapping = new HashMap<String, Info>();

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Cxf
Bundle-SymbolicName: org.apache.commons.cxf
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 2.5.10.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: FastInfoset-1.2.9.jar,
geronimo-activation_1.1_spec-1.1.jar,

View file

@ -1,9 +0,0 @@
com.raytheon.edex.plugin.bufrmos.common.BufrMosData
com.raytheon.edex.plugin.bufrmos.common.BufrMosDataLocation
com.raytheon.edex.plugin.bufrmos.common.BufrMosAvnData
com.raytheon.edex.plugin.bufrmos.common.BufrMosEtaData
com.raytheon.edex.plugin.bufrmos.common.BufrMosGfsData
com.raytheon.edex.plugin.bufrmos.common.BufrMosHpcData
com.raytheon.edex.plugin.bufrmos.common.BufrMosLampData
com.raytheon.edex.plugin.bufrmos.common.BufrMosMrfData
com.raytheon.edex.plugin.bufrmos.common.BufrMosNgmData

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -53,6 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 19, 2013 2275 bsteffen Add dataURI column back into bufrmos
* types.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -73,8 +71,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosAvn_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosAvnData extends BufrMosData {
@Override

View file

@ -28,11 +28,6 @@ import javax.persistence.MappedSuperclass;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SequenceGenerator;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
@ -59,6 +54,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Entity annotation to MappedSuperClass.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +64,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@MappedSuperclass
@SequenceGenerator(name = PluginDataObject.ID_GEN)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public abstract class BufrMosData extends PersistablePluginDataObject implements
IPersistable, IPointData {
@ -84,7 +78,6 @@ public abstract class BufrMosData extends PersistablePluginDataObject implements
// Text of the WMO header
@Transient
@XmlAttribute
@DynamicSerializeElement
private String wmoHeader;
@ -95,7 +88,6 @@ public abstract class BufrMosData extends PersistablePluginDataObject implements
@ManyToOne(cascade = { CascadeType.REFRESH })
@PrimaryKeyJoinColumn
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private BufrMosDataLocation location;

View file

@ -24,10 +24,6 @@ import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Jun 28, 2012 827 dgilling Annotate id field for serialization.
* Jul 26, 2013 1051 bsteffen Discard bufrmos data with invalid
* location.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -58,8 +55,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "bufrmos_location", uniqueConstraints = { @UniqueConstraint(columnNames = {
"stationId", "latitude", "longitude" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosDataLocation extends PersistableDataObject {
private static final long serialVersionUID = 1L;
@ -73,19 +68,16 @@ public class BufrMosDataLocation extends PersistableDataObject {
@Column(length = 48)
@Index(name = "mosLocationStationIndex")
@DataURI(position = 0)
@XmlAttribute
@DynamicSerializeElement
private String stationId;
@DataURI(position = 1)
@Column
@XmlAttribute
@DynamicSerializeElement
private Double latitude;
@DataURI(position = 2)
@Column
@XmlAttribute
@DynamicSerializeElement
private Double longitude;

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +66,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosEta_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosEtaData extends BufrMosData {
@Override

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +66,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosGfs_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosGfsData extends BufrMosData {
@Override

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -53,6 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 19, 2013 2275 bsteffen Add dataURI column back into bufrmos
* types.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -73,8 +71,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosHpc_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosHpcData extends BufrMosData {
@Override

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +66,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosLamp_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosLampData extends BufrMosData {
@Override

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +66,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosMrf_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosMrfData extends BufrMosData {
@Override

View file

@ -26,9 +26,6 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
@ -49,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -68,8 +66,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Index(name = "bufrmosNgm_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BufrMosNgmData extends BufrMosData {
@Override

View file

@ -1,2 +0,0 @@
com.raytheon.edex.plugin.ccfp.CcfpRecord
com.raytheon.edex.plugin.ccfp.CcfpLocation

View file

@ -22,17 +22,12 @@ package com.raytheon.edex.plugin.ccfp;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.hibernate.annotations.Type;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.serialization.adapters.GeometryAdapter;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.vividsolutions.jts.geom.Geometry;
@ -50,6 +45,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 17, 2009 3072 bsteffen Fixed type of geometry
* Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate-
* spatial
* Nov 01, 2013 2361 njensen Remove XML annotations
*
*
* </pre>
@ -58,7 +54,6 @@ import com.vividsolutions.jts.geom.Geometry;
* @version 1
*/
@Embeddable
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class CcfpLocation implements ISpatialObject {
@ -66,20 +61,17 @@ public class CcfpLocation implements ISpatialObject {
@Column(name = "location")
@Type(type = "org.hibernatespatial.GeometryUserType")
@XmlJavaTypeAdapter(value = GeometryAdapter.class)
@DynamicSerializeElement
private Geometry geometry;
@DataURI(position = 0)
@Column
@DynamicSerializeElement
@XmlElement
private double boxLat;
@DataURI(position = 1)
@Column
@DynamicSerializeElement
@XmlElement
private double boxLong;
@Override

View file

@ -28,15 +28,9 @@ import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
@ -61,6 +55,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Nov 01, 2013 2361 njensen Remove XML annotations
*
*
* </pre>
@ -77,8 +72,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@org.hibernate.annotations.Table(appliesTo = "ccfp", indexes = { @Index(name = "ccfp_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class CcfpRecord extends PluginDataObject implements ISpatialEnabled {
@ -86,48 +79,39 @@ public class CcfpRecord extends PluginDataObject implements ISpatialEnabled {
@DataURI(position = 1)
@Column(length = 8)
@XmlAttribute
@DynamicSerializeElement
private String producttype;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer coverage;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer conf;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer growth;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer tops;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer speed;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer direction;
@Column
@DynamicSerializeElement
@XmlElement
private Boolean canadaflag;
@DataURI(position = 2, embedded = true)
@Embedded
@XmlElement
@DynamicSerializeElement
private CcfpLocation location;
@ -159,12 +143,6 @@ public class CcfpRecord extends PluginDataObject implements ISpatialEnabled {
super(uri);
}
@Override
public IDecoderGettable getDecoderGettable() {
// TODO Auto-generated method stub
return null;
}
public java.lang.String getProducttype() {
return producttype;
}

View file

@ -1,2 +0,0 @@
com.raytheon.edex.plugin.redbook.common.RedbookRecord
com.raytheon.edex.plugin.redbook.decoder.RedbookFcstMap

View file

@ -31,14 +31,9 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
@ -72,6 +67,7 @@ import com.raytheon.uf.common.time.DataTime;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Nov 04, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -87,8 +83,6 @@ import com.raytheon.uf.common.time.DataTime;
*/
@org.hibernate.annotations.Table(appliesTo = "redbook", indexes = { @Index(name = "redbook_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class RedbookRecord extends PersistablePluginDataObject implements
IPersistable, Cloneable {
@ -99,57 +93,48 @@ public class RedbookRecord extends PersistablePluginDataObject implements
// Time of the observation.
@Column
@XmlAttribute
@DynamicSerializeElement
private Calendar timeObs;
@DataURI(position = 1)
@Column(length = 8)
@XmlAttribute
@DynamicSerializeElement
private String wmoTTAAii;
// Text of the WMO header
@Column(length = 16)
@XmlAttribute
@DynamicSerializeElement
private String wmoCCCCdt;
// Correction indicator from wmo header
@DataURI(position = 3)
@Column(length = 8)
@XmlAttribute
@DynamicSerializeElement
private String corIndicator;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer retentionHours;
@DataURI(position = 5)
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer fcstHours;
// varchar(15)
@DataURI(position = 2)
@Column(length = 15)
@XmlAttribute
@DynamicSerializeElement
private String productId;
@DataURI(position = 6)
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer fileId;
// varchar(4)
@DataURI(position = 4)
@Column(length = 4)
@XmlAttribute
@DynamicSerializeElement
private String originatorId;
@ -335,16 +320,6 @@ public class RedbookRecord extends PersistablePluginDataObject implements
this.redBookData = redBookData;
}
/**
* Get the IDecoderGettable reference for this record.
*
* @return This class does not implement IDecoderGettable, return null.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
/**
* @return a mostly shallow copy of the RedbookRecord with the reference
* time set back one minute. Clears the id and dataURI fields of the

View file

@ -21,6 +21,7 @@ package com.raytheon.edex.plugin.redbook.decoder;
import java.util.HashMap;
import javax.xml.bind.JAXB;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -33,9 +34,6 @@ import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -48,9 +46,10 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ----------- ----------- --------------------------
* 20101022 6424 kshrestha Add fcsttime
* Apr 29, 2013 1958 bgonzale Map is loaded once, and then
* Apr 29, 2013 1958 bgonzale Map is loaded once, and then
* not loaded again unless the mapping
* file changes.
* Nov 04, 2013 2361 njensen Use JAXB for XML instead of SerializationUtil
*
* </pre>
*
@ -59,7 +58,8 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RedbookFcstMap implements ISerializableObject {
public class RedbookFcstMap {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(RedbookFcstMap.class);
@ -90,9 +90,8 @@ public class RedbookFcstMap implements ISerializableObject {
private static RedbookFcstMap load(LocalizationFile xmlFile) {
RedbookFcstMap loadedMap = null;
try {
loadedMap = SerializationUtil.jaxbUnmarshalFromXmlFile(
RedbookFcstMap.class, xmlFile.getFile().getAbsolutePath());
} catch (SerializationException e) {
loadedMap = JAXB.unmarshal(xmlFile.getFile(), RedbookFcstMap.class);
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, e.getMessage(), e);
}
return loadedMap;

View file

@ -1,8 +0,0 @@
com.raytheon.edex.plugin.taf.common.TafRecord
com.raytheon.edex.plugin.taf.common.ChangeGroup
com.raytheon.edex.plugin.taf.common.IcingLayer
com.raytheon.edex.plugin.taf.common.TafPeriod
com.raytheon.edex.plugin.taf.common.TafSkyCover
com.raytheon.edex.plugin.taf.common.TafWeatherCondition
com.raytheon.edex.plugin.taf.common.TemperatureForecast
com.raytheon.edex.plugin.taf.common.TurbulenceLayer

View file

@ -58,13 +58,8 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
@ -86,6 +81,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* Oct 21, 2008 1515 jkorman Added 30 Hour capability changes.
* Jun 28, 2012 #827 dgilling Annotate id field for
* serialization.
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -95,9 +91,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
@Entity
@Table(name = "taf_change_groups")
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class ChangeGroup extends PersistableDataObject implements
ISerializableObject {
public class ChangeGroup extends PersistableDataObject {
private static final long serialVersionUID = 1L;
@ -124,7 +118,6 @@ public class ChangeGroup extends PersistableDataObject implements
* The period for which the change group conditions apply.
*/
@DynamicSerializeElement
@XmlElement
@Embedded
private TafPeriod tafChangePeriod;
@ -134,7 +127,6 @@ public class ChangeGroup extends PersistableDataObject implements
* and TEMPO change group could share the same start time.
*/
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer sequenceId;
@ -142,7 +134,6 @@ public class ChangeGroup extends PersistableDataObject implements
* The change group indicator i.e. BECMG, FM, TEMPO, etc
*/
@DynamicSerializeElement
@XmlAttribute
@Column(length = 10)
private String change_indicator;
@ -150,61 +141,51 @@ public class ChangeGroup extends PersistableDataObject implements
* The probability percentage for PROB and PROB TEMPO change groups.
*/
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer probability;
/** Wind direction in degrees */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 3)
private String wind_dir_degrees;
/** Wind speed in knots */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer wind_speed_kt;
/** Wind gust in knots */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer wind_gust_kt;
/** Wind shear height above ground level */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer wind_shear_hgt_ft_agl;
/** Wind shear direction in degrees */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer wind_shear_dir_degrees;
/** Wind shear speed in knots */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer wind_shear_speed_kt;
/** Visibility (horizontal) in miles */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 8)
private String visibility_mi;
/** Altimeter reading in inches of mercury */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 16)
private String altim_in_hg;
/** Vertical visibility */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 8)
private String vert_vis_ft;
@ -212,48 +193,40 @@ public class ChangeGroup extends PersistableDataObject implements
* Weather and obscurations
*/
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<TafWeatherCondition> weather;
/** Sky coverage */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<TafSkyCover> sky_cover;
/** The turbulence layers */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<TurbulenceLayer> turbulence_layers;
/** The icing layers */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<IcingLayer> icing_layers;
/** The temperature forecasts */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<TemperatureForecast> temp_forecasts;
/** Maximum temperature */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer max_temp_c;
/** Minimum temperature */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer min_temp_c;
@DynamicSerializeElement
@XmlElement
@Column
private String remarks;

View file

@ -27,14 +27,10 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -48,6 +44,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 8/30/06 bphillip Initial Creation
* 6/21/07 180 bphillip Updated for use with plugin persistance pattern
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -56,10 +53,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@Table(name = "taf_icing_layers")
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class IcingLayer extends PersistableDataObject implements
ISerializableObject {
public class IcingLayer extends PersistableDataObject {
@Id
@GeneratedValue
@ -76,19 +71,16 @@ public class IcingLayer extends PersistableDataObject implements
/** The icing intensity */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer icing_intensity;
/** The minimum altitude for the icing */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer icing_min_alt_ft_agl;
/** The maximum altitude for the icing */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer icing_max_alt_ft_agl;

View file

@ -25,11 +25,7 @@ import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
@ -50,6 +46,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* 09Dec2003 377 J. Wilwerding Adjust date for month rollover
* 23Mar2005 1055 D. Weeks Modified for use to decode TAFs for JET
* 30Aug2006 B. Phillippe Modified for use to decode TAFs for AWIPS
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -58,8 +55,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/
@Embeddable
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class TafPeriod implements Serializable, ISerializableObject {
public class TafPeriod implements Serializable {
/**
*
@ -70,14 +66,12 @@ public class TafPeriod implements Serializable, ISerializableObject {
* The forecast valid starting date
*/
@DynamicSerializeElement
@XmlElement
@Column
private Calendar startDate;
// This time is only used for BECMG groups. It marks the end time of the
// BECMG transition period.
@DynamicSerializeElement
@XmlElement
@Column
private Calendar transitionEndDate;
@ -85,7 +79,6 @@ public class TafPeriod implements Serializable, ISerializableObject {
* The forecast valid ending date
*/
@DynamicSerializeElement
@XmlElement
@Column
private Calendar endDate;

View file

@ -36,14 +36,9 @@ import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
@ -69,6 +64,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -85,8 +81,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@org.hibernate.annotations.Table(appliesTo = TafRecord.PLUGIN_NAME, indexes = { @Index(name = "taf_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class TafRecord extends PluginDataObject implements ISpatialEnabled {
private static final long serialVersionUID = 1L;
@ -94,70 +88,59 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
public static final String PLUGIN_NAME = "taf";
@DynamicSerializeElement
@XmlElement
@Column
private String wmoHeader;
@DynamicSerializeElement
@XmlElement
@Column(length = 1024)
private String tafText;
// Station Identifier for the data
@DynamicSerializeElement
@XmlElement
@Column
@Index(name = "taf_stationIndex")
@DataURI(position = 1)
private String stationId;
@DynamicSerializeElement
@XmlElement
@Column
@DataURI(position = 2)
private String corIndicator;
@DynamicSerializeElement
@XmlElement
@Column
@DataURI(position = 3)
private String amdIndicator;
/** Issue date */
@DynamicSerializeElement
@XmlElement
@Column
// @DataURI(position = 4)
private Date issue_time;
/** Issue date string */
@DynamicSerializeElement
@XmlElement
@Column
@DataURI(position = 4)
private String issue_timeString;
/** Bulletin issuance time */
@DynamicSerializeElement
@XmlElement
@Column
private Date bulletin_time;
/** Any remarks contained in the TAF record */
@DynamicSerializeElement
@XmlElement
@Column
private String remarks;
/** List of change groups (FM, BECMG, etc.) */
@DynamicSerializeElement
@XmlElement
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER)
private Set<ChangeGroup> changeGroups = new HashSet<ChangeGroup>();
@ManyToOne
@PrimaryKeyJoinColumn
@XmlElement
@DynamicSerializeElement
protected ObStation location;
@ -354,17 +337,6 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
}
/**
* Get the IDecoderGettable reference for this record.
*
* @return The IDecoderGettable reference for this record. Null for this
* class.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public ObStation getSpatialObject() {
return location;

View file

@ -27,14 +27,10 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -49,6 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 6/21/2007 180 Phillippe initial creation.
* 4/16/2008 934 grichard Added toString overridden method.
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -58,9 +55,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "taf_sky_cover")
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class TafSkyCover extends PersistableDataObject implements
ISerializableObject {
public class TafSkyCover extends PersistableDataObject {
private static final long serialVersionUID = 1L;
@ -75,19 +70,16 @@ public class TafSkyCover extends PersistableDataObject implements
/** The type of sky coverage * */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 3)
private String type;
/** The height of the cloud layer * */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer height;
// For convective low level cloud - CB
@DynamicSerializeElement
@XmlAttribute
@Column(length = 3)
private String genus;

View file

@ -28,14 +28,10 @@ import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -46,10 +42,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 6/21/2007 180 Phillippe Initial creation
* 20081106 1515 jkorman Changed length of &quot;other&quot; attribute.
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 6/21/2007 180 Phillippe Initial creation
* 20081106 1515 jkorman Changed length of &quot;other&quot; attribute.
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -59,9 +56,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "taf_weather_conditions")
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class TafWeatherCondition extends PersistableDataObject implements
ISerializableObject {
public class TafWeatherCondition extends PersistableDataObject {
private static final long serialVersionUID = 1L;
@ -76,30 +71,25 @@ public class TafWeatherCondition extends PersistableDataObject implements
/** The intensity proximity notation * */
@DynamicSerializeElement
@XmlAttribute
@Column(length = 2)
private String intensityProximity = "";
/** The descriptor notation * */
@XmlAttribute
@DynamicSerializeElement
@Column(length = 2)
private String descriptor = "";
/** The precipitation notation * */
@XmlAttribute
@DynamicSerializeElement
@Column(length = 2)
private String precipitation = "";
/** The obscuration notation * */
@XmlAttribute
@DynamicSerializeElement
@Column(length = 2)
private String obscuration = "";
/** The other notation * */
@XmlAttribute
@DynamicSerializeElement
@Column(length = 3)
private String other = "";

View file

@ -27,14 +27,10 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -50,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 8/30/2006 bphillip Initial Creation
* 6/21/2007 180 bphillip Updated for use with plugin persistence pattern
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -59,9 +56,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "taf_temperature_forecasts")
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class TemperatureForecast extends PersistableDataObject implements
ISerializableObject {
public class TemperatureForecast extends PersistableDataObject {
@Id
@GeneratedValue
@ -79,13 +74,11 @@ public class TemperatureForecast extends PersistableDataObject implements
/** Temperature valid time */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer valid_time;
/** Surface temperature */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer sfc_temp_c;

View file

@ -27,14 +27,10 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -48,6 +44,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 8/30/2006 bphillip Initial Creation
* 6/21/2007 bphillip Updated for use with plugin persistance pattern
* Nov 01, 2013 2361 njensen Remove XML annotations
*
* </pre>
*
@ -57,9 +54,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(name = "taf_turbulence_layers")
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class TurbulenceLayer extends PersistableDataObject implements
ISerializableObject {
public class TurbulenceLayer extends PersistableDataObject {
/**
*
@ -76,19 +71,16 @@ public class TurbulenceLayer extends PersistableDataObject implements
/** The intensity of the turbulence */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer turbulence_intensity;
/** The minimum altitude for the turbulence */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer turbulence_min_alt_ft_agl;
/** The maximum altitude for the turbulence */
@DynamicSerializeElement
@XmlAttribute
@Column
private Integer turbulence_max_alt_ft_agl;

View file

@ -61,6 +61,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
* Sept 30,2013 1797 dhladky Generics
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
*
* </pre>
*
@ -868,18 +869,23 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
if (activePeriodStart == null && activePeriodEnd == null) {
return true;
} else if (activePeriodStart != null && activePeriodEnd != null) {
Calendar startCal = TimeUtil.newGmtCalendar();
startCal.setTime(activePeriodStart);
startCal = TimeUtil.minCalendarFields(startCal,
Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND,
Calendar.MILLISECOND);
// add the current year for true comparison
startCal = TimeUtil.addCurrentYearCalendar(startCal);
activePeriodStart = startCal.getTime();
Calendar endCal = TimeUtil.newGmtCalendar();
endCal.setTime(activePeriodEnd);
endCal = TimeUtil.maxCalendarFields(endCal, Calendar.HOUR_OF_DAY,
Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND);
// add the current year for true comparison
endCal = TimeUtil.addCurrentYearCalendar(endCal);
// If the period crosses a year boundary, add a year to the end
if (endCal.before(startCal)) {
endCal.add(Calendar.YEAR, 1);
@ -887,12 +893,14 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
activePeriodEnd = endCal.getTime();
// Only concerned with month and day, need to set the years equal
// Only concerned with month and day, need to set the
// years on equal footing for comparison sake.
Calendar c = TimeUtil.newGmtCalendar();
c.setTime(checkDate);
// set the date to compare with the current date from the start
c.set(Calendar.YEAR, startCal.get(Calendar.YEAR));
Date date = c.getTime();
return (activePeriodStart.before(date) && activePeriodEnd
.after(date));
}

View file

@ -792,12 +792,22 @@ public class DiscreteGridSlice extends AbstractGridSlice implements Cloneable {
}
}
public void setKey(DiscreteKey[] key) {
this.keys = key;
/**
* @param keys
* the keys to set
* @deprecated use setKeys() instead
*/
@Deprecated
public void setKey(DiscreteKey[] keys) {
this.keys = keys;
}
public void setKey(List<DiscreteKey[]> key) {
setKey(key.toArray(new DiscreteKey[] {}));
/**
* @param keys
* the keys to set
*/
public void setKeys(DiscreteKey[] keys) {
this.keys = keys;
}
@Override

View file

@ -23,8 +23,8 @@ import static com.raytheon.uf.common.registry.ebxml.encoder.RegistryEncoders.Typ
import javax.xml.bind.JAXBException;
import com.raytheon.uf.common.registry.schemas.ebxml.util.EbxmlJaxbManager;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
/**
* A {@link StringBasedEncoder} implementation that uses JAXB. Package-private
@ -38,6 +38,7 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
* ------------ ---------- ----------- --------------------------
* Sep 07, 2012 1102 djohnson Initial creation
* Jun 03, 2013 2038 djohnson Add equals/hashcode.
* Oct 31, 2013 2361 njensen Use specific JAXBManager instead of SerializationUtil
*
* </pre>
*
@ -60,7 +61,7 @@ class JaxbEncoder extends StringBasedEncoder {
@Override
Object decodeContent(String content) throws SerializationException {
try {
return SerializationUtil.unmarshalFromXml(Object.class, content);
return EbxmlJaxbManager.getJaxbManager().unmarshalFromXml(content);
} catch (JAXBException e) {
throw new SerializationException("Unable to decode the object!", e);
}
@ -72,7 +73,8 @@ class JaxbEncoder extends StringBasedEncoder {
@Override
String encodeContent(Object objectToEncode) throws SerializationException {
try {
return new String(SerializationUtil.marshalToXml(objectToEncode));
return new String(EbxmlJaxbManager.getJaxbManager().marshalToXml(
objectToEncode));
} catch (JAXBException e) {
throw new SerializationException("Unable to encode the object!", e);
}

View file

@ -12,7 +12,8 @@ Require-Bundle: javax.persistence;bundle-version="1.0.0",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
org.apache.commons.cxf;bundle-version="1.0.0",
com.raytheon.uf.common.status;bundle-version="1.12.1174",
com.raytheon.uf.common.util;bundle-version="1.12.1174"
com.raytheon.uf.common.util;bundle-version="1.12.1174",
org.reflections;bundle-version="0.9.9"
Export-Package: com.raytheon.uf.common.registry,
com.raytheon.uf.common.registry.schemas.ebxml.util,
com.raytheon.uf.common.registry.schemas.ebxml.util.annotations,

View file

@ -1,64 +0,0 @@
oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory
oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory
oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory
oasis.names.tc.ebxml.regrep.xsd.spi.v4.ObjectFactory
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ActionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.AnyValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.AssociationType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.AuditableEventType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.BooleanValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationNodeType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationSchemeType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.CollectionValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.DateTimeValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.DeliveryInfoType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.DurationValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.EmailAddressType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.EntryType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExternalIdentifierType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExternalLinkType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExtrinsicObjectType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.FederationType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.FloatValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.IntegerValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.InternationalStringValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.LocalizedStringType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.MapType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.MapValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.NotificationType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefListType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.OrganizationType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ParameterType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.PersonNameType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.PersonType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.PostalAddressType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryDefinitionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryExpressionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectListType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryPackageType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.RoleType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceBindingType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceEndpointType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceInterfaceType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.SimpleLinkType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringQueryExpressionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.StringValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.SubscriptionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.TaxonomyElementType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.TelephoneNumberType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.ValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.VocabularyTermType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.VocabularyTermValueType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.WorkflowActionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.XMLQueryExpressionType
oasis.names.tc.ebxml.regrep.xsd.rim.v4.DynamicObjectRefType

View file

@ -0,0 +1,103 @@
/**
* 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.common.registry.schemas.ebxml.util;
import java.util.Set;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRegistry;
import org.reflections.Reflections;
import org.reflections.scanners.TypeAnnotationsScanner;
import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder;
import com.raytheon.uf.common.serialization.JAXBManager;
/**
* A JAXB Manager for transforming EBXML objects to/from XML.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 30, 2013 2361 njensen Initial creation
*
* </pre>
*
* @author njensen
* @version 1.0
*/
public class EbxmlJaxbManager {
private static JAXBManager jaxb;
/**
* Uses reflections to scan for ebxml datadelivery registry classes that can
* be transformed to/from xml, and then adds in the ebxml object factories.
*
* @return the classes it found without any duplicates
*/
private static Class<?>[] getClasses() {
String[] packageNames = new String[] {
"com.raytheon.uf.common.datadelivery.registry" };
long t0 = System.currentTimeMillis();
ConfigurationBuilder cb = new ConfigurationBuilder();
for (String pkg : packageNames) {
cb.addUrls(ClasspathHelper.forPackage(pkg));
}
cb.setScanners(new TypeAnnotationsScanner());
// the call to build() will do the actual scanning so the separate
// calls to getTypesAnnotatedWith(class, false) will not slow it down
Reflections reflecs = cb.build();
Set<Class<?>> set = reflecs.getTypesAnnotatedWith(
XmlAccessorType.class, false);
set.addAll(reflecs.getTypesAnnotatedWith(XmlRegistry.class, false));
long t1 = System.currentTimeMillis();
System.out.println("Found " + set.size() + " classes for ebxml in "
+ (t1 - t0) + " ms");
set.add(oasis.names.tc.ebxml.regrep.xsd.lcm.v4.ObjectFactory.class);
set.add(oasis.names.tc.ebxml.regrep.xsd.query.v4.ObjectFactory.class);
set.add(oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectFactory.class);
set.add(oasis.names.tc.ebxml.regrep.xsd.rs.v4.ObjectFactory.class);
set.add(oasis.names.tc.ebxml.regrep.xsd.spi.v4.ObjectFactory.class);
return set.toArray(new Class[0]);
}
public static synchronized JAXBManager getJaxbManager()
throws JAXBException {
if (jaxb == null) {
jaxb = new JAXBManager(getClasses());
}
return jaxb;
}
private EbxmlJaxbManager() {
}
}

View file

@ -1,3 +1,23 @@
/**
* 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.common.registry.schemas.ebxml.util;
import java.io.Serializable;
@ -11,8 +31,21 @@ import javax.xml.datatype.XMLGregorianCalendar;
import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;
import com.raytheon.uf.common.serialization.SerializationUtil;
/**
* A serialized type
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* --/--/---- Initial creation
* Oct 31, 2013 2361 njensen Use specific JAXBManager instead of SerializationUtil
*
* </pre>
*
*/
public class SerializedType implements UserType {
/** Stored as a varchar in the databse */
@ -60,7 +93,7 @@ public class SerializedType implements UserType {
if (obj != null) {
try {
return SerializationUtil.getJaxbManager().unmarshalFromXml(obj);
return EbxmlJaxbManager.getJaxbManager().unmarshalFromXml(obj);
} catch (Exception e) {
throw new HibernateException("Error retrieving AnyType data", e);
}
@ -77,7 +110,7 @@ public class SerializedType implements UserType {
} else {
try {
;
statement.setString(index, SerializationUtil.getJaxbManager()
statement.setString(index, EbxmlJaxbManager.getJaxbManager()
.marshalToXml(value));
} catch (Exception e) {
throw new HibernateException("Error storing AnyType data", e);

View file

@ -69,10 +69,12 @@ public class JAXBClassLocator {
private List<Class<?>> included = new ArrayList<Class<?>>(512);
private JAXBClassLocator(ISubClassLocator locator, Class<?> rootClass) {
private JAXBClassLocator(ISubClassLocator locator, Class<?>... rootClasses) {
this.locator = locator;
processed.addAll(getBuiltinTypes());
processClass(rootClass);
for (Class<?> rootClass : rootClasses) {
processClass(rootClass);
}
}
private void processClass(Class<?> clazz) {
@ -191,7 +193,7 @@ public class JAXBClassLocator {
* @return all classes that are can be in the xml.
*/
public static Collection<Class<?>> getJAXBClasses(ISubClassLocator locator,
Class<?> baseClass) {
return new JAXBClassLocator(locator, baseClass).getResults();
Class<?>... baseClasses) {
return new JAXBClassLocator(locator, baseClasses).getResults();
}
}

View file

@ -52,6 +52,7 @@ import com.raytheon.uf.common.time.domain.api.ITimePoint;
* Mar 20, 2013 1774 randerso Add SECONDS_PER_DAY, changed SECONDS_PER_HOUR to int.
* Apr 24, 2013 1628 mschenke Added GMT TimeZone Object constant
* Jun 05, 2013 DR 16279 D. Friedman Add timeOfDayToAbsoluteTime
* Oct 30, 2013 2448 dhladky Added current year addition to calendar object.
* </pre>
*
* @author njensen
@ -458,4 +459,48 @@ public final class TimeUtil {
*/
private TimeUtil() {
}
/**
* New Calendar from a Date
* @param date
* @return
*/
public static Calendar newCalendar(final Date date) {
Calendar t = null;
if (date != null) {
t = TimeUtil.newCalendar();
t.setTime(date);
}
return t;
}
/**
* New Calendar from an existing calendar
* @param calendar
* @return
*/
public static Calendar newCalendar(final Calendar calendar) {
Calendar t = null;
if (calendar != null) {
t = TimeUtil.newCalendar();
t.setTimeInMillis(calendar.getTimeInMillis());
}
return t;
}
/**
* Adds the current year to the calendar object that does not already have it set.
* Some calendar objects are only concerned with the day and month. When a
* comparison of years is necessary, you must add the current year to that calendar object.
* @param calendar
* @return
*/
public static Calendar addCurrentYearCalendar(final Calendar calendar) {
Calendar yearTime = TimeUtil.newGmtCalendar();
calendar.set(Calendar.YEAR, yearTime.get(Calendar.YEAR));
return calendar;
}
}

View file

@ -123,6 +123,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
* adhoc subscription.
* Sept 25, 2013 1797 dhladky separated time from gridded time
* 10/23/2013 2385 bphillip Change schedule method to scheduleAdhoc
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
* </pre>
*
* @author dhladky
@ -307,7 +308,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
.getBandwidthSubscription();
Calendar retrievalTime = bandwidthSubscription
.getBaseReferenceTime();
Calendar startTime = BandwidthUtil.copy(retrievalTime);
Calendar startTime = TimeUtil.newCalendar(retrievalTime);
int delayMinutes = retrieval.getDataSetAvailablityDelay();
int maxLatency = retrieval.getSubscriptionLatency();
@ -472,7 +473,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
for (SubscriptionRetrieval retrieval : retrievals) {
retrieval.setStartTime(now);
Calendar endTime = BandwidthUtil.copy(now);
Calendar endTime = TimeUtil.newCalendar(now);
endTime.add(Calendar.MINUTE, retrieval.getSubscriptionLatency());
retrieval.setEndTime(endTime);
// Store the SubscriptionRetrieval - retrievalManager expects

View file

@ -262,7 +262,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
return;
}
Calendar next = BandwidthUtil.copy(dao.getBaseReferenceTime());
Calendar next = TimeUtil.newCalendar(dao.getBaseReferenceTime());
// See how far into the future the plan goes..
int days = retrievalManager.getPlan(dao.getRoute()).getPlanDays();

View file

@ -21,9 +21,9 @@ import javax.persistence.Table;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.IDeepCopyable;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@ -41,6 +41,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Oct 12, 2012 0726 djohnson Add SW history, use string version of enum.
* Jun 24, 2013 2106 djohnson Add copy constructor.
* Jul 11, 2013 2106 djohnson Use SubscriptionPriority enum.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -55,7 +56,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@DynamicSerialize
@SequenceGenerator(name = "BANDWIDTH_SEQ", sequenceName = "bandwidth_seq", allocationSize = 1, initialValue = 1)
public class BandwidthAllocation implements IPersistableDataObject<Long>,
ISerializableObject, Serializable, IDeepCopyable<BandwidthAllocation> {
Serializable, IDeepCopyable<BandwidthAllocation> {
private static final long serialVersionUID = 743702044231376839L;
@ -130,19 +131,19 @@ public class BandwidthAllocation implements IPersistableDataObject<Long>,
public BandwidthAllocation(BandwidthAllocation from) {
final Calendar fromActualEnd = from.getActualEnd();
if (fromActualEnd != null) {
this.setActualEnd(BandwidthUtil.copy(fromActualEnd));
this.setActualEnd(TimeUtil.newCalendar(fromActualEnd));
}
final Calendar fromActualStart = from.getActualStart();
if (fromActualStart != null) {
this.setActualStart(BandwidthUtil.copy(fromActualStart));
this.setActualStart(TimeUtil.newCalendar(fromActualStart));
}
final Calendar fromStartTime = from.getStartTime();
if (fromStartTime != null) {
this.setStartTime(BandwidthUtil.copy(fromStartTime));
this.setStartTime(TimeUtil.newCalendar(fromStartTime));
}
final Calendar fromEndTime = from.getEndTime();
if (fromEndTime != null) {
this.setEndTime(BandwidthUtil.copy(fromEndTime));
this.setEndTime(TimeUtil.newCalendar(fromEndTime));
}
this.setAgentType(from.getAgentType());

View file

@ -15,9 +15,9 @@ import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.IDeepCopyable;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@ -33,6 +33,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* ------------ ---------- ----------- --------------------------
* Oct 19, 2012 0726 djohnson Added SW history.
* Jun 24, 2013 2106 djohnson Add copy constructor.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -45,7 +46,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@SequenceGenerator(name = "BANDWIDTH_SEQ", sequenceName = "bandwidth_datasetupdate_seq", allocationSize = 1)
@DynamicSerialize
public class BandwidthDataSetUpdate implements IPersistableDataObject<Long>,
Serializable, ISerializableObject, IDeepCopyable<BandwidthDataSetUpdate> {
Serializable, IDeepCopyable<BandwidthDataSetUpdate> {
private static final long serialVersionUID = 20120723L;
@ -92,13 +93,12 @@ public class BandwidthDataSetUpdate implements IPersistableDataObject<Long>,
* the instance to copy
*/
public BandwidthDataSetUpdate(BandwidthDataSetUpdate bandwidthDataSetUpdate) {
this.dataSetBaseTime = BandwidthUtil
.copy(bandwidthDataSetUpdate.dataSetBaseTime);
this.dataSetBaseTime = TimeUtil.newCalendar(bandwidthDataSetUpdate.dataSetBaseTime);
this.dataSetName = bandwidthDataSetUpdate.dataSetName;
this.dataSetType = bandwidthDataSetUpdate.dataSetType;
this.id = bandwidthDataSetUpdate.id;
this.providerName = bandwidthDataSetUpdate.providerName;
this.updateTime = BandwidthUtil.copy(bandwidthDataSetUpdate.updateTime);
this.updateTime = TimeUtil.newCalendar(bandwidthDataSetUpdate.updateTime);
this.url = bandwidthDataSetUpdate.url;
}

View file

@ -16,9 +16,9 @@ import javax.persistence.Table;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.IDeepCopyable;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@ -37,6 +37,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Jun 13, 2013 2095 djohnson Add flag for whether or not data set update should be looked for on aggregating.
* Jun 24, 2013 2106 djohnson Add copy constructor.
* Jul 11, 2013 2106 djohnson Use SubscriptionPriority enum, remove the Subscription.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -48,8 +49,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@DynamicSerialize
@SequenceGenerator(name = "BANDWIDTH_SEQ", sequenceName = "bandwidth_seq", allocationSize = 1, initialValue = 1)
public class BandwidthSubscription extends PersistableDataObject<Long>
implements Serializable, ISerializableObject,
IDeepCopyable<BandwidthSubscription> {
implements Serializable, IDeepCopyable<BandwidthSubscription> {
private static final long serialVersionUID = 20120723L;
@ -117,7 +117,7 @@ public class BandwidthSubscription extends PersistableDataObject<Long>
* @param bandwidthSubscription
*/
public BandwidthSubscription(BandwidthSubscription bandwidthSubscription) {
this.baseReferenceTime = BandwidthUtil.copy(bandwidthSubscription
this.baseReferenceTime = TimeUtil.newCalendar(bandwidthSubscription
.getBaseReferenceTime());
this.checkForDataSetUpdate = bandwidthSubscription.checkForDataSetUpdate;
this.cycle = bandwidthSubscription.cycle;

View file

@ -5,6 +5,7 @@ import java.util.Calendar;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.IDeepCopyable;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthAllocation;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
@ -22,6 +23,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Nov 09, 2012 1286 djohnson Add getters for bytes.
* Jun 24, 2013 2106 djohnson Add copy constructor.
* Jul 11, 2013 2106 djohnson Use SubscriptionPriority enum.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -85,12 +87,12 @@ public class BandwidthReservation implements Serializable,
*/
public BandwidthReservation(BandwidthReservation from) {
this.bandwidthBucket = from.bandwidthBucket;
this.endTime = BandwidthUtil.copy(from.endTime);
this.endTime = TimeUtil.newCalendar(from.endTime);
this.id = from.id;
this.network = from.network;
this.priority = from.priority;
this.size = from.size;
this.startTime = BandwidthUtil.copy(from.startTime);
this.startTime = TimeUtil.newCalendar(from.startTime);
}
@Override

View file

@ -39,6 +39,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Oct 23, 2012 1286 djohnson Add ability to get/set the default bandwidth.
* Nov 20, 2012 1286 djohnson Handle null bucketIds being returned.
* Jun 25, 2013 2106 djohnson Separate state into other classes, promote BandwidthBucket to a class proper.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -52,7 +53,7 @@ public class RetrievalPlan {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(RetrievalPlan.class);
private IBandwidthDao bandwidthDao;
private IBandwidthDao<?, ?> bandwidthDao;
// which retrieval plan
private Network network;
@ -110,7 +111,7 @@ public class RetrievalPlan {
if (found) {
Calendar currentBucket = BandwidthUtil.now();
planStart = BandwidthUtil.now();
planEnd = BandwidthUtil.copy(planStart);
planEnd = TimeUtil.newCalendar(planStart);
planEnd.add(Calendar.DAY_OF_YEAR, planDays);
// Make the buckets...
@ -183,7 +184,7 @@ public class RetrievalPlan {
// The end of the plan should always be planDays from
// now...
Calendar currentBucket = BandwidthUtil.now();
Calendar newEndOfPlan = BandwidthUtil.copy(currentBucket);
Calendar newEndOfPlan = TimeUtil.newCalendar(currentBucket);
newEndOfPlan.add(Calendar.DAY_OF_YEAR, planDays);
resize(currentBucket, newEndOfPlan);
@ -299,7 +300,7 @@ public class RetrievalPlan {
this.map = map;
}
public void setBandwidthDao(IBandwidthDao bandwidthDao) {
public void setBandwidthDao(IBandwidthDao<?, ?> bandwidthDao) {
this.bandwidthDao = bandwidthDao;
}
@ -411,13 +412,13 @@ public class RetrievalPlan {
public Calendar getPlanEnd() {
// Don't want an inadvertent change to plan end, so make a copy of the
// Calendar Object and return that.
return BandwidthUtil.copy(planEnd);
return TimeUtil.newCalendar(planEnd);
}
public Calendar getPlanStart() {
// Don't want an inadvertent change to plan start, so make a copy of the
// Calendar Object and return that.
return BandwidthUtil.copy(planStart);
return TimeUtil.newCalendar(planStart);
}
/**
@ -577,8 +578,8 @@ public class RetrievalPlan {
this.bucketMinutes = fromPlan.bucketMinutes;
this.bytesPerBucket = fromPlan.bytesPerBucket;
this.planDays = fromPlan.planDays;
this.planEnd = BandwidthUtil.copy(fromPlan.planEnd);
this.planStart = BandwidthUtil.copy(fromPlan.planStart);
this.planEnd = TimeUtil.newCalendar(fromPlan.planEnd);
this.planStart = TimeUtil.newCalendar(fromPlan.planStart);
this.requestMap.clear();
this.requestMap.putAll(fromPlan.requestMap);
this.associator.copyState(fromPlan.associator);

View file

@ -69,6 +69,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
* no metadata found.
* Sept 24, 2013 1797 dhladky separated time from GriddedTime
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
*
* </pre>
*
@ -161,92 +162,101 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
Calendar planEnd = plan.getPlanEnd();
Calendar planStart = plan.getPlanStart();
Calendar activePeriodStart = null;
Calendar activePeriodEnd = null;
// Make sure the RetrievalPlan's start and end times intersect
// the Subscription's active period.
Date activePeriodEnd = subscription.getActivePeriodEnd();
if (activePeriodEnd != null) {
Date activePeriodStart = subscription.getActivePeriodStart();
Calendar active = BandwidthUtil.copy(activePeriodStart);
if (subscription.getActivePeriodEnd() != null
&& subscription.getActivePeriodStart() != null) {
activePeriodStart = TimeUtil.newCalendar(subscription
.getActivePeriodStart());
// Substitute the active periods month and day for the
// plan start month and day.
Calendar s = BandwidthUtil.copy(planStart);
s.set(Calendar.MONTH, active.get(Calendar.MONTH));
s.set(Calendar.DAY_OF_MONTH, active.get(Calendar.DAY_OF_MONTH));
// If the active period start in outside the plan bounds,
Calendar start = BandwidthUtil.planToPeriodCompareCalendar(planStart, activePeriodStart);
// If the active period start is outside the plan bounds,
// there is no intersection - just return an empty set.
if (s.before(planStart) && s.after(planEnd)) {
if (start.after(planEnd)) {
return subscriptionTimes;
}
// Do the same for active plan end..
activePeriodStart = subscription.getActivePeriodEnd();
active = BandwidthUtil.copy(activePeriodStart);
activePeriodEnd = TimeUtil.newCalendar(subscription.getActivePeriodEnd());
// Substitute the active periods month and day for the
// plan ends month and day.
s = BandwidthUtil.copy(planStart);
s.set(Calendar.MONTH, active.get(Calendar.MONTH));
s.set(Calendar.DAY_OF_MONTH, active.get(Calendar.DAY_OF_MONTH));
Calendar end = BandwidthUtil.planToPeriodCompareCalendar(planStart, activePeriodEnd);
// If the active period end is before the start of the plan,
// there is no intersection - just return an empty set.
if (s.before(planStart)) {
if (end.before(planStart)) {
return subscriptionTimes;
}
}
// Now check the Subscription start and end times for intersection
// with the RetrievalPlan...
// Figure out the 'active' period for a subscription..
Calendar subscriptionEndDate = BandwidthUtil.copy(subscription
Calendar subscriptionEnd = TimeUtil.newCalendar(subscription
.getSubscriptionEnd());
Calendar subscriptionStartDate = null;
Calendar subscriptionStart = null;
// Check to see if this is a non-expiring subscription
if (subscriptionEndDate == null) {
if (subscriptionEnd == null) {
// If there is no subscription start end dates then the largest
// window that can be scheduled is the RetrievalPlan size..
subscriptionEndDate = BandwidthUtil.copy(planEnd);
subscriptionStartDate = BandwidthUtil.copy(planStart);
subscriptionEnd = TimeUtil.newCalendar(planEnd);
subscriptionStart = TimeUtil.newCalendar(planStart);
} else {
// If there is a start and end time, then modify the start and
// end times to 'fit' within the RetrievalPlan times
subscriptionStartDate = BandwidthUtil.copy(BandwidthUtil.max(
subscriptionStart = TimeUtil.newCalendar(BandwidthUtil.max(
subscription.getSubscriptionStart(), planStart));
subscriptionEndDate = BandwidthUtil.copy(BandwidthUtil.min(
subscriptionEnd = TimeUtil.newCalendar(BandwidthUtil.min(
subscription.getSubscriptionEnd(), planEnd));
}
// Create a Set of Calendars for all the baseReferenceTimes that a
// Subscription can contain...
TimeUtil.minCalendarFields(subscriptionStartDate, Calendar.MILLISECOND,
TimeUtil.minCalendarFields(subscriptionStart, Calendar.MILLISECOND,
Calendar.SECOND, Calendar.MINUTE, Calendar.HOUR_OF_DAY);
TimeUtil.maxCalendarFields(subscriptionEnd, Calendar.MILLISECOND,
Calendar.SECOND, Calendar.MINUTE, Calendar.HOUR_OF_DAY);
// setup active period checks if necessary
if (activePeriodStart != null && activePeriodEnd != null) {
// need to add the current year in order to make the checks relevant
activePeriodStart = TimeUtil.addCurrentYearCalendar(activePeriodStart);
activePeriodEnd = TimeUtil.addCurrentYearCalendar(activePeriodEnd);
}
outerloop: while (!subscriptionStartDate.after(subscriptionEndDate)) {
outerloop: while (!subscriptionStart.after(subscriptionEnd)) {
for (Integer cycle : hours) {
subscriptionStartDate.set(Calendar.HOUR_OF_DAY, cycle);
subscriptionStart.set(Calendar.HOUR_OF_DAY, cycle);
for (Integer minute : minutes) {
subscriptionStartDate.set(Calendar.MINUTE, minute);
if (subscriptionStartDate.after(subscriptionEndDate)) {
subscriptionStart.set(Calendar.MINUTE, minute);
if (subscriptionStart.after(subscriptionEnd)) {
break outerloop;
} else {
}
else {
Calendar time = TimeUtil.newCalendar();
time.setTimeInMillis(subscriptionStartDate
time.setTimeInMillis(subscriptionStart
.getTimeInMillis());
// Last check for time window, this checks fine grain by hour and minute
if (activePeriodStart != null && activePeriodEnd != null) {
if (time.after(activePeriodEnd) || time.before(activePeriodStart)) {
// discard this retrieval time, outside activePeriod window
continue;
}
}
subscriptionTimes.add(time);
}
}
}
// Start the next day..
subscriptionStartDate.add(Calendar.DAY_OF_YEAR, 1);
subscriptionStartDate.set(Calendar.HOUR_OF_DAY, hours.first());
subscriptionStart.add(Calendar.DAY_OF_YEAR, 1);
subscriptionStart.set(Calendar.HOUR_OF_DAY, hours.first());
}
// Now walk the subscription times and throw away anything outside the
@ -257,7 +267,7 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
while (itr.hasNext()) {
Calendar time = itr.next();
Calendar withAvailabilityDelay = BandwidthUtil.copy(time);
Calendar withAvailabilityDelay = TimeUtil.newCalendar(time);
withAvailabilityDelay.add(Calendar.MINUTE, availabilityDelay);
// We allow base reference times that are still possible to retrieve

View file

@ -28,6 +28,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthSubscription;
* Jun 13, 2013 2095 djohnson Point subscriptions don't check for dataset updates on aggregation.
* Jun 25, 2013 2106 djohnson CheapClone was cheap in ease, not performance.
* Jul 11, 2013 2106 djohnson Use SubscriptionPriority enum.
* Oct 30, 2013 2448 dhladky Moved methods to TimeUtil.
*
* </pre>
*
@ -59,18 +60,18 @@ public class BandwidthUtil {
private BandwidthUtil() {
};
public static int getSubscriptionLatency(Subscription subscription) {
public static int getSubscriptionLatency(Subscription<?, ?> subscription) {
return instance.subscriptionLatencyCalculator.getLatency(subscription);
}
public static Calendar min(Date lhs, Calendar rhs) {
return min(copy(lhs), rhs);
return min(TimeUtil.newCalendar(lhs), rhs);
}
public static Calendar max(Date lhs, Calendar rhs) {
return max(copy(lhs), rhs);
return max(TimeUtil.newCalendar(lhs), rhs);
}
public static Calendar max(Calendar lhs, Calendar rhs) {
Calendar calendar = null;
if (lhs != null && rhs != null) {
@ -95,24 +96,6 @@ public class BandwidthUtil {
return calendar;
}
public static Calendar copy(final Date date) {
Calendar t = null;
if (date != null) {
t = TimeUtil.newCalendar();
t.setTime(date);
}
return t;
}
public static Calendar copy(final Calendar calendar) {
Calendar t = null;
if (calendar != null) {
t = TimeUtil.newCalendar();
t.setTimeInMillis(calendar.getTimeInMillis());
}
return t;
}
/**
* Seconds and milliseconds on a Calendar are not used in bandwidth
* management and can alter some of the time arithmetic that is used
@ -137,7 +120,7 @@ public class BandwidthUtil {
*
* @return The delay in minutes.
*/
public static int getDataSetAvailablityDelay(Subscription subscription) {
public static int getDataSetAvailablityDelay(Subscription<?, ?> subscription) {
return instance.dataSetAvailabilityCalculator
.getDataSetAvailablityDelay(subscription);
}
@ -205,7 +188,7 @@ public class BandwidthUtil {
* on error serializing the subscription
*/
public static BandwidthSubscription getSubscriptionDaoForSubscription(
Subscription subscription, Calendar baseReferenceTime) {
Subscription<?, ?> subscription, Calendar baseReferenceTime) {
BandwidthSubscription dao = new BandwidthSubscription();
dao.setDataSetName(subscription.getDataSetName());
@ -231,13 +214,13 @@ public class BandwidthUtil {
* @return the dao
*/
public static BandwidthDataSetUpdate newDataSetMetaDataDao(
DataSetMetaData dataSetMetaData) {
DataSetMetaData<?> dataSetMetaData) {
BandwidthDataSetUpdate dao = new BandwidthDataSetUpdate();
// Set the fields we need to have..
dao.setDataSetName(dataSetMetaData.getDataSetName());
dao.setProviderName(dataSetMetaData.getProviderName());
dao.setUpdateTime(BandwidthUtil.now());
dao.setDataSetBaseTime(BandwidthUtil.copy(dataSetMetaData.getDate()));
dao.setDataSetBaseTime(TimeUtil.newCalendar(dataSetMetaData.getDate()));
dao.setUrl(dataSetMetaData.getUrl());
return dao;
@ -280,8 +263,21 @@ public class BandwidthUtil {
* @return true if the subscription should be rescheduled
*/
public static boolean subscriptionRequiresReschedule(
Subscription subscription, Subscription old) {
Subscription<?, ?> subscription, Subscription<?, ?> old) {
return instance.subscriptionRescheduleStrategy
.subscriptionRequiresReschedule(subscription, old);
}
/**
* Sets up the activePeriod Start/End to plan Start/End calendar
*/
public static Calendar planToPeriodCompareCalendar(Calendar planCalendar, Calendar activePeriod) {
Calendar cal = TimeUtil.newCalendar(planCalendar);
cal.set(Calendar.MONTH, activePeriod.get(Calendar.MONTH));
cal.set(Calendar.DAY_OF_MONTH, activePeriod.get(Calendar.DAY_OF_MONTH));
return cal;
}
}

View file

@ -21,12 +21,6 @@
<import feature="com.raytheon.uf.edex.registry.client.feature" version="0.0.0"/>
</requires>
<plugin
id="ll.netcdf"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="net.opengis"
download-size="0"
@ -86,13 +80,6 @@
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.nc4"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.unitconverter"
download-size="0"
@ -113,14 +100,7 @@
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.grib.ogc"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.obs.ogc"
download-size="0"
@ -142,13 +122,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.wms"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.datadelivery.retrieval"
download-size="0"
@ -184,11 +157,4 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.wcs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -37,6 +37,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* end since the times will be correct now.
* Oct 1, 2013 1797 dhladky Generics
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
* Oct 28, 2013 2448 dhladky Request start time incorrectly used subscription start time.
*
* </pre>
*
@ -195,8 +196,9 @@ public class WfsRequestBuilder<T extends Time, C extends Coverage> extends Reque
String endDateString = null;
String startDateString = null;
endDateString = ogcDateFormat.get().format(inTime.getEnd());
startDateString = ogcDateFormat.get().format(inTime.getStart());
// need to grab the request start and end times
endDateString = ogcDateFormat.get().format(inTime.getRequestEnd());
startDateString = ogcDateFormat.get().format(inTime.getRequestStart());
StringBuilder sb = new StringBuilder(256);
sb.append(PROPRERTYISGREATERTHAN_OPEN).append(NEW_LINE);

View file

@ -2,6 +2,7 @@ package com.raytheon.uf.edex.datadelivery.retrieval.wfs;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import com.raytheon.uf.common.datadelivery.registry.Coverage;
@ -17,6 +18,7 @@ import com.raytheon.uf.common.datadelivery.retrieval.xml.Retrieval;
import com.raytheon.uf.common.datadelivery.retrieval.xml.RetrievalAttribute;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.edex.datadelivery.retrieval.RetrievalGenerator;
import com.raytheon.uf.edex.datadelivery.retrieval.adapters.RetrievalAdapter;
@ -37,7 +39,8 @@ import com.raytheon.uf.edex.datadelivery.retrieval.adapters.RetrievalAdapter;
* Jun 04, 2013 1763 dhladky Readied for WFS Retrievals.
* Jun 18, 2013 2120 dhladky Fixed times.
* Sep 18, 2013 2383 bgonzale Added subscription name to log output.
* Oct 2, 2013 1797 dhladky Generics time gridded time separation
* Oct 2, 2013 1797 dhladky Generics time gridded time separation.
* Oct 28, 2013 2448 dhladky Request start time incorrectly used subscription start time.
*
* </pre>
*
@ -85,8 +88,6 @@ class WfsRetrievalGenerator extends RetrievalGenerator {
if (sub != null) {
PointTime subTime = sub.getTime();
if (sub.getUrl() == null) {
statusHandler
.info("Skipping subscription "
@ -94,6 +95,16 @@ class WfsRetrievalGenerator extends RetrievalGenerator {
+ " that is unfulfillable with the current metadata (null URL.)");
return Collections.emptyList();
}
PointTime subTime = sub.getTime();
// Gets the most recent time, which is kept as the end time.
Date endDate = subTime.getEnd();
// We add a little extra padding in the interval to prevent gaps in data.
long intervalMillis = (long) (subTime.getInterval() * TimeUtil.MILLIS_PER_MINUTE * 1.5);
// create the request start and end times.
subTime.setRequestEnd(endDate);
Date requestStartDate = new Date(endDate.getTime() - intervalMillis);
subTime.setRequestStart(requestStartDate);
// with point data they all have the same data
Parameter param = null;

View file

@ -46,6 +46,7 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 24, 2013 2292 mpduff Initial creation
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
*
* </pre>
*
@ -78,6 +79,10 @@ public class SubscriptionOverlapHandler implements
DataType dataType = subscription.getDataSetType();
Set<String> overlappingSubscriptions = new HashSet<String>();
for (Subscription potentialDuplicate : potentialDuplicates) {
// don't check against yourself
if (potentialDuplicate.getId().equals(subscription.getId())) {
continue;
}
OverlapData od = OverlapDataFactory.getOverlapData(
subscription, potentialDuplicate);

View file

@ -15,4 +15,7 @@ Import-Package: com.raytheon.edex.msg,
com.raytheon.uf.edex.database.purge
Require-Bundle: org.apache.commons.collections,
ch.qos.logback;bundle-version="1.0.13",
org.slf4j;bundle-version="1.7.5"
org.slf4j;bundle-version="1.7.5",
org.apache.commons.cxf;bundle-version="2.5.10"
Export-Package: com.raytheon.uf.edex.log,
com.raytheon.uf.edex.log.cxf

View file

@ -0,0 +1,136 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.edex.log.cxf;
import java.io.InputStream;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.LoggingMessage;
import org.apache.cxf.io.CachedOutputStream;
import org.apache.cxf.io.DelegatingInputStream;
import org.apache.cxf.message.Message;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
public class CXFLogger extends org.apache.cxf.interceptor.LoggingInInterceptor {
protected IUFStatusHandler log = UFStatus.getHandler(this.getClass());
@Override
public void handleMessage(Message message) throws Fault {
if (writer != null ||
RequestLogController.getInstance().shouldLogRequestsInfo() &&
log.isPriorityEnabled(RequestLogController.getInstance().getRequestLogLevel())) {
logging(message);
}
}
/**
* implement custom content for incoming requests in our own log format
* @param message
* @throws Fault
*/
protected void logging(Message message) throws Fault {
if (message.containsKey(LoggingMessage.ID_KEY)) {
return;
}
String id = (String)message.getExchange().get(LoggingMessage.ID_KEY);
if (id == null) {
id = LoggingMessage.nextId();
message.getExchange().put(LoggingMessage.ID_KEY, id);
}
message.put(LoggingMessage.ID_KEY, id);
final LoggingMessage buffer
= new LoggingMessage("Inbound Message\n--------------------------", id);
Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);
if (responseCode != null) {
buffer.getResponseCode().append(responseCode);
}
String encoding = (String)message.get(Message.ENCODING);
if (encoding != null) {
buffer.getEncoding().append(encoding);
}
String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);
if (httpMethod != null) {
buffer.getHttpMethod().append(httpMethod);
}
String ct = (String)message.get(Message.CONTENT_TYPE);
if (ct != null) {
buffer.getContentType().append(ct);
}
Object headers = message.get(Message.PROTOCOL_HEADERS);
if (headers != null) {
buffer.getHeader().append(headers);
}
String uri = (String)message.get(Message.REQUEST_URL);
if (uri != null) {
buffer.getAddress().append(uri);
String query = (String)message.get(Message.QUERY_STRING);
if (query != null) {
buffer.getAddress().append("?").append(query);
}
}
if (!isShowBinaryContent() && isBinaryContent(ct)) {
buffer.getMessage().append(BINARY_CONTENT_MESSAGE).append('\n');
log.handle(RequestLogController.getInstance().getRequestLogLevel(),
buffer.toString());
return;
}
InputStream is = message.getContent(InputStream.class);
if (is != null) {
CachedOutputStream bos = new CachedOutputStream();
if (threshold > 0) {
bos.setThreshold(threshold);
}
try {
// use the appropriate input stream and restore it later
InputStream bis = is instanceof DelegatingInputStream
? ((DelegatingInputStream)is).getInputStream() : is;
IOUtils.copyAndCloseInput(bis, bos);
bos.flush();
bis = bos.getInputStream();
// restore the delegating input stream or the input stream
if (is instanceof DelegatingInputStream) {
((DelegatingInputStream)is).setInputStream(bis);
} else {
message.setContent(InputStream.class, bis);
}
if (bos.getTempFile() != null) {
//large thing on disk...
buffer.getMessage().append("\nMessage (saved to tmp file):\n");
buffer.getMessage().append("Filename: " + bos.getTempFile().getAbsolutePath() + "\n");
}
if (bos.size() > limit) {
buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
}
writePayload(buffer.getPayload(), bos, encoding, ct);
bos.close();
} catch (Exception e) {
throw new Fault(e);
}
}
log.handle(RequestLogController.getInstance().getRequestLogLevel(),
buffer.toString());
}
}

View file

@ -0,0 +1,63 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.edex.log.cxf;
import com.raytheon.uf.common.status.UFStatus.Priority;
/**
* Singleton to control how incoming request information is logged. Implemented as
* a singleton to allow runtime control from a Web Client
* @author behemmi
*
*/
public class RequestLogController {
private static RequestLogController instance = null;
private Priority requestLogLevel;
private boolean shouldLogRequestsInfo;
private RequestLogController(){
requestLogLevel = Priority.DEBUG;
shouldLogRequestsInfo = true;
}
public static RequestLogController getInstance() {
if(instance == null) {
instance = new RequestLogController();
}
return instance;
}
public Priority getRequestLogLevel() {
return requestLogLevel;
}
public void setRequestLogLevel(Priority requestLogLevel) {
this.requestLogLevel = requestLogLevel;
}
public boolean shouldLogRequestsInfo() {
return getShouldLogRequestsInfo();
}
/**
* Traditional getter for Jackson serialization.
*
* @return shouldLogRequestsInfo - if this logger is enabled
*/
public boolean getShouldLogRequestsInfo() {
return shouldLogRequestsInfo;
}
public void setShouldLogRequestsInfo(boolean shouldLogRequestsInfo) {
this.shouldLogRequestsInfo = shouldLogRequestsInfo;
}
}

View file

@ -22,7 +22,8 @@ Require-Bundle: net.opengis;bundle-version="1.0.2",
ogc.tools.gml;bundle-version="1.0.2",
org.apache.commons.cxf,
org.eclipse.jetty;bundle-version="7.6.9",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174"
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
com.raytheon.uf.edex.log;bundle-version="1.12.1174"
Export-Package: com.raytheon.uf.edex.ogc.common,
com.raytheon.uf.edex.ogc.common.colormap,
com.raytheon.uf.edex.ogc.common.db,

View file

@ -52,10 +52,10 @@ public class AbstractFsStore {
protected static File findStore(String directoryName) {
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext edexStaticCONFIGURED = pathMgr.getContext(
LocalizationContext context = pathMgr.getContext(
LocalizationContext.LocalizationType.EDEX_STATIC,
LocalizationContext.LocalizationLevel.CONFIGURED);
return pathMgr.getFile(edexStaticCONFIGURED, directoryName);
LocalizationContext.LocalizationLevel.BASE);
return pathMgr.getFile(context, directoryName);
}
/**

View file

@ -0,0 +1,38 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.edex.ogc.common;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 30, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public interface IStyleLookupCallback<R extends PluginDataObject> {
public R lookupSample(String layerName) throws OgcException;
public List<R> getAllSamples() throws OgcException;
}

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
import com.vividsolutions.jts.geom.Envelope;

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/

View file

@ -1,26 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
import java.io.UnsupportedEncodingException;

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/
@ -102,4 +97,6 @@ public class OgcNamespace {
public static final String OWSNT = "http://www.opengis.net/owsnt/1.1";
public static final String NAWX15 = "http://www.faa.gov/nawx/1.5";
}

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/
@ -44,6 +39,8 @@ public class OgcOperationInfo<T> {
protected String postEncoding;
protected String httpBaseHostname;
protected List<String> formats = new LinkedList<String>();
protected List<String> versions = new LinkedList<String>();
@ -63,10 +60,12 @@ public class OgcOperationInfo<T> {
this.type = type;
}
public OgcOperationInfo(T type, String httpPostRes, String httpGetRes) {
public OgcOperationInfo(T type, String httpPostRes, String httpGetRes,
String httpBaseHostname) {
this(type);
this.httpGetRes = httpGetRes;
this.httpPostRes = httpPostRes;
this.httpBaseHostname = httpBaseHostname;
}
public void addFormat(String format) {
@ -223,4 +222,12 @@ public class OgcOperationInfo<T> {
this.postEncoding = postEncoding;
}
public String getHttpBaseHostname() {
return httpBaseHostname;
}
public void setHttpBaseHostname(String httpBaseHostname) {
this.httpBaseHostname = httpBaseHostname;
}
}

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/
@ -122,4 +117,6 @@ public class OgcPrefix {
public static final String OWSNT = "owsnt";
public static final String NAWX = "nawx";
}

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
import com.raytheon.uf.edex.ogc.common.http.MimeType;

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* 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.
**/
/**
*
*/

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
public class OgcStyle {

View file

@ -1,33 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 29, 2012 bclement Initial creation
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
import java.util.List;

View file

@ -1,27 +1,22 @@
/**********************************************************************
*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
**********************************************************************/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common;
import java.io.Serializable;

View file

@ -1,26 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.util.ArrayList;

View file

@ -128,7 +128,9 @@ public class FsLayerStore extends AbstractFsStore implements ILayerStore {
*/
private File getClassDirRead(Class<?> c) throws OgcException {
File rval = new File(storeLocation, c.getName());
if (!rval.exists()) {
return rval;
}
if (!rval.isDirectory()) {
throw new OgcException(Code.InternalServerError,
rval.getAbsolutePath() + " is not a directory");

View file

@ -1,33 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 11, 2012 bclement Initial creation
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.util.List;

View file

@ -1,26 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.lang.reflect.Constructor;

View file

@ -1,26 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.util.ArrayList;

View file

@ -1,34 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 06, 2012 bclement Initial creation
* Oct 14, 2013 2361 njensen Changed @Entity to @MappedSuperclass
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.util.Date;
@ -48,10 +36,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.edex.ogc.common.db.LayerTransformer.TimeFormat;
/**
*
* @author bclement
* @version 1.0
*/
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 29, 2011 bclement Initial creation
* 10/22/2013 2742 dhladky @Entity made for Db dependency in AWIPS code, changed to @MappedSuperclass
*
*
* @author bclement
* @version 1.0
*/
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@XmlAccessorType(XmlAccessType.NONE)
@ -62,21 +57,21 @@ public abstract class PointDataLayer extends
private static final long serialVersionUID = 4301480632118555546L;
public PointDataLayer() {
}
}
public PointDataLayer(SimpleLayer<DefaultPointDataDimension> other) {
super(other);
}
super(other);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.edex.ogc.common.db.SimpleLayer#getTimeEntries()
*/
@Override
public List<String> getTimeEntries() {
return LayerTransformer.getTimes(this, TimeFormat.HOUR_RANGES);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.edex.ogc.common.db.SimpleLayer#getTimeEntries()
*/
@Override
public List<String> getTimeEntries() {
return LayerTransformer.getTimes(this, TimeFormat.HOUR_RANGES);
}
/*
* (non-Javadoc)
@ -93,10 +88,10 @@ public abstract class PointDataLayer extends
*
* @see com.raytheon.uf.edex.ogc.common.db.SimpleLayer#getDefaultTimeEntry()
*/
@Override
public String getDefaultTimeEntry() {
return LayerTransformer.getTimeRange(getDefaultTime());
}
@Override
public String getDefaultTimeEntry() {
return LayerTransformer.getTimeRange(getDefaultTime());
}
/**
* Create formatted time range string with range start at the latest time
@ -105,15 +100,15 @@ public abstract class PointDataLayer extends
* @param milliOffset
* @return
*/
protected <T extends PluginDataObject> String getRangeSinceLatest(
long milliOffset) {
Date end = getTimes().last();
long startTime = end.getTime() - milliOffset;
Date start = new Date(startTime);
String startStr = LayerTransformer.format(start);
String endStr = LayerTransformer.format(end);
return startStr + "/" + endStr;
}
protected <T extends PluginDataObject> String getRangeSinceLatest(
long milliOffset) {
Date end = getTimes().last();
long startTime = end.getTime() - milliOffset;
Date start = new Date(startTime);
String startStr = LayerTransformer.format(start);
String endStr = LayerTransformer.format(end);
return startStr + "/" + endStr;
}
/*
* (non-Javadoc)

View file

@ -1,33 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 1, 2011 bclement Initial creation
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.io.Serializable;

View file

@ -1,33 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 29, 2011 bclement Initial creation
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.db;
import java.io.Serializable;
@ -106,6 +95,10 @@ public abstract class SimpleLayer<DIMENSION extends SimpleDimension> implements
@DynamicSerializeElement
protected TreeSet<Date> times;
@XmlElement
@DynamicSerializeElement
protected boolean timesAsRanges = false;
/**
*
*/
@ -367,4 +360,19 @@ public abstract class SimpleLayer<DIMENSION extends SimpleDimension> implements
this.crs84Bounds = crs84Bounds;
}
/**
* @return the timesAsRanges
*/
public boolean isTimesAsRanges() {
return timesAsRanges;
}
/**
* @param timesAsRanges
* the timesAsRanges to set
*/
public void setTimesAsRanges(boolean timesAsRanges) {
this.timesAsRanges = timesAsRanges;
}
}

View file

@ -1,33 +1,22 @@
/*
* The following software products were developed by Raytheon:
*
* ADE (AWIPS Development Environment) software
* CAVE (Common AWIPS Visualization Environment) software
* EDEX (Environmental Data Exchange) software
* uFrame (Universal Framework) software
*
* Copyright (c) 2010 Raytheon Co.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/epl-v10.php
*
*
* Contractor Name: Raytheon Company
* Contractor Address:
* 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 16, 2011 bclement Initial creation
*
*/
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.ogc.common.feature;
import java.util.List;

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