Issue #2514 updated comments and history for OGC classes
removed dead and duplicate code from OGC Former-commit-id: c13d5788a39898ef746b535d959bc845b6acad9c
This commit is contained in:
parent
8585080cd1
commit
308b06a47a
174 changed files with 1598 additions and 3689 deletions
|
@ -22,6 +22,22 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
|
||||
/**
|
||||
* Web Services interceptor that logs incoming requests
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* September, 2013 behemmi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
* @version 1.0
|
||||
*/
|
||||
public class CXFLogger extends org.apache.cxf.interceptor.LoggingInInterceptor {
|
||||
|
||||
protected IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
|
|
@ -12,10 +12,21 @@ package com.raytheon.uf.edex.log.cxf;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Singleton to control how incoming request information is logged. Implemented as
|
||||
* a singleton to allow runtime control from a Web Client
|
||||
* Singleton to control how incoming request information is logged. Implemented
|
||||
* as a singleton to allow runtime control from a Web Client
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* September, 2013 behemmi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
*
|
||||
* @version 1.0
|
||||
*/
|
||||
public class RequestLogController {
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ Require-Bundle: net.opengis;bundle-version="1.0.2",
|
|||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.edex.log;bundle-version="1.12.1174"
|
||||
Export-Package: com.raytheon.uf.edex.ogc.common,
|
||||
com.raytheon.uf.edex.ogc.common.colormap,
|
||||
com.raytheon.uf.edex.ogc.common.db,
|
||||
com.raytheon.uf.edex.ogc.common.feature,
|
||||
com.raytheon.uf.edex.ogc.common.filter,
|
||||
|
|
|
@ -29,20 +29,21 @@ import com.raytheon.uf.common.spatial.reprojection.KeyLocker.KeyLock;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException.Code;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Abstract base for file system backed query stores. Provides threadsafe
|
||||
* list/store/delete operations.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 15, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractFSQueryStore<T> extends AbstractFsStore {
|
||||
|
||||
|
|
|
@ -18,21 +18,23 @@ import com.raytheon.uf.common.localization.LocalizationContext;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
|
||||
/**
|
||||
* Abstract File store
|
||||
* Abstract File system storage. Provides basic storage location and id <-> file
|
||||
* name encoding methods.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 4, 2013 bclement Initial creation
|
||||
* Aug 18, 2013 #2097 dhladky Changed to configured
|
||||
*
|
||||
* October, 2012 #2472 dhladky/bclement Changed back to base
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AbstractFsStore {
|
||||
|
||||
|
|
|
@ -28,20 +28,21 @@ import net.opengis.ows.v_1_1_0.RequestMethodType;
|
|||
import net.opengis.ows.v_1_1_0.ValueType;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Abstract base for OGC operation descriptions. Provides common utility methods
|
||||
* for populating OGC capabilities documents.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 21, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractOpDescriber<T> {
|
||||
|
||||
|
|
|
@ -23,21 +23,21 @@ import com.raytheon.uf.common.localization.LocalizationContext;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
|
||||
/**
|
||||
* Basic File Store
|
||||
* Basic file system storage. Overlaps functionality with AbstractFsStore.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 11, 2013 bclement Initial creation
|
||||
* Aug 18, 2013 #2097 dhladky Moved to configured
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class BasicFileStore {
|
||||
|
||||
|
|
|
@ -14,25 +14,37 @@ import java.util.List;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Callback interface used by stylers to have access to plugin metadata.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 30, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface IStyleLookupCallback<R extends PluginDataObject> {
|
||||
|
||||
/**
|
||||
* @param layerName
|
||||
* @return a sample data record that supports layer
|
||||
* @throws OgcException
|
||||
*/
|
||||
public R lookupSample(String layerName) throws OgcException;
|
||||
|
||||
/**
|
||||
* Return a list of samples for plugin. One sample per layer advertised by
|
||||
* source.
|
||||
*
|
||||
* @return
|
||||
* @throws OgcException
|
||||
*/
|
||||
public List<R> getAllSamples() throws OgcException;
|
||||
|
||||
}
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Exception thrown when parsing version numbers
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 26, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class InvalidVersionException extends Exception {
|
||||
|
@ -34,7 +34,6 @@ public class InvalidVersionException extends Exception {
|
|||
*
|
||||
*/
|
||||
public InvalidVersionException() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,23 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
|
||||
/**
|
||||
* Bounding box with arbitrary CRS that also stored resolution information.
|
||||
* Should be replaced with GridGeometry2D.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcBoundingBox extends OgcGeoBoundingBox {
|
||||
|
||||
protected String crs;
|
||||
|
|
|
@ -24,9 +24,24 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Contains dimension metadata used to populate capability and description OGC
|
||||
* documents. Separate from OGC JAXB objects to support different versions of
|
||||
* OGC services.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcDimension {
|
||||
|
||||
|
|
|
@ -20,6 +20,22 @@
|
|||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
|
||||
/**
|
||||
* Exception class containing OGC specific error codes.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = -5832661027013919871L;
|
||||
|
|
|
@ -29,9 +29,23 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Contains CRS:84 longitudes and latitudes for OGC metadata. Should be replaced
|
||||
* with ReferencedEnvelope.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcGeoBoundingBox {
|
||||
|
||||
|
|
|
@ -27,9 +27,24 @@ import java.util.List;
|
|||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Contains layer metadata used to populate capability and description OGC
|
||||
* documents. Separate from OGC JAXB objects to support different versions of
|
||||
* OGC services.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcLayer {
|
||||
|
||||
|
|
|
@ -22,9 +22,22 @@
|
|||
*/
|
||||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Static constants for OGC related XML namespaces
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcNamespace {
|
||||
public static final String GML = "http://www.opengis.net/gml";
|
||||
|
|
|
@ -25,9 +25,23 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Contains operations metadata used to populated OGC capabilities documents.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <T>
|
||||
*/
|
||||
public class OgcOperationInfo<T> {
|
||||
|
||||
|
|
|
@ -22,9 +22,22 @@
|
|||
*/
|
||||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Static constants for OGC related XML namespace prefixes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcPrefix {
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,22 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
|
||||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
|
||||
/**
|
||||
* Response wrapper for OGC web services
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcResponse {
|
||||
public static final MimeType TEXT_XML_MIME = new MimeType("text/xml");
|
||||
|
||||
|
|
|
@ -25,9 +25,23 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Contains services metadata used to populated OGC capabilities documents.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <T>
|
||||
*/
|
||||
public class OgcServiceInfo<T> {
|
||||
protected String onlineResource;
|
||||
|
|
|
@ -19,6 +19,24 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
/**
|
||||
* Contains style metadata used to populate capability and description OGC
|
||||
* documents. Separate from OGC JAXB objects to support different versions of
|
||||
* OGC services.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcStyle {
|
||||
|
||||
protected String name;
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ogc.common;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
|
@ -21,10 +21,22 @@ package com.raytheon.uf.edex.ogc.common;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Styling interface for retrieving style information for layers
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 29, 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface StyleLookup {
|
||||
|
||||
|
@ -34,6 +46,9 @@ public interface StyleLookup {
|
|||
*/
|
||||
public String lookup(String layername);
|
||||
|
||||
/**
|
||||
* @return all styles
|
||||
*/
|
||||
public List<OgcStyle> getStyles();
|
||||
|
||||
public void setLoader(ClassLoader loader);
|
||||
|
|
|
@ -30,6 +30,22 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* Version object to track versions of OGC services
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class Version implements Comparable<Version>, Serializable {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,234 +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.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.measure.unit.Unit;
|
||||
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 com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.edex.ogc.common.spatial.AltUtil;
|
||||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate;
|
||||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference;
|
||||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalEnabled;
|
||||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalSpatialFactory;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* @author ekladstrup
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class StyleRuleLibrary {
|
||||
|
||||
@XmlElements({ @XmlElement(name = "styleRule", type = StyleRule.class) })
|
||||
private List<StyleRule> rules;
|
||||
|
||||
private Map<String, List<StyleRule>> _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<StyleRule> rules) {
|
||||
this.rules = rules;
|
||||
}
|
||||
|
||||
public List<StyleRule> getRules() {
|
||||
return rules;
|
||||
}
|
||||
|
||||
protected Map<String, List<StyleRule>> getRuleMap() {
|
||||
if (_ruleMap == null && rules != null) {
|
||||
_ruleMap = new HashMap<String, List<StyleRule>>();
|
||||
for (StyleRule rule : rules) {
|
||||
String cmap = rule.getColorMapName();
|
||||
List<StyleRule> list = _ruleMap.get(cmap);
|
||||
if (list == null) {
|
||||
list = new ArrayList<StyleRule>();
|
||||
_ruleMap.put(cmap, list);
|
||||
}
|
||||
list.add(rule);
|
||||
}
|
||||
}
|
||||
return _ruleMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rule
|
||||
* @param record
|
||||
* @return false if there was a range and it was out of bounds, true
|
||||
* otherwise
|
||||
* @throws ParseException
|
||||
*/
|
||||
protected boolean initRule(StyleRule rule, PluginDataObject record)
|
||||
throws ParseException {
|
||||
LevelRange range = rule.getLevelRange();
|
||||
if (range != null) {
|
||||
// only accept if range is ok
|
||||
return initRange(rule, record);
|
||||
}
|
||||
// if there is no range, we accept the rule
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rule
|
||||
* @param record
|
||||
* @return true if range is in bounds
|
||||
* @throws ParseException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected boolean initRange(StyleRule rule, PluginDataObject record)
|
||||
throws ParseException {
|
||||
LevelRange range = rule.getLevelRange();
|
||||
VerticalEnabled<PluginDataObject> enabled;
|
||||
if (record instanceof VerticalEnabled<?>) {
|
||||
enabled = (VerticalEnabled<PluginDataObject>) record;
|
||||
} else if ((enabled = (VerticalEnabled<PluginDataObject>) VerticalSpatialFactory
|
||||
.getEnabled(record.getClass())) != null) {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
VerticalCoordinate vert = enabled.getVerticalCoordinate(record);
|
||||
|
||||
if (vert != null) {
|
||||
Unit<?> styleLevelUnit = Unit.valueOf(range.getUnit());
|
||||
double levelValue = AltUtil.convert(styleLevelUnit,
|
||||
Reference.UNKNOWN, vert).getValue();
|
||||
if (levelValue >= range.getLower()
|
||||
&& levelValue <= range.getUpper()) {
|
||||
setupLevelRange(rule, levelValue);
|
||||
// range is in bounds
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// range is out of bounds
|
||||
return false;
|
||||
}
|
||||
|
||||
public StyleRule getMatchForLayer(PluginDataObject record)
|
||||
throws ParseException {
|
||||
if (record == null) {
|
||||
return null;
|
||||
}
|
||||
String datauri = record.getDataURI();
|
||||
for (StyleRule rule : rules) {
|
||||
String pattern = rule.getLayerRegex();
|
||||
if (datauri.matches(pattern)) {
|
||||
// do not return rule if there is an invalid range
|
||||
if (initRule(rule, record)) {
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public StyleRule getMatchForLayer(String layerName) throws ParseException {
|
||||
if (layerName == null) {
|
||||
return null;
|
||||
}
|
||||
for (StyleRule rule : rules) {
|
||||
String pattern = rule.getLayerRegex();
|
||||
if (layerName.matches(pattern)) {
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public StyleRule getLayerStyleWithNewCmap(PluginDataObject record,
|
||||
String newColormap) throws ParseException {
|
||||
StyleRule rule = getMatchForLayer(record);
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -40,6 +40,26 @@ import com.raytheon.uf.edex.database.dao.DaoConfig;
|
|||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
/**
|
||||
* Collects layer metadata from data records. Designed for use with records that
|
||||
* contain all data for a layer at a specific time and level.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <D>
|
||||
* @param <L>
|
||||
* @param <R>
|
||||
*/
|
||||
public abstract class DefaultLayerCollector<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject>
|
||||
extends LayerCollector<D, L, R> {
|
||||
|
||||
|
|
|
@ -13,20 +13,21 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Default dimension object for point data that has no extra dimension
|
||||
* information.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 24, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class DefaultPointDataDimension extends SimpleDimension {
|
||||
|
||||
|
|
|
@ -23,15 +23,39 @@ import java.util.List;
|
|||
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Interface for retrieving layer information that may be in storage or cached
|
||||
* in memory.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sept 11, 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
* @param <D>
|
||||
* @param <L>
|
||||
*/
|
||||
public interface ILayerCache<D extends SimpleDimension, L extends SimpleLayer<D>> {
|
||||
|
||||
/**
|
||||
* @return all layers
|
||||
* @throws OgcException
|
||||
*/
|
||||
public List<L> getLayers() throws OgcException;
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @return layer with matching name or null if none found
|
||||
* @throws OgcException
|
||||
*/
|
||||
public L getLayer(String name) throws OgcException;
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,26 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException.Code;
|
||||
|
||||
/**
|
||||
* Abstract base for layer collectors. Provides common utility methods for child
|
||||
* classes.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <D>
|
||||
* @param <L>
|
||||
* @param <R>
|
||||
*/
|
||||
public abstract class LayerCollector<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject>
|
||||
implements ILayerCache<D, L> {
|
||||
|
||||
|
|
|
@ -54,15 +54,24 @@ import com.raytheon.uf.edex.ogc.common.StyleLookup;
|
|||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Converts layer objects from storage to intermediate OGC metadata layer
|
||||
* objects.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 13, 2011 bclement Initial creation
|
||||
*
|
||||
**/
|
||||
* Jun 13, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <DIMENSION>
|
||||
* @param <L>
|
||||
*/
|
||||
public class LayerTransformer<DIMENSION extends SimpleDimension, L extends SimpleLayer<DIMENSION>> {
|
||||
|
||||
protected static IUFStatusHandler log = UFStatus
|
||||
|
|
|
@ -36,17 +36,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
import com.raytheon.uf.edex.ogc.common.db.LayerTransformer.TimeFormat;
|
||||
|
||||
/**
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 29, 2011 bclement Initial creation
|
||||
* 10/22/2013 2742 dhladky @Entity made for Db dependency in AWIPS code, changed to @MappedSuperclass
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
* Layer metadata storage for point data types
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 29, 2011 bclement Initial creation
|
||||
* 10/22/2013 2742 dhladky @Entity made for Db dependency in AWIPS code, changed to @MappedSuperclass
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
@MappedSuperclass
|
||||
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
|
|
|
@ -19,20 +19,20 @@ import org.hibernate.criterion.Criterion;
|
|||
import org.hibernate.engine.TypedValue;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Hibernate criterion that allows for direct SQL restrictions
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 20, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SQLParamRestriction implements Criterion {
|
||||
|
||||
|
|
|
@ -28,13 +28,11 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* Simple Dimension
|
||||
* Layer dimension metadata storage object
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
|
@ -51,7 +49,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public abstract class SimpleDimension implements Comparable<SimpleDimension>,
|
||||
Serializable, ISerializableObject {
|
||||
Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4654482181227204619L;
|
||||
|
||||
|
|
|
@ -38,15 +38,24 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Layer metadata storage object
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 29, 2011 bclement Initial creation
|
||||
* 04/22/2013 1746 dhladky Removed DB dependency from WFS code
|
||||
*
|
||||
**/
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <DIMENSION>
|
||||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
|
|
|
@ -47,10 +47,26 @@ import com.raytheon.uf.common.geospatial.MapUtil;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
|
||||
|
||||
/**
|
||||
* Collects layer metadata from data records. Designed for use with plugins that
|
||||
* have a single layer which all records contribute to (like pointdata)
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @param <D>
|
||||
* @param <L>
|
||||
* @param <R>
|
||||
*/
|
||||
public abstract class SingleLayerCollector<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject>
|
||||
extends LayerCollector<D, L, R> {
|
||||
|
|
|
@ -25,13 +25,31 @@ import org.opengis.feature.simple.SimpleFeature;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
||||
|
||||
/**
|
||||
* Interface for creating geotools feature objects from data records
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 16, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface FeatureFactory {
|
||||
|
||||
/**
|
||||
* Create a simple feature from each plugin data object
|
||||
*
|
||||
* @param pdos
|
||||
* @return
|
||||
*/
|
||||
public List<SimpleFeature> convert(PluginDataObject[] pdos);
|
||||
|
||||
}
|
||||
|
|
|
@ -19,22 +19,21 @@ import com.raytheon.uf.edex.ogc.common.Version;
|
|||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Utility methods and constants for GML version parsing and comparison
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 30, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class GmlUtils {
|
||||
|
||||
public static final MimeType GML31_TYPE = new MimeType(
|
||||
|
|
|
@ -36,7 +36,19 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcResponse.TYPE;
|
||||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
|
||||
|
||||
/**
|
||||
* Converts simple features to GeoJSON
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 9, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -27,11 +27,11 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
|
||||
import net.opengis.gml.v_3_1_1.DirectPositionType;
|
||||
import net.opengis.gml.v_3_1_1.PointType;
|
||||
|
||||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
|
||||
|
||||
/**
|
||||
* ObsLocation OGC representation.
|
||||
|
|
|
@ -54,9 +54,20 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse.TYPE;
|
|||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
|
||||
/**
|
||||
*
|
||||
* Convert simple features to shape files
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 28, 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ShpFeatureFormatter implements SimpleFeatureFormatter {
|
||||
|
||||
|
|
|
@ -28,19 +28,51 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
|||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
|
||||
/**
|
||||
* Interface for converting simple features to different output formats
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 8, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface SimpleFeatureFormatter {
|
||||
|
||||
/**
|
||||
* Format features and return in response wrapper
|
||||
*
|
||||
* @param features
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public OgcResponse format(List<List<SimpleFeature>> features)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Format features and output to stream
|
||||
*
|
||||
* @param features
|
||||
* @param out
|
||||
* @throws Exception
|
||||
*/
|
||||
public void format(List<List<SimpleFeature>> features, OutputStream out)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* @return mime type supported by this formatter
|
||||
*/
|
||||
public MimeType getMimeType();
|
||||
|
||||
/**
|
||||
* @param format
|
||||
* @return true if this formatter is suitable for format
|
||||
*/
|
||||
public boolean matchesFormat(MimeType format);
|
||||
}
|
||||
|
|
|
@ -12,20 +12,20 @@ package com.raytheon.uf.edex.ogc.common.filter;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Abstract base for in memory filtering of data records
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 14, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -18,20 +18,20 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
|||
import com.raytheon.uf.edex.ogc.common.util.ConvertService;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* In memory data record filtering by standard comparison operators
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 14, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ComparisonFilter extends AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -14,20 +14,21 @@ import java.util.Arrays;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* In memory data record filtering that combines other filters using logical
|
||||
* operators
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 14, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LogicFilter extends AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -27,20 +27,20 @@ import com.vividsolutions.jts.geom.LinearRing;
|
|||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
/**
|
||||
* Spatial PDO Filter
|
||||
* In memory data record filtering using spatial fields
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 14, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SpatialFilter extends AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -16,20 +16,20 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
import com.raytheon.uf.common.time.TimeRange;
|
||||
|
||||
/**
|
||||
* Temporal PDO Filter
|
||||
* In memory data record filtering using time fields
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 14, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class TemporalFilter extends AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -23,20 +23,20 @@ import com.raytheon.uf.edex.ogc.common.spatial.VerticalEnabled;
|
|||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalSpatialFactory;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* In memory data record filtering using vertical fields
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 23, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class VerticalFilter extends AbstractPdoFilter {
|
||||
|
||||
|
|
|
@ -39,6 +39,16 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
/**
|
||||
* Convert GML 3.1.1 envelopes to JTS envelopes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 26, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,17 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
import com.vividsolutions.jts.io.ParseException;
|
||||
|
||||
/**
|
||||
* Converts GML 3.1.1 objects to JTS
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 25, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -50,6 +50,17 @@ import net.opengis.gml.v_3_1_1.PolygonType;
|
|||
import net.opengis.gml.v_3_1_1.RingType;
|
||||
|
||||
/**
|
||||
* Converts GML 3.1.1 objects to Well Known Text
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 25, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -39,6 +39,16 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
/**
|
||||
* Converter for GML 3.2.1 envelopes to JTS envelopes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 26, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
|
@ -74,6 +74,16 @@ import com.vividsolutions.jts.io.ParseException;
|
|||
/**
|
||||
* Converts between GML 3.2.1 and JTS geometries
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 25, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Endpoint information client used when connecting to service
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 26, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class EndpointInfo {
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Interface for pooling OGC http handlers.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 31, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IOgcHttpPooler {
|
||||
|
|
|
@ -18,19 +18,20 @@ import java.util.regex.Pattern;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* Data object representing a MIME type used in service requests
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 29, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class MimeType {
|
||||
|
|
|
@ -43,9 +43,22 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse.TYPE;
|
|||
import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Abstract base for HTTP handlers. Provides common utility methods.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class OgcHttpHandler {
|
||||
|
||||
|
|
|
@ -28,9 +28,22 @@ import org.apache.commons.pool.impl.GenericKeyedObjectPool;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Pooling for OGC http handlers
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcHttpPool extends GenericKeyedObjectPool implements
|
||||
IOgcHttpPooler {
|
||||
|
|
|
@ -25,6 +25,22 @@ import java.util.Map;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* OGC HTTP request wrapper
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcHttpRequest {
|
||||
|
||||
protected HttpServletRequest request;
|
||||
|
|
|
@ -10,20 +10,21 @@
|
|||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* HTTP pooling for handlers that are thread safe and don't require a separate
|
||||
* instance per request.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 31, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class SingleHttpPool implements IOgcHttpPooler {
|
||||
|
|
|
@ -62,6 +62,16 @@ import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
|
|||
/**
|
||||
* Cache and utility class for OGC JAXB
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
|
@ -27,20 +27,21 @@ import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
|
|||
import com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* JAXB utility to allow for Transient annotation to be added to fields and
|
||||
* methods of classes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 11, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
@ -18,20 +18,20 @@ import com.raytheon.uf.edex.ogc.common.OgcException;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException.Code;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Utility methods for parsing and formatting level names for OGC metadata
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 18, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LevelDimUtil {
|
||||
|
||||
|
|
|
@ -13,20 +13,20 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Interface for OGC HTTP output
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface IOgcHttpResponse {
|
||||
|
||||
|
|
|
@ -37,9 +37,20 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcResponse.ErrorType;
|
||||
|
||||
/**
|
||||
*
|
||||
* Utility methods for sending OGC HTTP response output
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 28, 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcResponseOutput {
|
||||
|
||||
|
|
|
@ -15,19 +15,20 @@ import java.io.OutputStream;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* OGC HTTP response adapter for standard servlet response object
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ServletOgcResponse implements IOgcHttpResponse {
|
||||
|
||||
|
|
|
@ -16,20 +16,20 @@ import java.io.OutputStream;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* OGC HTTP response adapter for capturing OGC HTTP responses as byte arrays
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class StoredHttpResponse implements IOgcHttpResponse {
|
||||
|
||||
|
|
|
@ -21,20 +21,20 @@ import net.opengis.ows.v_1_1_0.ExceptionType;
|
|||
import com.raytheon.uf.edex.ogc.common.http.EndpointInfo;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Abstract base class for OGC web services. Provides common utility methods.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 31, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractOwsService {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
/**
|
||||
* WSDL reader
|
||||
* Provides custom WSDL for CXF endpoints
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
|
|
@ -16,20 +16,20 @@ import javax.measure.unit.Unit;
|
|||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Altitude utility methods and constants
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 4, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AltUtil {
|
||||
|
||||
|
|
|
@ -13,20 +13,21 @@ import org.geotools.geometry.jts.ReferencedEnvelope;
|
|||
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* 3D bounding box composed of 2D referenced envelope for horizontal bounds and
|
||||
* vertical coordinate for vertical bounds
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Composite3DBoundingBox {
|
||||
|
||||
|
|
|
@ -18,20 +18,20 @@ import java.util.regex.Pattern;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Utility methods for parsing coordinates from GML strings
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class CoordinateUtil {
|
||||
|
||||
|
|
|
@ -46,10 +46,21 @@ import com.raytheon.uf.edex.ogc.common.OgcException;
|
|||
import com.raytheon.uf.edex.ogc.common.spatial.VerticalCoordinate.Reference;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* Coordinate Reference System utility methods and constants. Used to parse CRS
|
||||
* codes and URNs to geotools objects and format geotools objects for output.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 17, 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class CrsLookup {
|
||||
|
||||
|
|
|
@ -14,20 +14,21 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Interface for retrieving geotools coordinate reference system objects using
|
||||
* native CRS URNs
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 6, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface NativeCrsAuthority {
|
||||
|
||||
|
|
|
@ -24,20 +24,22 @@ import com.raytheon.uf.edex.core.EDEXUtil;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Factory for retrieving geotools coordinate reference system objects from
|
||||
* native CRS URNs. Uses NativeCrsAuthority beans registered in spring to create
|
||||
* new CRS objects. Uses an internal LRU cache.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 6, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class NativeCrsFactory {
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
/**
|
||||
* Removing code only used by ogc services from {@link PluginDao} to here
|
||||
* Utility methods for reprojecting data records. Removing code only used by ogc
|
||||
* services from {@link PluginDao} to here
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
|
|
@ -20,20 +20,20 @@ import javax.measure.unit.Unit;
|
|||
import javax.measure.unit.UnitFormat;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Vertical level information which can be a point or range.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 23, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class VerticalCoordinate implements Comparable<VerticalCoordinate> {
|
||||
|
||||
|
|
|
@ -20,20 +20,21 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Factory for retrieving vertical coordinate objects from vertically enabled
|
||||
* classes. Uses VerticalEnabled beans registered in spring.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 29, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class VerticalSpatialFactory {
|
||||
|
||||
|
|
|
@ -9,6 +9,22 @@
|
|||
*/
|
||||
package com.raytheon.uf.edex.ogc.common.stats;
|
||||
|
||||
/**
|
||||
* Type of operation for which statistics are being measured
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2013 behemmi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
* @version 1.0
|
||||
*/
|
||||
public enum OperationType {
|
||||
STORE, QUERY, DELETE,
|
||||
// special case for encompassing all values
|
||||
|
|
|
@ -13,8 +13,18 @@ package com.raytheon.uf.edex.ogc.common.stats;
|
|||
* Enumeration representing the types of operations that statistics are recorded
|
||||
* for within the IGCServiceRecorder
|
||||
*
|
||||
* @author behemmi
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2013 behemmi Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
* @version 1.0
|
||||
*/
|
||||
public enum ServiceType {
|
||||
WFS, WCS, OGC, REGISTRY,
|
||||
|
|
|
@ -42,6 +42,18 @@ import com.raytheon.uf.edex.ogc.common.db.SimpleDimension;
|
|||
import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
|
||||
|
||||
/**
|
||||
* Utility methods and constants for forecast times. Used to find valid reftime,
|
||||
* forecast time and valid time combinations from OGC layer metadata.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 3, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -12,20 +12,20 @@ package com.raytheon.uf.edex.ogc.common.util;
|
|||
import java.lang.reflect.Field;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Generic object converter interface for OGC
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 16, 2013 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface Converter {
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ Export-Package: com.raytheon.uf.edex.wfs,
|
|||
com.raytheon.uf.edex.wfs.filter,
|
||||
com.raytheon.uf.edex.wfs.filter.v1_1_0,
|
||||
com.raytheon.uf.edex.wfs.filter.v2_0_0,
|
||||
com.raytheon.uf.edex.wfs.gml,
|
||||
com.raytheon.uf.edex.wfs.provider,
|
||||
com.raytheon.uf.edex.wfs.querystore,
|
||||
com.raytheon.uf.edex.wfs.reg,
|
||||
|
|
|
@ -34,6 +34,22 @@ import java.util.Map;
|
|||
import com.raytheon.uf.edex.ogc.common.http.EndpointInfo;
|
||||
import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
||||
|
||||
/**
|
||||
* Interface for WFS version specific implementations
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* November 2012 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface IWfsProvider {
|
||||
|
||||
public enum WfsOpType {
|
||||
|
|
|
@ -21,6 +21,22 @@ package com.raytheon.uf.edex.wfs;
|
|||
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
/**
|
||||
* Exception which includes WFS error codes
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 22, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class WfsException extends Exception {
|
||||
|
||||
public enum Code {
|
||||
|
|
|
@ -26,8 +26,21 @@ import com.raytheon.uf.edex.ogc.common.OgcGeoBoundingBox;
|
|||
import com.raytheon.uf.edex.wfs.request.QualifiedName;
|
||||
|
||||
/**
|
||||
* @author bclement
|
||||
* Feature type metadata object used for capabilities document. Independent from
|
||||
* JAXB object to support multiple WFS versions.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class WfsFeatureType {
|
||||
|
||||
|
|
|
@ -25,7 +25,17 @@ import com.raytheon.uf.edex.wfs.reg.WfsRegistryImpl;
|
|||
import com.raytheon.uf.edex.wfs.v1_1_0.Wfs1_1_0Provider;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Http handler factory for WFS
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 19, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -51,6 +51,23 @@ import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
|||
import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
||||
import com.raytheon.uf.edex.ogc.common.output.ServletOgcResponse;
|
||||
|
||||
/**
|
||||
* WFS http handler. Delegates WFS HTTP requests to providers using version
|
||||
* negotiation.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class WfsHttpHandler extends OgcHttpHandler {
|
||||
|
||||
protected final TreeMap<Version, IWfsProvider> providers;
|
||||
|
|
|
@ -32,6 +32,17 @@ import com.raytheon.uf.common.json.JsonException;
|
|||
import com.raytheon.uf.common.json.JsonService;
|
||||
|
||||
/**
|
||||
* Converts jaxb objects to geotools feature objects
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -22,6 +22,17 @@ package com.raytheon.uf.edex.wfs.feature;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcNamespace;
|
||||
|
||||
/**
|
||||
* Configuration for adapting java objects to geotools features
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -35,6 +35,17 @@ import org.opengis.referencing.NoSuchAuthorityCodeException;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
|
||||
/**
|
||||
* Interface for retrieving geotools feature types
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -37,6 +37,17 @@ import com.raytheon.uf.edex.ogc.common.OgcException;
|
|||
import com.raytheon.uf.edex.ogc.common.spatial.CrsLookup;
|
||||
|
||||
/**
|
||||
* Creates goetools simple feature types and caches results internally.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2011 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
|
|
|
@ -1,123 +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.wfs.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
|
||||
import net.opengis.filter.v_1_1_0.BinaryOperatorType;
|
||||
import net.opengis.filter.v_1_1_0.FunctionType;
|
||||
import net.opengis.filter.v_1_1_0.LiteralType;
|
||||
import net.opengis.filter.v_1_1_0.PropertyNameType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbsExpressionOp {
|
||||
|
||||
public abstract Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception;
|
||||
|
||||
public static class Literal extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
LiteralType literal = (LiteralType) element.getValue();
|
||||
return visitor.literal(literal.getContent(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Add extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
BinaryOperatorType binary = (BinaryOperatorType) element.getValue();
|
||||
List<JAXBElement<?>> exprs = binary.getExpression();
|
||||
ExpressionProcessor left = new ExpressionProcessor(exprs.get(0));
|
||||
ExpressionProcessor right = new ExpressionProcessor(exprs.get(1));
|
||||
return visitor.add(left, right, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Sub extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
BinaryOperatorType binary = (BinaryOperatorType) element.getValue();
|
||||
List<JAXBElement<?>> exprs = binary.getExpression();
|
||||
ExpressionProcessor left = new ExpressionProcessor(exprs.get(0));
|
||||
ExpressionProcessor right = new ExpressionProcessor(exprs.get(1));
|
||||
return visitor.sub(left, right, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Mul extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
BinaryOperatorType binary = (BinaryOperatorType) element.getValue();
|
||||
List<JAXBElement<?>> exprs = binary.getExpression();
|
||||
ExpressionProcessor left = new ExpressionProcessor(exprs.get(0));
|
||||
ExpressionProcessor right = new ExpressionProcessor(exprs.get(1));
|
||||
return visitor.mul(left, right, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Div extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
BinaryOperatorType binary = (BinaryOperatorType) element.getValue();
|
||||
List<JAXBElement<?>> exprs = binary.getExpression();
|
||||
ExpressionProcessor left = new ExpressionProcessor(exprs.get(0));
|
||||
ExpressionProcessor right = new ExpressionProcessor(exprs.get(1));
|
||||
return visitor.div(left, right, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Property extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
PropertyNameType prop = (PropertyNameType) element.getValue();
|
||||
return visitor.property(prop, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Function extends AbsExpressionOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<?> element,
|
||||
OgcExpressionVisitor visitor, Object obj) throws Exception {
|
||||
FunctionType f = (FunctionType) element.getValue();
|
||||
String name = f.getName();
|
||||
List<JAXBElement<?>> exprs = f.getExpression();
|
||||
List<ExpressionProcessor> procs = new ArrayList<ExpressionProcessor>(
|
||||
exprs.size());
|
||||
for (JAXBElement<?> expr : exprs) {
|
||||
procs.add(new ExpressionProcessor(expr));
|
||||
}
|
||||
return visitor.function(procs, name, obj);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,190 +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.wfs.filter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
|
||||
import net.opengis.filter.v_1_1_0.BinaryComparisonOpType;
|
||||
import net.opengis.filter.v_1_1_0.ComparisonOpsType;
|
||||
import net.opengis.filter.v_1_1_0.PropertyIsBetweenType;
|
||||
import net.opengis.filter.v_1_1_0.PropertyIsLikeType;
|
||||
import net.opengis.filter.v_1_1_0.PropertyIsNullType;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractCompOp {
|
||||
|
||||
protected static final Map<String, AbstractCompOp> binaryMap;
|
||||
|
||||
protected IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
||||
static {
|
||||
binaryMap = new HashMap<String, AbstractCompOp>();
|
||||
binaryMap.put("PropertyIsEqualTo", new Equal());
|
||||
binaryMap.put("PropertyIsNotEqualTo", new NotEqual());
|
||||
binaryMap.put("PropertyIsLessThan", new LessThan());
|
||||
binaryMap.put("PropertyIsGreaterThan", new GreaterThan());
|
||||
binaryMap.put("PropertyIsLessThanOrEqualTo", new LessThanEqual());
|
||||
binaryMap.put("PropertyIsGreaterThanOrEqualTo", new GreaterThanEqual());
|
||||
}
|
||||
|
||||
public abstract Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception;
|
||||
|
||||
public static class Like extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
return visitor.isLike((PropertyIsLikeType) op.getValue(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Null extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
return visitor.isNull((PropertyIsNullType) op.getValue(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Between extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
PropertyIsBetweenType between = (PropertyIsBetweenType) op
|
||||
.getValue();
|
||||
ExpressionProcessor exp = new ExpressionProcessor(
|
||||
between.getExpression());
|
||||
ExpressionProcessor lower = new ExpressionProcessor(between
|
||||
.getLowerBoundary().getExpression());
|
||||
ExpressionProcessor upper = new ExpressionProcessor(between
|
||||
.getUpperBoundary().getExpression());
|
||||
return visitor.between(lower, exp, upper, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class BinaryOp extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
String name = op.getName().getLocalPart();
|
||||
AbstractCompOp compOp = binaryMap.get(name);
|
||||
if (compOp != null) {
|
||||
return compOp.visit(op, visitor, obj);
|
||||
} else {
|
||||
throw new Exception("Unknown binary operator: " + name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class Equal extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.equal(new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class NotEqual extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.notEqual(
|
||||
new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LessThan extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.lessThan(
|
||||
new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GreaterThan extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.greaterThan(
|
||||
new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LessThanEqual extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.lessThanEqual(
|
||||
new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GreaterThanEqual extends AbstractCompOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends ComparisonOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryComparisonOpType binary = (BinaryComparisonOpType) op
|
||||
.getValue();
|
||||
List<JAXBElement<?>> expressions = binary.getExpression();
|
||||
return visitor.greaterThanEqual(
|
||||
new ExpressionProcessor(expressions.get(0)),
|
||||
new ExpressionProcessor(expressions.get(1)),
|
||||
binary.isMatchCase(), obj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,134 +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.wfs.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
|
||||
import net.opengis.filter.v_1_1_0.BinaryLogicOpType;
|
||||
import net.opengis.filter.v_1_1_0.ComparisonOpsType;
|
||||
import net.opengis.filter.v_1_1_0.FilterType;
|
||||
import net.opengis.filter.v_1_1_0.LogicOpsType;
|
||||
import net.opengis.filter.v_1_1_0.SpatialOpsType;
|
||||
import net.opengis.filter.v_1_1_0.UnaryLogicOpType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractLogicOp {
|
||||
|
||||
public abstract Object visit(JAXBElement<? extends LogicOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception;
|
||||
|
||||
protected Map<Class<?>, List<JAXBElement<?>>> sortByType(
|
||||
List<JAXBElement<?>> elements) {
|
||||
Map<Class<?>, List<JAXBElement<?>>> rval = new HashMap<Class<?>, List<JAXBElement<?>>>();
|
||||
for (JAXBElement<?> e : elements) {
|
||||
List<JAXBElement<?>> list = rval.get(e.getDeclaredType());
|
||||
if (list == null) {
|
||||
list = new ArrayList<JAXBElement<?>>();
|
||||
rval.put(e.getDeclaredType(), list);
|
||||
}
|
||||
list.add(e);
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected List<FilterProcessor> getProcessors(List<JAXBElement<?>> elements)
|
||||
throws Exception {
|
||||
List<FilterProcessor> rval = new ArrayList<FilterProcessor>(
|
||||
elements.size());
|
||||
for (JAXBElement<?> e : elements) {
|
||||
Class<?> type = e.getDeclaredType();
|
||||
FilterProcessor p;
|
||||
// FIXME this is slow
|
||||
if (ComparisonOpsType.class.isAssignableFrom(type)) {
|
||||
p = FilterProcessor
|
||||
.newFromComparison((JAXBElement<? extends ComparisonOpsType>) e);
|
||||
} else if (LogicOpsType.class.isAssignableFrom(type)) {
|
||||
p = FilterProcessor
|
||||
.newFromLogic((JAXBElement<? extends LogicOpsType>) e);
|
||||
} else if (SpatialOpsType.class.isAssignableFrom(type)) {
|
||||
p = FilterProcessor
|
||||
.newFromSpatial((JAXBElement<? extends SpatialOpsType>) e);
|
||||
} else {
|
||||
throw new Exception("Unknown operator: " + type);
|
||||
}
|
||||
rval.add(p);
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
protected FilterType createFilter(
|
||||
JAXBElement<? extends ComparisonOpsType> comps,
|
||||
JAXBElement<? extends SpatialOpsType> spats,
|
||||
JAXBElement<? extends LogicOpsType> logic) {
|
||||
FilterType rval = new FilterType();
|
||||
rval.setComparisonOps(comps);
|
||||
rval.setLogicOps(logic);
|
||||
rval.setSpatialOps(spats);
|
||||
return rval;
|
||||
}
|
||||
|
||||
public static class And extends AbstractLogicOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends LogicOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryLogicOpType and = (BinaryLogicOpType) op.getValue();
|
||||
List<JAXBElement<?>> gah = and
|
||||
.getComparisonOpsOrSpatialOpsOrLogicOps();
|
||||
List<FilterProcessor> processors = getProcessors(gah);
|
||||
return visitor.and(processors, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Or extends AbstractLogicOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends LogicOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinaryLogicOpType or = (BinaryLogicOpType) op.getValue();
|
||||
List<JAXBElement<?>> gah = or
|
||||
.getComparisonOpsOrSpatialOpsOrLogicOps();
|
||||
List<FilterProcessor> processors = getProcessors(gah);
|
||||
return visitor.or(processors, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Not extends AbstractLogicOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends LogicOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
UnaryLogicOpType not = (UnaryLogicOpType) op.getValue();
|
||||
JAXBElement<? extends ComparisonOpsType> comps = not
|
||||
.getComparisonOps();
|
||||
JAXBElement<? extends SpatialOpsType> spats = not.getSpatialOps();
|
||||
JAXBElement<? extends LogicOpsType> logics = not.getLogicOps();
|
||||
FilterType filter = createFilter(comps, spats, logics);
|
||||
return visitor.not(new FilterProcessor(filter), obj);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,137 +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.wfs.filter;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
|
||||
import net.opengis.filter.v_1_1_0.BBOXType;
|
||||
import net.opengis.filter.v_1_1_0.BinarySpatialOpType;
|
||||
import net.opengis.filter.v_1_1_0.DistanceBufferType;
|
||||
import net.opengis.filter.v_1_1_0.SpatialOpsType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractSpatialOp {
|
||||
|
||||
public abstract Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception;
|
||||
|
||||
public static class SpatialEquals extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.spatialEquals(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Disjoint extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.disjoint(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Touches extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.touches(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Within extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.within(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Overlaps extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.overlaps(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Crosses extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.crosses(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Intersects extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.intersects(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Contains extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BinarySpatialOpType binary = (BinarySpatialOpType) op.getValue();
|
||||
return visitor.contains(binary, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DWithin extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
DistanceBufferType dist = (DistanceBufferType) op.getValue();
|
||||
return visitor.dWithin(dist, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Beyond extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
DistanceBufferType dist = (DistanceBufferType) op.getValue();
|
||||
return visitor.beyond(dist, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Bbox extends AbstractSpatialOp {
|
||||
@Override
|
||||
public Object visit(JAXBElement<? extends SpatialOpsType> op,
|
||||
OgcFilterVisitor visitor, Object obj) throws Exception {
|
||||
BBOXType bbox = (BBOXType) op.getValue();
|
||||
return visitor.bbox(bbox, obj);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,20 +13,20 @@ import org.hibernate.criterion.LikeExpression;
|
|||
import org.hibernate.criterion.MatchMode;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Hibernate like expression that allows for a custom escape character
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 17, 2012 bclement Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class EscapingLikeExpression extends LikeExpression {
|
||||
|
|
|
@ -1,63 +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.wfs.filter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ExpressionProcessor {
|
||||
|
||||
protected static final Map<String, AbsExpressionOp> expressionMap;
|
||||
static {
|
||||
expressionMap = new HashMap<String, AbsExpressionOp>();
|
||||
expressionMap.put("Literal", new AbsExpressionOp.Literal());
|
||||
expressionMap.put("Add", new AbsExpressionOp.Add());
|
||||
expressionMap.put("Sub", new AbsExpressionOp.Sub());
|
||||
expressionMap.put("Mul", new AbsExpressionOp.Mul());
|
||||
expressionMap.put("Div", new AbsExpressionOp.Div());
|
||||
expressionMap.put("Function", new AbsExpressionOp.Function());
|
||||
expressionMap.put("PropertyName", new AbsExpressionOp.Property());
|
||||
}
|
||||
|
||||
JAXBElement<?> expression;
|
||||
|
||||
/**
|
||||
* @param expression
|
||||
*/
|
||||
public ExpressionProcessor(JAXBElement<?> expression) {
|
||||
super();
|
||||
this.expression = expression;
|
||||
}
|
||||
|
||||
public Object accept(OgcExpressionVisitor visitor, Object obj)
|
||||
throws Exception {
|
||||
AbsExpressionOp op = expressionMap.get(expression.getName()
|
||||
.getLocalPart());
|
||||
return op.visit(expression, visitor, obj);
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue