From 89c999410e831d2aab3703a02b98630fc0abe1ee Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Thu, 31 Oct 2013 14:06:05 -0500 Subject: [PATCH 01/13] Issue #2491 Fix collaboration Xml. Former-commit-id: a5f970e238ecf13691bf1f4ef25e1683047fd15a [formerly 3d36cec7be60d051a6d66e2c9c6f43cadfbe58c1] [formerly fdeff81da2c19543b5aa96e48700d05c10eb8d48 [formerly 64517ab3139be3cc21d5df7ff9d36709435bd7cd]] Former-commit-id: fdeff81da2c19543b5aa96e48700d05c10eb8d48 Former-commit-id: 49ffb7e92c7ca5f4c7b9ad3a7a5be6ab89037978 --- .../META-INF/MANIFEST.MF | 29 ++-- .../build.properties | 3 +- .../plugin.xml | 6 + ...com.raytheon.uf.viz.collaboration.xml.exsd | 78 +++++++++ .../provider/CollaborationXmlManager.java | 155 ++++++++++++++++++ .../collaboration/comm/provider/Tools.java | 42 +++-- .../META-INF/MANIFEST.MF | 27 +-- ...f.common.serialization.ISerializableObject | 4 - .../plugin.xml | 8 +- .../display/editor/CreateRemoteDisplay.java | 11 +- .../rsc/event/ResourceCapabilityChanged.java | 11 +- .../rsc/event/ResourcePropertiesChanged.java | 11 +- .../display/rsc/event/SharedResource.java | 11 +- .../serialization/jaxb/JAXBClassLocator.java | 10 +- 14 files changed, 329 insertions(+), 77 deletions(-) create mode 100644 cave/com.raytheon.uf.viz.collaboration.comm/plugin.xml create mode 100644 cave/com.raytheon.uf.viz.collaboration.comm/schema/com.raytheon.uf.viz.collaboration.xml.exsd create mode 100644 cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/CollaborationXmlManager.java delete mode 100644 cave/com.raytheon.uf.viz.collaboration.display/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.collaboration.comm/META-INF/MANIFEST.MF index de5ba1dde7..2b0fd469df 100644 --- a/cave/com.raytheon.uf.viz.collaboration.comm/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.collaboration.comm/META-INF/MANIFEST.MF @@ -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, diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/build.properties b/cave/com.raytheon.uf.viz.collaboration.comm/build.properties index 34d2e4d2da..e9863e281e 100644 --- a/cave/com.raytheon.uf.viz.collaboration.comm/build.properties +++ b/cave/com.raytheon.uf.viz.collaboration.comm/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + plugin.xml diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/plugin.xml b/cave/com.raytheon.uf.viz.collaboration.comm/plugin.xml new file mode 100644 index 0000000000..be8a82e56d --- /dev/null +++ b/cave/com.raytheon.uf.viz.collaboration.comm/plugin.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/schema/com.raytheon.uf.viz.collaboration.xml.exsd b/cave/com.raytheon.uf.viz.collaboration.comm/schema/com.raytheon.uf.viz.collaboration.xml.exsd new file mode 100644 index 0000000000..5e28330056 --- /dev/null +++ b/cave/com.raytheon.uf.viz.collaboration.comm/schema/com.raytheon.uf.viz.collaboration.xml.exsd @@ -0,0 +1,78 @@ + + + + + + + + + Extension point for specifying what types of objects can be the xml root of a collaboraton xml object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.13.0 + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/CollaborationXmlManager.java b/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/CollaborationXmlManager.java new file mode 100644 index 0000000000..8a54bcae50 --- /dev/null +++ b/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/CollaborationXmlManager.java @@ -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. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Oct 31, 2013  2491     bsteffen    Initial creation
+ * 
+ * 
+ * + * @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> baseClasses = new ArrayList>(); + 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> 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; + } + +} diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/Tools.java b/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/Tools.java index 665ef5ba53..07eb43309b 100644 --- a/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/Tools.java +++ b/cave/com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/Tools.java @@ -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. * *
  * 
  * 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.
+ * 
  * 
  * 
* @@ -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) { diff --git a/cave/com.raytheon.uf.viz.collaboration.display/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.collaboration.display/META-INF/MANIFEST.MF index 0c69688b99..1e0291e541 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.collaboration.display/META-INF/MANIFEST.MF @@ -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, diff --git a/cave/com.raytheon.uf.viz.collaboration.display/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.uf.viz.collaboration.display/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index bc3844a9a4..0000000000 --- a/cave/com.raytheon.uf.viz.collaboration.display/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -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 \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.collaboration.display/plugin.xml b/cave/com.raytheon.uf.viz.collaboration.display/plugin.xml index b77d894ab6..7f7d11faf7 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/plugin.xml +++ b/cave/com.raytheon.uf.viz.collaboration.display/plugin.xml @@ -21,4 +21,10 @@ class="com.raytheon.uf.viz.collaboration.display.rsc.rendering.PrimitiveRenderingHandler"> - \ No newline at end of file + + + + + + + diff --git a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/editor/CreateRemoteDisplay.java b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/editor/CreateRemoteDisplay.java index 5e664237f3..64cba778b9 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/editor/CreateRemoteDisplay.java +++ b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/editor/CreateRemoteDisplay.java @@ -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 + * * * * @@ -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; diff --git a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourceCapabilityChanged.java b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourceCapabilityChanged.java index 32abfae367..a68e5b8078 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourceCapabilityChanged.java +++ b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourceCapabilityChanged.java @@ -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 * * * @@ -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; diff --git a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourcePropertiesChanged.java b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourcePropertiesChanged.java index ae34a57068..8ce65f90ce 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourcePropertiesChanged.java +++ b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/ResourcePropertiesChanged.java @@ -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 * * * @@ -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; diff --git a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/SharedResource.java b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/SharedResource.java index 1dc49e6913..bcd90713a0 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/SharedResource.java +++ b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/event/SharedResource.java @@ -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 + * * * * @@ -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; diff --git a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/jaxb/JAXBClassLocator.java b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/jaxb/JAXBClassLocator.java index 46cb8ef922..c35943c17b 100644 --- a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/jaxb/JAXBClassLocator.java +++ b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/jaxb/JAXBClassLocator.java @@ -69,10 +69,12 @@ public class JAXBClassLocator { private List> included = new ArrayList>(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> getJAXBClasses(ISubClassLocator locator, - Class baseClass) { - return new JAXBClassLocator(locator, baseClass).getResults(); + Class... baseClasses) { + return new JAXBClassLocator(locator, baseClasses).getResults(); } } From 3776f258a3924cdf793f2b9f08e40fdccd72e49f Mon Sep 17 00:00:00 2001 From: David Gillingham Date: Thu, 31 Oct 2013 14:07:20 -0500 Subject: [PATCH 02/13] Issue #1843: Ensure user-selected ETN makes it back into the final transmitted product. Change-Id: Id5aede1ba07019150b3a43b45f067a5740d657af Former-commit-id: f404f1560ce79e26ae4f75b90565e79d7a1064ce [formerly 6e1cca29660a5d19b70f25c8ee0369475c7b32a2] [formerly c4f5cc53bb5a7bcd16214326d31479326097aac3 [formerly 194799b7d3fb719987523a77ba9b3c69a11bb69f]] Former-commit-id: c4f5cc53bb5a7bcd16214326d31479326097aac3 Former-commit-id: 3bac577a31e3ced76d11fd5eb4521f662e2c5045 --- .../viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java index 9eeb07461a..61b63f89df 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java @@ -405,6 +405,8 @@ public class StoreTransmitDlg extends CaveSWTDialog implements } else { throw new VizException(msg, e); } + } else { + serverResponse = responseContainer[0]; } } From ba31efaf0303dc06f5ba24f2dd92147bfa15ce5d Mon Sep 17 00:00:00 2001 From: Dave Hladky Date: Wed, 30 Oct 2013 13:56:39 -0500 Subject: [PATCH 03/13] Issue #2448 Fixed retrievals before activePeriod begins and after activePeriod expires. Change-Id: I75269bad24731990720d30683ebf5f27344661f3 Former-commit-id: 0eba787d3eacbe76d8dc0637f8eee076d9eaa9ba [formerly 4227f3a59f096dab54b30f55093af88e9e912ff1] [formerly 916196281335fd93ddc5671b0a2a99a2900a7cfc [formerly 060e719f27c20f24bae9a5603cc51d90434b8fa4]] Former-commit-id: 916196281335fd93ddc5671b0a2a99a2900a7cfc Former-commit-id: d55d68fe5af0a16a64239c548521b69c54114a05 --- .../registry/RecurringSubscription.java | 14 ++- .../uf/common/time/util/TimeUtil.java | 45 ++++++++++ .../bandwidth/BandwidthManager.java | 5 +- .../bandwidth/EdexBandwidthManager.java | 2 +- .../bandwidth/dao/BandwidthAllocation.java | 13 +-- .../bandwidth/dao/BandwidthDataSetUpdate.java | 10 +-- .../bandwidth/dao/BandwidthSubscription.java | 8 +- .../retrieval/BandwidthReservation.java | 6 +- .../bandwidth/retrieval/RetrievalPlan.java | 17 ++-- .../bandwidth/util/BandwidthDaoUtil.java | 88 +++++++++++-------- .../bandwidth/util/BandwidthUtil.java | 50 +++++------ .../retrieval/wfs/WfsRequestBuilder.java | 6 +- .../retrieval/wfs/WfsRetrievalGenerator.java | 17 +++- .../bandwidth/AbstractBandwidthDaoTest.java | 13 +-- 14 files changed, 186 insertions(+), 108 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/RecurringSubscription.java b/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/RecurringSubscription.java index fe0b2b1286..806b1ada4c 100644 --- a/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/RecurringSubscription.java +++ b/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/RecurringSubscription.java @@ -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. * * * @@ -868,18 +869,23 @@ public abstract class RecurringSubscription 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 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)); } diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimeUtil.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimeUtil.java index 8b5eb52eca..34355bbd41 100644 --- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimeUtil.java +++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimeUtil.java @@ -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. * * * @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; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthManager.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthManager.java index 7ae9e3be38..37cafa8fa2 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthManager.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthManager.java @@ -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. * * * @author dhladky @@ -307,7 +308,7 @@ public abstract class BandwidthManager .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 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 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/EdexBandwidthManager.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/EdexBandwidthManager.java index b953de7833..767ed19da0 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/EdexBandwidthManager.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/EdexBandwidthManager.java @@ -262,7 +262,7 @@ public abstract class EdexBandwidthManager 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(); diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthAllocation.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthAllocation.java index ad32d09262..b10ba0b8d0 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthAllocation.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthAllocation.java @@ -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. * * * @@ -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, - ISerializableObject, Serializable, IDeepCopyable { + Serializable, IDeepCopyable { private static final long serialVersionUID = 743702044231376839L; @@ -130,19 +131,19 @@ public class BandwidthAllocation implements IPersistableDataObject, 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()); diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthDataSetUpdate.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthDataSetUpdate.java index e17babe191..7f246f6929 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthDataSetUpdate.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthDataSetUpdate.java @@ -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. * * * @@ -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, - Serializable, ISerializableObject, IDeepCopyable { + Serializable, IDeepCopyable { private static final long serialVersionUID = 20120723L; @@ -92,13 +93,12 @@ public class BandwidthDataSetUpdate implements IPersistableDataObject, * 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; } diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthSubscription.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthSubscription.java index fcb84e9860..b6bde27d57 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthSubscription.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/dao/BandwidthSubscription.java @@ -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. * * * @@ -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 - implements Serializable, ISerializableObject, - IDeepCopyable { + implements Serializable, IDeepCopyable { private static final long serialVersionUID = 20120723L; @@ -117,7 +117,7 @@ public class BandwidthSubscription extends PersistableDataObject * @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; diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/BandwidthReservation.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/BandwidthReservation.java index 89709ab864..d9e2ea0781 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/BandwidthReservation.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/BandwidthReservation.java @@ -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. * * * @@ -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 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/RetrievalPlan.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/RetrievalPlan.java index 3e0bc83dc7..4c7befba90 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/RetrievalPlan.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/retrieval/RetrievalPlan.java @@ -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. * * * @@ -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); diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java index 77e140b0a4..6a4c722543 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java @@ -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. * * * @@ -161,92 +162,101 @@ public class BandwidthDaoUtil { 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 { 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 diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthUtil.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthUtil.java index 3fe7b9213f..26bf352156 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthUtil.java @@ -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. * * * @@ -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; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRequestBuilder.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRequestBuilder.java index 33c9b73b31..6cef654ca6 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRequestBuilder.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRequestBuilder.java @@ -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. * * * @@ -195,8 +196,9 @@ public class WfsRequestBuilder 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); diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRetrievalGenerator.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRetrievalGenerator.java index a420bfddf8..51ec6a0b3b 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRetrievalGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval.wfs/src/com/raytheon/uf/edex/datadelivery/retrieval/wfs/WfsRetrievalGenerator.java @@ -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. * * * @@ -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; diff --git a/tests/unit/com/raytheon/uf/edex/datadelivery/bandwidth/AbstractBandwidthDaoTest.java b/tests/unit/com/raytheon/uf/edex/datadelivery/bandwidth/AbstractBandwidthDaoTest.java index e28e7db08c..240f15f3f8 100644 --- a/tests/unit/com/raytheon/uf/edex/datadelivery/bandwidth/AbstractBandwidthDaoTest.java +++ b/tests/unit/com/raytheon/uf/edex/datadelivery/bandwidth/AbstractBandwidthDaoTest.java @@ -77,6 +77,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil; * Nov 12, 2012 1286 djohnson Initial creation * Jun 03, 2013 2038 djohnson Add test getting retrievals by dataset, provider, and status. * Oct 21, 2013 2292 mpduff Implement multiple data types. + * Oct 30, 2013 2248 dhladky Moved methods to TimeUtil * * * @@ -238,7 +239,7 @@ public abstract class AbstractBandwidthDaoTest Date: Thu, 31 Oct 2013 16:52:18 -0400 Subject: [PATCH 04/13] Issue #2486. Fixed an error of editing subset box. Corrected mouse wheel handler. Former-commit-id: feb9d8db5afb9b470dd120b073962fa59a6769de [formerly 7ca47690afc36179328a7e407944d979057db55f] [formerly f7d1939b36b6771b42c86462746aca51e31419f2 [formerly 7d16b7dd07d83975366505140d7a8df2c5c89cf2]] Former-commit-id: f7d1939b36b6771b42c86462746aca51e31419f2 Former-commit-id: 386db599857fa161169cf2d60cb1f99c56067d52 --- .../viz/datadelivery/rsc/DrawBoxResource.java | 239 ++++++++++++------ 1 file changed, 156 insertions(+), 83 deletions(-) diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/rsc/DrawBoxResource.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/rsc/DrawBoxResource.java index f41973eed2..ba0bd4db62 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/rsc/DrawBoxResource.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/rsc/DrawBoxResource.java @@ -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. * * * @@ -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)); + } } From d589bced40b4c97b1aa6a6e2077d65620ed9231c Mon Sep 17 00:00:00 2001 From: Dave Hladky Date: Fri, 1 Nov 2013 10:23:56 -0500 Subject: [PATCH 05/13] Issue #2292 Stopped subscriptions from checking against themselves. This prevented subscriptions from being updatable. Former-commit-id: 1594cc6a720e89511580d62cee4cf4c4f4f146d8 [formerly e5896397f6f35e895f014b05adfdd3cedf7b162d] [formerly 422dabf3eb38dd10e63593b30abf2331cc89769e [formerly 6edfeb94cfb14785d68d90b41fc636faa2ece074]] Former-commit-id: 422dabf3eb38dd10e63593b30abf2331cc89769e Former-commit-id: ca1f2fc340945956c69fb90b15fa90b7725f908f --- .../service/services/overlap/SubscriptionOverlapHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.service/src/com/raytheon/uf/edex/datadelivery/service/services/overlap/SubscriptionOverlapHandler.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.service/src/com/raytheon/uf/edex/datadelivery/service/services/overlap/SubscriptionOverlapHandler.java index de479effba..1d5545962d 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.service/src/com/raytheon/uf/edex/datadelivery/service/services/overlap/SubscriptionOverlapHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.service/src/com/raytheon/uf/edex/datadelivery/service/services/overlap/SubscriptionOverlapHandler.java @@ -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 * * * @@ -78,6 +79,10 @@ public class SubscriptionOverlapHandler implements DataType dataType = subscription.getDataSetType(); Set overlappingSubscriptions = new HashSet(); for (Subscription potentialDuplicate : potentialDuplicates) { + // don't check against yourself + if (potentialDuplicate.getId().equals(subscription.getId())) { + continue; + } OverlapData od = OverlapDataFactory.getOverlapData( subscription, potentialDuplicate); From 3753b45c0c57886c72159d0292f3c54dcb9dc1cd Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Thu, 31 Oct 2013 18:23:00 -0500 Subject: [PATCH 06/13] Issue #2361 move ebxml away from using SerializationUtil for XML processing Change-Id: I04decec05b44a9c1881963f1a902adf6742aafa9 Former-commit-id: 2e28d72fb798047406cbb30097e6b810418a0046 [formerly 2413c854c05693c25a44cf1cfa88a5ee70713a75] [formerly 5efd1b7218c7d9ccd2ca3b0c7df09d64887be1a6 [formerly ebf2c3c32945fefe8fd8c054b163fba238ac0ee5]] Former-commit-id: 5efd1b7218c7d9ccd2ca3b0c7df09d64887be1a6 Former-commit-id: f4cdcb2fae7262b45b5939c9c6aed08dd5c83fe2 --- .../registry/ebxml/encoder/JaxbEncoder.java | 8 +- .../META-INF/MANIFEST.MF | 3 +- ...f.common.serialization.ISerializableObject | 64 ----------- .../schemas/ebxml/util/EbxmlJaxbManager.java | 103 ++++++++++++++++++ .../schemas/ebxml/util/SerializedType.java | 41 ++++++- .../uf/edex/registry/ebxml/dao/DbInit.java | 27 +++-- .../query/adhoc/AdhocQueryExpression.java | 3 +- .../adhoc/AdhocQueryExpressionManager.java | 9 +- 8 files changed, 171 insertions(+), 87 deletions(-) delete mode 100644 edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject create mode 100644 edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/EbxmlJaxbManager.java diff --git a/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/JaxbEncoder.java b/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/JaxbEncoder.java index 3fae40334a..bf351c11f7 100644 --- a/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/JaxbEncoder.java +++ b/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/JaxbEncoder.java @@ -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 * * * @@ -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); } diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/MANIFEST.MF index 5fe77199b3..399a674add 100644 --- a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/MANIFEST.MF @@ -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, diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 527302bcff..0000000000 --- a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -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 \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/EbxmlJaxbManager.java b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/EbxmlJaxbManager.java new file mode 100644 index 0000000000..e11abcba09 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/EbxmlJaxbManager.java @@ -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. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Oct 30, 2013 2361       njensen     Initial creation
+ * 
+ * 
+ * + * @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> 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() { + + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/SerializedType.java b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/SerializedType.java index 0e9f5fe1e8..f6c7944b3c 100644 --- a/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/SerializedType.java +++ b/edexOsgi/com.raytheon.uf.common.registry.schemas.ebxml/src/com/raytheon/uf/common/registry/schemas/ebxml/util/SerializedType.java @@ -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 + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * --/--/----                          Initial creation
+ * Oct 31, 2013 2361      njensen      Use specific JAXBManager instead of SerializationUtil
+ * 
+ * 
+ * + */ 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); diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/dao/DbInit.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/dao/DbInit.java index a6e881f0b7..e0df2cef1d 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/dao/DbInit.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/dao/DbInit.java @@ -36,6 +36,8 @@ import java.util.Map; import java.util.jar.JarEntry; import java.util.jar.JarFile; +import javax.xml.bind.JAXBException; + import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.LifecycleManager; import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.MsgRegistryException; import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest; @@ -57,8 +59,8 @@ import com.google.common.annotations.VisibleForTesting; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.registry.ebxml.RegistryUtil; +import com.raytheon.uf.common.registry.schemas.ebxml.util.EbxmlJaxbManager; 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.util.ReflectionUtil; @@ -79,13 +81,14 @@ import com.raytheon.uf.edex.registry.ebxml.init.RegistryInitializedListener; * ------------ ---------- ----------- -------------------------- * 2/9/2012 184 bphillip Initial Coding * 3/18/2013 1082 bphillip Changed to use transactional boundaries and spring injection - * 4/9/2013 1802 bphillip Changed submitObjects method call from submitObjectsInternal - * Apr 15, 2013 1693 djohnson Use a strategy to verify the database is up to date. + * 4/9/2013 1802 bphillip Changed submitObjects method call from submitObjectsInternal + * Apr 15, 2013 1693 djohnson Use a strategy to verify the database is up to date. * Apr 30, 2013 1960 djohnson Extend the generalized DbInit. - * 5/21/2013 2022 bphillip Using TransactionTemplate for database initialization - * May 29, 2013 1650 djohnson Reference LifecycleManager as interface type. - * Jun 24, 2013 2106 djohnson Invoke registry initialized listeners in their own transaction so + * 5/21/2013 2022 bphillip Using TransactionTemplate for database initialization + * May 29, 2013 1650 djohnson Reference LifecycleManager as interface type. + * Jun 24, 2013 2106 djohnson Invoke registry initialized listeners in their own transaction so * they can't fail the ebxml schema creation/population. + * Nov 01, 2013 2361 njensen Use EbxmlJaxbManager instead of SerializationUtil * * * @author bphillip @@ -162,9 +165,15 @@ public class DbInit extends com.raytheon.uf.edex.database.init.DbInit implements statusHandler.info("Populating RegRep database from file: " + fileList[i].getName()); - SubmitObjectsRequest obj = SerializationUtil - .jaxbUnmarshalFromXmlFile(SubmitObjectsRequest.class, - fileList[i]); + SubmitObjectsRequest obj = null; + try { + obj = EbxmlJaxbManager.getJaxbManager().unmarshalFromXmlFile( + SubmitObjectsRequest.class, fileList[i]); + } catch (JAXBException e) { + throw new SerializationException( + "Error unmarshalling from file: " + + fileList[i].getPath(), e); + } // Ensure an owner is assigned for (RegistryObjectType regObject : obj.getRegistryObjectList() diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpression.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpression.java index d4ebc97c42..cbf0885d5f 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpression.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpression.java @@ -35,7 +35,8 @@ import javax.xml.bind.annotation.XmlRootElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Feb 29, 2012 bphillip Initial creation + * Feb 29, 2012 bphillip Initial creation + * Oct 31, 2013 2361 njensen Use specific JAXBManager instead of SerializationUtil * * * diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpressionManager.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpressionManager.java index 8dd5a2e735..7b3d0f962e 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpressionManager.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/adhoc/AdhocQueryExpressionManager.java @@ -25,8 +25,7 @@ import java.util.Map; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.serialization.SerializationException; -import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.common.registry.schemas.ebxml.util.EbxmlJaxbManager; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -83,9 +82,9 @@ public class AdhocQueryExpressionManager { AdhocQueryExpression obj = null; try { - obj = (AdhocQueryExpression) SerializationUtil - .jaxbUnmarshalFromXmlFile(fileList[i]); - } catch (SerializationException e) { + obj = EbxmlJaxbManager.getJaxbManager().unmarshalFromXmlFile( + AdhocQueryExpression.class, fileList[i]); + } catch (Exception e) { statusHandler.error("Error getting predefined adhoc queries.", e); } From a6cfeb56262b6399d221f01e5611922a74ba122c Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Fri, 1 Nov 2013 13:19:28 -0500 Subject: [PATCH 07/13] Issue #2361 remove XML annotations from TAF and CCFP Former-commit-id: c52c207c80e89d8b35185eca4eee04db5827890a [formerly 942936e815827ced404ba76a7c05d33e6ce0c84f] [formerly cd49daccf91d63e3790c420e9304a0d80fa2bdda [formerly 2587a9b13ec6576007081a165f6042dd5a82b7eb]] Former-commit-id: cd49daccf91d63e3790c420e9304a0d80fa2bdda Former-commit-id: d935c4f547326fc59cafcb6c459a7fe13b706668 --- ...f.common.serialization.ISerializableObject | 2 -- .../edex/plugin/ccfp/CcfpLocation.java | 10 +----- .../raytheon/edex/plugin/ccfp/CcfpRecord.java | 24 +------------- ...f.common.serialization.ISerializableObject | 8 ----- .../edex/plugin/taf/common/ChangeGroup.java | 31 ++----------------- .../edex/plugin/taf/common/IcingLayer.java | 12 ++----- .../edex/plugin/taf/common/TafPeriod.java | 11 ++----- .../edex/plugin/taf/common/TafRecord.java | 30 +----------------- .../edex/plugin/taf/common/TafSkyCover.java | 12 ++----- .../taf/common/TafWeatherCondition.java | 22 ++++--------- .../taf/common/TemperatureForecast.java | 11 ++----- .../plugin/taf/common/TurbulenceLayer.java | 12 ++----- 12 files changed, 21 insertions(+), 164 deletions(-) delete mode 100644 edexOsgi/com.raytheon.edex.plugin.ccfp/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 edexOsgi/com.raytheon.edex.plugin.taf/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.ccfp/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 76f54f1a80..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,2 +0,0 @@ -com.raytheon.edex.plugin.ccfp.CcfpRecord -com.raytheon.edex.plugin.ccfp.CcfpLocation \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpLocation.java b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpLocation.java index 5a2922ae10..b1976a1eaf 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpLocation.java +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpLocation.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java index 340a2922a7..45025c7581 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java @@ -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 * * * @@ -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; } diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.taf/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 4322ac8595..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.taf/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -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 \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/ChangeGroup.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/ChangeGroup.java index c5a913715f..f1f4fb28fa 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/ChangeGroup.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/ChangeGroup.java @@ -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 * * * @@ -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 weather; /** Sky coverage */ @DynamicSerializeElement - @XmlElement @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER) private Set sky_cover; /** The turbulence layers */ @DynamicSerializeElement - @XmlElement @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER) private Set turbulence_layers; /** The icing layers */ @DynamicSerializeElement - @XmlElement @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER) private Set icing_layers; /** The temperature forecasts */ @DynamicSerializeElement - @XmlElement @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentID", fetch = FetchType.EAGER) private Set 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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/IcingLayer.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/IcingLayer.java index ac387a1a8f..2ea5d818a0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/IcingLayer.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/IcingLayer.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java index 0ec1f97fcd..9ca45d4ed2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java index f9f1943290..3b9804ee88 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java @@ -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 * * * @@ -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 changeGroups = new HashSet(); @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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafSkyCover.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafSkyCover.java index 177476da88..52d8a8a115 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafSkyCover.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafSkyCover.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafWeatherCondition.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafWeatherCondition.java index 4189abe10f..9ebc953fdb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafWeatherCondition.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafWeatherCondition.java @@ -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 "other" attribute. + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 6/21/2007 180 Phillippe Initial creation + * 20081106 1515 jkorman Changed length of "other" attribute. + * Nov 01, 2013 2361 njensen Remove XML annotations * * * @@ -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 = ""; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TemperatureForecast.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TemperatureForecast.java index 4963657707..cd04ed2441 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TemperatureForecast.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TemperatureForecast.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TurbulenceLayer.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TurbulenceLayer.java index ace6d0ba9d..476371c366 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TurbulenceLayer.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TurbulenceLayer.java @@ -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 * * * @@ -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; From 6b3481ca260cf0266dbb595e7c94734faa2176a9 Mon Sep 17 00:00:00 2001 From: Slav Korolev Date: Fri, 1 Nov 2013 14:26:56 -0400 Subject: [PATCH 08/13] Issue #2431. Changed labels on the table. Former-commit-id: 8874f76878fa0a2de22eca1043aa09acb29b066f [formerly dd1ff63737758f6f9986a6428b3d60c97aeeb94f] [formerly 0801f8dedd718bfde0965f002be4e8cadb52d533 [formerly 5599d13b9cbac3806c636b629d502aacc1f621b4]] Former-commit-id: 0801f8dedd718bfde0965f002be4e8cadb52d533 Former-commit-id: 7d0198b3568ccdf9a6995dbda19cf2b6197f0870 --- .../notification/NotificationTableComp.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/notification/NotificationTableComp.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/notification/NotificationTableComp.java index 955da9fbb4..fbb1e671b5 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/notification/NotificationTableComp.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/notification/NotificationTableComp.java @@ -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. * * * @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; From d38879158d1215a89c6133b91f340cb1c4603827 Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Mon, 4 Nov 2013 13:01:49 -0600 Subject: [PATCH 09/13] Issue #2491 Clean a few more procedure only objects from ISerializableObject files. Former-commit-id: d386c6bc76c42ceb4c7b90b6219ea9fa0502c062 [formerly ff5f08d23a6566cc59e4c198dc70f60d5ee570d6] [formerly 5a928e6ad573853b33974723b0925313d284e7d4 [formerly 047e4cd82846adaf8fc3dcdfe087209bd57e210c]] Former-commit-id: 5a928e6ad573853b33974723b0925313d284e7d4 Former-commit-id: 08e73de88313926b7a8f3a7f10897cdcd1bbe9af --- .../com.raytheon.uf.common.serialization.ISerializableObject | 1 - .../com.raytheon.uf.common.serialization.ISerializableObject | 1 - .../com.raytheon.uf.common.serialization.ISerializableObject | 1 - 3 files changed, 3 deletions(-) delete mode 100644 cave/com.raytheon.uf.viz.d2d.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 cave/com.raytheon.uf.viz.gisdatastore.directory/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 cave/com.raytheon.uf.viz.monitor/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject diff --git a/cave/com.raytheon.uf.viz.d2d.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.uf.viz.d2d.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 66ae38f135..0000000000 --- a/cave/com.raytheon.uf.viz.d2d.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1 +0,0 @@ -com.raytheon.uf.viz.d2d.gfe.rsc.GFEGridResourceData diff --git a/cave/com.raytheon.uf.viz.gisdatastore.directory/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.uf.viz.gisdatastore.directory/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 8eb2ecad04..0000000000 --- a/cave/com.raytheon.uf.viz.gisdatastore.directory/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1 +0,0 @@ -com.raytheon.uf.viz.gisdatastore.directory.rsc.DirectoryDataStoreResourceData diff --git a/cave/com.raytheon.uf.viz.monitor/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.uf.viz.monitor/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index a1659a65cb..0000000000 --- a/cave/com.raytheon.uf.viz.monitor/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1 +0,0 @@ -com.raytheon.uf.viz.monitor.util.MonitorPlotInfoRetriever \ No newline at end of file From 173bff3eb86d0fd58be3d6cfbd03d6236179e416 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Mon, 4 Nov 2013 13:34:01 -0600 Subject: [PATCH 10/13] Issue #2361 remove XML annotations from bufrmos Former-commit-id: b1409d4002255d4e8f3d7437bd0634d2fa5b01ca [formerly 9b9d57bc9440078ba0cf6a8c21403ff45fe30396] [formerly 1a25186415b967dc2cccc80a116fffa14ef8dc8b [formerly f6a873e20e4cb7ce6fb47654ce3292b4f3bab99e]] Former-commit-id: 1a25186415b967dc2cccc80a116fffa14ef8dc8b Former-commit-id: b2847dd446740313857fde614bb36be36e9a80d4 --- ...aytheon.uf.common.serialization.ISerializableObject | 9 --------- .../edex/plugin/bufrmos/common/BufrMosAvnData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosData.java | 10 +--------- .../plugin/bufrmos/common/BufrMosDataLocation.java | 10 +--------- .../edex/plugin/bufrmos/common/BufrMosEtaData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosGfsData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosHpcData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosLampData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosMrfData.java | 6 +----- .../edex/plugin/bufrmos/common/BufrMosNgmData.java | 6 +----- 10 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 edexOsgi/com.raytheon.edex.plugin.bufrmos/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.bufrmos/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index e86e30db95..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosAvnData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosAvnData.java index 79a9700b63..5f75b2fce3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosAvnData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosAvnData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java index d84ee06f9e..8fde8b7356 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosDataLocation.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosDataLocation.java index 1d455bdba4..1dbb1b5bcf 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosDataLocation.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosDataLocation.java @@ -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 * * * @@ -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; diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosEtaData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosEtaData.java index fe9f5b155a..f6c018ae02 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosEtaData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosEtaData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosGfsData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosGfsData.java index d6c6585508..a7cc5e9b65 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosGfsData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosGfsData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosHpcData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosHpcData.java index bbc388319c..078926c80a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosHpcData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosHpcData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosLampData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosLampData.java index 707d166d77..c813aec30a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosLampData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosLampData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosMrfData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosMrfData.java index ffc865f2f4..aa7694743c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosMrfData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosMrfData.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosNgmData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosNgmData.java index b2982de3cf..c437682ff4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosNgmData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosNgmData.java @@ -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 * * * @@ -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 From 5d2ec98600931e45a096f6491e14542fa6ca7dea Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Mon, 4 Nov 2013 14:29:40 -0600 Subject: [PATCH 11/13] Issue #2361 remove ISerializableObject from redbook and hydro Change-Id: Ib48dea5d734f19a9919da9fea752b5e0f38a2141 Former-commit-id: 27f09b8096ff385f6c5c53544694fb70a5fb5674 [formerly 6064000389a0099e5aa293517218cf7137600d54] [formerly b36d28c9fd6b3ce849e70687ac2b8f14858360fa [formerly 2626a79c976ac016352a091bdf66890e929edc85]] Former-commit-id: b36d28c9fd6b3ce849e70687ac2b8f14858360fa Former-commit-id: 3e3400dc7cec9d1787bdefb2007d2dd5a94a4da5 --- ...f.common.serialization.ISerializableObject | 2 -- .../appsdefaults/SHEFAppsDefaultsDlg.java | 16 +++++------ .../viz/hydro/timeseries/ShefIssueMgr.java | 27 +++++++++++++------ ...f.common.serialization.ISerializableObject | 2 -- .../raytheon/viz/redbook/RedbookWMOMap.java | 12 ++++----- ...f.common.serialization.ISerializableObject | 2 -- .../plugin/redbook/common/RedbookRecord.java | 27 +------------------ .../redbook/decoder/RedbookFcstMap.java | 15 +++++------ 8 files changed, 40 insertions(+), 63 deletions(-) delete mode 100644 cave/com.raytheon.viz.hydro/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 cave/com.raytheon.viz.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 edexOsgi/com.raytheon.edex.plugin.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject diff --git a/cave/com.raytheon.viz.hydro/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.viz.hydro/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 9144a771dd..0000000000 --- a/cave/com.raytheon.viz.hydro/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,2 +0,0 @@ -com.raytheon.viz.hydro.timeseries.ShefIssueXML -com.raytheon.viz.hydro.appsdefaults.SHEFAppsDefaultsXML diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/appsdefaults/SHEFAppsDefaultsDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/appsdefaults/SHEFAppsDefaultsDlg.java index 754ffbcdb4..a59e9ed484 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/appsdefaults/SHEFAppsDefaultsDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/appsdefaults/SHEFAppsDefaultsDlg.java @@ -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 * * * @@ -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 { diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ShefIssueMgr.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ShefIssueMgr.java index 5e24c4da37..2bf58b2342 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ShefIssueMgr.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/ShefIssueMgr.java @@ -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 * * * @@ -48,6 +51,13 @@ import com.raytheon.uf.common.serialization.SerializationUtil; */ public class ShefIssueMgr { + + private static final SingleTypeJAXBManager 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 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); } } } diff --git a/cave/com.raytheon.viz.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.viz.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 8d76b088d8..0000000000 --- a/cave/com.raytheon.viz.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,2 +0,0 @@ -com.raytheon.viz.redbook.RedbookWMOMap -com.raytheon.viz.redbook.rsc.RedbookProductBrowserDataDefinition diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/RedbookWMOMap.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/RedbookWMOMap.java index 6c998100be..825d1f5926 100644 --- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/RedbookWMOMap.java +++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/RedbookWMOMap.java @@ -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 * * * @@ -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(); diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index cb7615ab77..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,2 +0,0 @@ -com.raytheon.edex.plugin.redbook.common.RedbookRecord -com.raytheon.edex.plugin.redbook.decoder.RedbookFcstMap \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java index 199634a1d7..e02a4a9b9c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java @@ -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 * * * @@ -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 diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/decoder/RedbookFcstMap.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/decoder/RedbookFcstMap.java index c98d57750a..701489756a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/decoder/RedbookFcstMap.java +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/decoder/RedbookFcstMap.java @@ -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 * * * @@ -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; From 99a63bc1824588a09ef105dbe13de7805d54bc2f Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Mon, 4 Nov 2013 15:22:32 -0600 Subject: [PATCH 12/13] Issue #2508 Added DiscreteGridSlice.setKeys() to fix error in serialization. Change-Id: I0edcf4e113f7226650a8363a3d7f0225f482c8f8 Former-commit-id: a5820f8ddf6f213b4ba2acf685f193d2996935cd [formerly b6eb0df14cc02b6a72a365d4649fb0a935042e98] [formerly 9a737b2d4adf67fe0b48337d5e88b4fd48bd7222 [formerly fe6f8beb1174e605a1935899eb2e5ad6d1babd57]] Former-commit-id: 9a737b2d4adf67fe0b48337d5e88b4fd48bd7222 Former-commit-id: 833e84b5b80b6c94a6496e7c9ed60d4bb610f12a --- .../gfe/slice/DiscreteGridSlice.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/DiscreteGridSlice.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/DiscreteGridSlice.java index 93770e0cfd..4bf375ade1 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/DiscreteGridSlice.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/DiscreteGridSlice.java @@ -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 key) { - setKey(key.toArray(new DiscreteKey[] {})); + /** + * @param keys + * the keys to set + */ + public void setKeys(DiscreteKey[] keys) { + this.keys = keys; } @Override From 2a2b35d62cdae7e65a29360997138befdeb070f7 Mon Sep 17 00:00:00 2001 From: Dave Hladky Date: Mon, 4 Nov 2013 16:24:14 -0600 Subject: [PATCH 13/13] Issue #2472 Replacing lost commit Former-commit-id: 62d08dbe93800c402cfa49b23ad1ee41266bb0c6 [formerly 1f1469fe825d82ebcb6acd6361dd8e54a3184c8c] [formerly 9c6a430d4006945865874adbcdd70ef3f9014802 [formerly 7c1f7ad737361b55e85bdf48dad24c7a60b36e99]] Former-commit-id: 9c6a430d4006945865874adbcdd70ef3f9014802 Former-commit-id: 47b946fc3bd8958eead12cb765003b1f347afd7b --- .../META-INF/MANIFEST.MF | 2 +- .../feature.xml | 36 +- .../META-INF/MANIFEST.MF | 5 +- .../raytheon/uf/edex/log/cxf/CXFLogger.java | 136 +++++++ .../uf/edex/log/cxf/RequestLogController.java | 63 ++++ .../META-INF/MANIFEST.MF | 3 +- .../uf/edex/ogc/common/AbstractFsStore.java | 6 +- .../edex/ogc/common/IStyleLookupCallback.java | 38 ++ .../uf/edex/ogc/common/OgcBoundingBox.java | 43 +-- .../uf/edex/ogc/common/OgcDimension.java | 43 +-- .../uf/edex/ogc/common/OgcException.java | 42 +-- .../uf/edex/ogc/common/OgcGeoBoundingBox.java | 43 +-- .../raytheon/uf/edex/ogc/common/OgcLayer.java | 43 +-- .../uf/edex/ogc/common/OgcNamespace.java | 45 ++- .../uf/edex/ogc/common/OgcOperationInfo.java | 57 +-- .../uf/edex/ogc/common/OgcPrefix.java | 45 ++- .../uf/edex/ogc/common/OgcResponse.java | 43 +-- .../uf/edex/ogc/common/OgcServiceInfo.java | 43 +-- .../raytheon/uf/edex/ogc/common/OgcStyle.java | 43 +-- .../uf/edex/ogc/common/StyleLookup.java | 49 +-- .../raytheon/uf/edex/ogc/common/Version.java | 43 +-- .../ogc/common/db/DefaultLayerCollector.java | 42 +-- .../uf/edex/ogc/common/db/FsLayerStore.java | 4 +- .../uf/edex/ogc/common/db/ILayerCache.java | 49 +-- .../uf/edex/ogc/common/db/LayerCollector.java | 42 +-- .../edex/ogc/common/db/LayerTransformer.java | 42 +-- .../uf/edex/ogc/common/db/PointDataLayer.java | 115 +++--- .../edex/ogc/common/db/SimpleDimension.java | 49 +-- .../uf/edex/ogc/common/db/SimpleLayer.java | 68 ++-- .../ogc/common/feature/FeatureFactory.java | 49 +-- .../common/feature/JsonFeatureFormatter.java | 49 +-- .../common/feature/ShpFeatureFormatter.java | 49 +-- .../feature/SimpleFeatureFormatter.java | 49 +-- .../edex/ogc/common/filter/SpatialFilter.java | 333 +++++++++++++++--- .../ogc/common/filter/TemporalFilter.java | 40 ++- .../common/gml3_1_1/EnvelopeConverter.java | 49 +-- .../common/gml3_1_1/GeometryConverter.java | 49 +-- .../ogc/common/gml3_1_1/GmlWktWriter.java | 49 +-- .../common/gml3_2_1/EnvelopeConverter.java | 49 +-- .../common/gml3_2_1/GeometryConverter.java | 67 ++-- .../edex/ogc/common/http/OgcHttpEndpoint.java | 26 +- .../edex/ogc/common/http/OgcHttpHandler.java | 43 +-- .../uf/edex/ogc/common/http/OgcHttpPool.java | 43 +-- .../edex/ogc/common/http/OgcHttpRequest.java | 42 +-- .../edex/ogc/common/jaxb/OgcJaxbManager.java | 8 +- .../ogc/common/output/OgcResponseOutput.java | 49 +-- .../ogc/common/spatial/BoundingBoxUtil.java | 17 +- .../uf/edex/ogc/common/spatial/CrsLookup.java | 91 +++-- .../common/spatial/VerticalCoordinate.java | 6 +- .../ogc/common/spatial/VerticalEnabled.java | 9 + .../edex/ogc/common/stats/IStatsRecorder.java | 72 ++++ .../ogc/common/stats/NoopStatsRecorder.java | 46 +-- .../edex/ogc/common/stats/OperationType.java | 25 ++ .../uf/edex/ogc/common/stats/ServiceType.java | 33 ++ .../ogc/common/stats/StatsRecorderFinder.java | 8 +- .../ogc/common/time/ForecastTimeUtil.java | 49 +-- .../plugin/grib/ogc/GribLayerCollector.java | 4 +- .../plugin/grib/ogc/GribRecordFinder.java | 49 +-- .../edex/plugin/grib/ogc/GribWcsSource.java | 49 +-- .../edex/plugin/grib/ogc/GribWmsSource.java | 63 ++-- .../plugin/grib/ogc/GridCompositeLayer.java | 13 +- .../plugin/grib/ogc/GridFieldAdapter.java | 5 +- .../plugin/grib/ogc/GridStyleProvider.java | 112 ++++++ .../plugin/grib/ogc/GridVerticalEnabler.java | 12 + .../META-INF/MANIFEST.MF | 1 - .../res/spring/madis-ogc.xml | 5 - .../edex/plugin/madis/ogc/MadisWmsSource.java | 105 ------ .../META-INF/MANIFEST.MF | 1 - .../res/spring/obs-ogc.xml | 5 - .../plugin/obs/ogc/metar/MetarWmsSource.java | 108 ------ .../META-INF/MANIFEST.MF | 3 +- .../com.raytheon.uf.edex.wcs/src/.classpath | 7 + .../com.raytheon.uf.edex.wcs/src/.project | 28 ++ .../src/.settings/org.eclipse.jdt.core.prefs | 8 + .../com/raytheon/uf/edex/wcs/WcsConfig.java | 124 +++++++ .../uf/edex/wcs/WcsCoverageThriftReponse.java | 49 +-- .../raytheon/uf/edex/wcs/WcsHttpHandler.java | 40 ++- .../uf/edex/wcs/WcsOperationInfo.java | 49 +-- .../raytheon/uf/edex/wcs/WcsServiceInfo.java | 49 +-- .../uf/edex/wcs/format/DataRecordIOSP.java | 49 +-- .../uf/edex/wcs/format/IWcsDataFormatter.java | 49 +-- .../uf/edex/wcs/format/NetCdfFormatter.java | 53 ++- .../wcs/provider/CapabilitiesBuilder.java | 51 ++- .../uf/edex/wcs/provider/CustomIdMap.java | 148 ++++++++ .../wcs/provider/DescCoverageBuilder.java | 74 ++-- .../uf/edex/wcs/provider/OgcWcsProvider.java | 157 ++++----- .../wcs/provider/OperationsDescriber.java | 65 ++-- .../uf/edex/wcs/provider/WcsJaxbUtils.java | 49 +-- .../raytheon/uf/edex/wcs/reg/Coverage.java | 58 ++- .../uf/edex/wcs/reg/CoverageDescription.java | 49 +-- .../uf/edex/wcs/reg/CoverageTransform.java | 108 ++++-- .../uf/edex/wcs/reg/DefaultWcsSource.java | 66 ++-- .../raytheon/uf/edex/wcs/reg/RangeAxis.java | 49 +-- .../raytheon/uf/edex/wcs/reg/RangeField.java | 49 +-- .../uf/edex/wcs/reg/RangeFieldDefinition.java | 49 +-- .../uf/edex/wcs/reg/RangeParseException.java | 49 +-- .../uf/edex/wcs/reg/WcsSourceAccessor.java | 49 +-- .../uf/edex/wcs/request/DefactoEnabler.java | 49 +-- .../edex/wcs/request/DescCoverageRequest.java | 104 ++++-- .../uf/edex/wcs/request/GetCapRequest.java | 49 +-- .../edex/wcs/request/GetCoverageRequest.java | 98 ++++-- .../uf/edex/wcs/request/GetDataRequest.java | 49 +-- .../uf/edex/wcs/request/WcsRequest.java | 11 + .../uf/edex/wcs/soap1_1_2/WcsImpl.java | 56 ++- .../META-INF/MANIFEST.MF | 6 +- .../res/spring/wfs-ogc-request.xml | 18 +- .../res/spring/wfs-ogc-soap-request.xml | 6 +- .../raytheon/uf/edex/wfs/IWfsProvider.java | 8 + .../raytheon/uf/edex/wfs/WfsException.java | 56 ++- .../raytheon/uf/edex/wfs/WfsFeatureType.java | 48 +-- .../raytheon/uf/edex/wfs/WfsHttpFactory.java | 49 +-- .../uf/edex/wfs/feature/FeatureAdapter.java | 49 +-- .../edex/wfs/feature/FeatureTypeConfig.java | 49 +-- .../wfs/feature/SimpleFeatureTypeCache.java | 49 +-- .../uf/edex/wfs/filter/AbsExpressionOp.java | 49 +-- .../uf/edex/wfs/filter/AbstractCompOp.java | 49 +-- .../uf/edex/wfs/filter/AbstractLogicOp.java | 49 +-- .../uf/edex/wfs/filter/AbstractSpatialOp.java | 49 +-- .../edex/wfs/filter/ExpressionProcessor.java | 49 +-- .../uf/edex/wfs/filter/FilterProcessor.java | 49 +-- .../edex/wfs/filter/OgcExpressionVisitor.java | 49 +-- .../uf/edex/wfs/filter/OgcFilterVisitor.java | 49 +-- .../wfs/filter/v1_1_0/AbsExpressionOp.java | 49 +-- .../wfs/filter/v1_1_0/AbstractCompOp.java | 49 +-- .../wfs/filter/v1_1_0/AbstractLogicOp.java | 49 +-- .../wfs/filter/v1_1_0/AbstractSpatialOp.java | 49 +-- .../filter/v1_1_0/ExpressionProcessor.java | 49 +-- .../wfs/filter/v1_1_0/FilterProcessor.java | 49 +-- .../filter/v1_1_0/OgcExpressionVisitor.java | 49 +-- .../wfs/filter/v1_1_0/OgcFilterVisitor.java | 49 +-- .../filter/v1_1_0/QueryExpressionVisitor.java | 49 +-- .../wfs/filter/v1_1_0/QueryFilterVisitor.java | 49 +-- .../wfs/filter/v2_0_0/AbsExpressionOp.java | 49 +-- .../wfs/filter/v2_0_0/AbstractCompOp.java | 49 +-- .../wfs/filter/v2_0_0/AbstractLogicOp.java | 49 +-- .../v2_0_0/AbstractQueryFilterVisitor.java | 42 ++- .../wfs/filter/v2_0_0/AbstractSpatialOp.java | 49 +-- .../filter/v2_0_0/ExpressionProcessor.java | 49 +-- .../wfs/filter/v2_0_0/Filter2Processor.java | 49 +-- .../filter/v2_0_0/QueryExpressionVisitor.java | 49 +-- .../wfs/filter/v2_0_0/QueryFilterVisitor.java | 136 +++++-- .../wfs/filter/v2_0_0/SubFilterVisitor.java | 69 +++- .../uf/edex/wfs/gml/EnvelopeConverter.java | 49 +-- .../uf/edex/wfs/gml/GeometryConverter.java | 49 +-- .../uf/edex/wfs/gml/GmlWktWriter.java | 49 +-- .../uf/edex/wfs/provider/Capabilities.java | 49 +-- .../edex/wfs/provider/FeatureDescriber.java | 27 +- .../uf/edex/wfs/provider/FeatureFetcher.java | 64 ++-- .../edex/wfs/provider/FeatureTranslator.java | 49 +-- .../wfs/provider/QueryExpressionVisitor.java | 49 +-- .../edex/wfs/provider/QueryFilterVisitor.java | 49 +-- .../wfs/provider/SimpleFilterHandler.java | 48 +-- .../uf/edex/wfs/provider/Transactor.java | 49 +-- .../uf/edex/wfs/provider/VisitorBag.java | 55 ++- .../uf/edex/wfs/reg/AbstractWfsSource.java | 54 ++- .../uf/edex/wfs/reg/IPdoGmlTranslator.java | 49 +-- .../uf/edex/wfs/reg/IWfsRegistry.java | 4 + .../raytheon/uf/edex/wfs/reg/IWfsSource.java | 5 + .../uf/edex/wfs/reg/PluginWfsSource.java | 49 +-- .../uf/edex/wfs/reg/WfsRegistryImpl.java | 114 ++++-- .../edex/wfs/request/DescFeatureTypeReq.java | 48 +-- .../uf/edex/wfs/request/FeatureQuery.java | 48 +-- .../uf/edex/wfs/request/GetCapReq.java | 48 +-- .../uf/edex/wfs/request/GetFeatureReq.java | 48 +-- .../uf/edex/wfs/request/QualifiedName.java | 48 +-- .../raytheon/uf/edex/wfs/request/SortBy.java | 48 +-- .../uf/edex/wfs/request/TransReq.java | 48 +-- .../uf/edex/wfs/request/WfsRequest.java | 49 +-- .../raytheon/uf/edex/wfs/soap2_0_0/Wfs.java | 17 +- .../uf/edex/wfs/soap2_0_0/WfsImpl.java | 81 ++++- .../uf/edex/wfs/util/JaxbTransUtil.java | 49 +-- .../util/XMLGregorianCalendarConverter.java | 79 +++++ .../uf/edex/wfs/v1_1_0/Capabilities.java | 49 +-- .../uf/edex/wfs/v1_1_0/FeatureTranslator.java | 49 +-- .../uf/edex/wfs/v1_1_0/Wfs1_1_0Provider.java | 80 +++-- .../uf/edex/wfs/v2_0_0/Capabilities.java | 94 ++--- .../uf/edex/wfs/v2_0_0/FeatureTranslator.java | 49 +-- .../uf/edex/wfs/v2_0_0/Wfs2_0_0Provider.java | 95 +++-- .../wfs/wxxm/AbstractWxxm32Translator.java | 167 ++++++++- .../uf/edex/wfs/wxxm/WxxmWfsSource.java | 6 + 180 files changed, 4782 insertions(+), 4296 deletions(-) create mode 100644 edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/CXFLogger.java create mode 100644 edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/RequestLogController.java create mode 100644 edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/IStyleLookupCallback.java create mode 100644 edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/IStatsRecorder.java create mode 100644 edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/OperationType.java create mode 100644 edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/ServiceType.java create mode 100644 edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridStyleProvider.java delete mode 100644 edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/MadisWmsSource.java delete mode 100644 edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/src/com/raytheon/uf/edex/plugin/obs/ogc/metar/MetarWmsSource.java create mode 100644 edexOsgi/com.raytheon.uf.edex.wcs/src/.classpath create mode 100644 edexOsgi/com.raytheon.uf.edex.wcs/src/.project create mode 100644 edexOsgi/com.raytheon.uf.edex.wcs/src/.settings/org.eclipse.jdt.core.prefs create mode 100644 edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsConfig.java create mode 100644 edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CustomIdMap.java create mode 100644 edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/XMLGregorianCalendarConverter.java diff --git a/cots/org.apache.commons.cxf/META-INF/MANIFEST.MF b/cots/org.apache.commons.cxf/META-INF/MANIFEST.MF index f1a355e1b9..8d78af960a 100644 --- a/cots/org.apache.commons.cxf/META-INF/MANIFEST.MF +++ b/cots/org.apache.commons.cxf/META-INF/MANIFEST.MF @@ -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, diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.core.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.datadelivery.core.feature/feature.xml index 0440cbd2b9..4ef2c03400 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.core.feature/feature.xml +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.core.feature/feature.xml @@ -21,12 +21,6 @@ - - - - - - - + - - - - diff --git a/edexOsgi/com.raytheon.uf.edex.log/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.log/META-INF/MANIFEST.MF index 28c4de8c3d..2dbebc064a 100644 --- a/edexOsgi/com.raytheon.uf.edex.log/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.log/META-INF/MANIFEST.MF @@ -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 diff --git a/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/CXFLogger.java b/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/CXFLogger.java new file mode 100644 index 0000000000..31c06eb12a --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/CXFLogger.java @@ -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 Government’s 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()); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/RequestLogController.java b/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/RequestLogController.java new file mode 100644 index 0000000000..e1631fc37a --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.log/src/com/raytheon/uf/edex/log/cxf/RequestLogController.java @@ -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 Government’s 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; + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF index 23e4ce2a1c..9f8370e771 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF @@ -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, diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/AbstractFsStore.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/AbstractFsStore.java index be155dc7d9..c09d3eb9d0 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/AbstractFsStore.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/AbstractFsStore.java @@ -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); } /** diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/IStyleLookupCallback.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/IStyleLookupCallback.java new file mode 100644 index 0000000000..67100732fb --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/IStyleLookupCallback.java @@ -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 Government’s 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 + * + *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 30, 2013            bclement     Initial creation
+ *
+ * 
+ * + * @author bclement + * @version 1.0 + */ +public interface IStyleLookupCallback { + + public R lookupSample(String layerName) throws OgcException; + + public List getAllSamples() throws OgcException; + +} diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcBoundingBox.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcBoundingBox.java index e39621257d..b9c655b3b2 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcBoundingBox.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcBoundingBox.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcDimension.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcDimension.java index 2302c233a6..fefc8c1e95 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcDimension.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcDimension.java @@ -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. + **/ /** * */ diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcException.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcException.java index 930b14bd18..bcef6ca0dc 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcException.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcException.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcGeoBoundingBox.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcGeoBoundingBox.java index b2298cafb2..96d9bee5f3 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcGeoBoundingBox.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcGeoBoundingBox.java @@ -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. + **/ /** * */ diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcLayer.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcLayer.java index 098d5c3087..b5ad0af36a 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcLayer.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcLayer.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcNamespace.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcNamespace.java index 7f81d270a0..5c91da8d25 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcNamespace.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcNamespace.java @@ -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"; + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcOperationInfo.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcOperationInfo.java index 0f9341307e..984b71512e 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcOperationInfo.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcOperationInfo.java @@ -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 { protected String postEncoding; + protected String httpBaseHostname; + protected List formats = new LinkedList(); protected List versions = new LinkedList(); @@ -63,10 +60,12 @@ public class OgcOperationInfo { 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 { this.postEncoding = postEncoding; } + public String getHttpBaseHostname() { + return httpBaseHostname; + } + + public void setHttpBaseHostname(String httpBaseHostname) { + this.httpBaseHostname = httpBaseHostname; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcPrefix.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcPrefix.java index 6de9a09e2a..4677b7b86a 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcPrefix.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcPrefix.java @@ -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"; + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcResponse.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcResponse.java index f6a6b31624..5d0f91550b 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcResponse.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcResponse.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcServiceInfo.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcServiceInfo.java index b5adef3e12..3a08e04e51 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcServiceInfo.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcServiceInfo.java @@ -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. + **/ /** * */ diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcStyle.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcStyle.java index 6509ce1f98..ebc770e525 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcStyle.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcStyle.java @@ -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 { diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/StyleLookup.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/StyleLookup.java index cc2a21c0e0..5986749dd6 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/StyleLookup.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/StyleLookup.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/Version.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/Version.java index f1a7889182..57ee4b4f10 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/Version.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/Version.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/DefaultLayerCollector.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/DefaultLayerCollector.java index ba2c908d33..3725fde40a 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/DefaultLayerCollector.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/DefaultLayerCollector.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/FsLayerStore.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/FsLayerStore.java index e4bf12b8b6..166a761e3e 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/FsLayerStore.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/FsLayerStore.java @@ -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"); diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/ILayerCache.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/ILayerCache.java index 8967f08cbb..9a66441291 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/ILayerCache.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/ILayerCache.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java index 48f15b883d..24198d8340 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerTransformer.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerTransformer.java index 7e3e09faf4..2cca1633a0 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerTransformer.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerTransformer.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/PointDataLayer.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/PointDataLayer.java index 72a9b97eb3..b1b938913a 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/PointDataLayer.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/PointDataLayer.java @@ -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 other) { - super(other); - } + super(other); + } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.edex.ogc.common.db.SimpleLayer#getTimeEntries() - */ - @Override - public List getTimeEntries() { - return LayerTransformer.getTimes(this, TimeFormat.HOUR_RANGES); - } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.ogc.common.db.SimpleLayer#getTimeEntries() + */ + @Override + public List 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 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 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) diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleDimension.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleDimension.java index 616a1c52cf..8e0d29e325 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleDimension.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleDimension.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleLayer.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleLayer.java index 7c3ecbb791..1cfae420c8 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleLayer.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleLayer.java @@ -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 implements @DynamicSerializeElement protected TreeSet times; + @XmlElement + @DynamicSerializeElement + protected boolean timesAsRanges = false; + /** * */ @@ -367,4 +360,19 @@ public abstract class SimpleLayer 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; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/FeatureFactory.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/FeatureFactory.java index a8e49eeb0c..c62ca43dcc 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/FeatureFactory.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/FeatureFactory.java @@ -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; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/JsonFeatureFormatter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/JsonFeatureFormatter.java index 8b22163f04..49b4381191 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/JsonFeatureFormatter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/JsonFeatureFormatter.java @@ -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 9, 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.io.ByteArrayOutputStream; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/ShpFeatureFormatter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/ShpFeatureFormatter.java index ae50a9af7a..f7721b2d03 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/ShpFeatureFormatter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/ShpFeatureFormatter.java @@ -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 -* ------------ ---------- ----------- -------------------------- -* Feb 28, 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.feature; import java.io.File; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/SimpleFeatureFormatter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/SimpleFeatureFormatter.java index 4c14e4b54a..1ae85869e7 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/SimpleFeatureFormatter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/feature/SimpleFeatureFormatter.java @@ -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 8, 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.io.OutputStream; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/SpatialFilter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/SpatialFilter.java index 1123fb6f6a..e558648466 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/SpatialFilter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/SpatialFilter.java @@ -9,13 +9,25 @@ */ package com.raytheon.uf.edex.ogc.common.filter; +import java.util.LinkedList; +import java.util.ListIterator; +import java.util.Map; + +import org.apache.commons.collections.map.LRUMap; +import org.opengis.referencing.crs.CoordinateReferenceSystem; + import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialObject; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.CoordinateFilter; import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.GeometryFactory; +import com.vividsolutions.jts.geom.LinearRing; +import com.vividsolutions.jts.geom.Polygon; /** - * TODO Add Description + * Spatial PDO Filter * *
  *
@@ -36,14 +48,34 @@ public class SpatialFilter extends AbstractPdoFilter {
         EQUALS, CONTAINS, COVERS, COVEREDBY, CROSSES, DISJOINT, INTERSECTS, OVERLAPS, TOUCHES, WITHIN
     };
 
-    protected Geometry geometry;
+	protected final Geometry geometry;
 
-    protected SpatialOp op;
+	protected final SpatialOp op;
+    
+    private static final Polygon CRS84_BOUNDS;
+    
+	private static final GeometryFactory geomFact = new GeometryFactory();
+
+	@SuppressWarnings("unchecked")
+	private final Map cache = new LRUMap(32);
+
+    static {
+		Coordinate[] coords = new Coordinate[5];
+		coords[0] = new Coordinate(-180, 90);
+		coords[1] = new Coordinate(180, 90);
+		coords[2] = new Coordinate(180, -90);
+		coords[3] = new Coordinate(-180, -90);
+		coords[4] = coords[0];
+		LinearRing shell = geomFact.createLinearRing(coords);
+		CRS84_BOUNDS = geomFact.createPolygon(shell, new LinearRing[0]);
+    }
 
     /**
-     * @param geometry
-     * @param op
-     */
+	 * Geometry is assumed to be same CRS as PDO (CRS:84)
+	 * 
+	 * @param geometry
+	 * @param op
+	 */
     public SpatialFilter(SpatialOp op, Geometry geometry) {
         this.geometry = geometry;
         this.op = op;
@@ -58,62 +90,261 @@ public class SpatialFilter extends AbstractPdoFilter {
      */
     @Override
     public boolean matches(PluginDataObject pdo) {
+		boolean rval = true;
         if (geometry == null) {
-            return true;
+			return rval;
         }
+		ISpatialObject spat;
         if (pdo instanceof ISpatialEnabled) {
-            if (!matchSpatial(((ISpatialEnabled) pdo).getSpatialObject())) {
-                return false;
-            }
+			spat = ((ISpatialEnabled) pdo).getSpatialObject();
         } else if (pdo instanceof ISpatialObject) {
-            if (!matchSpatial((ISpatialObject) pdo)) {
-                return false;
-            }
+			spat = (ISpatialObject) pdo;
+		} else {
+			return rval;
+		}
+		String cacheKey = getCacheKey(spat);
+		synchronized (cache) {
+			Boolean cachedResult = cache.get(cacheKey);
+			if (cachedResult != null) {
+				return cachedResult;
+			}
+		}
+		if (!matchSpatial(spat)) {
+			rval = false;
         }
-        return true;
+		synchronized (cache) {
+			cache.put(cacheKey, rval);
+		}
+		return rval;
     }
 
-    private boolean matchSpatial(ISpatialObject spat) {
-        Geometry other = spat.getGeometry();
-        boolean rval;
-        switch (op) {
-        case EQUALS:
-            rval = other.equals(this.geometry);
-            break;
-        case CONTAINS:
-            rval = other.contains(this.geometry);
-            break;
-        case COVERS:
-            rval = other.covers(this.geometry);
-            break;
-        case COVEREDBY:
-            rval = other.coveredBy(this.geometry);
-            break;
-        case CROSSES:
-            rval = other.crosses(this.geometry);
-            break;
-        case DISJOINT:
-            rval = other.disjoint(this.geometry);
-            break;
-        case INTERSECTS:
-            rval = other.intersects(this.geometry);
-            break;
-        case OVERLAPS:
-            rval = other.overlaps(this.geometry);
-            break;
-        case TOUCHES:
-            rval = other.touches(this.geometry);
-            break;
-        case WITHIN:
-            rval = other.within(this.geometry);
-            break;
-        default:
-            rval = true;
-            break;
+	/**
+	 * Generate unique key for spatial object
+	 * 
+	 * @param spat
+	 * @return
+	 */
+	private static String getCacheKey(ISpatialObject spat) {
+        CoordinateReferenceSystem crs = spat.getCrs();
+        String rval = (crs == null ? "" : crs.toWKT());
+        Geometry geom = spat.getGeometry();
+        if (geom != null) {
+            rval = rval + geom.toText();
         }
         return rval;
+	}
+
+	/**
+	 * Get geometries from internal bounds. Takes into account any needed
+	 * adjustments to map to OGC bounds
+	 * 
+	 * Assumes any geographic geometry is Lon/Lat order
+	 * 
+	 * @param spat
+	 * @return
+	 */
+	private static Geometry[] getGeometries(ISpatialObject spatial) {
+		// we don't support wrapping over the poles
+		Geometry copy = truncateYAxis(spatial.getGeometry());
+		// create multiple geometries that all fit inside CRS84 bounds
+		Geometry diff = copy.difference(CRS84_BOUNDS);
+		Geometry[] rval = new Geometry[diff.getNumGeometries() + 1];
+		rval[0] = copy.intersection(CRS84_BOUNDS);
+		for (int i = 0; i < diff.getNumGeometries(); ++i) {
+			rval[i + 1] = convertXAxis(diff.getGeometryN(i));
+		}
+		return merge(rval);
+	}
+
+	/**
+	 * Attempt to merge any intersecting geometries
+	 * 
+	 * @param geoms
+	 * @return
+	 */
+	private static Geometry[] merge(Geometry[] geoms) {
+		if (geoms.length < 2) {
+			return geoms;
+		}
+		LinkedList blobs = new LinkedList();
+		blobs.add(geoms[0]);
+		for (int i = 1; i < geoms.length; ++i) {
+			Geometry geom = geoms[i];
+			ListIterator iter = blobs.listIterator();
+			while (iter.hasNext()) {
+				Geometry blob = iter.next();
+				if (blob.intersects(geom)) {
+					geom = blob.union(geom);
+					iter.remove();
+				}
+			}
+			blobs.add(geom);
+		}
+		return blobs.toArray(new Geometry[blobs.size()]);
+	}
+
+	/**
+	 * Truncate geometry Y coordinates to fit between -90 and 90
+	 * 
+	 * @param geom
+	 */
+	private static Geometry truncateYAxis(Geometry geom) {
+		Geometry rval = (Geometry) geom.clone();
+		rval.apply(new CoordinateFilter() {
+			@Override
+			public void filter(Coordinate coord) {
+				if (coord.y > 90) {
+					coord.y = 90;
+				} else if (coord.y < -90) {
+					coord.y = -90;
+				}
+			}
+		});
+		rval.geometryChanged();
+		return rval;
+	}
+
+	/**
+	 * Convert geometry X coordinates to fit between -180 and 180
+	 * 
+	 * @param geom
+	 * @return
+	 */
+	private static Geometry convertXAxis(Geometry geom) {
+		Geometry rval = (Geometry) geom.clone();
+		rval.apply(new CoordinateFilter() {
+			@Override
+			public void filter(Coordinate coord) {
+				coord.x = ((coord.x + 180) % 360) - 180;
+			}
+		});
+		geom.geometryChanged();
+		return rval;
+	}
+
+	/**
+	 * Return true if spatial object matches the geographic operator
+	 * 
+	 * @param spat
+	 * @return
+	 */
+	private boolean matchSpatial(ISpatialObject spat) {
+        if (spat.getGeometry() == null) {
+            return false;
+        }
+		Geometry[] geometries = getGeometries(spat);
+		return matchGeom(geometries);
+	}
+
+	protected static interface ForEach {
+		public boolean eval(Geometry other);
+	}
+
+	/**
+	 * Return true if geometry matches the geographic operator
+	 * 
+	 * @param other
+	 * @return
+	 */
+	private boolean matchGeom(Geometry[] others) {
+        switch (op) {
+        case EQUALS:
+        	return all(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.equals(geometry);
+				}
+			}, others);
+        case CONTAINS:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.contains(geometry);
+				}
+			}, others);
+        case COVERS:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.covers(geometry);
+				}
+			}, others);
+        case COVEREDBY:
+			return all(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.coveredBy(geometry);
+				}
+			}, others);
+        case CROSSES:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.crosses(geometry);
+				}
+			}, others);
+        case DISJOINT:
+			return all(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.disjoint(geometry);
+				}
+			}, others);
+        case INTERSECTS:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.intersects(geometry);
+				}
+			}, others);
+        case OVERLAPS:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.overlaps(geometry);
+				}
+			}, others);
+        case TOUCHES:
+			return any(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.touches(geometry);
+				}
+			}, others);
+        case WITHIN:
+			return all(new ForEach() {
+				public boolean eval(Geometry other) {
+					return other.within(geometry);
+				}
+			}, others);
+        default:
+			return true;
+        }
     }
 
+	/**
+	 * Return true if any of others evaluate true
+	 * 
+	 * @param fe
+	 * @param others
+	 * @return
+	 */
+	private boolean any(ForEach fe, Geometry[] others) {
+		for (Geometry other : others) {
+			if (fe.eval(other)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Return true if all of other evaluate true
+	 * 
+	 * @param fe
+	 * @param others
+	 * @return
+	 */
+	private boolean all(ForEach fe, Geometry[] others) {
+		for (Geometry other : others) {
+			if (!fe.eval(other)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
     /**
      * @return the geometry
      */
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/TemporalFilter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/TemporalFilter.java
index 48ef4fb3d6..4096aaab82 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/TemporalFilter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/TemporalFilter.java
@@ -16,7 +16,7 @@ import com.raytheon.uf.common.time.DataTime;
 import com.raytheon.uf.common.time.TimeRange;
 
 /**
- * TODO Add Description
+ * Temporal PDO Filter
  * 
  * 
  *
@@ -34,7 +34,7 @@ import com.raytheon.uf.common.time.TimeRange;
 public class TemporalFilter extends AbstractPdoFilter {
 
     public static enum TimeOp {
-        After, Before, Begins, BegunBy, TContains, During, TEquals, TOverlaps, Meets, OverlappedBy, MetBy, Ends, EndedBy
+        AnyInteracts, After, Before, Begins, BegunBy, TContains, During, TEquals, TOverlaps, Meets, OverlappedBy, MetBy, Ends, EndedBy
     };
 
     protected DataTime time;
@@ -70,6 +70,14 @@ public class TemporalFilter extends AbstractPdoFilter {
         Date t2Start = range.getStart();
         Date t2End = range.getEnd();
         switch (op) {
+        case AnyInteracts:
+            if (isRange(time)) {
+                return beforeOrEqual(t1Start, t2End)
+                        && afterOrEqual(t1End, t2Start);
+            } else {
+                return beforeOrEqual(t1Start, t2Start)
+                        && afterOrEqual(t1End, t2End);
+            }
         case After:
             return t1Start.after(t2End);
         case Before:
@@ -82,6 +90,7 @@ public class TemporalFilter extends AbstractPdoFilter {
                     return t1Start.equals(t2Start);
                 }
             }
+			break;
         case BegunBy:
             if (isRange(other)) {
                 if (isRange(time)) {
@@ -90,10 +99,12 @@ public class TemporalFilter extends AbstractPdoFilter {
                     return t1Start.equals(t2Start);
                 }
             }
+			break;
         case During:
             if (isRange(time)) {
                 return t1Start.after(t2Start) && t1End.before(t2End);
             }
+			break;
         case EndedBy:
             if (isRange(other)) {
                 if (isRange(time)) {
@@ -102,6 +113,7 @@ public class TemporalFilter extends AbstractPdoFilter {
                     return t1End.equals(t2End);
                 }
             }
+			break;
         case Ends:
             if (isRange(time)) {
                 if (isRange(other)) {
@@ -110,19 +122,23 @@ public class TemporalFilter extends AbstractPdoFilter {
                     return t1End.equals(t2End);
                 }
             }
+			break;
         case Meets:
             if (isRange(other) && isRange(time)) {
                 return t1End.equals(t2Start);
             }
+			break;
         case MetBy:
             if (isRange(other) && isRange(time)) {
                 return t1Start.equals(t2End);
             }
+            break;
         case OverlappedBy:
             if (isRange(other) && isRange(time)) {
                 return t1Start.after(t2Start) && t1Start.before(t2End)
                         && t1End.after(t2End);
             }
+			break;
         case TContains:
             if (isRange(other)) {
                 if (isRange(time)) {
@@ -131,6 +147,7 @@ public class TemporalFilter extends AbstractPdoFilter {
                     return t1Start.before(t2Start) && t1End.after(t2End);
                 }
             }
+			break;
         case TEquals:
             if (!(isRange(other) ^ isRange(time))) {
                 return t1Start.equals(t2Start) && t1End.equals(t2End);
@@ -140,11 +157,30 @@ public class TemporalFilter extends AbstractPdoFilter {
                 return t1Start.before(t2Start) && t1End.after(t2Start)
                         && t1End.before(t2End);
             }
+			break;
         }
 
         return false;
     }
 
+    /**
+     * @param one
+     * @param two
+     * @return true if one is before or equal to two
+     */
+    public static boolean beforeOrEqual(Date one, Date two) {
+        return one.equals(two) || one.before(two);
+    }
+
+    /**
+     * @param one
+     * @param two
+     * @return true if one is after or equal to two
+     */
+    public static boolean afterOrEqual(Date one, Date two) {
+        return one.equals(two) || one.after(two);
+    }
+
     public static boolean isRange(DataTime time) {
         return time.getUtilityFlags().contains(DataTime.FLAG.PERIOD_USED);
     }
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java
index 4cd3d82bee..3096e617d7 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java
@@ -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
- * ------------ ---------- ----------- --------------------------
- * Apr 26, 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.gml3_1_1;
 
 import java.text.ParseException;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GeometryConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GeometryConverter.java
index ff26e0ca96..46db08f930 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GeometryConverter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GeometryConverter.java
@@ -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
- * ------------ ---------- ----------- --------------------------
- * Apr 25, 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.gml3_1_1;
 
 import net.opengis.gml.v_3_1_1.AbstractGeometryType;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GmlWktWriter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GmlWktWriter.java
index 250e27be0f..da3fb34f1f 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GmlWktWriter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/GmlWktWriter.java
@@ -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
- * ------------ ---------- ----------- --------------------------
- * Apr 25, 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.gml3_1_1;
 
 import java.math.BigDecimal;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java
index 2fec8304d1..2a43479bf4 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java
@@ -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
- * ------------ ---------- ----------- --------------------------
- * Apr 26, 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.gml3_2_1;
 
 import java.text.ParseException;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java
index 5b5a986356..52e924ec52 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java
@@ -1,39 +1,32 @@
-/*
- * 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
- * ------------ ---------- ----------- --------------------------
- * Apr 25, 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.gml3_2_1;
 
 import java.math.BigInteger;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.bind.JAXBElement;
 
@@ -61,6 +54,7 @@ import net.opengis.gml.v_3_2_1.PointPropertyType;
 import net.opengis.gml.v_3_2_1.PointType;
 import net.opengis.gml.v_3_2_1.PolygonType;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.geotools.geometry.jts.JTS;
 
 import com.vividsolutions.jts.geom.Coordinate;
@@ -88,6 +82,17 @@ public class GeometryConverter {
     protected final GeometryFactory factory = new GeometryFactory();
 
     protected final ObjectFactory gmlFactory = new ObjectFactory();
+    
+    private static final String DIGIT_STR = "Ee-.0123456789";
+
+    private static final Set DIGIT_SET;
+
+    static {
+        char[] arr = DIGIT_STR.toCharArray();
+        HashSet set = new HashSet(
+                Arrays.asList(ArrayUtils.toObject(arr)));
+        DIGIT_SET = Collections.unmodifiableSet(set);
+    }
 
     /**
      * Supports geometry collection, polygon, point and linestring
@@ -886,7 +891,7 @@ public class GeometryConverter {
      * @return true if c is a valid character used in representing a number
      */
     protected boolean isNumber(Character c) {
-        return Character.isDigit(c);
+        return DIGIT_SET.contains(c);
     }
 
     /**
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpEndpoint.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpEndpoint.java
index ecf5d32704..4a7a4e6e3c 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpEndpoint.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpEndpoint.java
@@ -29,11 +29,16 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 
-import com.raytheon.uf.edex.ogc.common.stats.OgcStatsRecorder;
+import com.raytheon.uf.common.status.IUFStatusHandler;
+import com.raytheon.uf.common.status.UFStatus;
+import com.raytheon.uf.edex.log.cxf.RequestLogController;
+import com.raytheon.uf.edex.ogc.common.stats.IStatsRecorder;
+import com.raytheon.uf.edex.ogc.common.stats.OperationType;
+import com.raytheon.uf.edex.ogc.common.stats.ServiceType;
 import com.raytheon.uf.edex.ogc.common.stats.StatsRecorderFinder;
 
 /**
- * TODO - Class comment here
+ * HTTP Camel Processor for OGC REST Services
  * 
  * 
  * 
@@ -56,6 +61,8 @@ public class OgcHttpEndpoint implements Processor {
 	public static final String HEADER_AC_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
 
     protected IOgcHttpPooler pool;
+    
+    protected IUFStatusHandler log = UFStatus.getHandler(this.getClass());
 
 	/**
 	 * 
@@ -89,9 +96,20 @@ public class OgcHttpEndpoint implements Processor {
 
         // TODO get service from request somehow?? remove time and duration
         // calculation from critical path
-		OgcStatsRecorder statRecorder = StatsRecorderFinder.find();
+		IStatsRecorder statRecorder = StatsRecorderFinder.find();
         statRecorder.recordRequest(System.currentTimeMillis(),
-                System.nanoTime() - start, "OGCRest", true);
+                System.nanoTime() - start, ServiceType.OGC, OperationType.QUERY, true);
+        
+        //TODO this is part of the incoming request log, the rest is usually in CXF
+        //which is not hooked up here. Fill in cxf portion of request logging.
+        if (RequestLogController.getInstance().shouldLogRequestsInfo() &&
+        		log.isPriorityEnabled(RequestLogController.getInstance().getRequestLogLevel())) {
+			String requestLog = "";
+			requestLog += "Successfully processed request from " + ex.getFromRouteId() + ".  ";
+			requestLog += "Duration of " + (System.nanoTime() - start/1000000000.0) + "s.";
+			log.handle(RequestLogController.getInstance().getRequestLogLevel(), 
+					requestLog);
+		}
 
 		pool.returnObject(id, handler);
 	}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java
index 9c9a5a32e6..18144e1bca 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java
@@ -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.
+ **/
 /**
  * 
  */
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpPool.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpPool.java
index bddeb2fa99..6121e5934e 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpPool.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpPool.java
@@ -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.
+ **/
 /**
  * 
  */
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpRequest.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpRequest.java
index 729034601e..0c940eb112 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpRequest.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpRequest.java
@@ -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.http;
 
 import java.io.InputStream;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/jaxb/OgcJaxbManager.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/jaxb/OgcJaxbManager.java
index 7a5f374452..94ecc07478 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/jaxb/OgcJaxbManager.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/jaxb/OgcJaxbManager.java
@@ -35,6 +35,8 @@ import java.io.OutputStream;
 import java.io.StringReader;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -65,10 +67,14 @@ import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
  */
 public class OgcJaxbManager extends JAXBManager {
 
-    private final JAXBContext jaxbContext;
+    protected final JAXBContext jaxbContext;
 
     protected static final int QUEUE_SIZE = 10;
 
+	protected final Queue unmarshallers = new ConcurrentLinkedQueue();
+
+	protected final Queue marshallers = new ConcurrentLinkedQueue();
+
 	protected volatile int unmarshallersCreated = 0;
 
 	protected volatile int marshallersCreated = 0;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/output/OgcResponseOutput.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/output/OgcResponseOutput.java
index 2c261cde11..13a1ab6aff 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/output/OgcResponseOutput.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/output/OgcResponseOutput.java
@@ -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
-* ------------ ---------- ----------- --------------------------
-* Feb 28, 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.output;
 
 import java.awt.image.RenderedImage;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java
index f6e8fc2297..8ad6ce851c 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java
@@ -26,7 +26,6 @@ import org.geotools.referencing.CRS;
 import org.geotools.referencing.crs.DefaultCompoundCRS;
 import org.opengis.geometry.DirectPosition;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.SingleCRS;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
@@ -54,6 +53,8 @@ import com.vividsolutions.jts.geom.Coordinate;
  * @version 1.0
  */
 public class BoundingBoxUtil {
+    
+    public static Unit FL_UNIT = VerticalCoordinate.FLIGHT_LEVEL_UNIT;
 
     /**
      * Split 3D envelope into composite parts
@@ -266,13 +267,13 @@ public class BoundingBoxUtil {
      */
     private static void checkGeoBounds(ReferencedEnvelope env)
             throws OgcException {
-        if (env.getCoordinateReferenceSystem() instanceof GeographicCRS) {
-            if (env.getMinX() < -180 || env.getMaxX() > 180
-                    || env.getMinY() < -90 || env.getMaxY() > 90) {
-                throw new OgcException(Code.InvalidParameterValue,
-                        "Geo bounds not in range. Check axis order");
-            }
-        }
+        // if (env.getCoordinateReferenceSystem() instanceof GeographicCRS) {
+        // if (env.getMinX() < -180 || env.getMaxX() > 180
+        // || env.getMinY() < -90 || env.getMaxY() > 90) {
+        // throw new OgcException(Code.InvalidParameterValue,
+        // "Geo bounds not in range. Check axis order");
+        // }
+        // }
     }
 
     /**
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CrsLookup.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CrsLookup.java
index 7fc12e5cc4..c82c16c5a9 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CrsLookup.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CrsLookup.java
@@ -1,39 +1,29 @@
-/*
-* 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
-* ------------ ---------- ----------- --------------------------
-* Feb 17, 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.spatial;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import javax.measure.quantity.Quantity;
+import javax.measure.unit.SI;
 import javax.measure.unit.Unit;
 
 import org.apache.commons.collections.map.LRUMap;
@@ -51,6 +41,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.cs.AxisDirection;
 
+import com.raytheon.uf.common.geospatial.MapUtil;
 import com.raytheon.uf.edex.ogc.common.OgcException;
 import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference;
 
@@ -137,17 +128,31 @@ public class CrsLookup {
             // check if unit string matches reference level
             ref = Reference.fromAbbreviation(m.group(2).toUpperCase());
         }
-        AxisDirection dir = ref.equals(Reference.PRESSURE_LEVEL) ? AxisDirection.DOWN
+        return create3d(m.group(0), base2d, units, ref);
+    }
+
+    /**
+     * Create 3D CRS from horizontal and vertical components
+     * 
+     * @param base2d
+     * @param vertUnits
+     * @param vertRef
+     * @return
+     */
+    protected static CoordinateReferenceSystem create3d(String name,
+            CoordinateReferenceSystem base2d, Unit vertUnits,
+            Reference vertRef) {
+        AxisDirection dir = vertRef.equals(Reference.PRESSURE_LEVEL) ? AxisDirection.DOWN
                 : AxisDirection.UP;
         DefaultCoordinateSystemAxis axis = new DefaultCoordinateSystemAxis(
-                ref.longName, dir, units);
+                vertRef.longName, dir, vertUnits);
         DefaultVerticalCS cs = new DefaultVerticalCS(axis);
-        DefaultVerticalDatum datum = new DefaultVerticalDatum(ref.longName,
+        DefaultVerticalDatum datum = new DefaultVerticalDatum(vertRef.longName,
                 DefaultVerticalDatum
-                        .getVerticalDatumTypeFromLegacyCode(ref.datumType));
-        DefaultVerticalCRS vertCrs = new DefaultVerticalCRS(ref.longName,
+                        .getVerticalDatumTypeFromLegacyCode(vertRef.datumType));
+        DefaultVerticalCRS vertCrs = new DefaultVerticalCRS(vertRef.longName,
                 datum, cs);
-        return new DefaultCompoundCRS(m.group(0), base2d, vertCrs);
+        return new DefaultCompoundCRS(name, base2d, vertCrs);
     }
 
     /**
@@ -192,6 +197,10 @@ public class CrsLookup {
 				|| crs.equalsIgnoreCase("epsg:3857")) {
 			return getGoogleCrs();
 		}
+        if (crs.equalsIgnoreCase("epsg:4979")) {
+            return create3d(crs, MapUtil.LATLON_PROJECTION, SI.METER,
+                    Reference.ABOVE_ELLIPSOID);
+        }
 		return CRS.decode(crs, true);
 	}
 
@@ -231,7 +240,7 @@ public class CrsLookup {
 			// OGC URN without version?
 			rval = constructCode(parts[4], parts[5]);
 		} else {
-			// unkown form, try it anyway
+            // unknown form, try it anyway
 			rval = crs;
 		}
 		return rval.toLowerCase();
@@ -273,8 +282,12 @@ public class CrsLookup {
      */
     protected static String createCrsURN(CoordinateReferenceSystem crs) {
         ReferenceIdentifier id = crs.getIdentifiers().iterator().next();
-        return String.format("urn:ogc:def:crs:%s::%s", id.getCodeSpace(),
-                id.getCode());
+        String codeSpace = id.getCodeSpace();
+        String code = id.getCode();
+        if (codeSpace.equalsIgnoreCase("crs") && code.equalsIgnoreCase("84")) {
+            return "urn:ogc:def:crs:OGC:2:84";
+        }
+        return String.format("urn:ogc:def:crs:%s::%s", codeSpace, code);
     }
 
     /**
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalCoordinate.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalCoordinate.java
index 0e909dcf69..7e1b937b46 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalCoordinate.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalCoordinate.java
@@ -49,7 +49,7 @@ public class VerticalCoordinate implements Comparable {
                 2005, "gravity-related height"), ABOVE_ELLIPSOID("AEH", 2002,
                 "ellipsoidal height"), PRESSURE_LEVEL("PL", 2003,
                 "barometric altitude"), FLIGHT_LEVEL("FL", 2003, "flight level"), UNKNOWN(
-                "", 2000, "unkown");
+                "", 2000, "unknown");
 
         private static final Map ABB_MAP;
 
@@ -95,8 +95,8 @@ public class VerticalCoordinate implements Comparable {
 
     private VerticalCoordinate(double min, double max, Unit units,
             Reference ref, boolean isRange) {
-        this.min = min;
-        this.max = max;
+        this.min = Math.min(min, max);
+        this.max = Math.max(min, max);
         this.units = units;
         this.ref = ref;
         this.range = isRange;
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalEnabled.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalEnabled.java
index e69f98e54a..12ff4d412a 100644
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalEnabled.java
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/VerticalEnabled.java
@@ -9,6 +9,8 @@
  */
 package com.raytheon.uf.edex.ogc.common.spatial;
 
+import javax.measure.unit.Unit;
+
 /**
  * Adapter for vertical spatial information
  * 
@@ -38,4 +40,11 @@ public interface VerticalEnabled {
      */
     public Class getSupportedClass();
 
+	/**
+	 * default unit for vertical coordinates
+	 * 
+	 * @return null if there is no reliable default
+	 */
+	public Unit getDefaultVerticalUnit();
+
 }
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/IStatsRecorder.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/IStatsRecorder.java
new file mode 100644
index 0000000000..acb5515d76
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/IStatsRecorder.java
@@ -0,0 +1,72 @@
+/**
+ * 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 Government’s 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.stats;
+
+
+
+/**
+ * interface for recording ogc service stats
+ * 
+ * 
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jun 25, 2013            bclement     Initial creation
+ * 
+ * 
+ * + * @author bclement + * @version 1.0 + */ +public interface IStatsRecorder { + + /** + * Records the request that was made with some basic raw information about + * it. + * + * @param time + * time of observation in milliseconds + * @param duration + * duration of request in nanoseconds + * @param service + * Id for service + * @param success + * indicates if the request being timed was successful + */ + public void recordRequest(long time, long duration, ServiceType service, + OperationType op, boolean success); + + /** + * Retrieve statistic about service + * + * @param service + * @return + */ + public long getMinRequestTime(ServiceType service, OperationType op); + + /** + * Retrieve statistic about service + * + * @param service + * @return + */ + public long getMaxRequestTime(ServiceType service, OperationType op); + + /** + * Retrieve statistic about service + * + * @param service + * @return + */ + public long getAvgRequestTime(ServiceType service, OperationType op); + +} diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/NoopStatsRecorder.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/NoopStatsRecorder.java index aca0ad60e7..3ae2b5f2be 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/NoopStatsRecorder.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/NoopStatsRecorder.java @@ -26,54 +26,32 @@ package com.raytheon.uf.edex.ogc.common.stats; * @author bclement * @version 1.0 */ -public class NoopStatsRecorder implements OgcStatsRecorder { +public class NoopStatsRecorder implements IStatsRecorder { - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.edex.ogc.common.OgcStatsRecorder#recordRequest(long, - * long, java.lang.String, boolean) - */ @Override - public void recordRequest(long time, long duration, String service, - boolean success) { - // do nothing + public void recordRequest(long time, long duration, ServiceType service, + OperationType op, boolean success) { + // TODO Auto-generated method stub + //do nothing } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.ogc.common.OgcStatsRecorder#getMinRequestTime(java - * .lang.String) - */ @Override - public long getMinRequestTime(String service) { + public long getMinRequestTime(ServiceType service, OperationType op) { + // TODO Auto-generated method stub return 0; } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.ogc.common.OgcStatsRecorder#getMaxRequestTime(java - * .lang.String) - */ @Override - public long getMaxRequestTime(String service) { + public long getMaxRequestTime(ServiceType service, OperationType op) { + // TODO Auto-generated method stub return 0; } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.ogc.common.OgcStatsRecorder#getAvgRequestTime(java - * .lang.String) - */ @Override - public long getAvgRequestTime(String service) { + public long getAvgRequestTime(ServiceType service, OperationType op) { + // TODO Auto-generated method stub return 0; } + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/OperationType.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/OperationType.java new file mode 100644 index 0000000000..c0fac344e3 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/OperationType.java @@ -0,0 +1,25 @@ +/** + * 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 Government’s 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.stats; + +public enum OperationType { + STORE, QUERY, DELETE, + // special case for encompassing all values + OPEN; + + public static OperationType permissiveValueOf(String name) { + for (OperationType e : values()) { + if (e.name().equals(name)) { + return e; + } + } + return null; + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/ServiceType.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/ServiceType.java new file mode 100644 index 0000000000..f8c5a94231 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/ServiceType.java @@ -0,0 +1,33 @@ +/** + * 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 Government’s 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.stats; + +/** + * Enumeration representing the types of operations that statistics are recorded + * for within the IGCServiceRecorder + * + * @author behemmi + * + */ +public enum ServiceType { + WFS, WCS, OGC, REGISTRY, + // special case for encompassing all values + OPEN; + + public static ServiceType permissiveValueOf(String name) { + for (ServiceType e : values()) { + if (e.name().equals(name)) { + return e; + } + } + return null; + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/StatsRecorderFinder.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/StatsRecorderFinder.java index abfaa08a35..4f6a0a56b7 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/StatsRecorderFinder.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/stats/StatsRecorderFinder.java @@ -31,7 +31,7 @@ import com.raytheon.uf.edex.core.EDEXUtil; */ public class StatsRecorderFinder { - private static volatile OgcStatsRecorder recorder = null; + private static volatile IStatsRecorder recorder = null; private static final Object recorderMutex = new Object(); @@ -40,17 +40,17 @@ public class StatsRecorderFinder { * * @return */ - public static OgcStatsRecorder find() { + public static IStatsRecorder find() { if (recorder == null) { synchronized (recorderMutex) { if (recorder == null) { ApplicationContext ctx = EDEXUtil.getSpringContext(); String[] beans = ctx - .getBeanNamesForType(OgcStatsRecorder.class); + .getBeanNamesForType(IStatsRecorder.class); if (beans.length == 0) { recorder = new NoopStatsRecorder(); } else { - recorder = (OgcStatsRecorder) ctx.getBean(beans[0]); + recorder = (IStatsRecorder) ctx.getBean(beans[0]); } } } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/time/ForecastTimeUtil.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/time/ForecastTimeUtil.java index 0a2c629bfc..6d0b1946bf 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/time/ForecastTimeUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/time/ForecastTimeUtil.java @@ -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 3, 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.time; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribLayerCollector.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribLayerCollector.java index 2e6192d920..d11256352e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribLayerCollector.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribLayerCollector.java @@ -65,9 +65,9 @@ public class GribLayerCollector extends } else if (GribDimension.PARAM_DIM.equals(name)) { values.add(getParameter(rec)); } else { - log.warn("Unkown grib dimension: " + name); + log.warn("Unknown grib dimension: " + name); } - } + } } /** diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribRecordFinder.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribRecordFinder.java index f3c48a120a..50cb9593e8 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribRecordFinder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribRecordFinder.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Feb 21, 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.plugin.grib.ogc; import java.util.Comparator; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWcsSource.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWcsSource.java index 7481f2f667..34f59e306d 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWcsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWcsSource.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jun 30, 2011 jelkins 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.plugin.grib.ogc; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWmsSource.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWmsSource.java index b46242152d..2ac8dbedfd 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWmsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GribWmsSource.java @@ -1,40 +1,28 @@ -/* - * 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 - * ------------ ---------- ----------- -------------------------- - * Jun 16, 2011 jelkins 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.plugin.grib.ogc; import java.util.Collections; import java.util.List; import java.util.Map; -import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.PluginProperties; import com.raytheon.uf.common.dataplugin.grid.GridRecord; @@ -52,10 +40,10 @@ import com.raytheon.uf.edex.wms.styling.ICoverageStyleProvider; * @version 1.0 */ public class GribWmsSource extends - DefaultWmsSource { + DefaultWmsSource { - protected ColormapStyleProvider styler = new ColormapStyleProvider( - "grib_style_library.xml", "Grid/Default"); + protected ColormapStyleProvider styler = new GridStyleProvider( + this, "Grid/Default"); public GribWmsSource(PluginProperties props, LayerTransformer transformer) @@ -71,9 +59,8 @@ public class GribWmsSource extends * java.lang.String, java.lang.String, java.util.Map) */ @Override - protected PluginDataObject getRecord(String layer, String time, - String elevation, Map dimensions, - Map levelUnits) throws WmsException { + protected GridRecord getRecord(String layer, String time, String elevation, + Map dimensions) throws WmsException { LayerTransformer transformer; List res; try { @@ -108,7 +95,7 @@ public class GribWmsSource extends * .String) */ @Override - protected ICoverageStyleProvider getStyleProvider(String layer) + protected ICoverageStyleProvider getStyleProvider(String layer) throws WmsException { return styler; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridCompositeLayer.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridCompositeLayer.java index 4a00fefb9e..64fd5f6d29 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridCompositeLayer.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridCompositeLayer.java @@ -76,11 +76,18 @@ public class GridCompositeLayer extends GribLayer { @Override public Set getDimensions() { - TreeSet rval = new TreeSet(); + HashMap byDim = new HashMap(); for (Entry> e : dimensions.entrySet()) { - rval.addAll(e.getValue()); + for (GribDimension dim : e.getValue()) { + GribDimension aggregate = byDim.get(dim.getName()); + if (aggregate == null) { + byDim.put(dim.getName(), dim); + continue; + } + aggregate.getValues().addAll(dim.getValues()); + } } - return rval; + return new TreeSet(byDim.values()); } /* diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridFieldAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridFieldAdapter.java index 0fda29377b..8980f8c05d 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridFieldAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridFieldAdapter.java @@ -10,6 +10,7 @@ package com.raytheon.uf.edex.plugin.grib.ogc; import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.edex.plugin.dataset.urn.CFNameLookup; import com.raytheon.uf.edex.wcs.reg.IFieldAdapted; /** @@ -39,7 +40,9 @@ public class GridFieldAdapter implements IFieldAdapted { */ @Override public String getCoverageField(GridRecord record) { - return record.getInfo().getParameter().getAbbreviation(); + CFNameLookup lookup = CFNameLookup.getInstance(); + String abbr = record.getInfo().getParameter().getAbbreviation(); + return lookup.getCFFromNCEP(abbr); } /* diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridStyleProvider.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridStyleProvider.java new file mode 100644 index 0000000000..bd1e69016d --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridStyleProvider.java @@ -0,0 +1,112 @@ +/** + * 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 Government’s 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.plugin.grib.ogc; + +import javax.measure.unit.Unit; + +import com.raytheon.uf.common.dataplugin.PluginException; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.common.dataplugin.grid.util.GridStyleUtil; +import com.raytheon.uf.common.datastorage.records.FloatDataRecord; +import com.raytheon.uf.common.datastorage.records.IDataRecord; +import com.raytheon.uf.common.parameter.Parameter; +import com.raytheon.uf.common.style.ParamLevelMatchCriteria; +import com.raytheon.uf.edex.ogc.common.IStyleLookupCallback; +import com.raytheon.uf.edex.plugin.grid.dao.GridDao; +import com.raytheon.uf.edex.wms.WmsException; +import com.raytheon.uf.edex.wms.WmsException.Code; +import com.raytheon.uf.edex.wms.styling.ColormapStyleProvider; + +/** + * Style provider specific to grid colormapped imagery + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 2, 2013            bclement     Initial creation
+ * 
+ * 
+ * + * @author bclement + * @version 1.0 + */ +public class GridStyleProvider extends ColormapStyleProvider { + + + + /** + * @param styleLibraryFileName + * @param defaultColormap + */ + public GridStyleProvider(IStyleLookupCallback callback, + String defaultColormap) { + super(callback, defaultColormap); + } + + /** + * @param styleLibraryFileName + */ + public GridStyleProvider(IStyleLookupCallback callback) { + super(callback); + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.wms.styling.ColormapStyleProvider#getCriteria(com + * .raytheon.uf.common.dataplugin.PluginDataObject) + */ + @Override + protected ParamLevelMatchCriteria getCriteria(GridRecord record) + throws WmsException { + return GridStyleUtil + .getMatchCriteria((GridRecord) record); + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.wms.styling.ColormapStyleProvider#getParamUnits( + * com.raytheon.uf.common.dataplugin.PluginDataObject) + */ + @Override + protected Unit getParamUnits(GridRecord record) throws WmsException { + Parameter parameter = record.getInfo().getParameter(); + return parameter.getUnit(); + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.wms.styling.ColormapStyleProvider#getRawData(com + * .raytheon.uf.common.dataplugin.PluginDataObject) + */ + @Override + protected Object getRawData(GridRecord record) throws WmsException { + Object data; + try { + GridDao dao = new GridDao(); + IDataRecord[] res = dao.getHDF5Data(record, 0); + FloatDataRecord datarecord = (FloatDataRecord) res[0]; + data = datarecord.getFloatData(); + } catch (PluginException e) { + log.error("Unable to retrieve grib data", e); + throw new WmsException(Code.InternalServerError); + } + return data; + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridVerticalEnabler.java b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridVerticalEnabler.java index 526e6fc509..3eda2aaeb7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridVerticalEnabler.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/src/com/raytheon/uf/edex/plugin/grib/ogc/GridVerticalEnabler.java @@ -10,6 +10,7 @@ package com.raytheon.uf.edex.plugin.grib.ogc; import javax.measure.unit.SI; +import javax.measure.unit.Unit; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.level.Level; @@ -86,4 +87,15 @@ public class GridVerticalEnabler implements VerticalEnabled { return GridRecord.class; } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.ogc.common.spatial.VerticalEnabled# + * getDefaultVerticalUnit() + */ + @Override + public Unit getDefaultVerticalUnit() { + return null; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/META-INF/MANIFEST.MF index b9727d78f1..b02950e13c 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/META-INF/MANIFEST.MF @@ -21,7 +21,6 @@ Require-Bundle: com.raytheon.uf.edex.ogc.common;bundle-version="1.0.0", ogc.tools.gml;bundle-version="1.0.2", com.raytheon.uf.common.geospatial;bundle-version="1.12.1174", com.raytheon.uf.common.pointdata;bundle-version="1.12.1174", - com.raytheon.uf.edex.wms;bundle-version="1.0.0", com.raytheon.uf.common.time;bundle-version="1.12.1174", com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174", com.raytheon.uf.common.datastorage;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/res/spring/madis-ogc.xml b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/res/spring/madis-ogc.xml index 59d651d72c..cbf87701f1 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/res/spring/madis-ogc.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/res/spring/madis-ogc.xml @@ -20,11 +20,6 @@ - - - - - diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/MadisWmsSource.java b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/MadisWmsSource.java deleted file mode 100644 index 67b90ab95e..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/MadisWmsSource.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.raytheon.uf.edex.plugin.madis.ogc; - -/** - * 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. - **/ -import org.opengis.referencing.crs.CoordinateReferenceSystem; - -import com.raytheon.uf.common.dataplugin.PluginProperties; -import com.raytheon.uf.common.geospatial.MapUtil; -import com.raytheon.uf.edex.ogc.common.db.LayerTransformer; -import com.raytheon.uf.edex.wms.WmsException; -import com.raytheon.uf.edex.wms.reg.PointDataWmsSource; -import com.raytheon.uf.edex.wms.styling.FeatureStyleProvider; - -/** - * MADIS WMS Source - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 18, 2013 2097       dhladky     Initial creation
- * 
- * 
- * - * @author bclement - * @version 1.0 - */ - -public class MadisWmsSource extends - PointDataWmsSource { - - private static final String geometryField = "location.location"; - - private static final FeatureStyleProvider styler = new FeatureStyleProvider( - "sld/madis/defaultMadis.sld"); - - /** - * @param props - * @param key - * @param layerTable - * @param styles - * @throws Exception - */ - public MadisWmsSource(PluginProperties props, - LayerTransformer transformer) - throws Exception { - super(props, "madis", transformer, new MadisFeatureFactory()); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getGeometryField(java.lang - * .String) - */ - @Override - protected String getGeometryField(String layer) { - // madis has only one layer - return geometryField; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getCRS(java.lang.String) - */ - @Override - protected CoordinateReferenceSystem getCRS(String layer) { - return MapUtil.LATLON_PROJECTION; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getStyleProvider(java.lang - * .String) - */ - @Override - protected FeatureStyleProvider getStyleProvider(String layer) - throws WmsException { - return styler; - } -} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/META-INF/MANIFEST.MF index 3d818426cc..d887491f62 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/META-INF/MANIFEST.MF @@ -18,7 +18,6 @@ Require-Bundle: org.geotools;bundle-version="2.6.4", org.hibernate;bundle-version="1.0.0", com.raytheon.uf.edex.database;bundle-version="1.0.0", com.raytheon.uf.edex.core;bundle-version="1.12.1174", - com.raytheon.uf.edex.wms;bundle-version="1.0.0", com.raytheon.uf.common.util;bundle-version="1.12.1174", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", javax.persistence;bundle-version="1.0.0", diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/res/spring/obs-ogc.xml b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/res/spring/obs-ogc.xml index 17c19ce684..59b7ebee1d 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/res/spring/obs-ogc.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/res/spring/obs-ogc.xml @@ -20,11 +20,6 @@
- - - - - diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/src/com/raytheon/uf/edex/plugin/obs/ogc/metar/MetarWmsSource.java b/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/src/com/raytheon/uf/edex/plugin/obs/ogc/metar/MetarWmsSource.java deleted file mode 100644 index 9424f47758..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.obs.ogc/src/com/raytheon/uf/edex/plugin/obs/ogc/metar/MetarWmsSource.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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 3, 2011 bclement Initial creation - * - */ -package com.raytheon.uf.edex.plugin.obs.ogc.metar; - -import org.opengis.referencing.crs.CoordinateReferenceSystem; - -import com.raytheon.uf.common.dataplugin.PluginProperties; -import com.raytheon.uf.common.geospatial.MapUtil; -import com.raytheon.uf.edex.ogc.common.db.DefaultPointDataDimension; -import com.raytheon.uf.edex.ogc.common.db.LayerTransformer; -import com.raytheon.uf.edex.wms.WmsException; -import com.raytheon.uf.edex.wms.reg.PointDataWmsSource; -import com.raytheon.uf.edex.wms.styling.FeatureStyleProvider; - - -/** - * - * @author bclement - * @version 1.0 - */ -public class MetarWmsSource extends - PointDataWmsSource { - - private static final String geometryField = "location.location"; - - private static final FeatureStyleProvider styler = new FeatureStyleProvider( - "sld/metar/defaultMetar.sld"); - - /** - * @param props - * @param key - * @param layerTable - * @param styles - * @throws Exception - */ - public MetarWmsSource(PluginProperties props, - LayerTransformer transformer) - throws Exception { - super(props, "metar", transformer, new MetarFeatureFactory()); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getGeometryField(java.lang - * .String) - */ - @Override - protected String getGeometryField(String layer) { - // metar has only one layer - return geometryField; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getCRS(java.lang.String) - */ - @Override - protected CoordinateReferenceSystem getCRS(String layer) { - - return MapUtil.LATLON_PROJECTION; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.wms.reg.FeatureWmsSource#getStyleProvider(java.lang - * .String) - */ - @Override - protected FeatureStyleProvider getStyleProvider(String layer) - throws WmsException { - return styler; - } - -} diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.wcs/META-INF/MANIFEST.MF index ad0782b697..9d3faebf25 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.wcs/META-INF/MANIFEST.MF @@ -25,7 +25,8 @@ Require-Bundle: com.raytheon.uf.edex.ogc.common;bundle-version="1.0.0", com.raytheon.uf.edex.plugin.unitconverter;bundle-version="1.0.0", com.raytheon.uf.common.spatial;bundle-version="1.0.0", org.eclipse.jetty;bundle-version="7.6.9", - com.raytheon.uf.common.status;bundle-version="1.12.1174" + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.edex.log;bundle-version="1.12.1174" Export-Package: com.raytheon.uf.edex.wcs, com.raytheon.uf.edex.wcs.format, com.raytheon.uf.edex.wcs.provider, diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/.classpath b/edexOsgi/com.raytheon.uf.edex.wcs/src/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/.project b/edexOsgi/com.raytheon.uf.edex.wcs/src/.project new file mode 100644 index 0000000000..1c4fe9c1a5 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/.project @@ -0,0 +1,28 @@ + + + com.raytheon.uf.edex.wcs + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.wcs/src/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..afcbd70733 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Thu Feb 16 10:57:42 CST 2012 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsConfig.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsConfig.java new file mode 100644 index 0000000000..24fd34d937 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsConfig.java @@ -0,0 +1,124 @@ +/** + * 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 Government’s 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.wcs; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Properties; + +import org.apache.commons.lang.BooleanUtils; + +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +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.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; + +/** + * WCS configuration + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 9, 2013            bclement     Initial creation
+ * 
+ * 
+ * + * @author bclement + * @version 1.0 + */ +public class WcsConfig { + + public static final String FORCE_KM_BBOX = "force.km.altitude"; + + private static final IUFStatusHandler log = UFStatus + .getHandler(WcsConfig.class); + + private static Properties props = null; + + static { + LocalizationFile confFile = findConfigFile(); + if (confFile == null) { + log.warn("Unable to find custom id mapping properties"); + props = new Properties(); + } else { + props = loadConfig(confFile); + } + } + + /** + * Find configuration file in localization + * + * @return null if not found + */ + private static LocalizationFile findConfigFile() { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationContext[] searchHierarchy = pm + .getLocalSearchHierarchy(LocalizationType.EDEX_STATIC); + + for (LocalizationContext ctx : searchHierarchy) { + LocalizationFile localizationFile = pm.getLocalizationFile(ctx, + "wcs" + IPathManager.SEPARATOR + "wcsConfig.properties"); + if (localizationFile.exists()) { + return localizationFile; + } + } + return null; + } + + /** + * Load map from config + * + * @param idMapFile + * @return + */ + private static Properties loadConfig(LocalizationFile idMapFile) { + Properties props = new Properties(); + File file = idMapFile.getFile(); + try { + props.load(new FileInputStream(file)); + } catch (Exception e) { + log.error("Unable to load WCS config: " + file, e); + } + return props; + } + + /** + * Get property from config + * + * @param key + * @return null if property not set + */ + public static String getProperty(String key) { + if (props == null) { + return null; + } + return props.getProperty(key); + } + + /** + * Return boolean value of property + * + * @param key + * @return false if property not set + */ + public static boolean isProperty(String key) { + if (props == null) { + return false; + } + return BooleanUtils.toBoolean(props.getProperty(key)); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsCoverageThriftReponse.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsCoverageThriftReponse.java index 82737cb35d..ffad4e9d36 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsCoverageThriftReponse.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsCoverageThriftReponse.java @@ -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 30, 2011 ekladstrup 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.wcs; import com.raytheon.uf.common.datastorage.records.IDataRecord; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsHttpHandler.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsHttpHandler.java index 5893799c8e..0fac660b42 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsHttpHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsHttpHandler.java @@ -22,6 +22,7 @@ package com.raytheon.uf.edex.wcs; import java.io.InputStream; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.List; import java.util.Map; @@ -208,28 +209,29 @@ public class WcsHttpHandler extends OgcHttpHandler { return null; } - private OgcServiceInfo getServiceInfo(HttpServletRequest request) { - // FIXME get address from spring - int port = request.getServerPort(); - String base = "http://" + request.getServerName(); - if (port != 80) { - base += ":" + port; - } - base += request.getPathInfo() + "?service=wcs"; - OgcServiceInfo rval = new OgcServiceInfo(base); - rval.addOperationInfo(getOp(base, base, - WcsOpType.GetCapabilities)); - rval.addOperationInfo(getOp(base, base, - WcsOpType.DescribeCoverage)); - rval.addOperationInfo(getOp(base, base, - WcsOpType.GetCoverage)); + private OgcServiceInfo getServiceInfo(HttpServletRequest request) { + // FIXME get address from spring + int port = request.getServerPort(); + String base = "http://" + request.getServerName(); + if (port != 80) { + base += ":" + port; + } + base += request.getPathInfo() + "?service=wcs"; + OgcServiceInfo rval = new OgcServiceInfo(base); + rval.addOperationInfo(getOp(base, base, WcsOpType.GetCapabilities, + request.getServerName())); + rval.addOperationInfo(getOp(base, base, WcsOpType.DescribeCoverage, + request.getServerName())); + rval.addOperationInfo(getOp(base, base, WcsOpType.GetCoverage, + request.getServerName())); - return rval; - } + return rval; + } protected OgcOperationInfo getOp(String get, String post, - WcsOpType type) { + WcsOpType type, String host) { OgcOperationInfo rval = new OgcOperationInfo(type); + rval.setHttpBaseHostname(host); // FIXME get version from provider rval.setHttpGetRes(get); rval.setHttpPostRes(post); @@ -349,7 +351,7 @@ public class WcsHttpHandler extends OgcHttpHandler { String[] identifiers = getHeaderArr(IDENTIFIERS, headers); if (identifiers != null) { - rval.setIdentifiers(identifiers); + rval.setIdentifiers(Arrays.asList(identifiers)); } return rval; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsOperationInfo.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsOperationInfo.java index 3d853e2901..cd864e958f 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsOperationInfo.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsOperationInfo.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wcs; import java.util.LinkedList; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsServiceInfo.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsServiceInfo.java index fb0873408a..1b38f5984d 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsServiceInfo.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/WcsServiceInfo.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wcs; import java.util.LinkedList; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/DataRecordIOSP.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/DataRecordIOSP.java index e61204b3fb..ce2b0a7f92 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/DataRecordIOSP.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/DataRecordIOSP.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jun 3, 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.wcs.format; import java.io.IOException; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/IWcsDataFormatter.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/IWcsDataFormatter.java index d714e1639d..3fe17b4b99 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/IWcsDataFormatter.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/IWcsDataFormatter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 23, 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.wcs.format; import java.io.File; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/NetCdfFormatter.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/NetCdfFormatter.java index ec137d07f1..118919c065 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/NetCdfFormatter.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/format/NetCdfFormatter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jun 3, 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.wcs.format; import java.io.File; @@ -42,6 +31,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.atomic.AtomicLong; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -109,6 +99,8 @@ public class NetCdfFormatter implements IWcsDataFormatter { private final BasicFileStore store; + private static final AtomicLong STORAGE_ID = new AtomicLong(); + public NetCdfFormatter(BasicFileStore store) { this.store = store; } @@ -637,6 +629,7 @@ public class NetCdfFormatter implements IWcsDataFormatter { do { HashCodeBuilder builder = new HashCodeBuilder(); builder.append(name).append(System.currentTimeMillis()); + builder.append(STORAGE_ID.incrementAndGet()); String hash = Integer.toHexString(builder.toHashCode()); rval = name + hash + ".nc"; } while (store.getFile(rval) != null); diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CapabilitiesBuilder.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CapabilitiesBuilder.java index c4da7f9c98..8e299ed0c1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CapabilitiesBuilder.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CapabilitiesBuilder.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wcs.provider; import static com.raytheon.uf.edex.wcs.provider.WcsJaxbUtils.getAsLangString; @@ -151,7 +140,7 @@ public class CapabilitiesBuilder { if (cov.getCrs() != null && cov.getCrs().size() > 0) { for (String crs : cov.getCrs()) { - jaxbList.add(owsFactory.createSupportedCRS(crs)); + jaxbList.add(wcsFactory.createCoverageSummaryTypeSupportedCRS(crs)); } } if (cov.getIdentifier() != null) { diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CustomIdMap.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CustomIdMap.java new file mode 100644 index 0000000000..0af4c6a654 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/CustomIdMap.java @@ -0,0 +1,148 @@ +/** + * 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 Government’s 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.wcs.provider; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; + +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +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.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; + +/** + * Mapping of custom identifiers to internally generated URNs + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 31, 2013            bclement     Initial creation
+ * 
+ * 
+ * + * @author bclement + * @version 1.0 + */ +public class CustomIdMap { + + private static final Map externalToInternal; + + private static final Map internalToExternal; + + private static final IUFStatusHandler log = UFStatus + .getHandler(CustomIdMap.class); + + static { + LocalizationFile idMapFile = findConfigFile(); + Map map; + if (idMapFile == null) { + log.warn("Unable to find custom id mapping properties"); + map = new HashMap(0); + } else { + map = loadConfig(idMapFile); + } + externalToInternal = Collections.unmodifiableMap(map); + internalToExternal = Collections.unmodifiableMap(reverseMap(map)); + } + + /** + * Find configuration file in localization + * + * @return null if not found + */ + private static LocalizationFile findConfigFile() { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationContext[] searchHierarchy = pm + .getLocalSearchHierarchy(LocalizationType.EDEX_STATIC); + + for (LocalizationContext ctx : searchHierarchy) { + LocalizationFile localizationFile = pm.getLocalizationFile(ctx, + "wcs" + IPathManager.SEPARATOR + + "wcsIdentifier.properties"); + if (localizationFile.exists()) { + return localizationFile; + } + } + return null; + } + + /** + * Load map from config + * + * @param idMapFile + * @return + */ + private static Map loadConfig(LocalizationFile idMapFile) { + Properties props = new Properties(); + File file = idMapFile.getFile(); + try { + props.load(new FileInputStream(file)); + } catch (Exception e) { + log.error("Unable to load WCS id map: " + file, e); + return new HashMap(0); + } + // TODO validate entries + Map rval = new HashMap(props.size()); + for (Entry e : props.entrySet()) { + rval.put(e.getKey().toString(), e.getValue().toString()); + } + return rval; + } + + /** + * Return a map of values to keys. + * + * @param map + * @return + */ + private static Map reverseMap(Map map) { + Map rval = new HashMap(map.size()); + for (Entry e : map.entrySet()) { + rval.put(e.getValue(), e.getKey()); + } + return rval; + } + + /** + * @param id + * @return id if no mapping exists + */ + public static String internalToExternal(String id) { + String rval = internalToExternal.get(id); + if (rval == null) { + return id; + } + return rval; + } + + /** + * @param id + * @return id if no mapping exists + */ + public static String externalToInternal(String id) { + String rval = externalToInternal.get(id); + if (rval == null) { + return id; + } + return rval; + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/DescCoverageBuilder.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/DescCoverageBuilder.java index 7a33677dcc..9b0dbedbee 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/DescCoverageBuilder.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/DescCoverageBuilder.java @@ -1,44 +1,35 @@ -/* - * 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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wcs.provider; import static com.raytheon.uf.edex.wcs.provider.WcsJaxbUtils.getAsLangString; import static com.raytheon.uf.edex.wcs.provider.WcsJaxbUtils.getKeywords; import java.math.BigInteger; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Set; +import java.util.TimeZone; import javax.xml.bind.JAXBElement; @@ -73,7 +64,6 @@ import org.jvnet.ogc.gml.v_3_1_1.jts.JTSToGML311SRSReferenceGroupConverter; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.TimeRange; -import com.raytheon.uf.edex.ogc.common.db.LayerTransformer; import com.raytheon.uf.edex.ogc.common.spatial.Composite3DBoundingBox; import com.raytheon.uf.edex.ogc.common.spatial.CrsLookup; import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate; @@ -193,9 +183,28 @@ public class DescCoverageBuilder { return rval; } + private static final ThreadLocal ISO_FORMAT = new ThreadLocal() { + + /* + * (non-Javadoc) + * + * @see java.lang.ThreadLocal#initialValue() + */ + @Override + protected SimpleDateFormat initialValue() { + SimpleDateFormat rval = new SimpleDateFormat( + "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + rval.setTimeZone(TimeZone.getTimeZone("GMT")); + return rval; + } + + }; + protected TimePositionType transform(Date time) { TimePositionType rval = new TimePositionType(); - String timeStr = LayerTransformer.format(time); + // client can't parse all ISO 8601, and it's our problem for some reason + // String timeStr = LayerTransformer.format(time); + String timeStr = ISO_FORMAT.get().format(time); rval.setValue(Arrays.asList(timeStr)); return rval; } @@ -212,6 +221,7 @@ public class DescCoverageBuilder { TimeRange vp = time.getValidPeriod(); tp.setBeginPosition(transform(vp.getStart())); tp.setEndPosition(transform(vp.getEnd())); + tp.setTimeResolution("PT0S"); rval.add(tp); } else { rval.add(transform(time.getRefTime())); diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OgcWcsProvider.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OgcWcsProvider.java index d95186f15c..1478440889 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OgcWcsProvider.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OgcWcsProvider.java @@ -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 - * ------------ ---------- ----------- -------------------------- +/** + * 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.wcs.provider; @@ -71,12 +60,9 @@ import net.opengis.wcs.v_1_1_2.CoverageDescriptionType; import net.opengis.wcs.v_1_1_2.CoverageDescriptions; import net.opengis.wcs.v_1_1_2.CoveragesType; import net.opengis.wcs.v_1_1_2.DescribeCoverage; -import net.opengis.wcs.v_1_1_2.DomainSubsetType; import net.opengis.wcs.v_1_1_2.GetCapabilities; import net.opengis.wcs.v_1_1_2.GetCoverage; -import net.opengis.wcs.v_1_1_2.GridCrsType; import net.opengis.wcs.v_1_1_2.ObjectFactory; -import net.opengis.wcs.v_1_1_2.OutputType; import net.opengis.wcs.v_1_1_2.RangeSubsetType; import net.opengis.wcs.v_1_1_2.RangeSubsetType.FieldSubset; import net.opengis.wcs.v_1_1_2.TimePeriodType; @@ -91,7 +77,6 @@ import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.edex.ogc.common.OgcBoundingBox; -import com.raytheon.uf.edex.ogc.common.OgcException; import com.raytheon.uf.edex.ogc.common.OgcNamespace; import com.raytheon.uf.edex.ogc.common.OgcOperationInfo; import com.raytheon.uf.edex.ogc.common.OgcPrefix; @@ -113,10 +98,10 @@ import com.raytheon.uf.edex.wcs.WcsProvider; import com.raytheon.uf.edex.wcs.format.IWcsDataFormatter; import com.raytheon.uf.edex.wcs.reg.Coverage; import com.raytheon.uf.edex.wcs.reg.CoverageDescription; +import com.raytheon.uf.edex.wcs.reg.IWcsSource; import com.raytheon.uf.edex.wcs.reg.RangeAxis; import com.raytheon.uf.edex.wcs.reg.RangeField; import com.raytheon.uf.edex.wcs.reg.RangeField.InterpolationType; -import com.raytheon.uf.edex.wcs.reg.IWcsSource; import com.raytheon.uf.edex.wcs.reg.WcsSourceAccessor; import com.raytheon.uf.edex.wcs.request.DescCoverageRequest; import com.raytheon.uf.edex.wcs.request.GetCapRequest; @@ -245,26 +230,31 @@ public class OgcWcsProvider implements WcsProvider { throws WcsException { CoverageDescriptions rval = new CoverageDescriptions(); - String[] ids = request.getIdentifiers(); + String[] externalIds = request.getExternalIds(); List descs = null; - if (ids == null) { + if (externalIds == null) { throw new WcsException(Code.MissingParameterValue); } - descs = new ArrayList(ids.length); - for (String id : ids) { - descs.add(descCov(id)); + String[] internalIds = request.getInternalIds(); + descs = new ArrayList(externalIds.length); + for (int i = 0; i < externalIds.length; ++i) { + String external = externalIds[i]; + String internal = internalIds[i]; + descs.add(descCov(external, internal)); } rval.setCoverageDescription(descs); return rval; } - protected CoverageDescriptionType descCov(String id) throws WcsException { - IWcsSource source = WcsSourceAccessor.getSource(id); + protected CoverageDescriptionType descCov(String externalId, + String internalId) throws WcsException { + IWcsSource source = WcsSourceAccessor.getSource(internalId); if (source == null) { throw new WcsException(Code.InvalidParameterValue, "Coverage ID not found"); - } - CoverageDescription cd = source.describeCoverage(id); + } + CoverageDescription cd = source.describeCoverage(internalId); + cd.setIdentifier(externalId); return getCoverageBuilder().getCoverageDescriptionType(cd); } @@ -276,10 +266,24 @@ public class OgcWcsProvider implements WcsProvider { return marshalResponse(capabilities); } - public Capabilities getCapabilities(EndpointInfo info, - GetCapabilities request) { - return getCapBuilder().getCapabilities(getServiceInfo(info), - WcsSourceAccessor.getCoverages(true)); + public Capabilities getCapabilities(EndpointInfo info, + GetCapabilities request) { + return getCapBuilder().getCapabilities(getServiceInfo(info), + getCoverages(true)); + } + + /** + * @param summary + * @return list of coverages with mapped identifiers + */ + private List getCoverages(boolean summary) { + List coverages = WcsSourceAccessor + .getCoverages(true); + for (CoverageDescription desc : coverages) { + String id = CustomIdMap.internalToExternal(desc.getIdentifier()); + desc.setIdentifier(id); + } + return coverages; } private OgcServiceInfo getServiceInfo(EndpointInfo info) { @@ -300,6 +304,7 @@ public class OgcWcsProvider implements WcsProvider { protected OgcOperationInfo getOp(String get, String post, WcsOpType type, EndpointInfo info) { OgcOperationInfo rval = new OgcOperationInfo(type); + rval.setHttpBaseHostname(info.getHost()); if (!info.isPostOnly()) { rval.setHttpGetRes(get); } @@ -333,8 +338,9 @@ public class OgcWcsProvider implements WcsProvider { } } - String id = request.getIdentifier(); + String externalId = request.getExternalId(); Coverage coverage = requestCoverage(request); + coverage.setName(CustomIdMap.internalToExternal(coverage.getName())); CoveragesHolder holder = new CoveragesHolder(); holder.setContentType(format); Map data = new HashMap(); @@ -350,7 +356,7 @@ public class OgcWcsProvider implements WcsProvider { throw new WcsException(Code.InternalServerError); } } else { - href = getCoverageId(id); + href = getCoverageId(externalId); ByteArrayOutputStream out = new ByteArrayOutputStream(); InputStream in = null; try { @@ -365,7 +371,7 @@ public class OgcWcsProvider implements WcsProvider { } data.put(href, out.toByteArray()); } - CoveragesType rval = getCoverageOgcResponse(id, href); + CoveragesType rval = getCoverageOgcResponse(externalId, href); holder.setMetadata(rval); holder.setData(data); return holder; @@ -373,7 +379,7 @@ public class OgcWcsProvider implements WcsProvider { private Coverage requestCoverage(GetCoverageRequest request) throws WcsException { - String id = request.getIdentifier(); + String id = request.getInternalId(); IWcsSource source = WcsSourceAccessor.getSource(id); if (source == null) { throw new WcsException(Code.InvalidParameterValue, @@ -404,19 +410,14 @@ public class OgcWcsProvider implements WcsProvider { String format = request.getFormat(); IWcsDataFormatter formatter = WcsSourceAccessor.getFormatMap().get( format); - if (formatter == null) { - throw new WcsException(Code.InvalidFormat); - } - String id = request.getIdentifier(); - IWcsSource source = WcsSourceAccessor.getSource(id); - if (source == null) { - throw new WcsException(Code.LayerNotDefined); - } - Composite3DBoundingBox bbox = request.getBbox(); - Coverage coverage = source.getCoverage(id, - request.getTimeSequence(), bbox, request.getFields()); - CoveragesType coveragesType = getCoverageOgcResponse(id, - getCoverageId(id)); + if (formatter == null) { + throw new WcsException(Code.InvalidFormat); + } + String externalId = request.getExternalId(); + Coverage coverage = requestCoverage(request); + coverage.setName(CustomIdMap.internalToExternal(coverage.getName())); + CoveragesType coveragesType = getCoverageOgcResponse(externalId, + getCoverageId(externalId)); try { // FIXME this code block makes my eyes bleed, needs to be @@ -439,7 +440,7 @@ public class OgcWcsProvider implements WcsProvider { httpResp.setContentType("multipart/related;boundary=" + part); PrintStream stream = new PrintStream(out); - String cid = getCoverageId(id); + String cid = getCoverageId(externalId); stream.println("--" + part); stream.println("Content-Type: text/xml"); @@ -647,7 +648,7 @@ public class OgcWcsProvider implements WcsProvider { DescribeCoverage req = (DescribeCoverage) obj; List ids = req.getIdentifier(); DescCoverageRequest dcr = new DescCoverageRequest(); - dcr.setIdentifiers(ids.toArray(new String[ids.size()])); + dcr.setIdentifiers(ids); rval = dcr; } else { rval = new WcsRequest(Type.ERROR); @@ -660,27 +661,13 @@ public class OgcWcsProvider implements WcsProvider { * @return */ protected WcsRequest unwrap(GetCoverage req) { - GetCoverageRequest rval = new GetCoverageRequest(); - DomainSubsetType ds = req.getDomainSubset(); - rval.setTimeSequence(getTime(ds.getTemporalSubset())); - BoundingBoxType bbox = (BoundingBoxType) ds.getBoundingBox().getValue(); try { - rval.setBbox(bbox); - } catch (OgcException e) { - return new WcsRequest(Type.ERROR); + return new GetCoverageRequest(req); + } catch (WcsException e) { + WcsRequest rval = new WcsRequest(Type.ERROR); + rval.setRequest(e); + return rval; } - rval.setIdentifier(req.getIdentifier().getValue()); - OutputType output = req.getOutput(); - rval.setFormat(output.getFormat()); - GridCrsType gridCRS = output.getGridCRS(); - if (gridCRS != null) { - rval.setGridBaseCrs(gridCRS.getGridBaseCRS()); - rval.setGridOffsets(gridCRS.getGridOffsets()); - rval.setGridOrigin(gridCRS.getGridOrigin()); - rval.setGridType(gridCRS.getGridType()); - } - rval.setFields(transform(req.getRangeSubset())); - return rval; } protected List transform(RangeSubsetType subset) { diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OperationsDescriber.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OperationsDescriber.java index 3258bc31bd..bdc89ac82e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OperationsDescriber.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/OperationsDescriber.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wcs.provider; import java.util.ArrayList; @@ -60,16 +49,12 @@ public class OperationsDescriber extends AbstractOpDescriber { * .uf.edex.ogc.common.OgcServiceInfo) */ @Override - protected List getParams(OgcServiceInfo serviceinfo) { - List rval = new LinkedList(); - // TODO: this info should be passed in from somewhere - DomainType parameter = new DomainType(); - parameter.setName("srsName"); - List value = new LinkedList(); - value.add("EPSG:4326"); - rval.add(parameter); - return rval; - } + protected List getParams(OgcServiceInfo serviceinfo) { + // TODO: this info should be passed in from somewhere + List value = new LinkedList(); + value.add("EPSG:4326"); + return Arrays.asList(getAsDomainType("srsName", value)); + } /* * (non-Javadoc) diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/WcsJaxbUtils.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/WcsJaxbUtils.java index 4181425307..bc35e9604a 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/WcsJaxbUtils.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/provider/WcsJaxbUtils.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wcs.provider; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/Coverage.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/Coverage.java index f33cb1e603..0b73a92a40 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/Coverage.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/Coverage.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 5, 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.wcs.reg; import java.util.List; @@ -40,7 +29,7 @@ import java.util.List; */ public class Coverage { - private final String name; + private String name; private final List fields; @@ -68,5 +57,12 @@ public class Coverage { return fields; } + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageDescription.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageDescription.java index def17cd35f..78b2dbbbe6 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageDescription.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageDescription.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wcs.reg; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageTransform.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageTransform.java index e2239c1623..37f5cd69e3 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageTransform.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/CoverageTransform.java @@ -1,41 +1,35 @@ -/* - * 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 - * ------------ ---------- ----------- -------------------------- - * May 10, 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.wcs.reg; import java.util.ArrayList; import java.util.Arrays; +import java.util.Calendar; import java.util.Date; +import java.util.EnumSet; +import java.util.Iterator; import java.util.List; import java.util.Set; +import javax.measure.unit.SI; + import org.apache.commons.lang.StringUtils; import org.geotools.geometry.jts.ReferencedEnvelope; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -43,14 +37,19 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.common.time.DataTime.FLAG; +import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.edex.ogc.common.OgcGeoBoundingBox; import com.raytheon.uf.edex.ogc.common.db.LayerTransformer; import com.raytheon.uf.edex.ogc.common.db.SimpleDimension; import com.raytheon.uf.edex.ogc.common.db.SimpleLayer; +import com.raytheon.uf.edex.ogc.common.spatial.AltUtil; import com.raytheon.uf.edex.ogc.common.spatial.Composite3DBoundingBox; import com.raytheon.uf.edex.ogc.common.spatial.CrsLookup; import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate; +import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference; import com.raytheon.uf.edex.plugin.dataset.urn.URNLookup; +import com.raytheon.uf.edex.wcs.WcsConfig; import com.raytheon.uf.edex.wcs.WcsException; import com.raytheon.uf.edex.wcs.WcsException.Code; import com.vividsolutions.jts.geom.Coordinate; @@ -92,6 +91,22 @@ public abstract class CoverageTransform bboxes = getBboxes(layer); + if (!bboxes.isEmpty() && WcsConfig.isProperty(WcsConfig.FORCE_KM_BBOX)) { + List newList = new ArrayList( + bboxes.size()); + for (Composite3DBoundingBox box : bboxes) { + if (box.hasVertical()) { + VerticalCoordinate vert = box.getVertical(); + vert = AltUtil.convert(SI.KILOMETER, Reference.UNKNOWN, + vert); + newList.add(new Composite3DBoundingBox(box.getHorizontal(), + box.getNative2DCrsUrn(), vert)); + } else { + newList.add(box); + } + } + bboxes = newList; + } if (bbox != null) { rval.setCrs84Bbox(bbox); rval.setCrs(getSupportedCrsList(layer.getTargetCrsCode(), bboxes)); @@ -130,7 +145,7 @@ public abstract class CoverageTransform parts = new ArrayList(split.length + 1); @@ -243,14 +258,29 @@ public abstract class CoverageTransform getRangeFields(L layer); - protected List getTimes(Set times) { - if (times == null) { - return null; - } - List rval = new ArrayList(times.size()); - for (Date d : times) { - rval.add(new DataTime(d)); + protected List getTimes(Set times, boolean asRanges) { + if (times == null || times.isEmpty()) { + return new ArrayList(0); } + List rval; + if (asRanges) { + rval = new ArrayList((int) Math.ceil(times.size() / 2.0)); + Iterator iter = times.iterator(); + while (iter.hasNext()) { + Date start = iter.next(); + Date end = (iter.hasNext() ? iter.next() : start); + DataTime time = new DataTime(Calendar.getInstance(), + new TimeRange(start, end)); + time.setUtilityFlags(EnumSet.of(FLAG.PERIOD_USED)); + rval.add(time); + } + } else { + rval = new ArrayList(times.size()); + for (Date d : times) { + rval.add(new DataTime(d)); + } + } + return rval; } } diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/DefaultWcsSource.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/DefaultWcsSource.java index 48a15a841a..047596863b 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/DefaultWcsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/reg/DefaultWcsSource.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jun 30, 2011 jelkins 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.wcs.reg; import java.awt.Point; @@ -64,6 +53,7 @@ import org.hibernate.criterion.Conjunction; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; +import org.hibernate.criterion.SimpleExpression; import org.opengis.geometry.DirectPosition; import org.opengis.geometry.MismatchedDimensionException; import org.opengis.metadata.spatial.PixelOrientation; @@ -137,6 +127,8 @@ public abstract class DefaultWcsSource fillCache = Collections .synchronizedMap(new LRUMap(2)); @@ -852,12 +844,20 @@ public abstract class DefaultWcsSource ids = req.getIdentifier(); - identifiers = ids.toArray(new String[ids.size()]); + this.externalIds = new String[ids.size()]; + this.internalIds = new String[ids.size()]; + setIdentifiers(req.getIdentifier()); } public String getOutputformat() { @@ -59,12 +54,45 @@ public class DescCoverageRequest extends WcsRequest{ this.outputformat = outputformat; } - public String[] getIdentifiers() { - return identifiers; - } + /** + * @return the externalIds + */ + public String[] getExternalIds() { + return externalIds; + } - public void setIdentifiers(String[] identifiers) { - this.identifiers = identifiers; - } + /** + * @param externalIds + * the externalIds to set + */ + public void setExternalIds(String[] externalIds) { + this.externalIds = externalIds; + } + + /** + * @return the internalIds + */ + public String[] getInternalIds() { + return internalIds; + } + + /** + * @param internalIds + * the internalIds to set + */ + public void setInternalIds(String[] internalIds) { + this.internalIds = internalIds; + } + + /** + * @param array + */ + public void setIdentifiers(Collection ids) { + Iterator iter = ids.iterator(); + for (int i = 0; iter.hasNext(); ++i) { + externalIds[i] = iter.next(); + internalIds[i] = externalToInternal(externalIds[i]); + } + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCapRequest.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCapRequest.java index 12cd60be8f..be418af17d 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCapRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCapRequest.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wcs.request; diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCoverageRequest.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCoverageRequest.java index 30ed88c999..c545b522e0 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCoverageRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetCoverageRequest.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wcs.request; import java.util.ArrayList; @@ -67,7 +56,9 @@ import com.raytheon.uf.edex.wcs.reg.RangeField; public class GetCoverageRequest extends WcsRequest { - protected String identifier; + protected String externalId; + + protected String internalId; protected String format; @@ -93,11 +84,12 @@ public class GetCoverageRequest extends WcsRequest { super(Type.GetCoverage); } - public GetCoverageRequest(GetCoverage req) throws Exception { + public GetCoverageRequest(GetCoverage req) throws WcsException { super(Type.GetCoverage); this.request = req; if (req.isSetIdentifier()) { - this.identifier = req.getIdentifier().getValue(); + this.externalId = req.getIdentifier().getValue(); + this.internalId = externalToInternal(this.externalId); } if (req.isSetOutput()) { setOutput(req.getOutput()); @@ -160,8 +152,6 @@ public class GetCoverageRequest extends WcsRequest { setBbox((EnvelopeType) obj); } else if (obj instanceof BoundingBoxType) { setBbox((BoundingBoxType) obj); - } else { - throw new IllegalArgumentException(); } } catch (OgcException e) { throw new WcsException(e); @@ -371,12 +361,34 @@ public class GetCoverageRequest extends WcsRequest { } } - public String getIdentifier() { - return identifier; + /** + * @return the externalId + */ + public String getExternalId() { + return externalId; } - public void setIdentifier(String identifier) { - this.identifier = identifier; + /** + * @param externalId + * the externalId to set + */ + public void setExternalId(String externalId) { + this.externalId = externalId; + } + + /** + * @return the internalId + */ + public String getInternalId() { + return internalId; + } + + /** + * @param internalId + * the internalId to set + */ + public void setInternalId(String internalId) { + this.internalId = internalId; } public String getFormat() { @@ -473,4 +485,12 @@ public class GetCoverageRequest extends WcsRequest { return defacto; } + /** + * @param identifier + */ + public void setIdentifier(String identifier) { + this.externalId = identifier; + this.internalId = externalToInternal(this.externalId); + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetDataRequest.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetDataRequest.java index 12be93ed95..c765af1559 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetDataRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/GetDataRequest.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wcs.request; public class GetDataRequest extends WcsRequest { diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/WcsRequest.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/WcsRequest.java index 55adb04c92..79c7cf2be5 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/WcsRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/request/WcsRequest.java @@ -22,6 +22,7 @@ package com.raytheon.uf.edex.wcs.request; import com.raytheon.uf.edex.ogc.common.OgcResponse; import com.raytheon.uf.edex.ogc.common.http.MimeType; +import com.raytheon.uf.edex.wcs.provider.CustomIdMap; /** * TODO - Class comment here @@ -55,6 +56,16 @@ public class WcsRequest { this.type = type; } + /** + * Map external id to internal URN + * + * @param id + * @return id if no mapping exists + */ + public String externalToInternal(String id) { + return CustomIdMap.externalToInternal(id); + } + public Type getType() { return type; } diff --git a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/soap1_1_2/WcsImpl.java b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/soap1_1_2/WcsImpl.java index 1e83c199d9..57d3d247fd 100644 --- a/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/soap1_1_2/WcsImpl.java +++ b/edexOsgi/com.raytheon.uf.edex.wcs/src/com/raytheon/uf/edex/wcs/soap1_1_2/WcsImpl.java @@ -26,9 +26,13 @@ import net.opengis.wcs.v_1_1_2.GetCoverage; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.edex.log.cxf.RequestLogController; +import com.raytheon.uf.edex.ogc.common.http.EndpointInfo; import com.raytheon.uf.edex.ogc.common.soap.AbstractOwsService; import com.raytheon.uf.edex.ogc.common.soap.ServiceExceptionReport; -import com.raytheon.uf.edex.ogc.common.stats.OgcStatsRecorder; +import com.raytheon.uf.edex.ogc.common.stats.IStatsRecorder; +import com.raytheon.uf.edex.ogc.common.stats.OperationType; +import com.raytheon.uf.edex.ogc.common.stats.ServiceType; import com.raytheon.uf.edex.ogc.common.stats.StatsRecorderFinder; import com.raytheon.uf.edex.wcs.CoveragesHolder; import com.raytheon.uf.edex.wcs.WcsException; @@ -81,17 +85,21 @@ public class WcsImpl extends AbstractOwsService implements IWcsPortType { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo endInfo = getInfo(); try { - return provider.getCapabilities(getInfo(), body); + return provider.getCapabilities(endInfo, body); } catch (Exception e) { success = false; log.error("Problem with get coverage", e); throw getReport(Code.InternalServerError.toString(), "Internal Server Error", VERSION); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WCS", success); + duration, ServiceType.WCS, OperationType.QUERY, success); + + logRequestInfo(duration, success, endInfo); } } @@ -111,19 +119,25 @@ public class WcsImpl extends AbstractOwsService implements IWcsPortType { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo endInfo = getInfo(); try { - return provider.describeCoverage(getInfo(), + return provider.describeCoverage(endInfo, new DescCoverageRequest(body)); } catch (WcsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WCS", success); + duration, ServiceType.WCS, OperationType.QUERY, success); + + logRequestInfo(duration, success, endInfo); } } + + /* * (non-Javadoc) * @@ -136,8 +150,9 @@ public class WcsImpl extends AbstractOwsService implements IWcsPortType { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo endInfo = getInfo(); try { - CoveragesHolder holder = provider.getCoverage(getInfo(), + CoveragesHolder holder = provider.getCoverage(endInfo, new GetCoverageRequest(body)); Map attachments = getAttachments(holder); context.getMessageContext().put( @@ -152,9 +167,12 @@ public class WcsImpl extends AbstractOwsService implements IWcsPortType { throw getReport(Code.InternalServerError.toString(), "Internal Server Error", VERSION); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WCS", success); + duration, ServiceType.WCS, OperationType.QUERY, success); + + logRequestInfo(duration, success, endInfo); } } @@ -184,5 +202,23 @@ public class WcsImpl extends AbstractOwsService implements IWcsPortType { protected WebServiceContext getContext() { return context; } + + private void logRequestInfo(long durationNanos, boolean success, + EndpointInfo endInfo) { + if (endInfo != null && + RequestLogController.getInstance().shouldLogRequestsInfo() && + log.isPriorityEnabled(RequestLogController.getInstance().getRequestLogLevel())) { + String requestLog = ""; + if(success){ + requestLog += "Successfully processed "; + } else { + requestLog += "Failed to process "; + } + requestLog += "request from " + endInfo.getHost() + ". "; + requestLog += "Duration of " + (durationNanos/1000000000.0) + "s."; + log.handle(RequestLogController.getInstance().getRequestLogLevel(), + requestLog); + } + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF index c449a18d2e..79f9d49fe8 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF @@ -16,9 +16,10 @@ Require-Bundle: org.geotools;bundle-version="2.6.4", org.apache.commons.lang;bundle-version="2.3.0", com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0", com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.edex.log;bundle-version="1.12.1174", + com.raytheon.uf.common.localization;bundle-version="1.12.1174", com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0", com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0", - com.raytheon.uf.common.localization;bundle-version="1.12.1174", javax.measure;bundle-version="1.0.0", com.sun.xml.bind;bundle-version="1.0.0", com.raytheon.uf.common.spatial;bundle-version="1.0.0", @@ -44,5 +45,4 @@ Export-Package: com.raytheon.uf.edex.wfs, com.raytheon.uf.edex.wfs.v2_0_0, com.raytheon.uf.edex.wfs.wxxm Import-Package: javax.servlet, - javax.servlet.http, - org.apache.commons.logging + javax.servlet.http diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-request.xml b/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-request.xml index 8fe5ef4cd6..96179c4d19 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-request.xml @@ -1,12 +1,22 @@ - - - + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-soap-request.xml b/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-soap-request.xml index b38c6b04ad..67649049c1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-soap-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.wfs/res/spring/wfs-ogc-soap-request.xml @@ -1,11 +1,11 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/IWfsProvider.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/IWfsProvider.java index 8f43092a17..ebd7326e88 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/IWfsProvider.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/IWfsProvider.java @@ -48,4 +48,12 @@ public interface IWfsProvider { public void handleGet(Map headers, EndpointInfo info, IOgcHttpResponse response) throws Exception; + /** + * Return the OGC HTTP (get/post) service location in the form [:port]/path + * for appending to the hostname of the server + * + * @return + */ + public String getHttpServiceLocation(); + } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsException.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsException.java index 11f01f282e..b24b3940bb 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsException.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsException.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs; import com.raytheon.uf.edex.ogc.common.OgcException; @@ -49,9 +38,16 @@ public class WfsException extends Exception { this.code = Code.OperationProcessingFailed; break; case InvalidRequest: + case OperationNotSupported: + case MissingParameterValue: + case MissingDimensionValue: this.code = Code.INVALID_REQUEST; break; case InvalidParameterValue: + case InvalidCRS: + case InvalidDimensionValue: + case InvalidFormat: + case LayerNotDefined: this.code = Code.InvalidParameterValue; break; default: diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsFeatureType.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsFeatureType.java index 9df77f6e5b..28f9d70fde 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsFeatureType.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsFeatureType.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs; import java.util.LinkedList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsHttpFactory.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsHttpFactory.java index ba79ea18d6..dcb20dcf36 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsHttpFactory.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/WfsHttpFactory.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 19, 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.wfs; import org.apache.commons.pool.KeyedPoolableObjectFactory; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureAdapter.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureAdapter.java index 166dff9cef..5116aefb9b 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureAdapter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jul 19, 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.wfs.feature; import java.util.Collection; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureTypeConfig.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureTypeConfig.java index abcfb263af..1abc3f037e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureTypeConfig.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/FeatureTypeConfig.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jul 19, 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.wfs.feature; import com.raytheon.uf.edex.ogc.common.OgcNamespace; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/SimpleFeatureTypeCache.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/SimpleFeatureTypeCache.java index 2740ba0056..f817b710dc 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/SimpleFeatureTypeCache.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/feature/SimpleFeatureTypeCache.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jul 19, 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.wfs.feature; import java.lang.reflect.Field; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbsExpressionOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbsExpressionOp.java index cc39ed584a..8f562876ae 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbsExpressionOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbsExpressionOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractCompOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractCompOp.java index 27a417f4f2..208dc44b1e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractCompOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractCompOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractLogicOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractLogicOp.java index ff5885d432..0e84dff989 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractLogicOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractLogicOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractSpatialOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractSpatialOp.java index 3f5e1ff542..71256f24bf 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractSpatialOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/AbstractSpatialOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter; import javax.xml.bind.JAXBElement; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/ExpressionProcessor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/ExpressionProcessor.java index f0a89769bd..4a8543c7ab 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/ExpressionProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/ExpressionProcessor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/FilterProcessor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/FilterProcessor.java index 7df76e00d5..974f2f104d 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/FilterProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/FilterProcessor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcExpressionVisitor.java index 01c22935ea..c8669607f3 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcExpressionVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcFilterVisitor.java index dee1a6b191..bb1970d478 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/OgcFilterVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbsExpressionOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbsExpressionOp.java index 3c677f471c..9460d4daf9 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbsExpressionOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbsExpressionOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v1_1_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractCompOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractCompOp.java index 718c3ff07a..8a0de0eae9 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractCompOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractCompOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter.v1_1_0; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractLogicOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractLogicOp.java index 35a5b07946..f1dd1afe70 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractLogicOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractLogicOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v1_1_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractSpatialOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractSpatialOp.java index 73db95014f..66466fcb28 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractSpatialOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/AbstractSpatialOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v1_1_0; import javax.xml.bind.JAXBElement; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/ExpressionProcessor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/ExpressionProcessor.java index 11f7459da2..2101d4464e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/ExpressionProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/ExpressionProcessor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v1_1_0; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/FilterProcessor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/FilterProcessor.java index ebc5a782eb..ac187199a2 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/FilterProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/FilterProcessor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter.v1_1_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcExpressionVisitor.java index ba5c364c21..b7c45266e4 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcExpressionVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v1_1_0; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcFilterVisitor.java index dd995bd55f..c6c6a5a4f2 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/OgcFilterVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter.v1_1_0; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryExpressionVisitor.java index a4f10046e5..50ea64f1df 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryExpressionVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v1_1_0; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java index affa1a616f..ea278a982e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v1_1_0; import java.util.AbstractMap.SimpleEntry; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbsExpressionOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbsExpressionOp.java index 07a0bfb726..3ff5ee692f 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbsExpressionOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbsExpressionOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v2_0_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractCompOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractCompOp.java index 38dbaff444..2ce9a7f4ce 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractCompOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractCompOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter.v2_0_0; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractLogicOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractLogicOp.java index 0c1f9505bf..f330bb94e7 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractLogicOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractLogicOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v2_0_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java index ebc95cf59e..d75ccbece1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java @@ -12,6 +12,7 @@ package com.raytheon.uf.edex.wfs.filter.v2_0_0; import java.lang.reflect.Field; import java.util.AbstractMap.SimpleEntry; import java.util.ArrayList; +import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; @@ -31,13 +32,17 @@ import net.opengis.gml.v_3_2_1.TimePositionType; import org.apache.commons.lang.StringUtils; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Junction; +import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.edex.ogc.common.gml3_2_1.EnvelopeConverter; import com.raytheon.uf.edex.ogc.common.gml3_2_1.GeometryConverter; +import com.raytheon.uf.edex.ogc.common.spatial.CrsLookup; import com.raytheon.uf.edex.ogc.common.util.ConvertService; import com.raytheon.uf.edex.wfs.provider.VisitorBag; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.CoordinateFilter; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.io.WKTReader; @@ -79,7 +84,13 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { */ protected Operand getBinaryProps(ExpressionProcessor left, ExpressionProcessor right, VisitorBag bag) throws Exception { + OpField field = getRef(left, bag); + //If the field is explicitly ignored in the filter, return null so it is not processed further + if(field.value == null) { + return null; + } + Object value = right.accept(exprVisitor, bag); if (!field.sql) { @@ -150,7 +161,10 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { Junction junc) throws Exception { Iterator i = filters.iterator(); while (i.hasNext()) { - junc.add((Criterion) i.next().accept(this, obj)); + Criterion crit = (Criterion)i.next().accept(this, obj); + if(crit != null) { + junc.add(crit); + } } } @@ -224,14 +238,31 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { obj = ((JAXBElement) obj).getValue(); } Geometry shape; + String crsStr; if (obj instanceof EnvelopeType) { - Envelope envelope = envConverter.convert((EnvelopeType) obj); + EnvelopeType env = (EnvelopeType) obj; + Envelope envelope = envConverter.convert(env); shape = geomConverter.convert(envelope); + crsStr = env.getSrsName(); } else if (obj instanceof AbstractGeometryType) { - shape = geomConverter.convert((AbstractGeometryType) obj); + AbstractGeometryType geom = (AbstractGeometryType) obj; + shape = geomConverter.convert(geom); + crsStr = geom.getSrsName(); } else { throw new Exception("Unsupported geometry format"); } + CoordinateReferenceSystem crs = CrsLookup.lookup(crsStr); + if (CrsLookup.isEpsgGeoCrs(crs)) { + shape.apply(new CoordinateFilter() { + @Override + public void filter(Coordinate coord) { + double tmp = coord.x; + coord.x = coord.y; + coord.y = tmp; + } + }); + shape.geometryChanged(); + } return shape; } @@ -420,6 +451,11 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { */ protected Entry> getRef(BinaryTemporalOpType binary, VisitorBag bag) throws Exception { + if (!binary.isSetValueReference()) { + // default to refTime + return new SimpleEntry>("dataTime.refTime", + Date.class); + } String prop = binary.getValueReference(); String[] unfilteredPath = parseProp(prop); String unfilteredField = StringUtils.join(unfilteredPath, "."); diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractSpatialOp.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractSpatialOp.java index 805dbff479..54e18368db 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractSpatialOp.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractSpatialOp.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v2_0_0; import javax.xml.bind.JAXBElement; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/ExpressionProcessor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/ExpressionProcessor.java index b3850a1f42..03efa3e56c 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/ExpressionProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/ExpressionProcessor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 21, 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.wfs.filter.v2_0_0; import java.util.HashMap; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/Filter2Processor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/Filter2Processor.java index 9148412dcd..5185990121 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/Filter2Processor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/Filter2Processor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 20, 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.wfs.filter.v2_0_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java index a65bd2d521..409bc64c99 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v2_0_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryFilterVisitor.java index 3f06974266..5b198b6dd2 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryFilterVisitor.java @@ -1,38 +1,28 @@ -/* - * 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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.filter.v2_0_0; import java.util.List; import java.util.Map.Entry; +import javax.measure.unit.Unit; import javax.xml.bind.JAXBElement; import net.opengis.filter.v_2_0_0.AbstractIdType; @@ -58,9 +48,13 @@ import org.hibernatespatial.criterion.SpatialRestrictions; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.edex.ogc.common.db.SQLParamRestriction; import com.raytheon.uf.edex.ogc.common.gml3_2_1.EnvelopeConverter; +import com.raytheon.uf.edex.ogc.common.spatial.AltUtil; import com.raytheon.uf.edex.ogc.common.spatial.BoundingBoxUtil; import com.raytheon.uf.edex.ogc.common.spatial.Composite3DBoundingBox; import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate; +import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference; +import com.raytheon.uf.edex.ogc.common.spatial.VerticalEnabled; +import com.raytheon.uf.edex.ogc.common.spatial.VerticalSpatialFactory; import com.raytheon.uf.edex.ogc.common.util.ConvertService; import com.raytheon.uf.edex.wfs.WfsException; import com.raytheon.uf.edex.wfs.WfsException.Code; @@ -96,6 +90,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return Restrictions.disjunction(); + } if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left @@ -122,6 +120,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left + " <> " + (String) operand.right); @@ -146,6 +148,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left + " < " + (String) operand.right); @@ -170,6 +176,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left + " > " + (String) operand.right); @@ -194,6 +204,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left + " >= " + (String) operand.right); @@ -218,6 +232,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + if (operand.sql) { return SQLParamRestriction.restriction((String) operand.left + " <= " + (String) operand.right); @@ -243,6 +261,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if(operand == null) { + return Restrictions.disjunction(); + } + Character wild = checkChar(op.getWildCard(), op.isSetWildCard(), SQL_WILD); Character esc = checkChar(op.getEscapeChar(), op.isSetEscapeChar(), '!'); @@ -357,6 +379,9 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { throws Exception { ExpressionProcessor eproc = new ExpressionProcessor(op.getExpression()); String field = getRef(eproc, (VisitorBag) obj).value; + if (field == null) { + return Restrictions.conjunction(); + } return Restrictions.isNull(field); } @@ -378,6 +403,10 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { Operand lowerPart = getBinaryProps(exp, lower, bag); Operand upperPart = getBinaryProps(exp, upper, bag); + if(lowerPart == null || upperPart == null) { + return Restrictions.disjunction(); + } + return Restrictions.between((String) lowerPart.left, lowerPart.right, upperPart.right); } @@ -574,10 +603,17 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { String prop; if (!op.isSetExpression()) { prop = bag.getSpatialField(); + if (prop == null) { + throw new WfsException(Code.InvalidParameterValue, + "Geospatial filter not supported for feature type"); + } } else { ExpressionProcessor eproc = new ExpressionProcessor( op.getExpression()); prop = getRef(eproc, bag).value; + if (prop == null) { + prop = bag.getSpatialField(); + } } Object any = op.getAny(); if (any instanceof JAXBElement) { @@ -590,7 +626,7 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { int dims = EnvelopeConverter.getDims(value); Envelope env; if (dims == 2) { - env = envConverter.convert(value); + env = BoundingBoxUtil.convert2D(value); SpatialRelateExpression disjoint = SpatialRestrictions.disjoint( bag.filterField(prop), JTS.toGeometry(env)); return Restrictions.not(disjoint); @@ -598,7 +634,7 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { String verticalField = bag.getVerticalField(); if (verticalField == null) { throw new WfsException(Code.InvalidParameterValue, - "Feature does not have vertical information"); + "3D filter not supported for feature type"); } Composite3DBoundingBox composite = BoundingBoxUtil .separate3DEnvelope(value); @@ -611,16 +647,15 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { and.add(Restrictions.not(disjoint)); // vert VerticalCoordinate vert = composite.getVertical(); - // TODO convert units + Unit verticalUnits = getVerticalUnits(bag, vert.getUnits()); + vert = AltUtil.convert(verticalUnits, Reference.UNKNOWN, vert); String min = Integer.toString((int) Math.floor(vert.getMin())); String max = Integer.toString((int) Math.ceil(vert.getMax())); String[] path = verticalField.split("\\."); - Object minObj = ConvertService.get().convertAsType(min, - bag.getRootEntity(), - path); - Object maxObj = ConvertService.get().convertAsType(max, - bag.getRootEntity(), - path); + Object minObj = ConvertService.get().convertAsType(min, + bag.getRootEntity(), path); + Object maxObj = ConvertService.get().convertAsType(max, + bag.getRootEntity(), path); and.add(Restrictions.between(verticalField, minObj, maxObj)); return and; } else { @@ -628,6 +663,26 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { } } + /** + * Find default vertical units for type + * + * @param bag + * @return + */ + private Unit getVerticalUnits(VisitorBag bag, Unit fallback) { + Class entity = bag.getRootEntity(); + VerticalEnabled enabled = VerticalSpatialFactory.getEnabled(entity); + Unit rval; + if (enabled == null + || (rval = enabled.getDefaultVerticalUnit()) == null) { + log.warn("Unable to find default vertical units for type: " + + entity); + log.warn("falling back to using: " + fallback); + return fallback; + } + return rval; + } + /* * (non-Javadoc) * @@ -639,6 +694,9 @@ public class QueryFilterVisitor extends AbstractQueryFilterVisitor { public Object isNil(PropertyIsNilType op, Object obj) throws Exception { ExpressionProcessor eproc = new ExpressionProcessor(op.getExpression()); String field = getRef(eproc, (VisitorBag) obj).value; + if (field == null) { + return Restrictions.conjunction(); + } return Restrictions.isNull(field); } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/SubFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/SubFilterVisitor.java index a64d7c7c01..8cd8d82068 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/SubFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/SubFilterVisitor.java @@ -53,20 +53,20 @@ import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; /** - * TODO Add Description + * visitor for parsing filters into subscription filters * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Feb 15, 2013            bclement     Initial creation
- *
+ * 
  * 
- * + * * @author bclement - * @version 1.0 + * @version 1.0 */ public class SubFilterVisitor extends AbstractQueryFilterVisitor { @@ -80,11 +80,16 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter equal(ExpressionProcessor left, + public AbstractPdoFilter equal(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return AbstractPdoFilter.noFilter(); + } + if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -105,11 +110,16 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter notEqual(ExpressionProcessor left, + public AbstractPdoFilter notEqual(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return AbstractPdoFilter.noFilter(); + } + if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -130,11 +140,16 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter lessThan(ExpressionProcessor left, + public AbstractPdoFilter lessThan(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return AbstractPdoFilter.noFilter(); + } + if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -155,11 +170,14 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter greaterThan(ExpressionProcessor left, + public AbstractPdoFilter greaterThan(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + if (operand == null) { + return AbstractPdoFilter.noFilter(); + } if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -180,11 +198,16 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter greaterThanEqual(ExpressionProcessor left, + public AbstractPdoFilter greaterThanEqual(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return AbstractPdoFilter.noFilter(); + } + if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -205,11 +228,16 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * java.lang.Object) */ @Override - public ComparisonFilter lessThanEqual(ExpressionProcessor left, + public AbstractPdoFilter lessThanEqual(ExpressionProcessor left, ExpressionProcessor right, boolean matchCase, Object obj) throws Exception { VisitorBag bag = (VisitorBag) obj; Operand operand = getBinaryProps(left, right, bag); + + if(operand == null) { + return AbstractPdoFilter.noFilter(); + } + if (operand.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -242,10 +270,13 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { * .v_1_1_0.PropertyIsNullType, java.lang.Object) */ @Override - public ComparisonFilter isNull(PropertyIsNullType op, Object obj) + public AbstractPdoFilter isNull(PropertyIsNullType op, Object obj) throws Exception { ExpressionProcessor eproc = new ExpressionProcessor(op.getExpression()); String field = getRef(eproc, (VisitorBag) obj).value; + if (field == null) { + return AbstractPdoFilter.noFilter(); + } return ComparisonFilter.isNull(field); } @@ -267,6 +298,10 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { Operand lowerPart = getBinaryProps(exp, lower, bag); Operand upperPart = getBinaryProps(exp, upper, bag); + if(lowerPart == null || upperPart == null) { + return AbstractPdoFilter.noFilter(); + } + if (lowerPart.sql || upperPart.sql) { // subscriptions do not go to the DB, if we need sql, likely from a // function, throw exception @@ -492,7 +527,7 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { int dims = EnvelopeConverter.getDims(value); Envelope env; if (dims == 2) { - env = envConverter.convert(value); + env = BoundingBoxUtil.convert2D(value); SpatialFilter disjoint = new SpatialFilter(SpatialOp.DISJOINT, JTS.toGeometry(env)); return LogicFilter.not(disjoint); @@ -531,6 +566,9 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { public Object isNil(PropertyIsNilType op, Object obj) throws Exception { ExpressionProcessor eproc = new ExpressionProcessor(op.getExpression()); String field = getRef(eproc, (VisitorBag) obj).value; + if (field == null) { + return AbstractPdoFilter.noFilter(); + } return ComparisonFilter.isNull(field); } @@ -720,8 +758,7 @@ public class SubFilterVisitor extends AbstractQueryFilterVisitor { @Override public TemporalFilter anyInteracts(BinaryTemporalOpType op, Object obj) throws Exception { - // TODO - throw new Exception("Any Interacts filter not supported"); + return new TemporalFilter(TimeOp.AnyInteracts, parseTimeOp(op, obj)); } /* diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/EnvelopeConverter.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/EnvelopeConverter.java index 921f31fd6c..39da5947f1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/EnvelopeConverter.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/EnvelopeConverter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 26, 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.wfs.gml; import java.util.Arrays; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GeometryConverter.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GeometryConverter.java index 46f07599a9..962bcdd1ec 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GeometryConverter.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GeometryConverter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 25, 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.wfs.gml; import net.opengis.gml.v_3_1_1.AbstractGeometryType; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GmlWktWriter.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GmlWktWriter.java index dd8df6255b..2ab732954f 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GmlWktWriter.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/gml/GmlWktWriter.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 25, 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.wfs.gml; import java.math.BigDecimal; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Capabilities.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Capabilities.java index 97bf802cfb..dfd1d065ba 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Capabilities.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Capabilities.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 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.wfs.provider; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureDescriber.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureDescriber.java index 86f83d1877..fb631e8f43 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureDescriber.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureDescriber.java @@ -16,11 +16,12 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.edex.ogc.common.OgcOperationInfo; import com.raytheon.uf.edex.ogc.common.OgcServiceInfo; +import com.raytheon.uf.edex.wfs.IWfsProvider; +import com.raytheon.uf.edex.wfs.IWfsProvider.WfsOpType; import com.raytheon.uf.edex.wfs.WfsException; import com.raytheon.uf.edex.wfs.WfsFeatureType; -import com.raytheon.uf.edex.wfs.IWfsProvider.WfsOpType; -import com.raytheon.uf.edex.wfs.reg.WfsRegistryImpl; import com.raytheon.uf.edex.wfs.reg.IWfsSource; +import com.raytheon.uf.edex.wfs.reg.WfsRegistryImpl; import com.raytheon.uf.edex.wfs.request.DescFeatureTypeReq; import com.raytheon.uf.edex.wfs.request.QualifiedName; @@ -28,37 +29,40 @@ import com.raytheon.uf.edex.wfs.request.QualifiedName; * TODO Add Description * *
- * 
+ *
  * SOFTWARE HISTORY
- * 
+ *
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Oct 25, 2012            bclement     Initial creation
- * 
+ *
  * 
- * + * * @author bclement - * @version 1.0 + * @version 1.0 */ public class FeatureDescriber { protected WfsRegistryImpl registry; - protected IUFStatusHandler log = UFStatus.getHandler(this.getClass()); + protected IWfsProvider provider; + + protected IUFStatusHandler log = UFStatus.getHandler(this.getClass()); /** * */ - public FeatureDescriber(WfsRegistryImpl registry) { + public FeatureDescriber(WfsRegistryImpl registry, IWfsProvider provider) { this.registry = registry; + this.provider = provider; } public String describe(DescFeatureTypeReq request, OgcServiceInfo serviceInfo) throws WfsException { List typenames = request.getTypenames(); String xml; - if (typenames == null || !typenames.isEmpty()) { + if (typenames == null || typenames.size() == 0) { xml = getAllSchemas(serviceInfo); } else if (typenames.size() == 1) { xml = getOneSchema(typenames.get(0)); @@ -114,7 +118,8 @@ public class FeatureDescriber { protected String getBaseDescUrl(OgcServiceInfo serviceInfo) { for (OgcOperationInfo opinfo : serviceInfo.getOperations()) { if (opinfo.getType().equals(WfsOpType.DescribeFeatureType)) { - return opinfo.getHttpGetRes(); + return "http://" + opinfo.getHttpBaseHostname() + + provider.getHttpServiceLocation(); } } log.error("Unable to construct describe feature URL"); diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureFetcher.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureFetcher.java index efb438b33e..49f229f361 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureFetcher.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureFetcher.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 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.wfs.provider; import java.util.ArrayList; @@ -233,10 +222,15 @@ public abstract class FeatureFetcher { throws Exception; protected Criterion getBbox(double lowerLat, double lowerLon, - double upperLat, double upperLon, VisitorBag bag) { - Polygon geom = JTS.toGeometry(new Envelope(lowerLon, upperLon, - lowerLat, upperLat)); - return SpatialRestrictions.within(bag.getSpatialField(), geom); - } + double upperLat, double upperLon, VisitorBag bag) + throws WfsException { + Polygon geom = JTS.toGeometry(new Envelope(lowerLon, upperLon, + lowerLat, upperLat)); + if (bag.getSpatialField() == null) { + throw new WfsException(Code.InvalidParameterValue, + "Geospatial filter not supported for feature type"); + } + return SpatialRestrictions.within(bag.getSpatialField(), geom); + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureTranslator.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureTranslator.java index 02a0a9f4d7..9f2db859d5 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureTranslator.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/FeatureTranslator.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 27, 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.wfs.provider; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryExpressionVisitor.java index 39a2b43921..994f20ee5f 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryExpressionVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.provider; import java.util.List; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryFilterVisitor.java index 38b0d3105c..4dd36e1dc0 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/QueryFilterVisitor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.provider; import java.util.AbstractMap.SimpleEntry; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/SimpleFilterHandler.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/SimpleFilterHandler.java index 5ca23681d7..a59510ad0e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/SimpleFilterHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/SimpleFilterHandler.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.provider; import org.geotools.filter.FilterHandler; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Transactor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Transactor.java index b7464bd287..5fde6c2c61 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Transactor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/Transactor.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 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.wfs.provider; import java.math.BigInteger; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/VisitorBag.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/VisitorBag.java index 06dd5144bf..fc0694ca52 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/VisitorBag.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/provider/VisitorBag.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.provider; import java.util.Map; @@ -65,11 +54,13 @@ public class VisitorBag { } public String filterField(String field) { - if (fieldMap == null || field == null) { + if (fieldMap == null || field == null || + !fieldMap.containsKey(field)) { return field; } String rval = fieldMap.get(field); - return rval != null ? rval : field; + //return "" as null for consistency + return (rval == null || "".equals(rval)) ? null : rval; } public Class getRootEntity() { diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/AbstractWfsSource.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/AbstractWfsSource.java index 7b9334778f..5f11d48396 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/AbstractWfsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/AbstractWfsSource.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * May 9, 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.wfs.reg; import java.io.IOException; @@ -105,6 +94,11 @@ public abstract class AbstractWfsSource extends AbstractOgcSource implements protected abstract List getFeatureTypes(); + public List getAliases() { + //Default to no aliases unless the source specifies + return new ArrayList(); + } + /* * (non-Javadoc) * diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IPdoGmlTranslator.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IPdoGmlTranslator.java index 0d32f49b0a..4a6f899a1d 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IPdoGmlTranslator.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IPdoGmlTranslator.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jul 26, 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.wfs.reg; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsRegistry.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsRegistry.java index 596c31216c..c57c2e2041 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsRegistry.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsRegistry.java @@ -48,4 +48,8 @@ public interface IWfsRegistry { */ IWfsRegistry unregister(IWfsSource source); + public String getHttpServicePort(); + + public String getHttpServicePath(); + } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsSource.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsSource.java index c8e1e2ad97..77e0c9cd11 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/IWfsSource.java @@ -45,6 +45,11 @@ public interface IWfsSource { */ public List listFeatureTypes(); + /** + * @return a list of aliases allowed for feature types for this source + */ + public List getAliases(); + /** * @param feature * name of feature to describe diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/PluginWfsSource.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/PluginWfsSource.java index 1c89ecabf9..76b09c3d4c 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/PluginWfsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/PluginWfsSource.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Jul 26, 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.wfs.reg; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java index fd3b12377c..ef2ca0fc21 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 11, 2011 bclement Initial creation - * May 30, 2013 753 dhladky reverted to original - * - */ +/** + * 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.wfs.reg; import java.io.InputStream; @@ -72,6 +60,8 @@ public class WfsRegistryImpl implements IWfsRegistry { protected final Map byFeature = new HashMap(); + protected final Map byAlias = new HashMap(); + protected Class[] jaxbClasses = new Class[] { ObjectFactory.class, net.opengis.wfs.v_1_1_0.ObjectFactory.class, net.opengis.filter.v_1_1_0.ObjectFactory.class, @@ -103,6 +93,10 @@ public class WfsRegistryImpl implements IWfsRegistry { public static final Map NS_MAP = new ConcurrentHashMap(); + protected String port; + + protected String path; + static { NS_MAP.put(OgcNamespace.EDEX, OgcPrefix.EDEX); NS_MAP.put(OgcNamespace.GML, OgcPrefix.GML); @@ -125,10 +119,12 @@ public class WfsRegistryImpl implements IWfsRegistry { NS_MAP.put(OgcNamespace.WSNT, OgcPrefix.WSNT); NS_MAP.put(OgcNamespace.WSA, OgcPrefix.WSA); NS_MAP.put(OgcNamespace.OWSNT, OgcPrefix.OWSNT); + NS_MAP.put(OgcNamespace.NAWX15, OgcPrefix.NAWX); } - public WfsRegistryImpl() { - + public WfsRegistryImpl(String port, String path) { + this.port = port; + this.path = path; } /* @@ -146,6 +142,7 @@ public class WfsRegistryImpl implements IWfsRegistry { try { addByKey(source); addByFeature(source); + addByAlias(source); jaxbClasses = (Class[]) ArrayUtils.addAll(jaxbClasses, source.getJaxbClasses()); currentVersion++; @@ -267,6 +264,25 @@ public class WfsRegistryImpl implements IWfsRegistry { byFeature.put(f.getName(), source); } } + + protected void addByAlias(IWfsSource source) throws RegistryException { + for (WfsFeatureType f : source.getAliases()) { + QualifiedName feature = f.getName(); + if (byAlias.containsKey(feature)) { + throw new RegistryException( + "Already providing a feature with name: " + feature); + } + String prefix = NS_MAP.get(feature.getNamespace()); + if (prefix == null) { + prefix = (feature.getPrefix() != null + && !feature.getPrefix().isEmpty() ? feature.getPrefix() + : feature.getName()); + NS_MAP.put(feature.getNamespace(), prefix); + } + + byAlias.put(f.getName(), source); + } + } /** * Remove source from all maps @@ -279,6 +295,9 @@ public class WfsRegistryImpl implements IWfsRegistry { for (WfsFeatureType f : removed.listFeatureTypes()) { byFeature.remove(f.getName()); } + for (WfsFeatureType f : removed.getAliases()) { + byAlias.remove(f.getName()); + } } } @@ -312,14 +331,19 @@ public class WfsRegistryImpl implements IWfsRegistry { Lock read = lock.readLock(); read.lock(); try { - return byFeature.get(feature); + IWfsSource source = byFeature.get(feature); + if(source == null) { + //If a standard feature is not found see if it is an alias + source = byAlias.get(feature); + } + return source; } finally { read.unlock(); } } /** - * Get a list of all available feature types + * Get a list of all available feature types, no aliases should be advertised * * @return */ @@ -352,4 +376,24 @@ public class WfsRegistryImpl implements IWfsRegistry { this.prefix = prefix; } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.wfs.reg.WfsRegistry#getHttpServicePort() + */ + @Override + public String getHttpServicePort() { + return port; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.wfs.reg.WfsRegistry#getHttpServicePath() + */ + @Override + public String getHttpServicePath() { + return path; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/DescFeatureTypeReq.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/DescFeatureTypeReq.java index 750b107033..30bc03f2ee 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/DescFeatureTypeReq.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/DescFeatureTypeReq.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/FeatureQuery.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/FeatureQuery.java index 9cf088ed63..6659105691 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/FeatureQuery.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/FeatureQuery.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import java.util.LinkedList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetCapReq.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetCapReq.java index b53a4249cd..fc34df9ad5 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetCapReq.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetCapReq.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import net.opengis.wfs.v_1_1_0.GetCapabilitiesType; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetFeatureReq.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetFeatureReq.java index c58869eb1a..819d35471d 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetFeatureReq.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/GetFeatureReq.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import java.math.BigInteger; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/QualifiedName.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/QualifiedName.java index 58b4cdac86..8358a6d5e7 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/QualifiedName.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/QualifiedName.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import javax.xml.namespace.QName; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/SortBy.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/SortBy.java index 5b820b7874..16d199615e 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/SortBy.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/SortBy.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; /** diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/TransReq.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/TransReq.java index fbc0ee864c..d9636a79c1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/TransReq.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/TransReq.java @@ -1,32 +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 - * ------------ ---------- ----------- -------------------------- - * - */ +/** + * 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.wfs.request; import net.opengis.wfs.v_1_1_0.TransactionType; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/WfsRequest.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/WfsRequest.java index ddd1183581..dd878be180 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/WfsRequest.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/request/WfsRequest.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.request; import com.raytheon.uf.edex.ogc.common.OgcResponse; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/Wfs.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/Wfs.java index e6685fde50..9296fb889f 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/Wfs.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/Wfs.java @@ -10,6 +10,8 @@ package com.raytheon.uf.edex.wfs.soap2_0_0; +//import gov.faa.nawx.v_1_5_0.ObjectFactory; + import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; @@ -39,9 +41,22 @@ import net.opengis.wfs.v_2_0_0.TransactionType; import net.opengis.wfs.v_2_0_0.ValueCollectionType; import net.opengis.wfs.v_2_0_0.WFSCapabilitiesType; +import org.apache.cxf.annotations.GZIP; +import org.apache.cxf.interceptor.InInterceptors; + import com.raytheon.uf.edex.ogc.common.soap.ServiceExceptionReport; import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType; +/* SOFTWARE HISTORY +* Date Ticket# Engineer Description +* ------------ ---------- ----------- -------------------------- +* unknown bclements Initial creation +* 10/22/2013 2472 dhladky removed FAA dependencies, fixed path for CXFlogger. +*
+*/ + +@GZIP +@InInterceptors(interceptors = "com.raytheon.uf.edex.log.cxf.CXFLogger") @WebService(name = "wfs", targetNamespace = "http://www.opengis.net/wfs/requests/2.0") @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) @@ -51,7 +66,7 @@ import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType; net.opengis.gml.v_3_2_1.ObjectFactory.class, com.eurocontrol.avwx.v_1_1_1.ObjectFactory.class, com.eurocontrol.wx.v_1_1_1.ObjectFactory.class, - net.opengis.sensorml.v_1_0_1_gml32.ObjectFactory.class }) + net.opengis.sensorml.v_1_0_1_gml32.ObjectFactory.class}) public interface Wfs { /** diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/WfsImpl.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/WfsImpl.java index 12a9e9ebb8..ff608a4915 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/WfsImpl.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/soap2_0_0/WfsImpl.java @@ -33,10 +33,15 @@ import net.opengis.wfs.v_2_0_0.TransactionType; import net.opengis.wfs.v_2_0_0.ValueCollectionType; import net.opengis.wfs.v_2_0_0.WFSCapabilitiesType; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.edex.log.cxf.RequestLogController; import com.raytheon.uf.edex.ogc.common.http.EndpointInfo; import com.raytheon.uf.edex.ogc.common.soap.AbstractOwsService; import com.raytheon.uf.edex.ogc.common.soap.ServiceExceptionReport; -import com.raytheon.uf.edex.ogc.common.stats.OgcStatsRecorder; +import com.raytheon.uf.edex.ogc.common.stats.IStatsRecorder; +import com.raytheon.uf.edex.ogc.common.stats.OperationType; +import com.raytheon.uf.edex.ogc.common.stats.ServiceType; import com.raytheon.uf.edex.ogc.common.stats.StatsRecorderFinder; import com.raytheon.uf.edex.wfs.WfsException; import com.raytheon.uf.edex.wfs.WfsException.Code; @@ -69,6 +74,8 @@ public class WfsImpl extends AbstractOwsService implements Wfs { protected Wfs2_0_0Provider provider; private static final String VERSION = "2.0.0"; + + protected IUFStatusHandler log = UFStatus.getHandler(this.getClass()); @Resource protected WebServiceContext context; @@ -89,16 +96,19 @@ public class WfsImpl extends AbstractOwsService implements Wfs { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.getCapabilities(new GetCapReq(body), info); } catch (WfsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -118,8 +128,8 @@ public class WfsImpl extends AbstractOwsService implements Wfs { DescribeFeatureTypeType body) throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.describeFeatureType( new DescFeatureTypeReq(body), info); @@ -127,9 +137,12 @@ public class WfsImpl extends AbstractOwsService implements Wfs { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -145,16 +158,19 @@ public class WfsImpl extends AbstractOwsService implements Wfs { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.getPropertyValues(body, info); } catch (WfsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -170,17 +186,20 @@ public class WfsImpl extends AbstractOwsService implements Wfs { throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.getFeatureGML(new GetFeatureReq(body, provider), info); } catch (WfsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -235,16 +254,19 @@ public class WfsImpl extends AbstractOwsService implements Wfs { ListStoredQueriesType body) throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.listQueries(info); } catch (WfsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -260,16 +282,19 @@ public class WfsImpl extends AbstractOwsService implements Wfs { DescribeStoredQueriesType body) throws ServiceExceptionReport { long start = System.nanoTime(); boolean success = true; + EndpointInfo info = getInfo(); try { - EndpointInfo info = getInfo(); return provider.describeQueries(new DescQueryReq(body), info); } catch (WfsException e) { success = false; throw getReport(e); } finally { - OgcStatsRecorder statRecorder = StatsRecorderFinder.find(); + long duration = System.nanoTime() - start; + IStatsRecorder statRecorder = StatsRecorderFinder.find(); statRecorder.recordRequest(System.currentTimeMillis(), - System.nanoTime() - start, "WFS", success); + duration, ServiceType.WFS, OperationType.QUERY, success); + + logRequestInfo(duration, success, info); } } @@ -308,5 +333,23 @@ public class WfsImpl extends AbstractOwsService implements Wfs { protected WebServiceContext getContext() { return context; } + + private void logRequestInfo(long durationNanos, boolean success, + EndpointInfo endInfo) { + if (endInfo != null && + RequestLogController.getInstance().shouldLogRequestsInfo() && + log.isPriorityEnabled(RequestLogController.getInstance().getRequestLogLevel())) { + String requestLog = ""; + if(success){ + requestLog += "Successfully processed "; + } else { + requestLog += "Failed to process "; + } + requestLog += "request from " + endInfo.getHost() + ". "; + requestLog += "Duration of " + (durationNanos/1000000000.0) + "s."; + log.handle(RequestLogController.getInstance().getRequestLogLevel(), + requestLog); + } + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/JaxbTransUtil.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/JaxbTransUtil.java index 6736c01108..1f8d7d75b5 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/JaxbTransUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/JaxbTransUtil.java @@ -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 15, 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.wfs.util; import java.util.Arrays; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/XMLGregorianCalendarConverter.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/XMLGregorianCalendarConverter.java new file mode 100644 index 0000000000..c9ef7f8334 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/util/XMLGregorianCalendarConverter.java @@ -0,0 +1,79 @@ +package com.raytheon.uf.edex.wfs.util; + +import java.util.GregorianCalendar; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +/** + * Utility class for converting between XMLGregorianCalendar and java.util.Date + * + * @author skorolev + * @version 1.0 + * + *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 18, 2013 #411       skorolev    Initial creation
+ *
+ * 
+ * + */ +public class XMLGregorianCalendarConverter { + + /** + * Needed to create XMLGregorianCalendar instances + */ + private static DatatypeFactory df = null; + static { + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException dce) { + throw new IllegalStateException( + "Exception while obtaining DatatypeFactory instance", dce); + } + } + + /** + * Converts a java.util.Date into an instance of XMLGregorianCalendar + * + * @param date Instance of java.util.Date or a null reference + * @return XMLGregorianCalendar instance whose value is based upon the + * value in the date parameter. If the date parameter is null then + * this method will simply return null. + */ + public static XMLGregorianCalendar asXMLGregorianCalendar(java.util.Date date) { + if (date == null) { + return null; + } else { + GregorianCalendar gc = new GregorianCalendar(); + gc.setTimeInMillis(date.getTime()); + return df.newXMLGregorianCalendar(gc); + } + } + + /** + * Converts an XMLGregorianCalendar to an instance of java.util.Date + * + * @param xgc Instance of XMLGregorianCalendar or a null reference + * @return java.util.Date instance whose value is based upon the + * value in the xgc parameter. If the xgc parameter is null then + * this method will simply return null. + */ + public static java.util.Date asDate(XMLGregorianCalendar xgc) { + if (xgc == null) { + return null; + } else { + return xgc.toGregorianCalendar().getTime(); + } + } + + public static XMLGregorianCalendar getCurrentTimeStamp (){ + GregorianCalendar gc = new GregorianCalendar(); + gc.setTimeInMillis(System.currentTimeMillis()); + return df.newXMLGregorianCalendar(gc); + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Capabilities.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Capabilities.java index 19f787c544..214fbfa941 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Capabilities.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Capabilities.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 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.wfs.v1_1_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/FeatureTranslator.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/FeatureTranslator.java index 4982e16948..5ab08d0feb 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/FeatureTranslator.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/FeatureTranslator.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 27, 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.wfs.v1_1_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Wfs1_1_0Provider.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Wfs1_1_0Provider.java index 257a22b672..2beb6bf41a 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Wfs1_1_0Provider.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v1_1_0/Wfs1_1_0Provider.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.v1_1_0; import java.io.IOException; @@ -115,7 +104,7 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider { public Wfs1_1_0Provider(WfsRegistryImpl registry) { this.capabilities = new Capabilities(registry); this.features = new Gml31FeatureFetcher(registry); - this.describer = new FeatureDescriber(registry); + this.describer = new FeatureDescriber(registry, this); this.registry = registry; this.transactor = new Transactor(); } @@ -318,10 +307,12 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider { String getCapGet = base; String getFeatureGet = base; String descFeatureGet = base; - rval.addOperationInfo(getOp(getCapGet, base, WfsOpType.GetCapabilities)); + rval.addOperationInfo(getOp(getCapGet, base, WfsOpType.GetCapabilities, + info.getHost())); rval.addOperationInfo(getOp(descFeatureGet, base, - WfsOpType.DescribeFeatureType)); - rval.addOperationInfo(getOp(getFeatureGet, base, WfsOpType.GetFeature)); + WfsOpType.DescribeFeatureType, info.getHost())); + rval.addOperationInfo(getOp(getFeatureGet, base, WfsOpType.GetFeature, + info.getHost())); return rval; } @@ -334,8 +325,9 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider { * @return */ protected OgcOperationInfo getOp(String get, String post, - WfsOpType type) { + WfsOpType type, String host) { OgcOperationInfo rval = new OgcOperationInfo(type); + rval.setHttpBaseHostname(host); rval.setHttpGetRes(get); rval.setHttpPostRes(post); rval.addVersion(version); @@ -798,4 +790,22 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider { handleInternal(req, info, response); } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.wfs.WfsProvider#getHttpServiceLocation() + */ + @Override + public String getHttpServiceLocation() { + String location = ""; + String port = registry.getHttpServicePort(); + if (!port.equals("80")) { + location += ":" + port; + } + String path = registry.getHttpServicePath(); + location += "/" + path + "?service=" + Capabilities.SERV_TYPE + + "&version=" + version; + return location; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Capabilities.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Capabilities.java index 940c91a79b..a7c5625f91 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Capabilities.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Capabilities.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 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.wfs.v2_0_0; import java.util.ArrayList; @@ -41,6 +30,7 @@ import javax.xml.namespace.QName; import net.opengis.filter.v_2_0_0.ComparisonOperatorType; import net.opengis.filter.v_2_0_0.ComparisonOperatorsType; +import net.opengis.filter.v_2_0_0.ConformanceType; import net.opengis.filter.v_2_0_0.FilterCapabilities; import net.opengis.filter.v_2_0_0.GeometryOperandsType; import net.opengis.filter.v_2_0_0.GeometryOperandsType.GeometryOperand; @@ -56,6 +46,7 @@ import net.opengis.ows.v_1_1_0.DCP; import net.opengis.ows.v_1_1_0.DomainType; import net.opengis.ows.v_1_1_0.HTTP; import net.opengis.ows.v_1_1_0.LanguageStringType; +import net.opengis.ows.v_1_1_0.NoValues; import net.opengis.ows.v_1_1_0.OperationsMetadata; import net.opengis.ows.v_1_1_0.RequestMethodType; import net.opengis.ows.v_1_1_0.ServiceIdentification; @@ -107,8 +98,8 @@ public class Capabilities { "Touches" }; protected String[] comparisonOperators = { "PropertyIsLessThan", - "PropertyIsGreaterThan", "PropertyIsLessThanEqualTo", - "PropertyIsGreaterThenEqualTo", "PropertyIsEqualTo", + "PropertyIsGreaterThan", "PropertyIsLessThanOrEqualTo", + "PropertyIsGreaterThanOrEqualTo", "PropertyIsEqualTo", "PropertyIsNotEqualTo" }; protected String[] logicOperators = { "And", "Or", "Not" }; @@ -182,20 +173,35 @@ public class Capabilities { AllowedValues value = new AllowedValues(); value.setValueOrRange(toVals); rval.setAllowedValues(value); - return rval; - } + return rval; + } - /** + /** + * @return + */ + protected FilterCapabilities getFilterCap() { + FilterCapabilities rval = new FilterCapabilities(); + rval.setConformance(getConformance()); + rval.setScalarCapabilities(getScalarCapabilities()); + rval.setSpatialCapabilities(getSpatialCapabilities()); + rval.setIdCapabilities(getIdCapabilities()); + return rval; + } + + /** * @return */ - protected FilterCapabilities getFilterCap() { - FilterCapabilities rval = new FilterCapabilities(); - rval.setScalarCapabilities(getScalarCapabilities()); - rval.setSpatialCapabilities(getSpatialCapabilities()); - rval.setIdCapabilities(getIdCapabilities()); + protected ConformanceType getConformance() { + ConformanceType rval = new ConformanceType(); + DomainType domain = new DomainType(); + //TODO, is this the correct name here?? + domain.setName("Filter_Conformance"); + NoValues value = new NoValues(); + domain.setNoValues(value); + rval.setConstraint(Arrays.asList(domain)); return rval; } - + /** * @return */ @@ -241,6 +247,7 @@ public class Capabilities { QName name = new QName(OgcNamespace.GML, op); GeometryOperand gop = new GeometryOperand(); gop.setName(name); + ops.add(gop); } rval.setGeometryOperand(ops); return rval; @@ -311,6 +318,7 @@ public class Capabilities { LanguageStringType lst = new LanguageStringType(); lst.setValue(SERV_TITLE); rval.setTitle(Arrays.asList(lst)); - return rval; - } + rval.setServiceTypeVersion(Arrays.asList(Wfs2_0_0Provider.version)); + return rval; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/FeatureTranslator.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/FeatureTranslator.java index a3d7f91403..9252d95f43 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/FeatureTranslator.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/FeatureTranslator.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 27, 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.wfs.v2_0_0; import java.util.ArrayList; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Wfs2_0_0Provider.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Wfs2_0_0Provider.java index f66085acfa..c5004d4384 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Wfs2_0_0Provider.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/v2_0_0/Wfs2_0_0Provider.java @@ -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 - * ------------ ---------- ----------- -------------------------- - * Apr 22, 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.wfs.v2_0_0; import java.io.IOException; @@ -118,7 +107,25 @@ import com.raytheon.uf.edex.wfs.request.QualifiedName; import com.raytheon.uf.edex.wfs.request.WfsRequest; import com.raytheon.uf.edex.wfs.request.WfsRequest.Type; import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType; +import com.raytheon.uf.edex.wfs.util.XMLGregorianCalendarConverter; +/** + * TODO Add Description + * + * @author bclement + * @version 1.0 + * + * *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 18, 2013 #411       skorolev    Added required RESPONSE METADATA
+ *
+ * 
+ * + */ public class Wfs2_0_0Provider extends AbstractWfsProvider implements IStoredQueryCallback { @@ -147,7 +154,7 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements public Wfs2_0_0Provider(WfsRegistryImpl registry) { this.capabilities = new Capabilities(registry); this.features = new Gml32FeatureFetcher(registry); - this.describer = new FeatureDescriber(registry); + this.describer = new FeatureDescriber(registry, this); this.registry = registry; // this name must match preloaded store in utility directory this.queryStore = new FileSystemQueryStore(registry, "wfsQueryStore"); @@ -377,6 +384,7 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements protected OgcOperationInfo getOp(String base, WfsOpType type, EndpointInfo info) { OgcOperationInfo rval = new OgcOperationInfo(type); + rval.setHttpBaseHostname(info.getHost()); if (!info.isPostOnly()) { rval.setHttpGetRes(base); } @@ -485,8 +493,8 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements } rval.setMember(members); rval.setNumberMatched(Long.toString(features.count)); - rval.setNumberReturned(new BigInteger(Integer - .toString(features.features.size()))); + rval.setNumberReturned(BigInteger.valueOf(features.features.size())); + rval.setTimeStamp(XMLGregorianCalendarConverter.getCurrentTimeStamp()); return rval; } @@ -1169,6 +1177,9 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements } } rval.setMember(values); + rval.setNumberMatched(Long.toString(counted.count)); + rval.setNumberReturned(BigInteger.valueOf(counted.features.size())); + rval.setTimeStamp(XMLGregorianCalendarConverter.getCurrentTimeStamp()); return rval; } @@ -1186,4 +1197,22 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements return features; } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.wfs.WfsProvider#getHttpServiceLocation() + */ + @Override + public String getHttpServiceLocation() { + String location = ""; + String port = registry.getHttpServicePort(); + if (!port.equals("80")) { + location += ":" + port; + } + String path = registry.getHttpServicePath(); + location += "/" + path + "?service=" + Capabilities.SERV_TYPE + + "&version=" + version; + return location; + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/AbstractWxxm32Translator.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/AbstractWxxm32Translator.java index 44d13aba5b..adb32cf22b 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/AbstractWxxm32Translator.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/AbstractWxxm32Translator.java @@ -35,7 +35,9 @@ import net.opengis.gml.v_3_2_1.DirectPositionType; import net.opengis.gml.v_3_2_1.FeaturePropertyType; import net.opengis.gml.v_3_2_1.LocationPropertyType; import net.opengis.gml.v_3_2_1.PointType; +import net.opengis.gml.v_3_2_1.TimeInstantPropertyType; import net.opengis.gml.v_3_2_1.TimeInstantType; +import net.opengis.gml.v_3_2_1.TimePeriodType; import net.opengis.gml.v_3_2_1.TimePositionType; import net.opengis.om.v_1_0_0_gml32.ProcessPropertyType; import net.opengis.swe.v_1_0_1_gml32.PhenomenonPropertyType; @@ -44,6 +46,8 @@ import net.opengis.swe.v_1_0_1_gml32.TimeObjectPropertyType; import com.eurocontrol.avwx.v_1_1_1.AirspaceType; import com.eurocontrol.avwx.v_1_1_1.ObjectFactory; import com.eurocontrol.wx.v_1_1_1.AirTemperatureType; +import com.eurocontrol.wx.v_1_1_1.ForecastType; +import com.eurocontrol.wx.v_1_1_1.ForecastType.ValidTime; import com.eurocontrol.wx.v_1_1_1.ObservationType; import com.eurocontrol.wx.v_1_1_1.PressureType; import com.eurocontrol.wx.v_1_1_1.UomAngleType; @@ -65,6 +69,7 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.edex.ogc.common.OgcGeoBoundingBox; import com.raytheon.uf.edex.ogc.common.db.LayerTransformer; import com.raytheon.uf.edex.ogc.common.gml3_2_1.GeometryConverter; @@ -110,11 +115,11 @@ public abstract class AbstractWxxm32Translator protected static final net.opengis.swe.v_1_0_1_gml32.ObjectFactory sweFactory = new net.opengis.swe.v_1_0_1_gml32.ObjectFactory(); - // FIXME - public static final String AIRCRAFT_URN = ""; + // taken from UCAR example + public static final String AIRCRAFT_URN = "urn:icao:Aircraft:type"; - // FIXME - public static final String AIRFRAME_URN = ""; + // FIXME guess based on aircraft URN + public static final String AIRFRAME_URN = "urn:icao:Airframe:type"; // FIXME public static final String FLIGHT_URN = ""; @@ -175,6 +180,10 @@ public abstract class AbstractWxxm32Translator protected static final String AERODROME_OBSERVED_PROPERTY = "http://www.eurocontrol.int/ont/avwx/1.1/wx.owl#AerodromeWx"; + protected static final String AVIATION_FORECAST_PROCEDURE = "urn:fdc:faa.gov:AviationForecast"; + + protected static final String WEATHER_OFFICE_URN = "urn:gov:noaa:nws:weatherOffice"; + private static IUFStatusHandler statusHandler = UFStatus .getHandler(AbstractWxxm32Translator.class); @@ -246,6 +255,16 @@ public abstract class AbstractWxxm32Translator return rval; } + /** + * Hook method for subclasses to do bulk preprocessing + * + * @param pdos + * @return + */ + protected PluginDataObject[] preprocess(PluginDataObject[] pdos) { + return pdos; + } + /** * Translate pdo into GML 3.2.1 WXXM Object * @@ -305,6 +324,18 @@ public abstract class AbstractWxxm32Translator return new Amount(value, uom); } + /** + * @param value + * @param uom + * @return null if value is null + */ + protected Amount createAmount(double value, Unit uom, double missingVal) { + if (value == missingVal) { + return null; + } + return new Amount(value, uom); + } + /** * @param value * @param uom @@ -409,17 +440,107 @@ public abstract class AbstractWxxm32Translator DataTime time = pdo.getDataTime(); Date refTime = time.getRefTime(); TimeObjectPropertyType rval = new TimeObjectPropertyType(); - TimeInstantType inst = new TimeInstantType(); - TimePositionType pos = new TimePositionType(); - String formatted = LayerTransformer.format(refTime); - pos.setValue(Arrays.asList(formatted)); - inst.setTimePosition(pos); + TimeInstantType inst = getInstant(refTime); JAXBElement timeObj = gmlFactory .createAbstractTimeObject(inst); rval.setAbstractTimeObject(timeObj); return rval; } + /** + * Create instant from date + * + * @param d + * @return + */ + protected TimeInstantType getInstant(Date d) { + TimeInstantType inst = new TimeInstantType(); + TimePositionType pos = new TimePositionType(); + String formatted = LayerTransformer.format(d); + pos.setValue(Arrays.asList(formatted)); + inst.setTimePosition(pos); + return inst; + } + + /** + * Create instant from date + * + * @param d + * @return + */ + protected TimeInstantPropertyType getInstantProp(Date d) { + TimeInstantPropertyType rval = new TimeInstantPropertyType(); + rval.setTimeInstant(getInstant(d)); + return rval; + } + + /** + * Create time position from date + * + * @param d + * @return + */ + protected TimePositionType getTimePosition(Date d) { + TimePositionType rval = new TimePositionType(); + rval.setValue(Arrays.asList(LayerTransformer.format(d))); + return rval; + } + + /** + * Sets valid and sampling times for forecast + * + * @param target + * @param pdo + */ + protected void setTimes(ForecastType target, Date start, Date end) { + TimePeriodType time = getTimePeriod(start, end); + ValidTime vtime = new ValidTime(); + JAXBElement timeElem = gmlFactory + .createAbstractTimeObject(time); + vtime.setAbstractTimeObject(timeElem); + target.setValidTime(vtime); + TimeObjectPropertyType prop = new TimeObjectPropertyType(); + prop.setAbstractTimeObject(timeElem); + target.setSamplingTime(prop); + } + + /** + * Create time period from valid period + * + * @param time + * @return + */ + protected TimePeriodType getTimePeriod(DataTime time) { + TimeRange range = time.getValidPeriod(); + return getTimePeriod(range.getStart(), range.getEnd()); + } + + /** + * Create time period from valid period + * + * @param time + * @return + */ + protected TimePeriodType getTimePeriod(Date start, Date end) { + TimePeriodType rval = new TimePeriodType(); + TimePositionType startpos = getTimePosition(start); + TimePositionType endpos = getTimePosition(end); + rval.setBeginPosition(startpos); + rval.setEndPosition(endpos); + return rval; + } + + /** + * Create aviation forecast procedure + * + * @return + */ + protected ProcessPropertyType getForecastProcedure() { + ProcessPropertyType rval = new ProcessPropertyType(); + rval.setHref(AVIATION_FORECAST_PROCEDURE); + return rval; + } + /** * Get flight level as vertical distance * @@ -524,6 +645,34 @@ public abstract class AbstractWxxm32Translator return property; } + /** + * @param geom + * @param base + * @param top + * @return + */ + protected FeaturePropertyType createFeatureOfInterest( + JAXBElement geom, Amount base, Amount top) { + FeaturePropertyType rval = new FeaturePropertyType(); + AirspaceType airspaceType = avFactory.createAirspaceType(); + if (base != null) { + airspaceType.setBase(getVertDist(base)); + } + if (top != null) { + airspaceType.setTop(getVertDist(top)); + } + LocationPropertyType locationPropertyType = gmlFactory + .createLocationPropertyType(); + locationPropertyType.setAbstractGeometry(geom); + JAXBElement location = gmlFactory + .createLocation(locationPropertyType); + airspaceType.setLocation(location); + JAXBElement airspace = avFactory + .createAirspace(airspaceType); + rval.setAbstractFeature(airspace); + return rval; + } + /** * @param aircraftObsLocation * @return diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/WxxmWfsSource.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/WxxmWfsSource.java index 1aa65bba77..0f18f6d05a 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/WxxmWfsSource.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/wxxm/WxxmWfsSource.java @@ -69,6 +69,12 @@ public abstract class WxxmWfsSource extends PluginWfsSource { if (trans.getFieldMap() != null) { fieldMap.putAll(trans.getFieldMap()); } + + //Map all the aliases to the same translator + List aliases = getAliases(); + for(WfsFeatureType alias : aliases) { + classMap.put(alias.getName(), trans.getRecordClass()); + } } }