From 9c6a430d4006945865874adbcdd70ef3f9014802 Mon Sep 17 00:00:00 2001 From: Dave Hladky Date: Mon, 4 Nov 2013 16:24:14 -0600 Subject: [PATCH] Issue #2472 Replacing lost commit Former-commit-id: 7c1f7ad737361b55e85bdf48dad24c7a60b36e99 --- .../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()); + } } }