diff --git a/cave/com.raytheon.uf.viz.common.core.feature/feature.xml b/cave/com.raytheon.uf.viz.common.core.feature/feature.xml
index ff2dcb2510..2f9468f542 100644
--- a/cave/com.raytheon.uf.viz.common.core.feature/feature.xml
+++ b/cave/com.raytheon.uf.viz.common.core.feature/feature.xml
@@ -77,13 +77,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cots/net.opengis/.project b/cots/net.opengis/.project
deleted file mode 100644
index b6e50c025b..0000000000
--- a/cots/net.opengis/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- net.opengis
-
-
-
-
-
- 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/cots/net.opengis/.settings/org.eclipse.jdt.core.prefs b/cots/net.opengis/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f4d0b5d267..0000000000
--- a/cots/net.opengis/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Fri Jun 08 12:00:15 CDT 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/cots/net.opengis/META-INF/MANIFEST.MF b/cots/net.opengis/META-INF/MANIFEST.MF
deleted file mode 100644
index e8c25f14b1..0000000000
--- a/cots/net.opengis/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Opengis
-Bundle-SymbolicName: net.opengis
-Bundle-Version: 1.0.2
-Bundle-ClassPath: filter-v_1_0_0-schema-1.0.2.jar,
- filter-v_1_1_0-schema-1.0.2.jar,
- gml-v_2_1_2-schema-1.0.2.jar,
- gml-v_3_1_1-schema-1.0.2.jar,
- jaxb2-basics-runtime-0.6.0.jar,
- kml-v_2_2_0-schema-1.0.3.jar,
- ows-v_1_0_0-schema-1.0.2.jar,
- ows-v_1_1_0-schema-1.0.2.jar,
- se-v_1_1_0-schema-1.0.2.jar,
- sld-v_1_0_0-schema-1.0.2.jar,
- sld-v_1_1_0-schema-1.0.2.jar,
- wcs-v_1_1_2-schema-1.0.2.jar,
- wfs-v_1_1_0-schema-1.0.2.jar,
- wms-v_1_3_0-schema-1.0.2.jar,
- wmts-v_1_0_0-schema-1.0.3.1.jar
-Export-Package: net.opengis.filter.v_1_0_0,
- net.opengis.filter.v_1_1_0,
- net.opengis.gml.v_2_1_2,
- net.opengis.gml.v_3_1_1,
- net.opengis.kml.v_2_2_0,
- net.opengis.ows.v_1_0_0,
- net.opengis.ows.v_1_1_0,
- net.opengis.se.v_1_1_0,
- net.opengis.sld.v_1_0_0,
- net.opengis.sld.v_1_1_0,
- net.opengis.wcs.v_1_1_2,
- net.opengis.wfs.v_1_1_0,
- net.opengis.wms.v_1_3_0,
- net.opengis.wmts.v_1_0_0,
- oasis.names.tc.ciq.xsdschema.xal._2,
- org.jvnet.jaxb2_commons.i18n,
- org.jvnet.jaxb2_commons.lang,
- org.jvnet.jaxb2_commons.locator,
- org.jvnet.jaxb2_commons.locator.util,
- org.jvnet.jaxb2_commons.xml.bind,
- org.jvnet.jaxb2_commons.xml.bind.annotation.adapters,
- org.w3.smil.v_2_0,
- org.w3.smil.v_2_0.language
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cots/net.opengis/build.properties b/cots/net.opengis/build.properties
deleted file mode 100644
index 325c31687d..0000000000
--- a/cots/net.opengis/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- filter-v_1_0_0-schema-1.0.2.jar,\
- filter-v_1_1_0-schema-1.0.2.jar,\
- gml-v_2_1_2-schema-1.0.2.jar,\
- gml-v_3_1_1-schema-1.0.2.jar,\
- jaxb2-basics-runtime-0.6.0.jar,\
- kml-v_2_2_0-schema-1.0.3.jar,\
- ows-v_1_0_0-schema-1.0.2.jar,\
- ows-v_1_1_0-schema-1.0.2.jar,\
- se-v_1_1_0-schema-1.0.2.jar,\
- sld-v_1_0_0-schema-1.0.2.jar,\
- sld-v_1_1_0-schema-1.0.2.jar,\
- wcs-v_1_1_2-schema-1.0.2.jar,\
- wfs-v_1_1_0-schema-1.0.2.jar,\
- wms-v_1_3_0-schema-1.0.2.jar,\
- wmts-v_1_0_0-schema-1.0.3.1.jar
diff --git a/cots/net.opengis/filter-v_1_0_0-schema-1.0.2.jar b/cots/net.opengis/filter-v_1_0_0-schema-1.0.2.jar
deleted file mode 100644
index ea2d0755bd..0000000000
Binary files a/cots/net.opengis/filter-v_1_0_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/filter-v_1_1_0-schema-1.0.2.jar b/cots/net.opengis/filter-v_1_1_0-schema-1.0.2.jar
deleted file mode 100644
index 3ad3689169..0000000000
Binary files a/cots/net.opengis/filter-v_1_1_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/gml-v_2_1_2-schema-1.0.2.jar b/cots/net.opengis/gml-v_2_1_2-schema-1.0.2.jar
deleted file mode 100644
index f4d81ed7ba..0000000000
Binary files a/cots/net.opengis/gml-v_2_1_2-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/gml-v_3_1_1-schema-1.0.2.jar b/cots/net.opengis/gml-v_3_1_1-schema-1.0.2.jar
deleted file mode 100644
index ba19a4ab83..0000000000
Binary files a/cots/net.opengis/gml-v_3_1_1-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/jaxb2-basics-runtime-0.6.0.jar b/cots/net.opengis/jaxb2-basics-runtime-0.6.0.jar
deleted file mode 100644
index 129c920a23..0000000000
Binary files a/cots/net.opengis/jaxb2-basics-runtime-0.6.0.jar and /dev/null differ
diff --git a/cots/net.opengis/kml-v_2_2_0-schema-1.0.3.jar b/cots/net.opengis/kml-v_2_2_0-schema-1.0.3.jar
deleted file mode 100644
index 4d4452fd37..0000000000
Binary files a/cots/net.opengis/kml-v_2_2_0-schema-1.0.3.jar and /dev/null differ
diff --git a/cots/net.opengis/net.opengis.ecl b/cots/net.opengis/net.opengis.ecl
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/cots/net.opengis/ows-v_1_0_0-schema-1.0.2.jar b/cots/net.opengis/ows-v_1_0_0-schema-1.0.2.jar
deleted file mode 100644
index 209386d829..0000000000
Binary files a/cots/net.opengis/ows-v_1_0_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/ows-v_1_1_0-schema-1.0.2.jar b/cots/net.opengis/ows-v_1_1_0-schema-1.0.2.jar
deleted file mode 100644
index fe34dce62a..0000000000
Binary files a/cots/net.opengis/ows-v_1_1_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/se-v_1_1_0-schema-1.0.2.jar b/cots/net.opengis/se-v_1_1_0-schema-1.0.2.jar
deleted file mode 100644
index 04f9a99d49..0000000000
Binary files a/cots/net.opengis/se-v_1_1_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/sld-v_1_0_0-schema-1.0.2.jar b/cots/net.opengis/sld-v_1_0_0-schema-1.0.2.jar
deleted file mode 100644
index 96bfcc22e4..0000000000
Binary files a/cots/net.opengis/sld-v_1_0_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/sld-v_1_1_0-schema-1.0.2.jar b/cots/net.opengis/sld-v_1_1_0-schema-1.0.2.jar
deleted file mode 100644
index 002563eca8..0000000000
Binary files a/cots/net.opengis/sld-v_1_1_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/wcs-v_1_1_2-schema-1.0.2.jar b/cots/net.opengis/wcs-v_1_1_2-schema-1.0.2.jar
deleted file mode 100644
index 206af3c409..0000000000
Binary files a/cots/net.opengis/wcs-v_1_1_2-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/wfs-v_1_1_0-schema-1.0.2.jar b/cots/net.opengis/wfs-v_1_1_0-schema-1.0.2.jar
deleted file mode 100644
index 2055675857..0000000000
Binary files a/cots/net.opengis/wfs-v_1_1_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/wms-v_1_3_0-schema-1.0.2.jar b/cots/net.opengis/wms-v_1_3_0-schema-1.0.2.jar
deleted file mode 100644
index 4fc69149dd..0000000000
Binary files a/cots/net.opengis/wms-v_1_3_0-schema-1.0.2.jar and /dev/null differ
diff --git a/cots/net.opengis/wmts-v_1_0_0-schema-1.0.3.1.jar b/cots/net.opengis/wmts-v_1_0_0-schema-1.0.3.1.jar
deleted file mode 100644
index f4c049b9de..0000000000
Binary files a/cots/net.opengis/wmts-v_1_0_0-schema-1.0.3.1.jar and /dev/null differ
diff --git a/cots/ogc.tools.gml/.classpath b/cots/ogc.tools.gml/.classpath
deleted file mode 100644
index 452eab1820..0000000000
--- a/cots/ogc.tools.gml/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/cots/ogc.tools.gml/.project b/cots/ogc.tools.gml/.project
deleted file mode 100644
index eadb43c2ff..0000000000
--- a/cots/ogc.tools.gml/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- ogc.tools.gml
-
-
-
-
-
- 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/cots/ogc.tools.gml/.settings/org.eclipse.jdt.core.prefs b/cots/ogc.tools.gml/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 39808a517b..0000000000
--- a/cots/ogc.tools.gml/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Fri Jun 08 11:56:09 CDT 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/cots/ogc.tools.gml/META-INF/MANIFEST.MF b/cots/ogc.tools.gml/META-INF/MANIFEST.MF
deleted file mode 100644
index 8d7e4700a8..0000000000
--- a/cots/ogc.tools.gml/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: ogc.tools.gml
-Bundle-SymbolicName: ogc.tools.gml
-Bundle-Version: 1.0.2
-Bundle-ClassPath: ogc-tools-gml-jts-1.0.2.jar
-Export-Package: org.jvnet.ogc.gml.v_3_1_1,
- org.jvnet.ogc.gml.v_3_1_1.jts
-Require-Bundle: org.geotools;bundle-version="2.6.4",
- net.opengis;bundle-version="1.0.2"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cots/ogc.tools.gml/build.properties b/cots/ogc.tools.gml/build.properties
deleted file mode 100644
index 8c28283f04..0000000000
--- a/cots/ogc.tools.gml/build.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- ogc-tools-gml-jts-1.0.2.jar
diff --git a/cots/ogc.tools.gml/ogc-tools-gml-jts-1.0.2.jar b/cots/ogc.tools.gml/ogc-tools-gml-jts-1.0.2.jar
deleted file mode 100644
index f3d63f7112..0000000000
Binary files a/cots/ogc.tools.gml/ogc-tools-gml-jts-1.0.2.jar and /dev/null differ
diff --git a/cots/ogc.tools.gml/ogc.tools.gml.ecl b/cots/ogc.tools.gml/ogc.tools.gml.ecl
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/.classpath b/edexOsgi/com.raytheon.uf.common.spatial/.classpath
deleted file mode 100644
index 1fa3e6803d..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/.project b/edexOsgi/com.raytheon.uf.common.spatial/.project
deleted file mode 100644
index f8fdc72bc1..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- com.raytheon.uf.common.spatial
-
-
-
-
-
- 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.common.spatial/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.common.spatial/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 295d77f55d..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Dec 02 10:55:26 CST 2010
-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.common.spatial/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.spatial/META-INF/MANIFEST.MF
deleted file mode 100644
index 5da49e577a..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: com.raytheon.uf.common.spatial
-Bundle-SymbolicName: com.raytheon.uf.common.spatial
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: RAYTHEON
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: com.raytheon.uf.common.spatial.reprojection
-Require-Bundle: org.apache.commons.lang;bundle-version="2.3.0",
- org.apache.commons.logging;bundle-version="1.1.1",
- org.geotools;bundle-version="2.6.4",
- com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
- com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
- com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
- com.raytheon.uf.common.serialization;bundle-version="1.12.1174"
-
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/build.properties b/edexOsgi/com.raytheon.uf.common.spatial/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/com.raytheon.uf.common.spatial.ecl b/edexOsgi/com.raytheon.uf.common.spatial/com.raytheon.uf.common.spatial.ecl
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/AbstractDataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/AbstractDataReprojector.java
deleted file mode 100644
index 6d371973d6..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/AbstractDataReprojector.java
+++ /dev/null
@@ -1,150 +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
- * ------------ ---------- ----------- --------------------------
- * Jun 15, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.image.DataBuffer;
-import java.awt.image.WritableRaster;
-
-import javax.media.jai.RasterFactory;
-
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.coverage.grid.GridCoverageFactory;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public abstract class AbstractDataReprojector {
-
- public static class RequestWrapper {
- public Request req;
- public ReferencedEnvelope env;
- }
-
- /**
- * Copy data record into geotools grid coverage object
- *
- * @param dataRecord
- * datset
- * @param env
- * geographics bounds for dataset
- * @return
- * @throws Exception
- */
- protected abstract GridCoverage2D getGridCoverage(IDataRecord dataRecord,
- ReferencedEnvelope env) throws Exception;
-
- /**
- * Copy data record into geotools grid coverage object
- *
- * @param dataRecord
- * datset
- * @param env
- * geographics bounds for dataset
- * @return
- * @throws Exception
- */
- protected abstract GridCoverage2D getMaskCoverage(IDataRecord dataRecord,
- ReferencedEnvelope env) throws Exception;
-
- /**
- * Extract data from geotools coverage object into data record object
- *
- * @param coverage
- * @return
- */
- protected abstract T extractData(GridCoverage2D coverage);
-
- /**
- * Extract data from geotools coverage object into data record object with a
- * mask for covering the non-data area.
- *
- * @param coverage
- * @param maskCoverage
- * @return
- */
- protected abstract T extractData(GridCoverage2D coverage,
- GridCoverage2D maskCoverage);
-
- /**
- * Apply slab request to data record, returning result in a new data record
- * object.
- *
- * @param dataRecord
- * @param req
- * @return
- */
- protected abstract T getDataSlice(IDataRecord dataRecord, Request req);
-
- /**
- * @param dataRecord
- * @return true if this object can operate on native type of data record
- */
- protected abstract boolean compatible(IDataRecord dataRecord);
-
- /**
- * Apply point request to data record, returning result in a new data record
- * object.
- *
- * @param record
- * @param req
- * @return
- */
- protected abstract IDataRecord getDataPoints(IDataRecord record, Request req);
-
- /**
- * Construct a new geotools grid coverage object using data buffer
- *
- * @param name
- * name of coverage
- * @param data
- * raw data
- * @param width
- * @param height
- * @param env
- * geographic bounds of coverage
- * @return
- * @throws Exception
- */
- public static GridCoverage2D constructGridCoverage(String name,
- DataBuffer data, int width, int height, ReferencedEnvelope env)
- throws Exception {
- WritableRaster raster = RasterFactory.createBandedRaster(data, width,
- height, width, new int[] { 0 }, new int[] { 0 }, null);
- return new GridCoverageFactory().create(name, raster, env);
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ByteDataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ByteDataReprojector.java
deleted file mode 100644
index bb0f55e88c..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ByteDataReprojector.java
+++ /dev/null
@@ -1,238 +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
- * ------------ ---------- ----------- --------------------------
- * May 18, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.Point;
-import java.awt.image.DataBufferByte;
-import java.awt.image.Raster;
-import java.awt.image.RenderedImage;
-import java.util.Arrays;
-
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public class ByteDataReprojector extends
- AbstractDataReprojector {
-
- protected byte fill = 0;
-
- protected byte dataMaskValue = -1;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getGridCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getGridCoverage(IDataRecord record,
- ReferencedEnvelope env)
- throws Exception {
- ByteDataRecord dataRecord = (ByteDataRecord) record;
- byte[] data = dataRecord.getByteData();
- DataBufferByte buff = new DataBufferByte(data, data.length);
- int x = (int) dataRecord.getSizes()[0];
- int y = (int) dataRecord.getSizes()[1];
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getMaskCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getMaskCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- int x = (int) record.getSizes()[0];
- int y = (int) record.getSizes()[1];
- byte[] mask = new byte[x * y];
- Arrays.fill(mask, dataMaskValue);
- DataBufferByte buff = new DataBufferByte(mask, mask.length);
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected ByteDataRecord extractData(GridCoverage2D coverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferByte dataBuffer = (DataBufferByte) raster.getDataBuffer();
- byte[] data = dataBuffer.getData();
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new ByteDataRecord("", "", data, 2, new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D,
- * org.geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected ByteDataRecord extractData(GridCoverage2D coverage,
- GridCoverage2D maskCoverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferByte dataBuffer = (DataBufferByte) raster.getDataBuffer();
- byte[] data = dataBuffer.getData();
-
- // Extract mask
- image = maskCoverage.getRenderedImage();
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- dataBuffer = (DataBufferByte) raster.getDataBuffer();
- byte[] mask = dataBuffer.getData();
-
- if (mask.length == data.length) {
- for (int i = 0; i < data.length; ++i) {
- if (mask[i] != dataMaskValue) {
- data[i] = fill;
- }
- }
- }
-
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new ByteDataRecord("", "", data, 2, new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getDataSlice(com
- * .raytheon.uf.common.datastorage.records.IDataRecord,
- * com.raytheon.uf.common.datastorage.Request)
- */
- @Override
- protected ByteDataRecord getDataSlice(IDataRecord record, Request req) {
- ByteDataRecord dataRecord = (ByteDataRecord) record;
- int[] max = req.getMaxIndexForSlab();
- int[] min = req.getMinIndexForSlab();
- int toWidth = max[0] - min[0];
- int toHeight = max[1] - min[1];
- byte[] from = dataRecord.getByteData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- byte[] to = new byte[toWidth * toHeight];
- for (int fromY = min[1], toY = 0; fromY < max[1]; ++fromY, ++toY) {
- int toRow = toY * toWidth;
- int fromRow = fromY * fromWidth;
- for (int fromX = min[0], toX = 0; fromX < max[0]; ++fromX, ++toX) {
- to[toRow + toX] = from[fromRow + fromX];
- }
- }
- long[] sizes = { toWidth, toHeight };
- return new ByteDataRecord("", "", to, 2, sizes);
- }
-
- public byte getFill() {
- return fill;
- }
-
- public void setFill(byte fill) {
- this.fill = fill;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.AbstractDataReprojector#compatible
- * (com.raytheon.uf.common.datastorage.records.IDataRecord)
- */
- @Override
- protected boolean compatible(IDataRecord dataRecord) {
- return dataRecord instanceof ByteDataRecord;
- }
-
- @Override
- protected IDataRecord getDataPoints(IDataRecord record, Request req) {
- ByteDataRecord dataRecord = (ByteDataRecord) record;
- byte[] from = dataRecord.getByteData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- Point[] points = req.getPoints();
- byte[] to = new byte[points.length];
- for (int i = 0; i < to.length; ++i) {
- Point p = points[i];
- to[i] = from[p.y * fromWidth + p.x];
- }
- return new ByteDataRecord("", "", to, 1, new long[] { to.length });
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/DataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/DataReprojector.java
deleted file mode 100644
index ae208ad2a2..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/DataReprojector.java
+++ /dev/null
@@ -1,624 +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
- * ------------ ---------- ----------- --------------------------
- * May 18, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.Point;
-import java.io.FileNotFoundException;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.media.jai.Interpolation;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.geotools.coverage.grid.GeneralGridEnvelope;
-import org.geotools.coverage.grid.GridCoordinates2D;
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.coverage.grid.GridGeometry2D;
-import org.geotools.coverage.grid.ViewType;
-import org.geotools.coverage.processing.Operations;
-import org.geotools.geometry.DirectPosition2D;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.geometry.DirectPosition;
-import org.opengis.geometry.MismatchedDimensionException;
-import org.opengis.metadata.spatial.PixelOrientation;
-import org.opengis.referencing.FactoryException;
-import org.opengis.referencing.ReferenceIdentifier;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.operation.MathTransform2D;
-import org.opengis.referencing.operation.TransformException;
-
-import com.raytheon.uf.common.dataplugin.PluginException;
-import com.raytheon.uf.common.datastorage.IDataStore;
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.StorageException;
-import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
-import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
-import com.raytheon.uf.common.datastorage.records.ShortDataRecord;
-import com.raytheon.uf.common.geospatial.ISpatialObject;
-import com.raytheon.uf.common.geospatial.MapUtil;
-import com.raytheon.uf.common.spatial.reprojection.AbstractDataReprojector.RequestWrapper;
-import com.raytheon.uf.common.spatial.reprojection.KeyLocker.KeyLock;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Envelope;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public class DataReprojector {
-
- protected IDataStore dataStore;
-
- protected String dataSetBase = "Data-";
-
- protected String dataSet = "Data";
-
- private AbstractDataReprojector extends IDataRecord> _typeProjector;
-
- protected static Log log = LogFactory.getLog(DataReprojector.class);
-
- protected static KeyLocker locker = new KeyLocker();
-
- public DataReprojector(IDataStore dataStore) {
- this.dataStore = dataStore;
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param spatial
- * spatial object tied to requested dataset
- * @param nativeEnv
- * native bounds of dataset
- * @param crs
- * desired crs of returned data
- * @param coords
- * coordinates of requested data in requested crs
- * @return null if any of the coordinates are out of the bounds of the grid
- * geometry
- * @throws Exception
- */
- public IDataRecord getProjectedPoints(String group, ISpatialObject spatial,
- ReferencedEnvelope nativeEnv, CoordinateReferenceSystem crs,
- Coordinate[] coords) throws Exception {
- // get envelope in requested projection
- ReferencedEnvelope targetEnv = nativeEnv.transform(crs, true);
- // get target grid geometry
- GridGeometry2D geom = getGridGeometry(targetEnv, spatial.getNx(),
- spatial.getNy());
- Point[] points = new Point[coords.length];
- for (int i = 0; i < points.length; ++i) {
- Coordinate coord = coords[i];
- GridCoordinates2D point = getGridPoint(geom, coord);
- int nx = spatial.getNx();
- int ny = spatial.getNy();
- // coordinate was out of bounds, bail
- if (point.x < 0 || point.x > nx || point.y < 0 || point.y > ny) {
- return null;
- }
- // need to repackage point due to pypies not knowing about
- // gridcoordinates2d
- points[i] = new Point(point);
- }
- String reprojectedDataset = buildDatasetName(crs);
- Request req = Request.buildPointRequest(points);
- return getDataRecordWithReproject(group, reprojectedDataset, spatial,
- crs, req);
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param reprojectedDataset
- * dataset name for reprojected data
- * @param spatial
- * spatial object tied to requested dataset
- * @param crs
- * desired crs of returned data
- * @param req
- * datastore request object
- * @return
- * @throws Exception
- */
- protected IDataRecord getDataRecordWithReproject(String group,
- String reprojectedDataset, ISpatialObject spatial,
- CoordinateReferenceSystem crs, Request req) throws Exception {
- IDataRecord dataRecord;
- // check if data has already been reprojected
- if (!datasetExists(group, reprojectedDataset)) {
- // it hasn't lock and reproject
- dataRecord = reprojectLocked(group, reprojectedDataset, spatial,
- crs, req);
- } else {
- // it has, just request the data
- dataRecord = getDataRecord(group, reprojectedDataset, req);
- }
- return dataRecord;
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param reprojectedDataset
- * dataset name for reprojected data
- * @param spatial
- * spatial object tied to requested dataset
- * @param crs
- * desired crs of returned data
- * @param req
- * datastore request object
- * @return
- * @throws Exception
- */
- protected IDataRecord reprojectLocked(String group,
- String reprojectedDataset, ISpatialObject spatial,
- CoordinateReferenceSystem crs, Request req) throws Exception {
- KeyLock lock = null;
- IDataRecord dataRecord;
- try {
- // get reproject lock
- lock = locker.getLock(group + reprojectedDataset);
- lock.lock();
- // recheck that dataset still doesn't exist
- if (!datasetExists(group, reprojectedDataset)) {
- // still not there, reproject
- dataRecord = reprojectAndStore(spatial, group, crs, req);
- } else {
- // another thread created it, just grab it
- dataRecord = getDataRecord(group, reprojectedDataset, req);
- }
- lock.unlock();
- return dataRecord;
- } finally {
- if (lock != null) {
- lock.release();
- }
- }
- }
-
- /**
- * @param group
- * @param dataset
- * @return true if dataset exists in datastore
- * @throws FileNotFoundException
- * @throws StorageException
- */
- protected boolean datasetExists(String group, String dataset)
- throws FileNotFoundException, StorageException {
- String[] datasets = dataStore.getDatasets(group);
- return ArrayUtils.contains(datasets, dataset);
- }
-
- /**
- * @param geom
- * Grid geometry
- * @param coord
- * desired geographic coordinate
- * @return grid point for coordinate
- * @throws PluginException
- */
- public static GridCoordinates2D getGridPoint(GridGeometry2D geom,
- Coordinate coord) throws PluginException {
- DirectPosition src = new DirectPosition2D(coord.x, coord.y);
- DirectPosition inGrid = new DirectPosition2D();
- try {
- MathTransform2D crsToGrid2D = geom
- .getCRSToGrid2D(PixelOrientation.UPPER_LEFT);
- crsToGrid2D.transform(src, inGrid);
- } catch (Exception e) {
- throw new PluginException("Unable to get grid point for geometry",
- e);
- }
- // floor of grid points should be upper left of pixel
- int x = (int) Math.floor(inGrid.getOrdinate(0));
- int y = (int) Math.floor(inGrid.getOrdinate(1));
- GridCoordinates2D rval = new GridCoordinates2D(x, y);
- return rval;
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param spatial
- * spatial object tied to requested dataset
- * @param nativeEnv
- * native bounds of dataset
- * @param targetEnv
- * bounds of requested data
- * @return null if target envelope is out of bounds for dataset
- * @throws Exception
- */
- public GridCoverage2D getReprojectedCoverage(String group,
- ISpatialObject spatial, ReferencedEnvelope nativeEnv,
- ReferencedEnvelope targetEnv)
- throws Exception {
- ReferencedDataRecord rep = getReprojected(group, spatial, nativeEnv,
- targetEnv);
- if (rep == null) {
- return null;
- }
- ReferencedEnvelope re = rep.getEnvelope();
- IDataRecord record = rep.getRecord();
- return getTypeProjector(record).getGridCoverage(rep.getRecord(), re);
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param spatial
- * spatial object tied to requested dataset
- * @param nativeEnvelope
- * native bounds of dataset
- * @param targetEnvelope
- * bounds of requested data
- * @return null if target envelope is out of bounds for dataset
- * @throws Exception
- */
- public ReferencedDataRecord getReprojected(String group,
- ISpatialObject spatial, ReferencedEnvelope nativeEnvelope,
- ReferencedEnvelope targetEnvelope)
- throws Exception {
- RequestWrapper req = getRequest(spatial, nativeEnvelope, targetEnvelope);
- if (req == null) {
- return null;
- }
- CoordinateReferenceSystem targetCrs = targetEnvelope
- .getCoordinateReferenceSystem();
- String reprojectedDataset = buildDatasetName(targetCrs);
- IDataRecord dataRecord = getDataRecordWithReproject(group,
- reprojectedDataset, spatial, targetCrs, req.req);
- return new ReferencedDataRecord(dataRecord, req.env);
- }
-
- /**
- * @param group
- * name of the datastore group that contains requested dataset
- * @param targetDataset
- * dataset name for requested data
- * @param req
- * datastore request object
- * @return
- * @throws Exception
- */
- protected IDataRecord getDataRecord(String group, String targetDataset,
- Request req) throws Exception {
- IDataRecord rval = dataStore.retrieve(group, targetDataset, req);
- return rval;
- }
-
- /**
- * Get a projector that is compatible with record
- *
- * @param record
- * @return
- * @throws Exception
- */
- protected AbstractDataReprojector extends IDataRecord> getTypeProjector(
- IDataRecord record) throws Exception {
- if (_typeProjector == null || !_typeProjector.compatible(record)) {
- if (record instanceof ByteDataRecord) {
- _typeProjector = new ByteDataReprojector();
- } else if (record instanceof FloatDataRecord) {
- _typeProjector = new FloatDataReprojector();
- } else if (record instanceof ShortDataRecord) {
- _typeProjector = new ShortDataReprojector();
- } else if (record instanceof IntegerDataRecord) {
- _typeProjector = new IntDataReprojector();
- } else {
- throw new Exception("Unsupported data store type");
- }
- }
- return _typeProjector;
- }
-
- /**
- * Gets the entire coverage from the store and reprojects it. Reprojected
- * coverage is then stored under a name derived from the projected crs.
- *
- * @param spatial
- * spatial object tied to requested dataset
- * @param group
- * name of the datastore group that contains requested dataset
- * @param targetCRS
- * desired crs of returned data
- * @param req
- * datastore request object
- * @return datarecord as per the request object
- * @throws Exception
- */
- protected IDataRecord reprojectAndStore(ISpatialObject spatial,
- String group, CoordinateReferenceSystem targetCRS, Request req)
- throws Exception {
- GridGeometry2D geom = MapUtil.getGridGeometry(spatial);
- IDataRecord original = getDataRecord(group, dataSet, Request.ALL);
- ReferencedEnvelope env = new ReferencedEnvelope(geom.getEnvelope());
- AbstractDataReprojector extends IDataRecord> typeProjector = getTypeProjector(original);
- GridCoverage2D cov = typeProjector.getGridCoverage(original, env);
- GridCoverage2D reprojected = MapUtil.reprojectCoverage(cov, targetCRS);
- IDataRecord rval;
-
- if (typeProjector instanceof FloatDataReprojector) {
- // TODO So far, the problem that this fixes has only appeared with
- // float data. If it happens with other data we can change this.
- GridCoverage2D maskCov = typeProjector.getMaskCoverage(original,
- env);
- GridCoverage2D reprojectedMask = (GridCoverage2D) Operations.DEFAULT
- .resample(maskCov.view(ViewType.GEOPHYSICS), targetCRS,
- null, Interpolation
- .getInstance(Interpolation.INTERP_NEAREST));
- rval = typeProjector.extractData(reprojected, reprojectedMask);
- } else {
- rval = typeProjector.extractData(reprojected);
- }
-
- rval.setGroup(group);
- rval.setName(buildDatasetName(targetCRS));
- dataStore.addDataRecord(rval);
- dataStore.store();
- return getDataPerReq(rval, req);
- }
-
- /**
- * @param record
- * data record containing full coverage
- * @param req
- * datastore request object
- * @return result of applying request object to data record
- * @throws Exception
- */
- protected IDataRecord getDataPerReq(IDataRecord record, Request req)
- throws Exception {
- AbstractDataReprojector extends IDataRecord> typeProjector = getTypeProjector(record);
- IDataRecord rval;
- switch (req.getType()) {
- case ALL:
- rval = record;
- break;
- case POINT:
- rval = typeProjector.getDataPoints(record, req);
- break;
- case SLAB:
- rval = typeProjector.getDataSlice(record, req);
- break;
- case XLINE:
- case YLINE:
- default:
- throw new Exception("Data reprojector " + req.getType()
- + " not implemented");
- }
- return rval;
- }
-
- /**
- * @param env
- * geographic bounds of data
- * @param nx
- * length of x axis
- * @param ny
- * length of y axis
- * @return
- */
- public static GridGeometry2D getGridGeometry(ReferencedEnvelope env,
- int nx, int ny) {
- // TODO cache
- GridGeometry2D mapGeom = null;
- mapGeom = new GridGeometry2D(new GeneralGridEnvelope(
- new int[] { 0, 0 }, new int[] { nx, ny }, false), env);
- return mapGeom;
- }
-
- /**
- * Build up slice request for reprojected dataset
- *
- * @param record
- * @param crs
- * @param targetEnvelope
- * bbox in crs
- * @return null if envelope is outside of data bounds
- * @throws TransformException
- * @throws MismatchedDimensionException
- * @throws FactoryException
- */
- protected RequestWrapper getRequest(ISpatialObject spatial,
- ReferencedEnvelope nativeEnv, ReferencedEnvelope targetEnvelope)
- throws MismatchedDimensionException,
- TransformException, FactoryException {
- RequestWrapper rval = null;
- CoordinateReferenceSystem targetCrs = targetEnvelope
- .getCoordinateReferenceSystem();
- // get full bounds of reprojected dataset
- ReferencedEnvelope dataEnv = nativeEnv.transform(targetCrs, true);
- if (!dataEnv.intersects((Envelope) targetEnvelope)) {
- // request and data envelopes are disjoint, return null
- return null;
- }
- // get grid geometry for reprojected dataset
- GridGeometry2D geom = getGridGeometry(dataEnv, spatial.getNx(),
- spatial.getNy());
- int[] dims = { spatial.getNx(), spatial.getNy() };
- if (dataEnv.contains((Envelope) targetEnvelope)) {
- // requested slice is entirely inside data bounds
- // build slice based on requested bounds
- rval = getSubSlice(geom, targetEnvelope, dims);
- } else {
- // build slice based on intersection
- Envelope intersection = targetEnvelope.intersection(dataEnv);
- rval = getSubSlice(geom, intersection, dims);
- }
- return rval;
- }
-
- /**
- * @param geom
- * grid geometry for projected dataset
- * @param env
- * geographic bounds for slice
- * @param dims
- * dimensions of dataset
- * @return grid slice that corresponds to env
- * @throws MismatchedDimensionException
- * @throws TransformException
- */
- protected RequestWrapper getSubSlice(GridGeometry2D geom, Envelope env,
- int[] dims) throws MismatchedDimensionException, TransformException {
- RequestWrapper rval = new RequestWrapper();
- MathTransform2D crsToGrid2D = geom
- .getCRSToGrid2D(PixelOrientation.UPPER_LEFT);
- // find a slice that has data for entire envelope (can have extra)
- int[][] minmax = transformEnv(crsToGrid2D, env, dims);
- MathTransform2D gridToCrs = crsToGrid2D.inverse();
- // find an envelope that matches the slice (could be a bit larger than
- // previous envelope)
- rval.env = transformGrid(gridToCrs, minmax,
- geom.getCoordinateReferenceSystem());
- rval.req = Request.buildSlab(minmax[0], minmax[1]);
- return rval;
- }
-
- /**
- * @param gridToCrs
- * @param minmax
- * 2d array holding slice
- * @param crs
- * @return
- * @throws MismatchedDimensionException
- * @throws TransformException
- */
- protected ReferencedEnvelope transformGrid(MathTransform2D gridToCrs,
- int[][] minmax, CoordinateReferenceSystem crs)
- throws MismatchedDimensionException, TransformException {
- int[] min = minmax[0];
- int[] max = minmax[1];
- DirectPosition lower = new DirectPosition2D(min[0], min[1]);
- DirectPosition upper = new DirectPosition2D(max[0], max[1]);
- DirectPosition lowerCrs = gridToCrs.transform(lower, null);
- DirectPosition upperCrs = gridToCrs.transform(upper, null);
- double x0 = lowerCrs.getOrdinate(0);
- double x1 = upperCrs.getOrdinate(0);
- // handle y axis flip
- double y0 = upperCrs.getOrdinate(1);
- double y1 = lowerCrs.getOrdinate(1);
- return new ReferencedEnvelope(x0, x1, y0, y1, crs);
- }
-
- /**
- * transforms crs coordinates to grid indexes using given math transform
- *
- * @param crsToGrid
- * @param env
- * @param dims
- * max bounds to be limited to
- * @return an array with [[minx, miny], [maxx, maxy]]
- * @throws MismatchedDimensionException
- * @throws TransformException
- */
- protected int[][] transformEnv(MathTransform2D crsToGrid, Envelope env,
- int[] dims) throws MismatchedDimensionException, TransformException {
- DirectPosition lower = new DirectPosition2D(env.getMinX(),
- env.getMinY());
- DirectPosition upper = new DirectPosition2D(env.getMaxX(),
- env.getMaxY());
- DirectPosition lowerGrid = crsToGrid.transform(lower, null);
- DirectPosition upperGrid = crsToGrid.transform(upper, null);
- int x0 = (int) Math.floor(lowerGrid.getOrdinate(0));
- // we want ceiling since slices are inclusive
- int x1 = (int) Math.ceil(upperGrid.getOrdinate(0));
- // handle y axis flip
- int y0 = (int) Math.floor(upperGrid.getOrdinate(1));
- // we want ceiling since slices are inclusive
- int y1 = (int) Math.ceil(lowerGrid.getOrdinate(1));
- // truncate requests to dataset dimensions
- if (x0 < 0) {
- x0 = 0;
- }
- if (y0 < 0) {
- y0 = 0;
- }
- if (x1 > dims[0]) {
- x1 = dims[0];
- }
- if (y1 > dims[1]) {
- y1 = dims[1];
- }
- return new int[][] { { x0, y0 }, { x1, y1 } };
- }
-
- /**
- * construct the dataset name based on the name of the crs.
- *
- * @param crs
- * @return
- */
- protected String buildDatasetName(CoordinateReferenceSystem crs) {
- Set ids = crs.getIdentifiers();
- String code;
- if (ids == null || ids.isEmpty()) {
- code = crs.getName().toString();
- } else {
- Iterator i = ids.iterator();
- code = i.next().toString();
- while (i.hasNext()) {
- code += "-" + i.next().toString();
- }
- }
- return dataSetBase + code;
- }
-
- public IDataStore getDataStore() {
- return dataStore;
- }
-
- public void setDataStore(IDataStore dataStore) {
- this.dataStore = dataStore;
- }
-
- public String getDataSetBase() {
- return dataSetBase;
- }
-
- public void setDataSetBase(String dataSetBase) {
- this.dataSetBase = dataSetBase;
- }
-
- public String getDataSet() {
- return dataSet;
- }
-
- public void setDataSet(String dataSet) {
- this.dataSet = dataSet;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/FloatDataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/FloatDataReprojector.java
deleted file mode 100644
index 4d1da89252..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/FloatDataReprojector.java
+++ /dev/null
@@ -1,246 +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
- * ------------ ---------- ----------- --------------------------
- * Jun 13, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.Point;
-import java.awt.image.DataBufferFloat;
-import java.awt.image.Raster;
-import java.awt.image.RenderedImage;
-import java.util.Arrays;
-
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public class FloatDataReprojector extends
- AbstractDataReprojector {
-
- protected float fill = -999999.0f;
-
- protected float dataMaskValue = -0;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getGridCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getGridCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- FloatDataRecord dataRecord = (FloatDataRecord) record;
- float[] data = dataRecord.getFloatData();
- DataBufferFloat buff = new DataBufferFloat(data, data.length);
- int x = (int) dataRecord.getSizes()[0];
- int y = (int) dataRecord.getSizes()[1];
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getMaskCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getMaskCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- int x = (int) record.getSizes()[0];
- int y = (int) record.getSizes()[1];
- float[] mask = new float[x * y];
- Arrays.fill(mask, dataMaskValue);
- DataBufferFloat buff = new DataBufferFloat(mask, mask.length);
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected FloatDataRecord extractData(GridCoverage2D coverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferFloat dataBuffer = (DataBufferFloat) raster.getDataBuffer();
- float[] data = dataBuffer.getData();
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new FloatDataRecord("", "", data, 2,
- new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D,
- * org.geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected FloatDataRecord extractData(GridCoverage2D coverage,
- GridCoverage2D maskCoverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferFloat dataBuffer = (DataBufferFloat) raster.getDataBuffer();
- float[] data = dataBuffer.getData();
-
- // Extract mask
- image = maskCoverage.getRenderedImage();
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- dataBuffer = (DataBufferFloat) raster.getDataBuffer();
- float[] mask = dataBuffer.getData();
-
- if (mask.length == data.length) {
- for (int i = 0; i < data.length; ++i) {
- if (mask[i] != dataMaskValue) {
- data[i] = fill;
- }
- }
- }
-
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new FloatDataRecord("", "", data, 2,
- new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getDataSlice(com
- * .raytheon.uf.common.datastorage.records.IDataRecord,
- * com.raytheon.uf.common.datastorage.Request)
- */
- @Override
- protected FloatDataRecord getDataSlice(IDataRecord record, Request req) {
- FloatDataRecord dataRecord = (FloatDataRecord) record;
- int[] max = req.getMaxIndexForSlab();
- int[] min = req.getMinIndexForSlab();
- int toWidth = max[0] - min[0];
- int toHeight = max[1] - min[1];
- float[] from = dataRecord.getFloatData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- float[] to = new float[toWidth * toHeight];
- for (int fromY = min[1], toY = 0; fromY < max[1]; ++fromY, ++toY) {
- int toRow = toY * toWidth;
- int fromRow = fromY * fromWidth;
- for (int fromX = min[0], toX = 0; fromX < max[0]; ++fromX, ++toX) {
- to[toRow + toX] = from[fromRow + fromX];
- }
- }
- long[] sizes = { toWidth, toHeight };
- return new FloatDataRecord("", "", to, 2, sizes);
- }
-
- /**
- * @return the fill
- */
- public float getFill() {
- return fill;
- }
-
- /**
- * @param fill
- * the fill to set
- */
- public void setFill(float fill) {
- this.fill = fill;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.AbstractDataReprojector#compatible
- * (com.raytheon.uf.common.datastorage.records.IDataRecord)
- */
- @Override
- protected boolean compatible(IDataRecord dataRecord) {
- return dataRecord instanceof FloatDataRecord;
- }
-
- @Override
- protected IDataRecord getDataPoints(IDataRecord record, Request req) {
- FloatDataRecord dataRecord = (FloatDataRecord) record;
- float[] from = dataRecord.getFloatData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- Point[] points = req.getPoints();
- float[] to = new float[points.length];
- for (int i = 0; i < to.length; ++i) {
- Point p = points[i];
- to[i] = from[p.y * fromWidth + p.x];
- }
- return new FloatDataRecord("", "", to, 1, new long[] { to.length });
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/IntDataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/IntDataReprojector.java
deleted file mode 100644
index 384c15466c..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/IntDataReprojector.java
+++ /dev/null
@@ -1,247 +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
- * ------------ ---------- ----------- --------------------------
- * Jun 13, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.Point;
-import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferInt;
-import java.awt.image.Raster;
-import java.awt.image.RenderedImage;
-import java.util.Arrays;
-
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public class IntDataReprojector extends
- AbstractDataReprojector {
-
- protected int fill = 0;
-
- protected int dataMaskValue = -1;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getGridCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getGridCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- IntegerDataRecord dataRecord = (IntegerDataRecord) record;
- int[] data = dataRecord.getIntData();
- DataBuffer buff = new DataBufferInt(data, data.length);
- int x = (int) dataRecord.getSizes()[0];
- int y = (int) dataRecord.getSizes()[1];
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getMaskCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getMaskCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- int x = (int) record.getSizes()[0];
- int y = (int) record.getSizes()[1];
- int[] mask = new int[x * y];
- Arrays.fill(mask, dataMaskValue);
- DataBufferInt buff = new DataBufferInt(mask, mask.length);
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected IntegerDataRecord extractData(GridCoverage2D coverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferInt dataBuffer = (DataBufferInt) raster.getDataBuffer();
- int[] data = dataBuffer.getData();
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new IntegerDataRecord("", "", data, 2, new long[] { width,
- height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D,
- * org.geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected IntegerDataRecord extractData(GridCoverage2D coverage,
- GridCoverage2D maskCoverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferInt dataBuffer = (DataBufferInt) raster.getDataBuffer();
- int[] data = dataBuffer.getData();
-
- // Extract mask
- image = maskCoverage.getRenderedImage();
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- dataBuffer = (DataBufferInt) raster.getDataBuffer();
- int[] mask = dataBuffer.getData();
-
- if (mask.length == data.length) {
- for (int i = 0; i < data.length; ++i) {
- if (mask[i] != dataMaskValue) {
- data[i] = fill;
- }
- }
- }
-
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new IntegerDataRecord("", "", data, 2, new long[] { width,
- height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getDataSlice(com
- * .raytheon.uf.common.datastorage.records.IDataRecord,
- * com.raytheon.uf.common.datastorage.Request)
- */
- @Override
- protected IntegerDataRecord getDataSlice(IDataRecord record, Request req) {
- IntegerDataRecord dataRecord = (IntegerDataRecord) record;
- int[] max = req.getMaxIndexForSlab();
- int[] min = req.getMinIndexForSlab();
- int toWidth = max[0] - min[0];
- int toHeight = max[1] - min[1];
- int[] from = dataRecord.getIntData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- int[] to = new int[toWidth * toHeight];
- for (int fromY = min[1], toY = 0; fromY < max[1]; ++fromY, ++toY) {
- int toRow = toY * toWidth;
- int fromRow = fromY * fromWidth;
- for (int fromX = min[0], toX = 0; fromX < max[0]; ++fromX, ++toX) {
- to[toRow + toX] = from[fromRow + fromX];
- }
- }
- long[] sizes = { toWidth, toHeight };
- return new IntegerDataRecord("", "", to, 2, sizes);
- }
-
- /**
- * @return the fill
- */
- public int getFill() {
- return fill;
- }
-
- /**
- * @param fill
- * the fill to set
- */
- public void setFill(int fill) {
- this.fill = fill;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.AbstractDataReprojector#compatible
- * (com.raytheon.uf.common.datastorage.records.IDataRecord)
- */
- @Override
- protected boolean compatible(IDataRecord dataRecord) {
- return dataRecord instanceof IntegerDataRecord;
- }
-
- @Override
- protected IDataRecord getDataPoints(IDataRecord record, Request req) {
- IntegerDataRecord dataRecord = (IntegerDataRecord) record;
- int[] from = dataRecord.getIntData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- Point[] points = req.getPoints();
- int[] to = new int[points.length];
- for (int i = 0; i < to.length; ++i) {
- Point p = points[i];
- to[i] = from[p.y * fromWidth + p.x];
- }
- return new IntegerDataRecord("", "", to, 1, new long[] { to.length });
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/KeyLocker.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/KeyLocker.java
deleted file mode 100644
index b47c48408f..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/KeyLocker.java
+++ /dev/null
@@ -1,104 +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
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * Class for managing a pool of concurrency locks organized by string keys.
- *
- * @author bclement
- * @version 1.0
- */
-public class KeyLocker {
-
- public class KeyLock {
- private final String key;
-
- private final Lock lock;
-
- private boolean released = false;
-
- public KeyLock(String key, Lock lock) {
- this.key = key;
- this.lock = lock;
- }
-
- @Override
- protected void finalize() throws Throwable {
- release();
- }
-
- public void release() {
- if (!this.released) {
- releaseLock(this.key);
- this.released = true;
- }
- }
-
- public void lock() {
- this.lock.lock();
- }
-
- public void unlock() {
- this.lock.unlock();
- }
-
- }
-
- private class Entry {
- int count = 0;
- final Lock lock = new ReentrantLock();
- }
-
- private final Map locks = new HashMap();
-
- public KeyLock getLock(String key) {
- synchronized (locks) {
- Entry e = locks.get(key);
- if (e == null) {
- e = new Entry();
- locks.put(key, e);
- }
- e.count++;
- return new KeyLock(key, e.lock);
- }
- }
-
- void releaseLock(String key) {
- synchronized (locks) {
- Entry e = locks.get(key);
- if (e != null) {
- e.count--;
- if (e.count <= 0) {
- locks.remove(key);
- }
- }
- }
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ReferencedDataRecord.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ReferencedDataRecord.java
deleted file mode 100644
index fd38a68b2d..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ReferencedDataRecord.java
+++ /dev/null
@@ -1,64 +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
- * ------------ ---------- ----------- --------------------------
- * May 18, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import org.geotools.geometry.jts.ReferencedEnvelope;
-
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-
-public class ReferencedDataRecord{
-
- protected IDataRecord record;
-
- protected ReferencedEnvelope envelope;
-
- public ReferencedDataRecord(IDataRecord record, ReferencedEnvelope envlope) {
- this.record = record;
- this.envelope = envlope;
- }
-
- public IDataRecord getRecord() {
- return record;
- }
-
- public void setRecord(IDataRecord record) {
- this.record = record;
- }
-
- public ReferencedEnvelope getEnvelope() {
- return envelope;
- }
-
- public void setEnvelope(ReferencedEnvelope envelope) {
- this.envelope = envelope;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ShortDataReprojector.java b/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ShortDataReprojector.java
deleted file mode 100644
index 4c40a28930..0000000000
--- a/edexOsgi/com.raytheon.uf.common.spatial/src/com/raytheon/uf/common/spatial/reprojection/ShortDataReprojector.java
+++ /dev/null
@@ -1,248 +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
- * ------------ ---------- ----------- --------------------------
- * Jun 13, 2011 bclement Initial creation
- *
- */
-package com.raytheon.uf.common.spatial.reprojection;
-
-import java.awt.Point;
-import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferShort;
-import java.awt.image.Raster;
-import java.awt.image.RenderedImage;
-import java.util.Arrays;
-
-import org.geotools.coverage.grid.GridCoverage2D;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.raytheon.uf.common.datastorage.Request;
-import com.raytheon.uf.common.datastorage.records.IDataRecord;
-import com.raytheon.uf.common.datastorage.records.ShortDataRecord;
-
-/**
- * TODO Add Description
- *
- * @author bclement
- * @version 1.0
- */
-public class ShortDataReprojector extends
- AbstractDataReprojector {
-
- protected short fill = 0;
-
- protected short dataMaskValue = -1;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getGridCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getGridCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- ShortDataRecord dataRecord = (ShortDataRecord) record;
- short[] data = dataRecord.getShortData();
- DataBuffer buff = new DataBufferShort(data, data.length);
- int x = (int) dataRecord.getSizes()[0];
- int y = (int) dataRecord.getSizes()[1];
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getMaskCoverage
- * (com.raytheon.uf.common.datastorage.records.IDataRecord,
- * org.opengis.referencing.crs.CoordinateReferenceSystem,
- * org.opengis.geometry.Envelope)
- */
- @Override
- protected GridCoverage2D getMaskCoverage(IDataRecord record,
- ReferencedEnvelope env) throws Exception {
- int x = (int) record.getSizes()[0];
- int y = (int) record.getSizes()[1];
- short[] mask = new short[x * y];
- Arrays.fill(mask, dataMaskValue);
- DataBufferShort buff = new DataBufferShort(mask, mask.length);
- CoordinateReferenceSystem crs = env.getCoordinateReferenceSystem();
- return constructGridCoverage(crs.getName() + " Grid", buff, x, y, env);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected ShortDataRecord extractData(GridCoverage2D coverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferShort dataBuffer = (DataBufferShort) raster.getDataBuffer();
- short[] data = dataBuffer.getData();
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new ShortDataRecord("", "", data, 2,
- new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#extractData(org
- * .geotools.coverage.grid.GridCoverage2D,
- * org.geotools.coverage.grid.GridCoverage2D)
- */
- @Override
- protected ShortDataRecord extractData(GridCoverage2D coverage,
- GridCoverage2D maskCoverage) {
- RenderedImage image = coverage.getRenderedImage();
- Raster raster;
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- DataBufferShort dataBuffer = (DataBufferShort) raster.getDataBuffer();
- short[] data = dataBuffer.getData();
-
- // Extract mask
- image = maskCoverage.getRenderedImage();
- if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) {
- // we can directly access data
- raster = image.getTile(0, 0);
- } else {
- // need to copy data out
- raster = image.getData();
- }
- dataBuffer = (DataBufferShort) raster.getDataBuffer();
- short[] mask = dataBuffer.getData();
-
- if (mask.length == data.length) {
- for (int i = 0; i < data.length; ++i) {
- if (mask[i] != dataMaskValue) {
- data[i] = fill;
- }
- }
- }
-
- int height = raster.getHeight();
- int width = raster.getWidth();
- return new ShortDataRecord("", "", data, 2,
- new long[] { width, height });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.DataReprojector#getDataSlice(com
- * .raytheon.uf.common.datastorage.records.IDataRecord,
- * com.raytheon.uf.common.datastorage.Request)
- */
- @Override
- protected ShortDataRecord getDataSlice(IDataRecord record, Request req) {
- ShortDataRecord dataRecord = (ShortDataRecord) record;
- int[] max = req.getMaxIndexForSlab();
- int[] min = req.getMinIndexForSlab();
- int toWidth = max[0] - min[0];
- int toHeight = max[1] - min[1];
- short[] from = dataRecord.getShortData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- short[] to = new short[toWidth * toHeight];
- for (int fromY = min[1], toY = 0; fromY < max[1]; ++fromY, ++toY) {
- int toRow = toY * toWidth;
- int fromRow = fromY * fromWidth;
- for (int fromX = min[0], toX = 0; fromX < max[0]; ++fromX, ++toX) {
- to[toRow + toX] = from[fromRow + fromX];
- }
- }
- long[] sizes = { toWidth, toHeight };
- return new ShortDataRecord("", "", to, 2, sizes);
- }
-
- /**
- * @return the fill
- */
- public short getFill() {
- return fill;
- }
-
- /**
- * @param fill
- * the fill to set
- */
- public void setFill(short fill) {
- this.fill = fill;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.uf.common.spatial.reprojection.AbstractDataReprojector#compatible
- * (com.raytheon.uf.common.datastorage.records.IDataRecord)
- */
- @Override
- protected boolean compatible(IDataRecord dataRecord) {
- return dataRecord instanceof ShortDataRecord;
- }
-
- @Override
- protected IDataRecord getDataPoints(IDataRecord record, Request req) {
- ShortDataRecord dataRecord = (ShortDataRecord) record;
- short[] from = dataRecord.getShortData();
- int fromWidth = (int) dataRecord.getSizes()[0];
- Point[] points = req.getPoints();
- short[] to = new short[points.length];
- for (int i = 0; i < to.length; ++i) {
- Point p = points[i];
- to[i] = from[p.y * fromWidth + p.x];
- }
- return new ShortDataRecord("", "", to, 1, new long[] { to.length });
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml
index 485093c9eb..0a3af798e1 100644
--- a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml
@@ -112,13 +112,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/.project b/edexOsgi/com.raytheon.uf.edex.ogc.common/.project
deleted file mode 100644
index ce62be234b..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- com.raytheon.uf.edex.ogc.common
-
-
-
-
-
- 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.ogc.common/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.ogc.common/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 03445bee4a..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Jan 23 16:19:06 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.ogc.common/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF
deleted file mode 100644
index a23d2ca4dd..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Common
-Bundle-SymbolicName: com.raytheon.uf.edex.ogc.common
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: RAYTHEON
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: net.opengis;bundle-version="1.0.2",
- org.apache.commons.logging;bundle-version="1.1.1",
- org.geotools;bundle-version="2.6.4",
- org.apache.commons.lang;bundle-version="2.3.0",
- org.apache.camel;bundle-version="1.0.0",
- javax.servlet;bundle-version="2.5.0",
- org.apache.commons.pool;bundle-version="1.3.0",
- javax.measure;bundle-version="1.0.0",
- javax.persistence;bundle-version="1.0.0",
- com.raytheon.edex.common;bundle-version="1.12.1174",
- org.apache.commons.collections;bundle-version="3.2.0",
- com.raytheon.uf.common.json;bundle-version="1.0.0",
- com.sun.xml.bind;bundle-version="1.0.0",
- com.raytheon.uf.common.status;bundle-version="1.12.1174",
- com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
- com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
- com.raytheon.uf.common.registry.schemas.ebxml;bundle-version="1.0.0",
- com.raytheon.uf.common.registry.schemas.iso19115;bundle-version="1.0.0",
- com.raytheon.uf.common.registry.event;bundle-version="1.0.0",
- com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0",
- com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0",
- com.raytheon.uf.common.spatial;bundle-version="1.0.0"
-Export-Package: com.raytheon.uf.edex.ogc.common,
- com.raytheon.uf.edex.ogc.common.colormap,
- com.raytheon.uf.edex.ogc.common.db,
- com.raytheon.uf.edex.ogc.common.feature,
- com.raytheon.uf.edex.ogc.common.http,
- com.raytheon.uf.edex.ogc.common.interfaces,
- com.raytheon.uf.edex.ogc.common.jaxb,
- com.raytheon.uf.edex.ogc.common.output,
- com.raytheon.uf.edex.ogc.common.spatial,
- com.raytheon.uf.edex.ogc.common.time
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties b/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties
deleted file mode 100644
index e016089273..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-bin.includes = .project,\
- .classpath,\
- META-INF/,\
- build.properties,\
- .settings/,\
- .,\
- res/
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/com.raytheon.uf.edex.ogc.common.ecl b/edexOsgi/com.raytheon.uf.edex.ogc.common/com.raytheon.uf.edex.ogc.common.ecl
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/res/spring/ogc-common.xml b/edexOsgi/com.raytheon.uf.edex.ogc.common/res/spring/ogc-common.xml
deleted file mode 100644
index 1cd58500ce..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/res/spring/ogc-common.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
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
deleted file mode 100644
index e39621257d..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcBoundingBox.java
+++ /dev/null
@@ -1,86 +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
- *
- **********************************************************************/
-package com.raytheon.uf.edex.ogc.common;
-
-import com.vividsolutions.jts.geom.Envelope;
-
-public class OgcBoundingBox extends OgcGeoBoundingBox {
-
- protected String crs;
-
- protected double resx = Double.NaN;
-
- protected double resy = Double.NaN;
-
- public OgcBoundingBox() {
- }
-
- public OgcBoundingBox(String crs, double minx, double maxx, double miny,
- double maxy, double resx, double resy) {
- this(crs, minx, maxx, miny, maxy);
- this.resx = resx;
- this.resy = resy;
- }
-
- public OgcBoundingBox(String crs, double minx, double maxx, double miny,
- double maxy) {
- super(maxx, minx, maxy, miny);
- this.crs = crs;
- }
-
- /**
- * @param targetCrs
- * @param env
- */
- public OgcBoundingBox(String crs, Envelope env) {
- super(env);
- this.crs = crs;
- }
-
- public String getCrs() {
- return crs;
- }
-
- public void setCrs(String crs) {
- this.crs = crs;
- }
-
- public double getResx() {
- return resx;
- }
-
- public void setResx(double resx) {
- this.resx = resx;
- }
-
- public double getResy() {
- return resy;
- }
-
- public void setResy(double resy) {
- this.resy = resy;
- }
-
-}
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
deleted file mode 100644
index 2302c233a6..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcDimension.java
+++ /dev/null
@@ -1,145 +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
-*
-**********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-import java.util.List;
-
-/**
- * @author bclement
- *
- */
-public class OgcDimension {
-
- protected String name;
-
- protected String units;
-
- protected String unitSymbol;
-
- protected List values;
-
- protected String defaultVal;
-
- /**
- *
- */
- public OgcDimension() {
- }
-
- public OgcDimension(String name, List values) {
- this(name, "", values);
- }
-
- public OgcDimension(String name, String units, List values) {
- this(name, units, null, values);
- }
-
- public OgcDimension(String name, String units, String unitSymbol,
- List values) {
- this.name = name;
- this.units = units;
- this.unitSymbol = unitSymbol;
- this.values = values;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name
- * the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the units
- */
- public String getUnits() {
- return units;
- }
-
- /**
- * @param units
- * the units to set
- */
- public void setUnits(String units) {
- this.units = units;
- }
-
- /**
- * @return the unitSymbol
- */
- public String getUnitSymbol() {
- return unitSymbol;
- }
-
- /**
- * @param unitSymbol
- * the unitSymbol to set
- */
- public void setUnitSymbol(String unitSymbol) {
- this.unitSymbol = unitSymbol;
- }
-
- /**
- * @return the values
- */
- public List getValues() {
- return values;
- }
-
- /**
- * @param values
- * the values to set
- */
- public void setValues(List values) {
- this.values = values;
- }
-
- /**
- * @return the defaultVal
- */
- public String getDefaultVal() {
- return defaultVal;
- }
-
- /**
- * @param defaultVal
- * the defaultVal to set
- */
- public void setDefaultVal(String defaultVal) {
- this.defaultVal = defaultVal;
- }
-
-}
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
deleted file mode 100644
index acf73b3d7f..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcException.java
+++ /dev/null
@@ -1,65 +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
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-
-public class OgcException extends Exception {
-
- private static final long serialVersionUID = -5832661027013919871L;
-
- public enum Code {
- InvalidFormat, InvalidCRS, LayerNotDefined, MissingDimensionValue, InvalidDimensionValue, OperationNotSupported, MissingParameterValue, InvalidParameterValue, InternalServerError
- }
-
- protected Code code;
-
- public OgcException(Code code) {
- super();
- this.code = code;
- }
-
- public OgcException(Code code, String message) {
- super(message);
- this.code = code;
- }
-
- public OgcException(Code code, Throwable cause) {
- super(cause);
- this.code = code;
- }
-
- public OgcException(Code code, String message, Throwable cause) {
- super(message, cause);
- this.code = code;
- }
-
- public Code getCode() {
- return code;
- }
-
- public void setCode(Code code) {
- this.code = code;
- }
-
-}
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
deleted file mode 100644
index b2298cafb2..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcGeoBoundingBox.java
+++ /dev/null
@@ -1,156 +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
- *
- **********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.Polygon;
-
-/**
- * @author bclement
- *
- */
-public class OgcGeoBoundingBox {
-
- protected double maxx;
-
- protected double minx;
-
- protected double maxy;
-
- protected double miny;
-
- /**
- *
- */
- public OgcGeoBoundingBox() {
- }
-
- public OgcGeoBoundingBox(double eastLongitude, double westLongitude,
- double northLatitude, double southLatitude) {
- super();
- this.maxx = eastLongitude;
- this.minx = westLongitude;
- this.maxy = northLatitude;
- this.miny = southLatitude;
- }
-
- public OgcGeoBoundingBox(Polygon polygon, CoordinateReferenceSystem crs) {
- Geometry env = polygon.getEnvelope();
- Coordinate[] coords = env.getCoordinates();
- Coordinate ur = coords[2];
- Coordinate ll = coords[0];
- this.maxx = ur.x;
- this.minx = ll.x;
- this.maxy = ur.y;
- this.miny = ll.y;
- }
-
- public OgcGeoBoundingBox(Envelope env) {
- this.maxx = env.getMaxX();
- this.maxy = env.getMaxY();
- this.minx = env.getMinX();
- this.miny = env.getMinY();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- long temp;
- temp = Double.doubleToLongBits(maxx);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- temp = Double.doubleToLongBits(maxy);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- temp = Double.doubleToLongBits(miny);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- temp = Double.doubleToLongBits(minx);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- OgcGeoBoundingBox other = (OgcGeoBoundingBox) obj;
- if (Double.doubleToLongBits(maxx) != Double
- .doubleToLongBits(other.maxx))
- return false;
- if (Double.doubleToLongBits(maxy) != Double
- .doubleToLongBits(other.maxy))
- return false;
- if (Double.doubleToLongBits(miny) != Double
- .doubleToLongBits(other.miny))
- return false;
- if (Double.doubleToLongBits(minx) != Double
- .doubleToLongBits(other.minx))
- return false;
- return true;
- }
-
- public double getMaxx() {
- return maxx;
- }
-
- public void setMaxx(double maxx) {
- this.maxx = maxx;
- }
-
- public double getMinx() {
- return minx;
- }
-
- public void setMinx(double minx) {
- this.minx = minx;
- }
-
- public double getMaxy() {
- return maxy;
- }
-
- public void setMaxy(double maxy) {
- this.maxy = maxy;
- }
-
- public double getMiny() {
- return miny;
- }
-
- public void setMiny(double miny) {
- this.miny = miny;
- }
-
-}
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
deleted file mode 100644
index a902793615..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcLayer.java
+++ /dev/null
@@ -1,292 +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
- *
- **********************************************************************/
-package com.raytheon.uf.edex.ogc.common;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author bclement
- *
- */
-public class OgcLayer {
-
- protected OgcLayer parent;
-
- protected List children;
-
- protected String name;
-
- protected String title;
-
- protected List keywords;
-
- protected String abs;
-
- protected List styles;
-
- protected OgcGeoBoundingBox geoBoundingBox;
-
- protected List boundingBox;
-
- protected List crs;
-
- protected double minScaleDenom = Double.NaN;
-
- protected double maxScaleDenom = Double.NaN;
-
- protected boolean opaque;
-
- protected int sizeRecord = 0;
-
- protected List dimensions;
-
- protected static String keySeparator = "/";
-
- public void addCRS(String crs) {
- this.crs = addToList(this.crs, crs);
- }
-
- protected List addToList(List l, T item) {
- if (l == null) {
- l = new ArrayList();
- }
- l.add(item);
- return l;
- }
-
- public void addBoundingBox(OgcBoundingBox bbox) {
- this.boundingBox = addToList(boundingBox, bbox);
- }
-
- public void addStyle(OgcStyle style) {
- this.styles = addToList(styles, style);
- }
-
- public void addChildLayer(OgcLayer child) {
- this.children = addToList(children, child);
- }
-
- public void addDimension(OgcDimension dimention) {
- this.dimensions = addToList(dimensions, dimention);
- }
-
- public void addKeyword(String keyword) {
- this.keywords = addToList(keywords, keyword);
- }
-
- public String getKey() {
- return getKey(name);
- }
-
- public String[] separateKey() {
- return separateKey(name);
- }
-
- /**
- * @return the unique key for the source of the layer
- */
- public static String getKey(String layerName) {
- if (layerName == null) {
- return null;
- }
- return separateKey(layerName)[0];
- }
-
- public static String[] separateKey(String layerName) {
- if (layerName == null) {
- return null;
- }
- String lname;
- try {
- lname = URLDecoder.decode(layerName, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- return lname.split(OgcLayer.keySeparator, 2);
- }
-
- public String getFullTitle() {
- return getKey() + keySeparator + title;
- }
-
- protected String createName(String key, String name) {
- try {
- return URLEncoder.encode(key + keySeparator + name, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * @return the dimentions
- */
- public List getDimensions() {
- return dimensions;
- }
-
- /**
- * @param dimensions
- * the dimentions to set
- */
- public void setDimensions(List dimensions) {
- this.dimensions = dimensions;
- }
-
- public OgcLayer getParent() {
- return parent;
- }
-
- public void setParent(OgcLayer parent) {
- this.parent = parent;
- }
-
- public List getChildren() {
- return children;
- }
-
- public void setChildren(List children) {
- this.children = children;
- }
-
- public List getStyles() {
- return styles;
- }
-
- public void setStyles(List styles) {
- this.styles = styles;
- }
-
- /**
- * @return the geoBoundingBox
- */
- public OgcGeoBoundingBox getGeoBoundingBox() {
- return geoBoundingBox;
- }
-
- /**
- * @param geoBoundingBox
- * the geoBoundingBox to set
- */
- public void setGeoBoundingBox(OgcGeoBoundingBox geoBoundingBox) {
- this.geoBoundingBox = geoBoundingBox;
- }
-
- public List getCrs() {
- return crs;
- }
-
- public void setCrs(List crs) {
- this.crs = crs;
- }
-
- /**
- * @return the boundingBox
- */
- public List getBoundingBox() {
- return boundingBox;
- }
-
- /**
- * @param boundingBox
- * the boundingBox to set
- */
- public void setBoundingBox(List boundingBox) {
- this.boundingBox = boundingBox;
- }
-
- public double getMinScaleDenom() {
- return minScaleDenom;
- }
-
- public void setMinScaleDenom(double minScaleDenom) {
- this.minScaleDenom = minScaleDenom;
- }
-
- public double getMaxScaleDenom() {
- return maxScaleDenom;
- }
-
- public void setMaxScaleDenom(double maxScaleDenom) {
- this.maxScaleDenom = maxScaleDenom;
- }
-
- public boolean isOpaque() {
- return opaque;
- }
-
- public void setOpaque(boolean opaque) {
- this.opaque = opaque;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * @param key
- * a key that is used in all layers from the layer's source
- * @param name
- */
- public void setName(String key, String name) {
- this.name = createName(key, name);
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public List getKeywords() {
- return keywords;
- }
-
- public void setKeywords(List keywords) {
- this.keywords = keywords;
- }
-
- public String getAbs() {
- return abs;
- }
-
- public void setAbs(String abs) {
- this.abs = abs;
- }
-
- public int getSizeRecord() {
- return sizeRecord;
- }
-
- public void setSizeRecord(int sizeRecord) {
- this.sizeRecord = sizeRecord;
- }
-
-}
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
deleted file mode 100644
index e9dd68f0cb..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcNamespace.java
+++ /dev/null
@@ -1,81 +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
- *
- **********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-/**
- * @author bclement
- *
- */
-public class OgcNamespace {
- public static final String GML = "http://www.opengis.net/gml";
-
- public static final String ISM = "urn:us:gov:ic:ism:v2";
-
- public static final String OGC = "http://www.opengis.net/ogc";
-
- public static final String OM100 = "http://www.opengis.net/om/1.0";
-
- public static final String OWS110 = "http://www.opengis.net/ows/1.1";
-
- public static final String OWS = "http://www.opengis.net/ows";
-
- public static final String Sampling100 = "http://www.opengis.net/sampling/1.0";
-
- public static final String SMIL = "http://www.w3.org/2001/SMIL20/";
-
- public static final String SMIL_LANG = "http://www.w3.org/2001/SMIL20/Language";
-
- public static final String SensorML101 = "http://www.opengis.net/sensorML/1.0.1";
-
- public static final String SOS100 = "http://www.opengis.net/sos/1.0";
-
- public static final String SWE101 = "http://www.opengis.net/swe/1.0.1";
-
- public static final String TML = "http://www.opengis.net/tml";
-
- public static final String XLINK = "http://www.w3.org/1999/xlink";
-
- public static final String XSI = "http://www.w3.org/2001/XMLSchema-instance";
-
- public static final String WCS111 = "http://www.opengis.net/wcs/1.1.1";
-
- public static final String WCS112 = "http://www.opengis.net/wcs/1.1.2";
-
- public static final String WMS = "http://www.opengis.net/wms";
-
- public static final String WFS = "http://www.opengis.net/wfs";
-
- public static final String EDEX = "http://edex.uf.raytheon.com";
-
- public static final String SLD = "http://www.opengis.net/sld";
-
- public static final String SE = "http://www.opengis.net/se";
-
- public static final String WMTS100 = "http://www.opengis.net/wmts/1.0";
-
-}
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
deleted file mode 100644
index 7bc69e82ac..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcOperationInfo.java
+++ /dev/null
@@ -1,209 +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
-*
-**********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author bclement
- *
- */
-public class OgcOperationInfo {
-
- protected T type;
-
- protected String httpPostRes;
-
- protected String httpGetRes;
-
- protected List formats = new LinkedList();
-
- protected List versions = new LinkedList();
-
- protected List acceptversions = new LinkedList();
-
- protected List services = new LinkedList();
-
- protected List identifiers = new LinkedList();
-
- protected List interpolationtypes = new LinkedList();
-
- /**
- *
- */
- public OgcOperationInfo(T type) {
- this.type = type;
- }
-
- public OgcOperationInfo(T type, String httpPostRes, String httpGetRes) {
- this(type);
- this.httpGetRes = httpGetRes;
- this.httpPostRes = httpPostRes;
- }
-
- public void addFormat(String format) {
- formats.add(format);
- }
-
- public void addVersion(String version) {
- versions.add(version);
- }
-
- public void addAcceptVersions(String version) {
- acceptversions.add(version);
- }
-
- public void addService(String service) {
- services.add(service);
- }
-
- public void addIdentifier(String identifier) {
- identifiers.add(identifier);
- }
-
- public void addInterpolationType(String interpolationtype) {
- interpolationtypes.add(interpolationtype);
- }
-
- public boolean hasHttpPost() {
- return httpPostRes != null;
- }
-
- public boolean hasHttpGet() {
- return httpGetRes != null;
- }
-
- /**
- * @return the httpPostRes
- */
- public String getHttpPostRes() {
- return httpPostRes;
- }
-
- /**
- * @param httpPostRes
- * the httpPostRes to set
- */
- public void setHttpPostRes(String httpPostRes) {
- this.httpPostRes = httpPostRes;
- }
-
- /**
- * @return the httpGetRes
- */
- public String getHttpGetRes() {
- return httpGetRes;
- }
-
- /**
- * @param httpGetRes
- * the httpGetRes to set
- */
- public void setHttpGetRes(String httpGetRes) {
- this.httpGetRes = httpGetRes;
- }
-
- /**
- * @return the type
- */
- public T getType() {
- return type;
- }
-
- /**
- * @param type
- * the type to set
- */
- public void setType(T type) {
- this.type = type;
- }
-
- /**
- * @return the formats
- */
- public List getFormats() {
- return formats;
- }
-
- /**
- * @param formats
- * the formats to set
- */
- public void setFormats(List formats) {
- this.formats = formats;
- }
-
- /**
- * @return the versions
- */
- public List getVersions() {
- return versions;
- }
-
- /**
- * @param versions
- * the versions to set
- */
- public void setVersions(List versions) {
- this.versions = versions;
- }
-
- public List getAcceptversions() {
- return acceptversions;
- }
-
- public void setAcceptversions(List acceptversions) {
- this.acceptversions = acceptversions;
- }
-
- public List getServices() {
- return services;
- }
-
- public void setServices(List services) {
- this.services = services;
- }
-
- public List getIdentifiers() {
- return identifiers;
- }
-
- public void setIdentifiers(List identifiers) {
- this.identifiers = identifiers;
- }
-
- public List getInterpolationtypes() {
- return interpolationtypes;
- }
-
- public void setInterpolationtypes(List interpolationtypes) {
- this.interpolationtypes = interpolationtypes;
- }
-
-}
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
deleted file mode 100644
index d47160e3fa..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcPrefix.java
+++ /dev/null
@@ -1,112 +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
- *
- **********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-/**
- * @author bclement
- *
- */
-public class OgcPrefix {
- /**
- * Geography Markup Language
- */
- public static final String GML = "gml";
-
- public static final String ISM = "ism";
-
- /**
- * Open Geospatial Consortium
- */
- public static final String OGC = "ogc";
-
- /**
- * Observations & Measurements
- */
- public static final String OM = "om";
-
- public static final String OWS = "ows";
-
- /**
- * Sampling
- */
- public static final String Sampling = "sa";
-
- /**
- * Synchronized Multimedia Integration Language
- */
- public static final String SMIL = "smil";
-
- /**
- * Synchronized Multimedia Integration Language
- */
- public static final String SMIL_LANG = "smilLang";
-
- /**
- * Sensor Markup Language
- */
- public static final String SensorML = "sml";
-
- /**
- * Sensor Observation Service
- */
- public static final String SOS = "sos";
-
- /**
- * Sensor Web Enablement
- */
- public static final String SWE = "swe";
-
- /**
- * Transducer Markup Language
- */
- public static final String TML = "tml";
-
- /**
- * XML Linking Language
- */
- public static final String XLINK = "xlink";
-
- /**
- * XML Schema Instance
- */
- public static final String XSI = "xsi";
-
- public static final String WCS = "wcs";
-
- public static final String WMS = "wms";
-
- public static final String WFS = "wfs";
-
- public static final String WMTS = "wmts";
-
- public static final String EDEX = "edex";
-
- public static final String SLD = "sld";
-
- public static final String SE = "se";
-}
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
deleted file mode 100644
index 09b15f4bf5..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcResponse.java
+++ /dev/null
@@ -1,129 +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
- *
- **********************************************************************/
-package com.raytheon.uf.edex.ogc.common;
-
-public class OgcResponse {
- public static final String TEXT_XML_MIME = "text/xml";
-
- public static final String TEXT_HTML_MIME = "text/html";
-
- public static final String APP_VND_OGC_SE_XML = "application/vnd.ogc.se_xml";
-
- public enum TYPE {
- TEXT, IMAGE, BYTE, MULTIPART
- };
-
- public enum ErrorType {
- NONE, BAD_REQ, INT_ERR, NOT_IMPLEMENTED
- };
-
- protected String mimetype;
-
- protected Object body;
-
- protected boolean multipart = false;
-
- protected TYPE type;
-
- protected ErrorType error = ErrorType.NONE;
-
- private String exceptionFormat = OgcResponse.TEXT_XML_MIME;
-
- public OgcResponse(Object body, String mimetype, TYPE type) {
- this.body = body;
- this.mimetype = mimetype;
- this.type = type;
- }
-
- public String getMimetype() {
- return mimetype;
- }
-
- public void setMimetype(String mimetype) {
- this.mimetype = mimetype;
- }
-
- public Object getBody() {
- return body;
- }
-
- public void setBody(Object body) {
- this.body = body;
- }
-
- public boolean isMultipart() {
- return multipart;
- }
-
- public void setMultipart(boolean multipart) {
- this.multipart = multipart;
- }
-
- /**
- * @param exceptionFormat
- * the exceptionFormat to set
- */
- public void setExceptionFormat(String exceptionFormat) {
- this.exceptionFormat = exceptionFormat;
- }
-
- /**
- * @return the exceptionFormat
- */
- public String getExceptionFormat() {
- return exceptionFormat;
- }
-
- /**
- * @return the type
- */
- public TYPE getType() {
- return type;
- }
-
- /**
- * @param type
- * the type to set
- */
- public void setType(TYPE type) {
- this.type = type;
- }
-
- /**
- * @return the error
- */
- public ErrorType getError() {
- return error;
- }
-
- /**
- * @param error
- * the error to set
- */
- public void setError(ErrorType error) {
- this.error = error;
- }
-
-}
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
deleted file mode 100644
index b5adef3e12..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcServiceInfo.java
+++ /dev/null
@@ -1,83 +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
-*
-**********************************************************************/
-/**
- *
- */
-package com.raytheon.uf.edex.ogc.common;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author bclement
- *
- */
-public class OgcServiceInfo {
- protected String onlineResource;
-
- protected List> operations = new LinkedList>();
-
- /**
- *
- */
- public OgcServiceInfo(String onlineResouce) {
- this.onlineResource = onlineResouce;
- }
-
- public void addOperationInfo(OgcOperationInfo info) {
- operations.add(info);
- }
-
- /**
- * @return the onlineResource
- */
- public String getOnlineResource() {
- return onlineResource;
- }
-
- /**
- * @param onlineResource
- * the onlineResource to set
- */
- public void setOnlineResource(String onlineResource) {
- this.onlineResource = onlineResource;
- }
-
- /**
- * @return the operations
- */
- public List> getOperations() {
- return operations;
- }
-
- /**
- * @param operations
- * the operations to set
- */
- public void setOperations(List> operations) {
- this.operations = operations;
- }
-
-}
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
deleted file mode 100644
index 6509ce1f98..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/OgcStyle.java
+++ /dev/null
@@ -1,110 +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
-*
-**********************************************************************/
-package com.raytheon.uf.edex.ogc.common;
-
-public class OgcStyle {
-
- protected String name;
-
- protected String title;
-
- protected String abs;
-
- protected String legendUrl;
-
- protected boolean isDefault = false;
-
- public OgcStyle() {
- }
-
- public OgcStyle(String name, String title, String abs) {
- this.name = name;
- this.title = title;
- this.abs = abs;
- }
-
- public OgcStyle(String name, String title) {
- this(name, title, null);
- }
-
- public OgcStyle(String name) {
- this(name, null, null);
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public String getAbs() {
- return abs;
- }
-
- public void setAbs(String abs) {
- this.abs = abs;
- }
-
- /**
- * @return the legendUrl
- */
- public String getLegendUrl() {
- return legendUrl;
- }
-
- /**
- * @param legendUrl
- * the legendUrl to set
- */
- public void setLegendUrl(String legendUrl) {
- this.legendUrl = legendUrl;
- }
-
- /**
- * @return the isDefault
- */
- public boolean isDefault() {
- return isDefault;
- }
-
- /**
- * @param isDefault
- * the isDefault to set
- */
- public void setDefault(boolean isDefault) {
- this.isDefault = isDefault;
- }
-
-}
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
deleted file mode 100644
index cc2a21c0e0..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/StyleLookup.java
+++ /dev/null
@@ -1,52 +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
-* ------------ ---------- ----------- --------------------------
-* Mar 29, 2012 bclement Initial creation
-*
-*/
-package com.raytheon.uf.edex.ogc.common;
-
-import java.util.List;
-
-/**
- *
- * @author bclement
- * @version 1.0
- */
-public interface StyleLookup {
-
- /**
- * @param layername
- * @return the name of the default style for layer
- */
- public String lookup(String layername);
-
- public List getStyles();
-
- public void setLoader(ClassLoader loader);
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/ColorbarLabeling.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/ColorbarLabeling.java
deleted file mode 100644
index 54592a5d63..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/ColorbarLabeling.java
+++ /dev/null
@@ -1,55 +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
- */
-package com.raytheon.uf.edex.ogc.common.colormap;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-
-@XmlAccessorType(XmlAccessType.NONE)
-@XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
-public class ColorbarLabeling {
- @XmlElement
- String increment;
-
- @XmlElement
- String values;
-
- public String getIncrement() {
- return increment;
- }
-
- public void setIncriment(String increment) {
- this.increment = increment;
- }
-
- public String getValues() {
- return values;
- }
-
- public void setValues(String values) {
- this.values = values;
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/LevelRange.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/LevelRange.java
deleted file mode 100644
index 95c57394ec..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/LevelRange.java
+++ /dev/null
@@ -1,101 +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
-* ------------ ---------- ----------- --------------------------
-* Dec 9, 2011 ekladstrup Initial creation
-*
-*/
-
-package com.raytheon.uf.edex.ogc.common.colormap;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * TODO Add Description
- *
- * @author ekladstrup
- * @version 1.0
- */
-@XmlAccessorType(XmlAccessType.NONE)
-@XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
-public class LevelRange {
-
- @XmlAttribute
- private String level;
-
- @XmlElement
- private Float upper;
-
- @XmlElement
- private Float lower;
-
- @XmlAttribute
- private String unit;
-
- public LevelRange() {
-
- }
-
-
- public Float getUpper() {
- return upper;
- }
-
- public void setUpper(Float upper) {
- this.upper = upper;
- }
-
- public Float getLower() {
- return lower;
- }
-
- public void setLower(Float lower) {
- this.lower = lower;
- }
-
- public void setLevel(String level) {
- this.level = level;
- }
-
- public String getLevel() {
- return level;
- }
-
-
- public void setUnit(String unit) {
- this.unit = unit;
- }
-
-
- public String getUnit() {
- return unit;
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/MapRange.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/MapRange.java
deleted file mode 100644
index 77b0a7cfe3..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/MapRange.java
+++ /dev/null
@@ -1,123 +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
- * ------------ ---------- ----------- --------------------------
- * Dec 9, 2011 ekladstrup Initial creation
- *
- */
-package com.raytheon.uf.edex.ogc.common.colormap;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * TODO Add Description
- *
- * @author ekladstrup
- * @version 1.0
- */
-@XmlAccessorType(XmlAccessType.NONE)
-@XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
-public class MapRange {
-
- @XmlAttribute
- private String type;
-
- /**
- * indicates that this range was pulled from "thin air" and can be replaced
- * if a better range is known
- */
- @XmlAttribute
- private boolean replaceable = false;
-
- @XmlElement
- private Float upperMinimum;
-
- @XmlElement
- private Float upperMaximum;
-
- @XmlElement
- private Float lowerMinimum;
-
- @XmlElement
- private Float lowerMaximum;
-
- public MapRange() {
-
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Float getUpperMinimum() {
- return upperMinimum;
- }
-
- public void setUpperMinimum(Float upperMinimum) {
- this.upperMinimum = upperMinimum;
- }
-
- public Float getUpperMaximum() {
- return upperMaximum;
- }
-
- public void setUpperMaximum(Float upperMaximum) {
- this.upperMaximum = upperMaximum;
- }
-
- public Float getLowerMinimum() {
- return lowerMinimum;
- }
-
- public void setLowerMinimum(Float lowerMinimum) {
- this.lowerMinimum = lowerMinimum;
- }
-
- public Float getLowerMaximum() {
- return lowerMaximum;
- }
-
- public void setLowerMaximum(Float lowerMaximum) {
- this.lowerMaximum = lowerMaximum;
- }
-
- public void setReplaceable(boolean replaceable) {
- this.replaceable = replaceable;
- }
-
- public boolean isReplaceable() {
- return replaceable;
- }
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRule.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRule.java
deleted file mode 100644
index 54da933899..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRule.java
+++ /dev/null
@@ -1,129 +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
- * ------------ ---------- ----------- --------------------------
- * Dec 8, 2011 ekladstrup Initial creation
- *
- */
-package com.raytheon.uf.edex.ogc.common.colormap;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * TODO Add Description
- *
- * @author ekladstrup
- * @version 1.0
- */
-@XmlAccessorType(XmlAccessType.NONE)
-@XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
-public class StyleRule {
- @XmlElement
- private String layerRegex;
-
- @XmlElement
- private LevelRange levelRange;
-
- @XmlElement
- private MapRange mapRange;
-
- @XmlElement
- private MapRange dataRange;
-
- @XmlElement
- private ColorbarLabeling colorbarLabeling;
-
- @XmlElement
- private String colorMapName;
-
- @XmlElement
- private String displayUnits;
-
- public StyleRule() {
-
- }
-
- public String getLayerRegex() {
- return layerRegex;
- }
-
- public void setLayerRegex(String layerRegex) {
- this.layerRegex = layerRegex;
- }
-
- public void setLevelRange(LevelRange levelRange) {
- this.levelRange = levelRange;
- }
-
- public LevelRange getLevelRange() {
- return levelRange;
- }
-
- public void setMapRange(MapRange mapRange) {
- this.mapRange = mapRange;
- }
-
- public MapRange getMapRange() {
- return mapRange;
- }
-
- public void setDataRange(MapRange dataRange) {
- this.dataRange = dataRange;
- }
-
- public MapRange getDataRange() {
- return dataRange;
- }
-
- public void setColorbarLabeling(ColorbarLabeling colorbarLabeling) {
- this.colorbarLabeling = colorbarLabeling;
- }
-
- public ColorbarLabeling getColorbarLabeling() {
- return colorbarLabeling;
- }
-
- public void setColorMapName(String colorMapName) {
- this.colorMapName = colorMapName;
- }
-
- public String getColorMapName() {
- return colorMapName;
- }
-
- public void setDisplayUnits(String displayUnits) {
- this.displayUnits = displayUnits;
- }
-
- public String getDisplayUnits() {
- return displayUnits;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRuleLibrary.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRuleLibrary.java
deleted file mode 100644
index bfddc05b81..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/colormap/StyleRuleLibrary.java
+++ /dev/null
@@ -1,241 +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
- * ------------ ---------- ----------- --------------------------
- * Dec 8, 2011 ekladstrup Initial creation
- *
- */
-package com.raytheon.uf.edex.ogc.common.colormap;
-
-import java.io.InputStream;
-import java.text.ParseException;
-import java.text.ParsePosition;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.measure.converter.UnitConverter;
-import javax.measure.unit.Unit;
-import javax.measure.unit.UnitFormat;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * TODO Add Description
- *
- * @author ekladstrup
- * @version 1.0
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-public class StyleRuleLibrary {
-
- @XmlElements({ @XmlElement(name = "styleRule", type = StyleRule.class) })
- private List rules;
-
- private Log log = LogFactory.getLog(this.getClass());
-
- private Map> _ruleMap;
-
- public StyleRuleLibrary() {
-
- }
-
- public static StyleRuleLibrary load(InputStream inputStream)
- throws JAXBException {
- JAXBContext context = JAXBContext.newInstance(StyleRuleLibrary.class);
- Unmarshaller unmarshaller = context.createUnmarshaller();
- Object lib = unmarshaller.unmarshal(inputStream);
- if (lib instanceof StyleRuleLibrary) {
- return (StyleRuleLibrary) lib;
- } else {
- return null;
- }
-
- }
-
- public void setRules(List rules) {
- this.rules = rules;
- }
-
- public List getRules() {
- return rules;
- }
-
- protected Map> getRuleMap() {
- if (_ruleMap == null && rules != null) {
- _ruleMap = new HashMap>();
- for (StyleRule rule : rules) {
- String cmap = rule.getColorMapName();
- List list = _ruleMap.get(cmap);
- if (list == null) {
- list = new ArrayList();
- _ruleMap.put(cmap, list);
- }
- list.add(rule);
- }
- }
- return _ruleMap;
- }
-
- /**
- * @param rule
- * @param dimensions
- * @param levelUnits
- * @return false if there was a range and it was out of bounds, true
- * otherwise
- * @throws ParseException
- */
- protected boolean initRule(StyleRule rule, Map dimensions,
- Map levelUnits) throws ParseException {
- LevelRange range = rule.getLevelRange();
- if (range != null) {
- // only accept if range is ok
- return initRange(rule, dimensions, levelUnits);
- }
- // if there is no range, we accept the rule
- return true;
- }
-
- /**
- * @param rule
- * @param dimensions
- * @param levelUnits
- * @return true if range is in bounds
- * @throws ParseException
- */
- protected boolean initRange(StyleRule rule, Map dimensions,
- Map levelUnits) throws ParseException {
- LevelRange range = rule.getLevelRange();
- String level = range.getLevel();
- String levelValue = dimensions.get(level);
- if (levelValue != null) {
- Double lvlVal = Double.parseDouble(levelValue);
- String styleLevelUnit = range.getUnit();
- lvlVal = convert(lvlVal, styleLevelUnit, styleLevelUnit, levelUnits);
- if (lvlVal >= range.getLower() && lvlVal <= range.getUpper()) {
- setupLevelRange(rule, lvlVal);
- // range is in bounds
- return true;
- }
- }
- // range is out of bounds
- return false;
- }
-
- protected Double convert(Double lvlVal, String styleLevelUnit,
- String level, Map levelUnits) throws ParseException {
- if (styleLevelUnit == null || levelUnits == null) {
- return lvlVal;
- }
- String dataLevelUnit = levelUnits.get(level);
- if (dataLevelUnit == null) {
- return lvlVal;
- }
- UnitFormat formatter = UnitFormat.getInstance();
- try {
- Unit> ruleUnit = formatter.parseSingleUnit(styleLevelUnit,
- new ParsePosition(0));
- Unit> dataUnit = formatter.parseSingleUnit(dataLevelUnit,
- new ParsePosition(0));
-
- UnitConverter dataToRuleConv = dataUnit.getConverterTo(ruleUnit);
-
- return dataToRuleConv.convert(lvlVal.doubleValue());
-
- } catch (ParseException e) {
- log.error("Cannot convert units", e);
- throw e;
- }
- }
-
- public StyleRule getMatchForLayer(String layer,
- Map dimensions, Map levelUnits)
- throws ParseException {
- if (layer == null) {
- return null;
- }
- for (StyleRule rule : rules) {
- String pattern = rule.getLayerRegex();
- if (layer.matches(pattern)) {
- // do not return rule if there is an invalid range
- if (initRule(rule, dimensions, levelUnits)) {
- return rule;
- }
- }
- }
- return null;
- }
-
- public StyleRule getLayerStyleWithNewCmap(String layer,
- Map dimensions, Map levelUnits,
- String newColormap) throws ParseException {
- StyleRule rule = getMatchForLayer(layer, dimensions, levelUnits);
- if (rule != null && newColormap != null) {
- rule.setColorMapName(newColormap);
- return rule;
- }
- return null;
- }
-
- private void setupLevelRange(StyleRule rule, Double lvlVal) {
- MapRange range = rule.getMapRange();
- LevelRange lRange = rule.getLevelRange();
- if (range != null && lRange != null) {
- if (range.getLowerMaximum() != null
- && range.getLowerMinimum() != null) {
- // calculate upper and lower
- double maxRange = Math.abs(range.getUpperMaximum()
- - range.getLowerMaximum());
- double minRange = Math.abs(range.getUpperMinimum()
- - range.getLowerMinimum());
- double levelRange = Math.abs(lRange.getUpper()
- - lRange.getLower());
-
- double lvlRatioOffset = (lvlVal - lRange.getLower())
- / levelRange;
-
- Double newMax = (maxRange * lvlRatioOffset)
- + range.getLowerMaximum();
- Double newMin = (minRange * lvlRatioOffset)
- + range.getLowerMinimum();
-
- range.setUpperMaximum(newMax.floatValue());
- range.setUpperMinimum(newMin.floatValue());
- }
- }
- }
-}
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
deleted file mode 100644
index 32669ddf25..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/DefaultLayerCollector.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
- /**
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Nov 1, 2011 bclement Initial creation
- *
- **/
-
-package com.raytheon.uf.edex.ogc.common.db;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-import com.raytheon.uf.common.dataplugin.PluginDataObject;
-import com.raytheon.uf.common.status.IUFStatusHandler;
-import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.edex.database.DataAccessLayerException;
-import com.raytheon.uf.edex.database.dao.CoreDao;
-import com.raytheon.uf.edex.database.dao.DaoConfig;
-import com.raytheon.uf.edex.database.query.DatabaseQuery;
-
-/**
- *
- * Default Layer Collector
- *
- *
- * SOFTWARE HISTORY
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * 08/09/2012 754 dhladky initial creation, based on B Clements original
- *
- *
- * @author dhladky
- * @version 1.0
- */
-
-public abstract class DefaultLayerCollector
- extends LayerCollector {
-
- private static final transient IUFStatusHandler statusHandler = UFStatus
- .getHandler(DefaultLayerCollector.class);
-
- protected Class recordClass;
-
- protected Class layerClass;
-
- public DefaultLayerCollector(LayerTransformer transformer,
- Class layerClass, Class recordClass) {
- super(transformer);
- this.recordClass = recordClass;
- this.layerClass = layerClass;
- }
-
- public void add(PluginDataObject... pdos) {
- if (pdos.length > 0) {
- addAll(Arrays.asList(pdos));
- }
- }
-
- @SuppressWarnings("unchecked")
- public void addAll(Collection extends PluginDataObject> coll) {
- HashMap layermap = new HashMap(coll.size());
- for (PluginDataObject pdo : coll) {
- if (recordClass.equals(pdo.getClass())) {
- R rec = (R) pdo;
- String name = getLayerName(rec);
- L layer = layermap.get(name);
- if (layer == null) {
- layer = newLayer();
- layer.setName(name);
- if (initializeLayer(layer, rec)) {
- layermap.put(name, layer);
- } else {
- continue;
- }
- }
- addToTimes(layer, rec);
- addToDims(layer, rec);
-
- statusHandler.info("Adding layer " + layer.getName());
- }
- }
- for (String key : layermap.keySet()) {
- try {
- updateLayer(layermap.get(key));
- } catch (DataAccessLayerException e) {
- statusHandler.error("Problem updating the layer table", e);
- }
- }
-
- sendMetaData(layermap, coll);
- }
-
- protected L newLayer() {
- try {
- return layerClass.newInstance();
- } catch (Exception e) {
- statusHandler
- .error("Unable to instantiate class: " + layerClass, e);
- throw new RuntimeException(e);
- }
- }
-
- protected void addToTimes(L layer, R rec) {
- Date refTime = rec.getDataTime().getRefTime();
- layer.getTimes().add(refTime);
- }
-
- protected void addToDims(L layer, R rec) {
- // default is to do nothing
- }
-
- protected abstract boolean initializeLayer(L layer, R rec);
-
- protected abstract String getLayerName(R rec);
-
- protected abstract void sendMetaData(HashMap layermap,
- Collection extends PluginDataObject> coll);
-
- @SuppressWarnings("unchecked")
- public void purgeExpired() {
- try {
- clearLayers(layerClass);
- DaoConfig conf = DaoConfig.forClass(recordClass);
- CoreDao dao = new CoreDao(conf);
- DatabaseQuery q = new DatabaseQuery(recordClass);
- q.setMaxResults(500);
- q.addOrder("dataTime.refTime", false);
- List recs = (List) dao.queryByCriteria(q);
- addAll(recs);
- } catch (Exception e) {
- statusHandler.error("Problem purging layers", e);
- }
- }
-
- public void purgeAll() {
- try {
- clearLayers(layerClass);
- } catch (Exception e) {
- statusHandler.error("problem purging layers", e);
- }
- }
-
-}
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
deleted file mode 100644
index ab5698f465..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.ogc.common.db;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.criterion.Restrictions;
-
-import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
-import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfigurationManager;
-import com.raytheon.uf.common.datadelivery.harvester.OGCAgent;
-import com.raytheon.uf.common.datadelivery.registry.Coverage;
-import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
-import com.raytheon.uf.common.datadelivery.registry.DataSet;
-import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
-import com.raytheon.uf.common.datadelivery.registry.DataSetName;
-import com.raytheon.uf.common.datadelivery.registry.DataType;
-import com.raytheon.uf.common.datadelivery.registry.Levels;
-import com.raytheon.uf.common.datadelivery.registry.Parameter;
-import com.raytheon.uf.common.datadelivery.registry.Provider;
-import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
-import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetHandler;
-import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
-import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
-import com.raytheon.uf.common.status.IUFStatusHandler;
-import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.common.status.UFStatus.Priority;
-import com.raytheon.uf.edex.database.DataAccessLayerException;
-import com.raytheon.uf.edex.database.dao.CoreDao;
-import com.raytheon.uf.edex.database.dao.DaoConfig;
-import com.raytheon.uf.edex.database.query.DatabaseQuery;
-
-/**
- *
- * Layer Collector
- *
- *
- * SOFTWARE HISTORY
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * 08/09/2012 754 dhladky initial creation, based on B Clements original
- *
- *
- * @author dhladky
- * @version 1.0
- */
-
-public abstract class LayerCollector {
-
- protected LayerTransformer transformer;
-
- protected L layer;
-
- protected HarvesterConfig config = null;
-
- protected OGCAgent agent = null;
-
- protected Map parameters = null;
-
- private static final transient IUFStatusHandler statusHandler = UFStatus
- .getHandler(LayerCollector.class);
-
- public LayerCollector(LayerTransformer transformer) {
- setTransformer(transformer);
- this.config = (HarvesterConfig) HarvesterConfigurationManager.getOGCConfiguration();
- setAgent((OGCAgent)config.getAgent());
- storeProvider(config.getProvider());
- }
-
- public HarvesterConfig getConfig() {
- return config;
- }
-
- public void setConfig(HarvesterConfig config) {
- this.config = config;
- }
-
- public void clearLayers(Class c)
- throws DataAccessLayerException {
- DaoConfig conf = DaoConfig.forClass(c);
- CoreDao dao = new CoreDao(conf);
- List> res = dao.queryByCriteria(new DatabaseQuery(c));
- dao.deleteAll(res);
- }
-
- public void replaceTimes(T layer)
- throws DataAccessLayerException {
- DaoConfig conf = DaoConfig.forClass(layer.getClass());
- CoreDao dao = new CoreDao(conf);
- Session sess = dao.getSessionFactory().openSession();
- Transaction tx = null;
- try {
- tx = sess.beginTransaction();
- List list = query(sess, layer);
- if (list.isEmpty()) {
- sess.save(layer);
- } else {
- if (list.size() > 1) {
- statusHandler.warn("Multiple layers found with same name, using first");
- }
- T old = list.get(0);
- Set times = old.getTimes();
- times.clear();
- Set newTimes = layer.getTimes();
- if (newTimes != null) {
- times.addAll(newTimes);
- }
- }
- tx.commit();
- } catch (Exception e) {
- tx.rollback();
- throw new DataAccessLayerException("Problem replacing layer times",
- e);
- } finally {
- sess.close();
- }
- }
-
- public void updateLayer(T layer)
- throws DataAccessLayerException {
- DaoConfig conf = DaoConfig.forClass(layer.getClass());
- CoreDao dao = new CoreDao(conf);
- Session sess = dao.getSessionFactory().openSession();
- Transaction tx = null;
- try {
- tx = sess.beginTransaction();
- List list = query(sess, layer);
- if (list.isEmpty()) {
- Set extends SimpleDimension> dims = layer.getDimensions();
- if (dims != null) {
- for (SimpleDimension d : dims) {
- sess.save(d);
- }
- }
- sess.save(layer);
- } else {
- if (!list.isEmpty()) {
- statusHandler.warn("Multiple layers found with same name, using first");
- }
- T old = list.get(0);
- update(old, layer);
- }
- tx.commit();
- } catch (Exception e) {
- tx.rollback();
- throw new DataAccessLayerException("Problem updating layer", e);
- } finally {
- sess.close();
- }
- }
-
- public void update(T old, T shiny) {
- updateDates(old, shiny);
- updateDims(old, shiny);
- }
-
- public void updateDates(T old, T shiny) {
- Set shinyTimes = shiny.getTimes();
- Set oldTimes = old.getTimes();
- if (shinyTimes != null && shinyTimes != null) {
- for (Date time : shinyTimes) {
- oldTimes.add(time);
- }
- }
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- public void updateDims(T old, T shiny) {
- Set oldDims = old.getDimensions();
- Set shinyDims = shiny.getDimensions();
- if (oldDims != null) {
- if (shinyDims != null) {
- updateDimLists(oldDims, shinyDims);
- }
- }
- }
-
- public HashMap getDimMap(Set dims) {
- HashMap rval = new HashMap(dims.size());
- for (T sd : dims) {
- rval.put(sd.getName(), sd);
- }
- return rval;
- }
-
- public void updateDimLists(Set oldDims,
- Set shinyDims) {
- HashMap oldMap = getDimMap(oldDims);
- HashMap shinyMap = getDimMap(shinyDims);
- for (String name : shinyMap.keySet()) {
- T shinyDim = shinyMap.get(name);
- T oldDim = oldMap.get(name);
- if (oldDim == null) {
- oldDims.add(shinyDim);
- } else {
- updateDimValues(oldDim, shinyDim);
- }
- }
- }
-
- public void updateDimValues(SimpleDimension oldDim, SimpleDimension shinyDim) {
- Set oldValues = oldDim.getValues();
- Set shinyValues = shinyDim.getValues();
- if (oldValues != null && shinyValues != null) {
- for (String val : shinyValues) {
- oldValues.add(val);
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public List query(Session sess, T layer)
- throws DataAccessLayerException {
- Class extends SimpleLayer> layerClass = transformer.getLayerClass();
- Criteria criteria = sess.createCriteria(layerClass);
- criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
- criteria.add(Restrictions.eq("name", layer.getName()));
- return criteria.list();
- }
-
- @SuppressWarnings("unchecked")
- public List query(Session sess, String layerName)
- throws DataAccessLayerException {
- Class extends SimpleLayer> layerClass = transformer.getLayerClass();
- Criteria criteria = sess.createCriteria(layerClass);
- criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
- criteria.add(Restrictions.eq("name", layerName));
- return criteria.list();
- }
-
- /**
- * Take the Calendar back to the first instant of the current hour. This is
- * equivalent to calling roundToHour with cutoff of 59
- *
- * @param cal
- * @return
- */
- public static Calendar truncateToHour(Calendar cal) {
- return DateUtils.truncate(cal, Calendar.HOUR);
- }
-
- /**
- * Take the Date back to the first instant of the current hour. This is
- * equivalent to calling roundToHour with cutoff of 59
- *
- * @param d
- * @return
- */
- public static Date truncateToHour(Date d) {
- return DateUtils.truncate(d, Calendar.HOUR);
- }
-
- /**
- * Round the Calendar to the nearest hour determined by cutoff
- *
- * @param cal
- * @param cutoff
- * if cal's minute value is greater than cutoff, the return will
- * be rounded up to the next hour, else rounded down
- * @return
- */
- public static Calendar roundToHour(Calendar cal, int cutoff) {
- if (cutoff < 0 || cutoff > 59) {
- cutoff %= 60;
- }
- if (cal.get(Calendar.MINUTE) > cutoff) {
- cal = (Calendar) cal.clone();
- cal.add(Calendar.HOUR, 1);
- }
- return truncateToHour(cal);
- }
-
- /**
- * Round the Date to the nearest hour determined by cutoff
- *
- * @param d
- * @param cutoff
- * if d's minute value is greater than cutoff, the return will be
- * rounded up to the next hour, else rounded down
- * @return
- */
- public static Date roundToHour(Date d, int cutoff) {
- Calendar tmp = Calendar.getInstance();
- tmp.setTime(d);
- tmp = roundToHour(tmp, cutoff);
- return tmp.getTime();
- }
-
- /**
- * Find the DPA config
- * @return
- */
- public HarvesterConfig getConfiguration() {
- return config;
- }
-
- /**
- * Stroe Data objects
- * @param metaDatas
- * @param dataSet
- */
- public void storeMetaData(final DataSetMetaData metaData) {
-
- IDataSetMetaDataHandler handler = DataDeliveryHandlers
- .getDataSetMetaDataHandler();
-
- final String description = metaData.getDataSetDescription();
- statusHandler.info("Attempting store of DataSetMetaData["+description+"]");
-
- try {
- handler.update(metaData);
- statusHandler.info("DataSetMetaData [" + description
- + "] successfully stored in Registry");
- } catch (RegistryHandlerException e) {
- statusHandler.info("DataSetMetaData [" + description
- + "] failed to store in Registry");
-
-
- }
- }
-
- /**
- *
- * @param dataSetToStore
- */
- protected void storeDataSetName(DataSet dataSetToStore) {
-
- DataSetName dsn = new DataSetName();
- // Set the RegistryObject Id keys for this Object
- // using the values from the DataSetMetaData Object.
- dsn.setProviderName(dataSetToStore.getProviderName());
- dsn.setDataSetType(dataSetToStore.getDataSetType());
- dsn.setDataSetName(dataSetToStore.getDataSetName());
-
- // Now add the parameter Objects so we can associate
- // the DataSetName with parameters..
- dsn.setParameters(dataSetToStore.getParameters());
-
- try {
- DataDeliveryHandlers.getDataSetNameHandler().update(dsn);
- statusHandler.info("DataSetName object store complete, dataset ["
- + dsn.getDataSetName() + "]");
- } catch (RegistryHandlerException e) {
- statusHandler.error("DataSetName object store failed:", e);
- }
- }
-
- /**
- * @param dataSet
- */
- protected void storeDataSet(final DataSet dataSet) {
-
- DataSet dataSetToStore = getDataSetToStore(dataSet);
- final String dataSetName = dataSetToStore.getDataSetName();
- IDataSetHandler handler = DataDeliveryHandlers.getDataSetHandler();
-
- try {
- handler.update(dataSetToStore);
- statusHandler.info("Dataset [" + dataSetName
- + "] successfully stored in Registry");
- storeDataSetName(dataSet);
-
- } catch (RegistryHandlerException e) {
- statusHandler.info("Dataset [" + dataSetName
- + "] failed to store in Registry");
- }
- }
-
- /**
- * Make sure our provider is contained in the Registry
- * @param provider
- */
- protected void storeProvider(final Provider provider) {
-
- try {
- DataDeliveryHandlers.getProviderHandler().update(provider);
- } catch (RegistryHandlerException e) {
- statusHandler.info("Provider [" + provider.getName()
- + "] failed to store in Registry");
- }
- }
-
- /**
- * Checks for a {@link DataSet} already existing with the same name in the
- * Registry. If so, then combine the objects.
- *
- * @param dataSet
- * the dataSet
- * @return the dataSet instance that should be stored to the registry
- */
- protected DataSet getDataSetToStore(DataSet dataSet) {
- try {
- DataSet result = DataDeliveryHandlers.getDataSetHandler()
- .getByNameAndProvider(dataSet.getDataSetName(),
- dataSet.getProviderName());
- if (result != null) {
- dataSet.combine(result);
- }
- } catch (RegistryHandlerException e) {
- statusHandler.handle(Priority.PROBLEM,
- "Unable to retrieve dataset.", e);
- }
- return dataSet;
- }
-
- /**
- * Store a parameter object to the registry. If necessary, also store the
- * ParameterLevel Objects needed to successfully store the Parameter Object.
- *
- * @param parameter
- * The Parameter Object to store.
- */
- protected void storeParameter(Parameter parameter) {
-
- try {
- DataDeliveryHandlers.getParameterHandler().update(parameter);
- } catch (RegistryHandlerException e) {
- statusHandler.info("Failed to store parameter ["
- + parameter.getName() + "]");
- }
- }
-
- /**
- * Get me my level types for this param
- *
- * @param cp
- * @return
- */
- public List getDataLevelTypes(Parameter cp) {
- return cp.getLevelType();
- }
-
- protected abstract L newLayer();
-
- protected abstract void setCoverage(L layer);
-
- protected abstract Coverage getCoverage();
-
- public void setParameters(L layer) {
- synchronized (layer) {
- if (getParameters() == null || getParameters().isEmpty()) {
- parameters = new HashMap();
- for (Parameter parm : agent.getLayer(layer.getName())
- .getParameters()) {
- // place in map
- parameters.put(parm.getName(), parm);
- storeParameter(parm);
- }
- }
- }
- }
-
- public Map getParameters() {
- return parameters;
- }
-
- protected abstract void setDataSet(L layer);
-
- protected abstract DataSet getDataSet();
-
- protected abstract void setDataSetMetaData(L layer);
-
- protected abstract DataSetMetaData getDataSetMetaData();
-
- protected abstract DataType getDataType();
-
- public abstract Levels getLevels(DataLevelType type, String collectionName);
-
- public LayerTransformer getTransformer() {
- return transformer;
- }
-
- public void setTransformer(LayerTransformer transformer) {
- this.transformer = transformer;
- }
-
- public OGCAgent getAgent() {
- return agent;
- }
-
- public void setAgent(OGCAgent agent) {
- this.agent = agent;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerHolder.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerHolder.java
deleted file mode 100644
index dd3354b20d..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerHolder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.ogc.common.db;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
- /**
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Mar 29, 2011 bclement Initial creation
- *
-**/
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-public class LayerHolder {
- @XmlElement
- protected L value;
-
- @SuppressWarnings("unchecked")
- public static Class> getDefaultClass() {
- return (Class>) new LayerHolder()
- .getClass();
- }
-
- public L getValue() {
- return value;
- }
-
- public void setValue(L value) {
- this.value = value;
- }
-
-}
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
deleted file mode 100644
index 449fd53d92..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerTransformer.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.ogc.common.db;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TimeZone;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.bind.DatatypeConverter;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.geotools.geometry.jts.JTS;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-import org.opengis.referencing.ReferenceIdentifier;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.raytheon.uf.common.dataquery.db.QueryParam;
-import com.raytheon.uf.edex.database.DataAccessLayerException;
-import com.raytheon.uf.edex.database.dao.CoreDao;
-import com.raytheon.uf.edex.database.dao.DaoConfig;
-import com.raytheon.uf.edex.database.query.DatabaseQuery;
-import com.raytheon.uf.edex.ogc.common.OgcBoundingBox;
-import com.raytheon.uf.edex.ogc.common.OgcDimension;
-import com.raytheon.uf.edex.ogc.common.OgcGeoBoundingBox;
-import com.raytheon.uf.edex.ogc.common.OgcLayer;
-import com.raytheon.uf.edex.ogc.common.OgcStyle;
-import com.raytheon.uf.edex.ogc.common.StyleLookup;
-import com.vividsolutions.jts.geom.Polygon;
-
-/**
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Jun 13, 2011 bclement Initial creation
- *
- **/
-
-public class LayerTransformer {
-
- public enum TimeFormat {
- LIST, HOUR_RANGES
- };
-
- protected String key;
-
- protected static String timeUnit = "ISO8601";
-
- protected Class extends SimpleLayer> layerClass = SimpleLayer.class;
-
- protected static Log log = LogFactory.getLog(LayerTransformer.class);
-
- protected static final int MILLIS_IN_HOUR = 60 * 60 * 1000;
-
- public static final Pattern frontDot = Pattern
- .compile("^(-?[0-9]*\\.?[0-9]+)(.*)$");
- public static final Pattern backDot = Pattern
- .compile("^(-?[0-9]+\\.?[0-9]*)(.*)$");
-
- /**
- * Construct a LayerTransformer that uses a different layerClass and
- * layerWrapperClass than the default SimpleLayer and LayerHolder
- *
- * @param key
- * @param layerTable
- * @param das
- * @param layerClass
- * @param layerHolderClass
- */
- public LayerTransformer(String key, Class extends SimpleLayer> layerClass) {
- this.key = key;
- this.layerClass = layerClass;
- }
-
- /**
- * @param name
- * @return null if layer not found
- * @throws DataAccessLayerException
- */
- public SimpleLayer find(String name) throws DataAccessLayerException {
- String field = "name";
- List params = Arrays.asList(new QueryParam(field, name));
- List extends SimpleLayer> res;
- res = query(layerClass, params);
- if (res == null || res.isEmpty()) {
- return null;
- }
- if (res.size() > 1) {
- log.warn("Multiple layers found with the same name, returning first");
- }
- return layerClass.cast(res.get(0));
- }
-
- /**
- * @param layer
- * @param dimension
- * @return null if layer/dimension not found
- * @throws DataAccessLayerException
- */
- public SimpleDimension getDimension(String layer, String dimension)
- throws DataAccessLayerException {
- SimpleLayer l = find(layer);
- return getDimension(l, dimension);
- }
-
- /**
- * @param layer
- * @param dimension
- * @return null if layer/dimension not found
- */
- public static SimpleDimension getDimension(SimpleLayer layer,
- String dimension) {
- if (layer == null) {
- return null;
- }
- SimpleDimension rval = null;
- for (SimpleDimension d : layer.getDimensions()) {
- if (d.getName().equalsIgnoreCase(dimension)) {
- rval = d;
- break;
- }
- }
- return rval;
- }
-
- /**
- * @param dim
- * @return empty set if dim is null or doesn't have any parsable values
- */
- public static TreeSet getDimValuesAsDouble(SimpleDimension dim) {
- TreeSet rval = new TreeSet();
- if (dim == null) {
- return rval;
- }
- for (String val : dim.getValues()) {
- try {
- Matcher m = frontDot.matcher(val);
- if (m.matches()) {
- val = m.group(1);
- } else {
- m = backDot.matcher(val);
- if (m.matches()) {
- val = m.group(1);
- }
- }
- rval.add(Double.parseDouble(val));
- } catch (Throwable e) {
- // continue
- }
- }
- return rval;
- }
-
- /**
- * @param layer
- * @return
- */
- public List getBoundingBoxes(SimpleLayer layer) {
- String crs = layer.getTargetCrsCode();
- double minx = layer.getTargetMinx();
- double maxx = layer.getTargetMaxx();
- double miny = layer.getTargetMiny();
- double maxy = layer.getTargetMaxy();
- OgcBoundingBox rval = new OgcBoundingBox(crs, minx, maxx, miny, maxy);
- return Arrays.asList(rval);
- }
-
- public static String getCrsName(CoordinateReferenceSystem crs) {
- if (crs == null) {
- return null;
- }
- Set ids = crs.getIdentifiers();
- if (ids == null || ids.isEmpty()) {
- return crs.getName().toString();
- } else {
- return ids.iterator().next().toString();
- }
- }
-
- /**
- * @param layer
- * @return
- */
- public static OgcGeoBoundingBox getGeoBoundingBox(SimpleLayer layer) {
- Polygon crs84Bounds = layer.getCrs84Bounds();
- if (crs84Bounds == null) {
- return null;
- }
- ReferencedEnvelope env = JTS.toEnvelope(crs84Bounds);
- return new OgcGeoBoundingBox(env);
- }
-
- /**
- * @param layer
- * @param tformat
- * @return
- */
- public static List getTimes(SimpleLayer layer) {
- return getTimes(layer, TimeFormat.LIST);
- }
-
- /**
- * @param layer
- * @param tformat
- * @return
- */
- public static List getTimes(SimpleLayer layer, TimeFormat tformat) {
- List rval;
- // TODO this could be adapted to a pattern that allows for formatters to
- // be externally added
- switch (tformat) {
- case LIST:
- rval = getTimesAsList(layer);
- break;
- case HOUR_RANGES:
- rval = getTimesAsHourRanges(layer);
- break;
- default:
- throw new IllegalArgumentException("No handler for time format: "
- + tformat);
- }
- return rval;
- }
-
- /**
- * @param layer
- * @return
- */
- protected static List getTimesAsHourRanges(SimpleLayer layer) {
- Set times = layer.getTimes();
- if (times == null || times.isEmpty()) {
- return new ArrayList(0);
- }
- Set set = new TreeSet();
- set.addAll(times);
- Iterator i = set.iterator();
- StringBuilder sb = new StringBuilder();
- List rval = new ArrayList();
- Date curr = i.next();
- while (curr != null) {
- startRange(sb, curr);
- curr = endRange(curr, i, sb);
- if (curr != null) {
- rval.add(sb.toString());
- sb = new StringBuilder();
- }
- }
- String last = sb.toString();
- if (!last.isEmpty()) {
- rval.add(last);
- }
- return rval;
- }
-
- /**
- * End a range started by startRange()
- *
- * @param d
- * start of range
- * @param i
- * iterator to rest of times that possibly include the rest of
- * the range
- * @param sb
- * where the formatted output goes
- * @return the start of the next range, null if there are no more ranges
- */
- protected static Date endRange(Date d, Iterator i, StringBuilder sb) {
- long milliStart = d.getTime();
- long milliPrev = milliStart;
- Date rval = null;
- Date prev = null;
- Date curr = null;
- while (i.hasNext()) {
- curr = i.next();
- if (curr.getTime() - milliPrev > MILLIS_IN_HOUR) {
- // we've reached the end of the range return rval
- rval = curr;
- break;
- }
- prev = curr;
- milliPrev = prev.getTime();
- }
- if (prev == null) {
- // iterator didn't have anything
- prev = new Date(milliStart + MILLIS_IN_HOUR);
- } else {
- // we want the range to end at the next hour
- prev = new Date(prev.getTime() + MILLIS_IN_HOUR);
- }
- sb.append(format(prev));
- // FIXME 0 indicates a continuum range, we should support discrete
- // periods in the range
- sb.append("/0");
- return rval;
- }
-
- public static String format(Date d) {
- Calendar c = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT"));
- c.setTime(d);
- return DatatypeConverter.printDateTime(c);
- }
-
- protected static void startRange(StringBuilder sb, Date d) {
- sb.append(format(d));
- sb.append('/');
- }
-
- protected static List getTimesAsList(SimpleLayer layer) {
- Set times = layer.getTimes();
- if (times == null || times.isEmpty()) {
- return new ArrayList(0);
- }
- TreeSet sorted = new TreeSet(times);
- Iterator i = sorted.iterator();
- List rval = new ArrayList(sorted.size());
- while (i.hasNext()) {
- rval.add(format(i.next()));
- }
- return rval;
- }
-
- public TreeSet getAllTimes() {
- TreeSet rval = new TreeSet();
- List layers = getLayers();
- for (SimpleLayer l : layers) {
- rval.addAll(l.getTimes());
- }
- return rval;
- }
-
- @SuppressWarnings("unchecked")
- public List getLayers() {
- List rval;
- rval = (List) query(layerClass);
- return rval;
- }
-
- public List getLayersAsOgc(TimeFormat tformat, StyleLookup lookup) {
- return transform(getLayers(), tformat, lookup);
- }
-
- public List getLayersAsOgc(StyleLookup lookup) {
- return getLayersAsOgc(TimeFormat.LIST, lookup);
- }
-
- /**
- * @param layers
- * @return
- */
- protected List transform(List extends SimpleLayer> layers,
- TimeFormat tformat, StyleLookup lookup) {
- List rval = new ArrayList(layers.size());
- for (SimpleLayer simple : layers) {
- rval.add(transform(simple, tformat, lookup));
- }
- return rval;
- }
-
- /**
- * Transform a simple layer as represented in the data storage area to an
- * OgcLayer that can be viewed through getCapabilities
- *
- * Override this method to add additional Dimensions.
- *
- * @param layer
- * @return
- */
- public OgcLayer transform(SimpleLayer layer, TimeFormat tformat,
- StyleLookup lookup) {
- OgcLayer rval = new OgcLayer();
- String name = layer.getName();
- rval.setName(key, name);
- rval.setTitle(name);
- setStylesForLayer(rval.getName(), layer, rval, lookup);
- OgcDimension timeDim = new OgcDimension("time", timeUnit, getTimes(layer,
- tformat));
- Date time = layer.getDefaultTime();
- String defaultTime;
- if (tformat.equals(TimeFormat.HOUR_RANGES)) {
- defaultTime = getTimeRange(time);
- } else {
- defaultTime = format(time);
- }
- timeDim.setDefaultVal(defaultTime);
- rval.addDimension(timeDim);
- for (OgcDimension dim : getDims(layer, layer.getDimensions())) {
- rval.addDimension(dim);
- }
- rval.setGeoBoundingBox(getGeoBoundingBox(layer));
- rval.setBoundingBox(getBoundingBoxes(layer));
- // rval.setCrs(Arrays.asList(layer.getTargetCrs()));
- return rval;
- }
-
- public String getTimeRange(Date d) {
- Date start = DateUtils.truncate(d, Calendar.HOUR);
- Date end = DateUtils.addHours(start, 1);
- return format(start) + '/' + format(end);
- }
-
- protected void setStylesForLayer(String layerName, SimpleLayer layer,
- OgcLayer rval, StyleLookup lookup) {
- if (lookup != null) {
- String style = lookup.lookup(layerName);
- if (style != null) {
- OgcStyle ogcstyle = new OgcStyle(style);
- String url = "&layer=" + layerName + "&style=" + style
- + "&format=image/png";
- ogcstyle.setLegendUrl(url.replaceAll(" ", "%20"));
- ogcstyle.setDefault(true);
- rval.setStyles(Arrays.asList(ogcstyle));
- }
- }
- }
-
- /**
- * @param layer
- * @return
- */
- protected OgcDimension[] getDims(SimpleLayer layer,
- Set extends SimpleDimension> dims) {
- if (dims == null) {
- return new OgcDimension[0];
- }
- ArrayList rval = new ArrayList(dims.size());
- for (SimpleDimension dim : dims) {
- OgcDimension ogcdim = transform(layer, dim);
- if (ogcdim != null) {
- rval.add(ogcdim);
- }
- }
- return rval.toArray(new OgcDimension[rval.size()]);
- }
-
- /**
- * @param simpleDimension
- * @return
- */
- protected OgcDimension transform(SimpleLayer layer, SimpleDimension dim) {
- if (dim == null || dim.getName() == null || dim.getValues() == null) {
- return null;
- }
- OgcDimension rval;
- List values = new ArrayList(dim.getValues());
- if (dim.getUnits() == null) {
- rval = new OgcDimension(dim.getName(), values);
- } else {
- rval = new OgcDimension(dim.getName(), dim.getUnits(), values);
- }
- rval.setDefaultVal(dim.getDefaultValue(layer));
- return rval;
- }
-
- protected OgcLayer transform(SimpleLayer layer, StyleLookup lookup) {
- return transform(layer, TimeFormat.LIST, lookup);
- }
-
- protected List query(Class c) {
- return query(c, null);
- }
-
- @SuppressWarnings("unchecked")
- protected List query(Class c, List params) {
- try {
- DatabaseQuery query = new DatabaseQuery(c);
- if (params != null && !params.isEmpty()) {
- for (QueryParam p : params) {
- query.addQueryParam(p);
- }
- }
- DaoConfig config = DaoConfig.forClass(layerClass);
- CoreDao dao = new CoreDao(config);
- return (List) dao.queryByCriteria(query);
- } catch (Exception e) {
- log.error("Unable to query entity: " + c, e);
- return new ArrayList(0);
- }
- }
-
- protected > List unwrap(
- List holders) {
- List rval = new ArrayList(holders.size());
- for (H holder : holders) {
- rval.add(holder.getValue());
- }
- return rval;
- }
-
- /**
- * @param layerName
- * @return null if layer name isn't found
- * @throws DataAccessLayerException
- */
- public Date getLatestTime(String layerName) throws DataAccessLayerException {
- SimpleLayer simpleLayer = find(layerName);
- return getLatestTime(simpleLayer);
- }
-
- /**
- * @param layer
- * @return null if layer name isn't found
- */
- public static Date getLatestTime(SimpleLayer layer) {
- if (layer == null) {
- return null;
- }
- Set times = layer.getTimes();
- TreeSet sorted = new TreeSet(times);
- return sorted.last();
- }
-
- /**
- * @return the key
- */
- public String getKey() {
- return key;
- }
-
- /**
- * @param key
- * the key to set
- */
- public void setKey(String key) {
- this.key = key;
- }
-
- /**
- * @param layerClass
- * the layerClass to set
- */
- public void setLayerClass(Class extends SimpleLayer> layerClass) {
- this.layerClass = layerClass;
- }
-
- /**
- * @return the layerClass
- */
- public Class extends SimpleLayer> getLayerClass() {
- return layerClass;
- }
-
- /**
- * @return
- */
- public TreeSet getLatestTimes() {
- List layers = getLayers();
- TreeSet rval = new TreeSet();
- for (SimpleLayer l : layers) {
- TreeSet times = new TreeSet(l.getTimes());
- rval.add(times.last());
- }
- return rval;
- }
-
-}
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
deleted file mode 100644
index 4ad1a8c49d..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleDimension.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
- /**
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Nov 1, 2011 bclement Initial creation
- *
- **/
-
-package com.raytheon.uf.edex.ogc.common.db;
-
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
-import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
-
-@Entity
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-@DynamicSerialize
-@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
-public abstract class SimpleDimension implements Comparable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- protected int id;
-
- @Column
- @XmlElement
- @DynamicSerializeElement
- protected String name;
-
- @Column
- @XmlElement
- @DynamicSerializeElement
- protected String units;
-
- /**
- * @return live reference to values set, should not return null
- */
- public abstract Set getValues();
-
- /**
- * @param layer
- * the layer that this dimension belongs to. Used by method to
- * determine the best default for dimension.
- * @return
- */
- public abstract String getDefaultValue(SimpleLayer layer);
-
- public SimpleDimension() {
- }
-
- /**
- * @param lowest
- * set true to return lowest value, otherwise highest is returned
- * @return null if there are no values for this dimension
- */
- protected String getDouble(boolean lowest) {
- Double rval = getValue(lowest);
- return rval != null ? rval.toString() : null;
- }
-
- /**
- * @param lowest
- * set true to return lowest value, otherwise highest is returned
- * @return null if there are no values for this dimension
- */
- protected Double getValue(boolean lowest) {
- Double rval;
- TreeSet vals = LayerTransformer.getDimValuesAsDouble(this);
- if (vals.isEmpty()) {
- rval = null;
- } else {
- rval = lowest ? vals.first() : vals.last();
- }
- return rval;
- }
-
- /**
- * @param lowest
- * set true to return lowest value, otherwise highest is returned
- * @return null if there are no values for this dimension
- */
- protected String getInt(boolean lowest) {
- Double val = getValue(lowest);
- return val != null ? String.valueOf(val.intValue()) : null;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name
- * the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the units
- */
- public String getUnits() {
- return units;
- }
-
- /**
- * @param units
- * the units to set
- */
- public void setUnits(String units) {
- this.units = units;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- @Override
- public int compareTo(SimpleDimension o) {
- return this.name.compareTo(o.name);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- SimpleDimension other = (SimpleDimension) obj;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- return true;
- }
-}
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
deleted file mode 100644
index ab15680a55..0000000000
--- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/SimpleLayer.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-package com.raytheon.uf.edex.ogc.common.db;
-
-import java.util.Date;
-import java.util.Set;
-import java.util.SortedSet;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.hibernate.annotations.Index;
-import org.hibernate.annotations.Type;
-
-import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject;
-import com.raytheon.uf.common.serialization.adapters.GeometryAdapter;
-import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
-import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
-import com.vividsolutions.jts.geom.Polygon;
-
- /**
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * Mar 29, 2011 bclement Initial creation
- *
- **/
-
-@Entity
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-@DynamicSerialize
-@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
-public abstract class SimpleLayer implements IPersistableDataObject