Issue #1796 Resurrected DPA code from old 5-DataDelviery repo, merged with current development!
Change-Id: I71b56de45f61bef15c03ee4fc3f45790c59b527d Former-commit-id: a52596494feb2255269513a3cd19490628d4ae10
This commit is contained in:
parent
b7a5311dde
commit
ddb23ae59f
65 changed files with 2965 additions and 664 deletions
|
@ -13,6 +13,5 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
org.apache.log4j;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.event
|
||||
Eclipse-BuddyPolicy: ext, registered, global
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.event
|
||||
|
|
|
@ -312,28 +312,38 @@
|
|||
<exclude>.*datadelivery-registry.*</exclude>
|
||||
<includeMode>datadeliverytemplate</includeMode>
|
||||
</mode>
|
||||
<mode name="dataprovideragent">
|
||||
<mode name="dataProviderAgentTemplate" template="true">
|
||||
<include>manualIngest*</include>
|
||||
<include>time-common.xml</include>
|
||||
<include>distribution-spring.xml</include>
|
||||
<include>persist-ingest.xml</include>
|
||||
<include>auth-common.xml</include>
|
||||
<!-- grid specific services -->
|
||||
<include>database-common.xml</include>
|
||||
<!-- Remote connect to registry services -->
|
||||
<include>datadelivery-standalone.xml</include>
|
||||
<include>datadelivery-handlers.xml</include>
|
||||
<include>datadelivery-handlers-impl.xml</include>
|
||||
<include>request-router.xml</include>
|
||||
<include>utility-request.xml</include>
|
||||
<include>dpa-datadelivery.xml</include>
|
||||
<!-- OGC/DPA services -->
|
||||
<include>ogc-common.xml</include>
|
||||
<include>.*-ogc-request.xml</include>
|
||||
</mode>
|
||||
<!-- This is a sample reference implmentation -->
|
||||
<mode name="dataprovideragent">
|
||||
<includeMode>dataProviderAgentTemplate</includeMode>
|
||||
<!-- pointdata/obs specific services -->
|
||||
<include>obs-common.xml</include>
|
||||
<include>pointdata-common.xml</include>
|
||||
<include>obs-dpa-ingest.xml</include>
|
||||
<include>obs-ogc.xml</include>
|
||||
<!-- grid specific services
|
||||
<include>grib-common.xml</include>
|
||||
<include>grid-staticdata-process.xml</include>
|
||||
<include>gridcoverage-.*.xml</include>
|
||||
<include>grib-distribution.xml</include>
|
||||
<include>grib-datadelivery.xml</include>
|
||||
<include>level-common.xml</include>
|
||||
<!-- pointdata/obs specific services -->
|
||||
<include>pointdata-common.xml</include>
|
||||
<include>obs-common.xml</include>
|
||||
<include>obs-datadelivery.xml</include>
|
||||
<!-- dpa services -->
|
||||
<include>.*dpa.*</include>
|
||||
<!-- OGC services -->
|
||||
<include>.*ogc.*</include>
|
||||
<!-- excluded services -->
|
||||
<exclude>fssobs-common</exclude>
|
||||
<include>parameter-common.xml</include> -->
|
||||
</mode>
|
||||
</edexModes>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<property name="record" value="com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord" />
|
||||
</bean>
|
||||
|
||||
<bean factory-bean="pluginRegistry" factory-method="register">
|
||||
<bean id="registerObsPlugin" factory-bean="pluginRegistry" factory-method="register">
|
||||
<constructor-arg ref="obsPluginName"/>
|
||||
<constructor-arg ref="obsProperties"/>
|
||||
</bean>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.common.datadelivery.harvester</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,8 @@
|
|||
#Tue Mar 05 08:33:26 CST 2013
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Harvester
|
||||
Bundle-SymbolicName: com.raytheon.uf.common.datadelivery.harvester
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Export-Package: com.raytheon.uf.common.datadelivery.harvester;uses:="com.raytheon.uf.common.serialization,com.raytheon.uf.common.datadelivery.registry"
|
||||
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.time;bundle-version="1.12.1174"
|
|
@ -0,0 +1,6 @@
|
|||
com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig
|
||||
com.raytheon.uf.common.datadelivery.harvester.CrawlAgent
|
||||
com.raytheon.uf.common.datadelivery.harvester.Agent
|
||||
com.raytheon.uf.common.datadelivery.harvester.OGCAgent
|
||||
com.raytheon.uf.common.datadelivery.harvester.ConfigLayer
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
|
@ -0,0 +1,7 @@
|
|||
<project basedir="." default="deploy" name="com.raytheon.uf.common.datadelivery.harvester">
|
||||
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
|
||||
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex"/>
|
||||
|
||||
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
|
||||
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.raytheon.uf.edex.datadelivery.harvester.config;
|
||||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
|
@ -22,10 +22,12 @@ package com.raytheon.uf.edex.datadelivery.harvester.config;
|
|||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* DD Agent data provider
|
||||
|
@ -48,4 +50,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
@XmlSeeAlso({ CrawlAgent.class, OGCAgent.class })
|
||||
public abstract class Agent implements ISerializableObject {
|
||||
|
||||
@XmlElement(name = "dateFormat", required = true)
|
||||
@DynamicSerializeElement
|
||||
private String dateFormat = "HHddMMMyyyy";
|
||||
|
||||
public String getDateFormat() {
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
public void setDateFormat(String dateFormat) {
|
||||
this.dateFormat = dateFormat;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElements;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* Configuration for an individual layer running a LayerCollector instance
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/21/2012 754 dhladky initial
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlRootElement(name = "layer")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class ConfigLayer implements ISerializableObject {
|
||||
|
||||
@XmlAttribute(name = "name", required = true)
|
||||
private String name;
|
||||
|
||||
@XmlElement(name = "minx", required = true)
|
||||
private Double minx;
|
||||
|
||||
@XmlElement(name = "maxx", required = true)
|
||||
private Double maxx;
|
||||
|
||||
@XmlElement(name = "miny", required = true)
|
||||
private Double miny;
|
||||
|
||||
@XmlElement(name = "maxy", required = true)
|
||||
private Double maxy;
|
||||
|
||||
@XmlElements({ @XmlElement(name = "parameter", type = Parameter.class, required = true) })
|
||||
private List<Parameter> parameters;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Double getMinx() {
|
||||
return minx;
|
||||
}
|
||||
|
||||
public void setMinx(Double minx) {
|
||||
this.minx = minx;
|
||||
}
|
||||
|
||||
public Double getMaxx() {
|
||||
return maxx;
|
||||
}
|
||||
|
||||
public void setMaxx(Double maxx) {
|
||||
this.maxx = maxx;
|
||||
}
|
||||
|
||||
public Double getMiny() {
|
||||
return miny;
|
||||
}
|
||||
|
||||
public void setMiny(Double miny) {
|
||||
this.miny = miny;
|
||||
}
|
||||
|
||||
public Double getMaxy() {
|
||||
return maxy;
|
||||
}
|
||||
|
||||
public void setMaxy(Double maxy) {
|
||||
this.maxy = maxy;
|
||||
}
|
||||
|
||||
public void setParameters(List<Parameter> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
public List<Parameter> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public Parameter getParameter(String name) {
|
||||
Parameter parm = null;
|
||||
for (Parameter lparm : getParameters()) {
|
||||
if (lparm.getName().equals(name)) {
|
||||
parm = lparm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return parm;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.raytheon.uf.edex.datadelivery.harvester.config;
|
||||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
|
@ -59,10 +59,6 @@ public class CrawlAgent extends Agent implements ISerializableObject {
|
|||
@DynamicSerializeElement
|
||||
private String crawlDir = "/awips2/crawl";
|
||||
|
||||
@XmlElement(name = "dateFormat")
|
||||
@DynamicSerializeElement
|
||||
private String dateFormat = "HHddMMMyyyy";
|
||||
|
||||
@XmlElement(name = "ignore")
|
||||
@DynamicSerializeElement
|
||||
private List<String> ignore;
|
||||
|
@ -136,10 +132,6 @@ public class CrawlAgent extends Agent implements ISerializableObject {
|
|||
return crawlDir;
|
||||
}
|
||||
|
||||
public String getDateFormat() {
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
public List<String> getIgnore() {
|
||||
return ignore;
|
||||
}
|
||||
|
@ -212,10 +204,6 @@ public class CrawlAgent extends Agent implements ISerializableObject {
|
|||
this.crawlDir = crawlDir;
|
||||
}
|
||||
|
||||
public void setDateFormat(String dateFormat) {
|
||||
this.dateFormat = dateFormat;
|
||||
}
|
||||
|
||||
public void setIgnore(List<String> ignore) {
|
||||
this.ignore = ignore;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.raytheon.uf.edex.datadelivery.harvester.config;
|
||||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
|
@ -0,0 +1,96 @@
|
|||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
public class HarvesterConfigurationManager {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(HarvesterConfigurationManager.class);
|
||||
|
||||
/**
|
||||
* Gets site and base level configs for harvesters
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static List<LocalizationFile> getLocalizedFiles() {
|
||||
// first get the Localization directory and find all harvester
|
||||
// configs
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationFile[] files = pm.listStaticFiles("datadelivery/harvester", new String[] { "xml" }, false, true);
|
||||
|
||||
return Arrays.asList(files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the crawler configuration
|
||||
* @return
|
||||
*/
|
||||
public static HarvesterConfig getCrawlerConfiguration() {
|
||||
|
||||
HarvesterConfig config = null;
|
||||
|
||||
for (LocalizationFile lf : getLocalizedFiles()) {
|
||||
|
||||
try {
|
||||
config = SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(HarvesterConfig.class,
|
||||
lf.getFile());
|
||||
} catch (SerializationException e) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't de-serialize this harvester config", e);
|
||||
}
|
||||
|
||||
if (config != null) {
|
||||
Agent agent = config.getAgent();
|
||||
|
||||
if (agent instanceof CrawlAgent) {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the OGC configuration
|
||||
* @return
|
||||
*/
|
||||
public static HarvesterConfig getOGCConfiguration() {
|
||||
|
||||
HarvesterConfig config = null;
|
||||
|
||||
for (LocalizationFile lf : getLocalizedFiles()) {
|
||||
|
||||
try {
|
||||
config = SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(HarvesterConfig.class,
|
||||
lf.getFile());
|
||||
} catch (SerializationException e) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't de-serialize this harvester config", e);
|
||||
}
|
||||
|
||||
if (config != null) {
|
||||
Agent agent = config.getAgent();
|
||||
|
||||
if (agent instanceof OGCAgent) {
|
||||
return config;
|
||||
} else {
|
||||
config = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.raytheon.uf.edex.datadelivery.harvester.config;
|
||||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
|
@ -20,10 +20,18 @@ package com.raytheon.uf.edex.datadelivery.harvester.config;
|
|||
* further licensing information.
|
||||
**/
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import java.util.List;
|
||||
|
||||
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.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
|
||||
/**
|
||||
* DD OGC Agent
|
||||
*
|
||||
|
@ -40,29 +48,35 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class OGCAgent extends Agent {
|
||||
|
||||
/**
|
||||
* name path used for WFS
|
||||
*/
|
||||
@XmlElement(name = "wfs")
|
||||
@XmlElement(name = "wfs", required = false)
|
||||
@DynamicSerializeElement
|
||||
private String wfs = "wfs";
|
||||
|
||||
/**
|
||||
* name path used for WMS
|
||||
*/
|
||||
@XmlElement(name = "wms")
|
||||
@XmlElement(name = "wms", required = false)
|
||||
@DynamicSerializeElement
|
||||
private String wms = "wms";
|
||||
|
||||
/**
|
||||
* name path used for WCS
|
||||
*/
|
||||
@XmlElement(name = "wcs")
|
||||
@XmlElement(name = "wcs", required = false)
|
||||
@DynamicSerializeElement
|
||||
private String wcs = "wcs";
|
||||
|
||||
@XmlElements({ @XmlElement(name = "layer", type = ConfigLayer.class, required = true) })
|
||||
private List<ConfigLayer> layers;
|
||||
|
||||
public String getWcs() {
|
||||
return wcs;
|
||||
}
|
||||
|
@ -87,4 +101,27 @@ public class OGCAgent extends Agent {
|
|||
this.wms = wms;
|
||||
}
|
||||
|
||||
}
|
||||
public void setLayers(List<ConfigLayer> layers) {
|
||||
this.layers = layers;
|
||||
}
|
||||
|
||||
public List<ConfigLayer> getLayers() {
|
||||
return layers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the config layer for the OGC layer collector
|
||||
* @param layerName
|
||||
* @return
|
||||
*/
|
||||
public ConfigLayer getLayer(String layerName) {
|
||||
for (ConfigLayer llayer: getLayers()) {
|
||||
if (llayer.getName().equals(layerName)) {
|
||||
return llayer;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.raytheon.uf.edex.datadelivery.harvester.config;
|
||||
package com.raytheon.uf.common.datadelivery.harvester;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
|
@ -8,7 +8,10 @@ com.raytheon.uf.common.datadelivery.registry.DataSetName
|
|||
com.raytheon.uf.common.datadelivery.registry.Ensemble
|
||||
com.raytheon.uf.common.datadelivery.registry.GriddedCoverage
|
||||
com.raytheon.uf.common.datadelivery.registry.GriddedDataSet
|
||||
com.raytheon.uf.common.datadelivery.registry.PointDataSet
|
||||
com.raytheon.uf.common.datadelivery.registry.WFSPointDataSet
|
||||
com.raytheon.uf.common.datadelivery.registry.GriddedDataSetMetaData
|
||||
com.raytheon.uf.common.datadelivery.registry.PointDataSetMetaData
|
||||
com.raytheon.uf.common.datadelivery.registry.GriddedProjection
|
||||
com.raytheon.uf.common.datadelivery.registry.GroupDefinition
|
||||
com.raytheon.uf.common.datadelivery.registry.Levels
|
||||
|
@ -22,3 +25,5 @@ com.raytheon.uf.common.datadelivery.registry.Provider
|
|||
com.raytheon.uf.common.datadelivery.registry.Subscription
|
||||
com.raytheon.uf.common.datadelivery.registry.SubscriptionBundle
|
||||
com.raytheon.uf.common.datadelivery.registry.Time
|
||||
com.raytheon.uf.common.datadelivery.registry.PointTime
|
||||
com.raytheon.uf.common.datadelivery.registry.GriddedTime
|
||||
|
|
|
@ -47,7 +47,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
|
|||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlSeeAlso({ GriddedDataSetMetaData.class, OpenDapGriddedDataSetMetaData.class })
|
||||
@XmlSeeAlso({ GriddedDataSetMetaData.class, OpenDapGriddedDataSetMetaData.class, PointDataSetMetaData.class })
|
||||
@RegistryObject({ "url" })
|
||||
public abstract class DataSetMetaData implements ISerializableObject {
|
||||
public static final String DATE_SLOT = "date";
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlEnumValue;
|
||||
|
||||
/**
|
||||
* Enumeration of data types.
|
||||
|
@ -33,6 +32,7 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 22, 2012 0743 djohnson Initial creation
|
||||
* Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects.
|
||||
* Feb 21, 2013 754 dhladky Added point data type
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -41,10 +41,10 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||
*/
|
||||
@XmlEnum
|
||||
public enum DataType {
|
||||
@XmlEnumValue(DataType.GRID_STRING_VALUE)
|
||||
GRID(DataType.GRID_STRING_VALUE);
|
||||
GRID(DataType.GRID_STRING_VALUE), POINT(DataType.POINT_STRING_VALUE);
|
||||
|
||||
private static final String GRID_STRING_VALUE = "Grid";
|
||||
private static final String POINT_STRING_VALUE = "Point";
|
||||
|
||||
private final String displayString;
|
||||
|
||||
|
|
|
@ -0,0 +1,615 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
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.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Request Time XML
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 15, 2011 dhladky Initial creation
|
||||
* Jul 24, 2012 955 djohnson Use List instead of ArrayList.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class GriddedTime extends Time implements ISerializableObject, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7032078355732493125L;
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus.getHandler(GriddedTime.class);
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
*/
|
||||
public GriddedTime() {
|
||||
|
||||
}
|
||||
|
||||
@XmlElement(name = "step")
|
||||
@DynamicSerializeElement
|
||||
private Double step;
|
||||
|
||||
@XmlElement(name = "stepUnit")
|
||||
@DynamicSerializeElement
|
||||
private String stepUnit;
|
||||
|
||||
@XmlElements({ @XmlElement(name = "selectedTimeIndices", type = Integer.class) })
|
||||
@DynamicSerializeElement
|
||||
private List<Integer> selectedTimeIndices;
|
||||
|
||||
@XmlElements({ @XmlElement(name = "cycleTimes", type = Integer.class) })
|
||||
@DynamicSerializeElement
|
||||
private List<Integer> cycleTimes;
|
||||
|
||||
private Date startDate = null;
|
||||
|
||||
private Date requestEndDate = null;
|
||||
|
||||
private Date endDate = null;
|
||||
|
||||
private Date requestStartDate = null;
|
||||
|
||||
|
||||
/**
|
||||
* Clone constructor.
|
||||
*
|
||||
* @param the
|
||||
* {@link Time} to clone
|
||||
*/
|
||||
public GriddedTime(GriddedTime toCopy) {
|
||||
List<Integer> incomingCycleTimes = toCopy.getCycleTimes();
|
||||
this.cycleTimes = (incomingCycleTimes == null) ? null
|
||||
: new ArrayList<Integer>(incomingCycleTimes);
|
||||
this.end = toCopy.end;
|
||||
this.format = toCopy.format;
|
||||
this.numTimes = toCopy.numTimes;
|
||||
this.requestEnd = toCopy.requestEnd;
|
||||
this.requestStart = toCopy.requestStart;
|
||||
List<Integer> incomingSelectedTimeIndices = toCopy.selectedTimeIndices;
|
||||
this.selectedTimeIndices = (incomingSelectedTimeIndices == null) ? null
|
||||
: new ArrayList<Integer>(
|
||||
incomingSelectedTimeIndices);
|
||||
this.start = toCopy.start;
|
||||
this.step = toCopy.step;
|
||||
this.stepUnit = toCopy.stepUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the start date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public Date getStartDate() throws ParseException {
|
||||
|
||||
if (startDate == null) {
|
||||
if (getStart() != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
this.startDate = dateFormat.parse(getStart());
|
||||
}
|
||||
}
|
||||
|
||||
return startDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the start date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public void setStartDate(Date startDate) throws ParseException {
|
||||
this.startDate = startDate;
|
||||
if (startDate != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
setStart(dateFormat.format(startDate));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public Date getEndDate() throws ParseException {
|
||||
if (endDate == null) {
|
||||
if (getEnd() != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
this.endDate = dateFormat.parse(getEnd());
|
||||
}
|
||||
}
|
||||
|
||||
return endDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public void setEndDate(Date endDate) throws ParseException {
|
||||
this.endDate = endDate;
|
||||
if (endDate != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
setStart(dateFormat.format(endDate));
|
||||
}
|
||||
}
|
||||
|
||||
public Double getStep() {
|
||||
return step;
|
||||
}
|
||||
|
||||
public void setStep(Double step) {
|
||||
this.step = step;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cycle times.
|
||||
*
|
||||
* @return List of cycle times
|
||||
*/
|
||||
public List<Integer> getCycleTimes() {
|
||||
return this.cycleTimes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cycle times.
|
||||
*
|
||||
* @param cycleTimes ArrayList of cycle times.
|
||||
*/
|
||||
public void setCycleTimes(List<Integer> cycleTimes) {
|
||||
this.cycleTimes = cycleTimes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a cycle time.
|
||||
*
|
||||
* @param cycleTime The cycle time to add
|
||||
*/
|
||||
public void addCycleTime(int cycleTime) {
|
||||
this.cycleTimes.add(cycleTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get me the date of the time requested
|
||||
* @param timeInt
|
||||
* @return
|
||||
*/
|
||||
public Date getTimeAsDate(int timeInt) {
|
||||
|
||||
try {
|
||||
long unitStepFactor = getUnitStepFactor();
|
||||
|
||||
for (int i = 0; i < getNumTimes(); i++) {
|
||||
if (timeInt == i) {
|
||||
|
||||
long time = 0l;
|
||||
if (i == 0) {
|
||||
time = getStartDate().getTime();
|
||||
} else {
|
||||
time = (long) (getStartDate().getTime() + (unitStepFactor
|
||||
* getStep() * i));
|
||||
}
|
||||
return new Date(time);
|
||||
}
|
||||
}
|
||||
} catch (ParseException pe) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't parse time as date.", pe);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the request start as a date
|
||||
*
|
||||
* @param timeInt
|
||||
*/
|
||||
public void setRequestStartTimeAsInt(Integer timeInt) {
|
||||
try {
|
||||
if (getStartDate() != null) {
|
||||
|
||||
long unitStepFactor = getUnitStepFactor();
|
||||
|
||||
for (int i = 0; i < getNumTimes(); i++) {
|
||||
if (timeInt == i) {
|
||||
|
||||
long time = 0l;
|
||||
if (i == 0) {
|
||||
time = getStartDate().getTime();
|
||||
} else {
|
||||
time = (long) (getStartDate().getTime() + (unitStepFactor
|
||||
* getStep() * i));
|
||||
}
|
||||
Date date = new Date(time);
|
||||
setRequestStartAsDate(date);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ParseException pe) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't parse time as date.", pe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the start time as an int
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getRequestStartTimeAsInt() {
|
||||
|
||||
int timeInt = 0;
|
||||
|
||||
try {
|
||||
if (getRequestStartAsDate() != null && getStartDate() != null) {
|
||||
|
||||
long unitStepFactor = getUnitStepFactor();
|
||||
|
||||
for (int i = 0; i < getNumTimes(); i++) {
|
||||
// System.out.println("StartDate: "+getStartDate());
|
||||
long time = 0l;
|
||||
if (i == 0) {
|
||||
time = getStartDate().getTime();
|
||||
} else {
|
||||
time = (long) (getStartDate().getTime() + (unitStepFactor
|
||||
* getStep() * i));
|
||||
}
|
||||
Date stepDate = new Date(time);
|
||||
|
||||
if (stepDate.equals(getRequestStartAsDate())) {
|
||||
timeInt = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ParseException pe) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't parse requested time as date.", pe);
|
||||
}
|
||||
return timeInt;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the end time with a know integer in the list
|
||||
*
|
||||
* @param timeInt
|
||||
*/
|
||||
public void setRequestEndTimeAsInt(Integer timeInt) {
|
||||
try {
|
||||
if (getEndDate() != null) {
|
||||
|
||||
long unitStepFactor = getUnitStepFactor();
|
||||
|
||||
for (int i = getNumTimes() - 1; i > 0; i--) {
|
||||
// System.out.println("EndDate: " + getEndDate());
|
||||
|
||||
if (i == timeInt) {
|
||||
|
||||
long time = (long) (getStartDate().getTime() + (unitStepFactor
|
||||
* getStep() * i));
|
||||
Date date = new Date(time);
|
||||
setRequestEndAsDate(date);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ParseException pe) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't parse requested time as int.", pe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end time as an int
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getRequestEndTimeAsInt() {
|
||||
|
||||
int timeInt = 0;
|
||||
|
||||
try {
|
||||
if (getRequestEndAsDate() != null && getEndDate() != null) {
|
||||
|
||||
long unitStepFactor = getUnitStepFactor();
|
||||
|
||||
for (int i = 0; i < getNumTimes(); i++) {
|
||||
// System.out.println("StartDate: "+getStartDate());
|
||||
long time = 0l;
|
||||
if (i == getNumTimes() - 1) {
|
||||
time = getEndDate().getTime();
|
||||
} else {
|
||||
time = (long) (getStartDate().getTime() + (unitStepFactor
|
||||
* getStep() * i));
|
||||
}
|
||||
Date stepDate = new Date(time);
|
||||
|
||||
if (stepDate.equals(getRequestEndAsDate())) {
|
||||
timeInt = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ParseException pe) {
|
||||
statusHandler.handle(Priority.ERROR, "Can't parse requested time as int.", pe);
|
||||
}
|
||||
return timeInt;
|
||||
|
||||
}
|
||||
|
||||
public String getStepUnit() {
|
||||
return stepUnit;
|
||||
}
|
||||
|
||||
public void setStepUnit(String stepUnit) {
|
||||
this.stepUnit = stepUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the primitive
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private long getUnitStepFactor() {
|
||||
|
||||
long millis = 0l;
|
||||
|
||||
if (getStepUnit().equals(STEP_UNIT.SECOND.getDurationUnit())) {
|
||||
|
||||
return 1000;
|
||||
|
||||
} else if (getStepUnit().equals(STEP_UNIT.MINUTE.getDurationUnit())) {
|
||||
millis = 1000 * 60;
|
||||
|
||||
} else if (getStepUnit().equals(STEP_UNIT.HOUR.getDurationUnit())) {
|
||||
millis = 1000 * 60 * 60;
|
||||
|
||||
} else if (getStepUnit().equals(STEP_UNIT.DAY.getDurationUnit())) {
|
||||
millis = 1000 * 60 * 60 * 24;
|
||||
|
||||
} else if (getStepUnit().equals(STEP_UNIT.WEEK.getDurationUnit())) {
|
||||
millis = 1000 * 60 * 60 * 24 * 7;
|
||||
|
||||
}
|
||||
return millis;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enumeration of the duration units
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
public enum STEP_UNIT {
|
||||
SECOND("second"), MINUTE("minute"), HOUR("hour"), DAY("day"), WEEK(
|
||||
"week"), MONTH("month");
|
||||
|
||||
private final String durationUnit;
|
||||
|
||||
private STEP_UNIT(String name) {
|
||||
durationUnit = name;
|
||||
}
|
||||
|
||||
public String getDurationUnit() {
|
||||
return durationUnit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds forecast step in seconds
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int findForecastStepUnit() {
|
||||
|
||||
if (getStepUnit().equals("hour")) {
|
||||
return (int) (getStep() * 60 * 60);
|
||||
} else if (getStepUnit().equals("minute")) {
|
||||
return (int) (getStep() * 60);
|
||||
} else if (getStepUnit().equals("month")) {
|
||||
return (int) (getStep() * 30 * 24 * 60);
|
||||
} else if (getStepUnit().equals("week")) {
|
||||
return (int) (getStep() * 7 * 24 * 60);
|
||||
} else if (getStepUnit().equals("second")) {
|
||||
return getStep().intValue();
|
||||
} else if (getStepUnit().equals("day")) {
|
||||
return (int) (getStep() * 24 * 60 * 60);
|
||||
}
|
||||
|
||||
return -99999;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public void setRequestStartAsDate(Date requestStartDate)
|
||||
throws ParseException {
|
||||
this.requestStartDate = requestStartDate;
|
||||
if (requestStartDate != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
setRequestStart(dateFormat.format(requestStartDate));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public Date getRequestStartAsDate() throws ParseException {
|
||||
if (requestStartDate == null) {
|
||||
if (getRequestStart() != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
this.requestStartDate = dateFormat.parse(getRequestStart());
|
||||
}
|
||||
}
|
||||
|
||||
return requestStartDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public void setRequestEndAsDate(Date requestEndDate) throws ParseException {
|
||||
this.requestEndDate = requestEndDate;
|
||||
if (requestEndDate != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
setRequestEnd(dateFormat.format(requestEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end date
|
||||
*
|
||||
* @return
|
||||
* @throws ParseException
|
||||
*/
|
||||
public Date getRequestEndAsDate() throws ParseException {
|
||||
if (requestEndDate == null) {
|
||||
if (getRequestEnd() != null && getFormat() != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
this.requestEndDate = dateFormat.parse(getRequestEnd());
|
||||
}
|
||||
}
|
||||
|
||||
return requestEndDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the FCST hours
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<String> getFcstHours() {
|
||||
List<String> hours = new ArrayList<String>();
|
||||
|
||||
int hour = 0;
|
||||
hours.add(String.valueOf(hour));
|
||||
|
||||
for (int i = 1; i < getNumTimes(); i++) {
|
||||
hour += getStep();
|
||||
hours.add(String.valueOf(hour));
|
||||
}
|
||||
|
||||
return hours;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the selectedTimeIndices
|
||||
*/
|
||||
public List<Integer> getSelectedTimeIndices() {
|
||||
return selectedTimeIndices;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param selectedTimeIndices
|
||||
* the selectedTimeIndices to set
|
||||
*/
|
||||
public void setSelectedTimeIndices(List<Integer> selectedTimeIndices) {
|
||||
this.selectedTimeIndices = selectedTimeIndices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the time breakups needs to split retrievals for a subscription and
|
||||
* limit size of retrievals
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<List<Integer>> getTimeSequences(int sfactor) {
|
||||
|
||||
List<List<Integer>> sequences = new ArrayList<List<Integer>>();
|
||||
List<Integer> al = new ArrayList<Integer>();
|
||||
|
||||
if (selectedTimeIndices.size() > 0) {
|
||||
int previous = selectedTimeIndices.get(0);
|
||||
al.add(previous);
|
||||
for (int i = 1; i < selectedTimeIndices.size(); i++) {
|
||||
int next = selectedTimeIndices.get(i);
|
||||
if (next - previous == 1 && al.size() <= sfactor) {
|
||||
al.add(next);
|
||||
previous = next;
|
||||
} else {
|
||||
sequences.add(al);
|
||||
al = new ArrayList<Integer>();
|
||||
al.add(next);
|
||||
previous = next;
|
||||
}
|
||||
}
|
||||
|
||||
sequences.add(al);
|
||||
}
|
||||
|
||||
return sequences;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
* A point DataSet.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 11, 2012 754 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlSeeAlso(WFSPointDataSet.class)
|
||||
@DynamicSerialize
|
||||
public abstract class PointDataSet extends DataSet {
|
||||
|
||||
public PointDataSet() {
|
||||
this.dataSetType = DataType.POINT;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
/**
|
||||
* Point Meta Data object
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 20, 2012 754 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class PointDataSetMetaData extends DataSetMetaData {
|
||||
|
||||
@Override
|
||||
public void accept(IDataSetMetaDataVisitor visitor) {
|
||||
// TODO: not sure what this does?
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* PointTime
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 21, 2012 754 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class PointTime extends Time implements ISerializableObject, Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 234624356321L;
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
*/
|
||||
public PointTime() {
|
||||
|
||||
}
|
||||
|
||||
@XmlElements({ @XmlElement(name = "times", type = Date.class) })
|
||||
@DynamicSerializeElement
|
||||
private List<Date> times;
|
||||
|
||||
public void setTimes(List<Date> times) {
|
||||
this.times = times;
|
||||
}
|
||||
|
||||
public List<Date> getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
||||
}
|
|
@ -78,7 +78,7 @@ public class Provider implements ISerializableObject {
|
|||
|
||||
private static final String GRID_STRING_VALUE = "Grid";
|
||||
|
||||
private static final String POINT_STRING_VALUE = "point_data";
|
||||
private static final String POINT_STRING_VALUE = "Point";
|
||||
|
||||
private final String providerType;
|
||||
|
||||
|
|
|
@ -101,51 +101,51 @@ public class Time implements ISerializableObject, Serializable {
|
|||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private int numTimes;
|
||||
protected int numTimes;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String start;
|
||||
protected String start;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String end;
|
||||
protected String end;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double step;
|
||||
protected Double step;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String stepUnit;
|
||||
protected String stepUnit;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String format;
|
||||
protected String format;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String requestStart;
|
||||
protected String requestStart;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String requestEnd;
|
||||
protected String requestEnd;
|
||||
|
||||
@XmlElements({ @XmlElement(name = "selectedTimeIndices", type = Integer.class) })
|
||||
@DynamicSerializeElement
|
||||
private List<Integer> selectedTimeIndices = new ArrayList<Integer>();
|
||||
protected List<Integer> selectedTimeIndices = new ArrayList<Integer>();
|
||||
|
||||
@XmlElements({ @XmlElement(name = "cycleTimes", type = Integer.class) })
|
||||
@DynamicSerializeElement
|
||||
private List<Integer> cycleTimes = new ArrayList<Integer>();
|
||||
protected List<Integer> cycleTimes = new ArrayList<Integer>();
|
||||
|
||||
private Date startDate = null;
|
||||
protected Date startDate = null;
|
||||
|
||||
private Date requestEndDate = null;
|
||||
protected Date requestEndDate = null;
|
||||
|
||||
private Date endDate = null;
|
||||
protected Date endDate = null;
|
||||
|
||||
private Date requestStartDate = null;
|
||||
protected Date requestStartDate = null;
|
||||
|
||||
public int getNumTimes() {
|
||||
return numTimes;
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.text.ParseException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.CollectionValueType;
|
||||
|
@ -13,6 +14,7 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ValueType;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time.STEP_UNIT;
|
||||
import com.raytheon.uf.common.registry.ebxml.CalendarAttribute;
|
||||
import com.raytheon.uf.common.registry.ebxml.slots.DateSlotConverter;
|
||||
import com.raytheon.uf.common.registry.ebxml.slots.SlotConverter;
|
||||
|
||||
/**
|
||||
|
@ -64,8 +66,18 @@ public class TimeSlotConverter implements SlotConverter {
|
|||
List<ValueType> collectionValues = new ArrayList<ValueType>();
|
||||
CollectionValueType cvt = new CollectionValueType();
|
||||
|
||||
// Handle times for Point types
|
||||
if (slotValue instanceof PointTime) {
|
||||
|
||||
if (slotValue instanceof Time) {
|
||||
PointTime pt = (PointTime)slotValue;
|
||||
|
||||
for (Date date: pt.getTimes()) {
|
||||
List<SlotType> ptSlots = DateSlotConverter.INSTANCE.getSlots(slotName, date);
|
||||
slots.add(ptSlots.get(0));
|
||||
}
|
||||
|
||||
//TODO: This will convert to GriddedTime when I execute DR to switch
|
||||
} else if (slotValue instanceof Time) {
|
||||
|
||||
Time t = (Time)slotValue;
|
||||
SimpleDateFormat df = new SimpleDateFormat(CalendarAttribute.DATE_TIME_FORMAT);
|
||||
|
@ -113,8 +125,7 @@ public class TimeSlotConverter implements SlotConverter {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw new IllegalArgumentException("Object of type " + slotValue.getClass().getName() +
|
||||
" cannot be converted by " + TimeSlotConverter.class.getName());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package com.raytheon.uf.common.datadelivery.registry;
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider.ServiceType;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
* The {@DataSet} for WFS point products.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 11, 2012 754 dhladky Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class WFSPointDataSet extends PointDataSet {
|
||||
|
||||
@Override
|
||||
public ServiceType getServiceType() {
|
||||
return ServiceType.WFS;
|
||||
}
|
||||
}
|
|
@ -188,4 +188,11 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.datadelivery.harvester"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -31,11 +31,11 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0",
|
||||
com.raytheon.uf.edex.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.stats;bundle-version="1.0.0"
|
||||
com.raytheon.uf.common.stats;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.edex.datadelivery.harvester;uses:="com.raytheon.uf.edex.datadelivery.harvester.crawler",
|
||||
com.raytheon.uf.edex.datadelivery.harvester.config;uses:="com.raytheon.uf.common.serialization,com.raytheon.uf.common.datadelivery.registry",
|
||||
com.raytheon.uf.edex.datadelivery.harvester.crawler;
|
||||
uses:="com.raytheon.uf.edex.datadelivery.harvester.interfaces,
|
||||
com.raytheon.uf.edex.datadelivery.retrieval,
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig
|
||||
com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent
|
||||
com.raytheon.uf.edex.datadelivery.harvester.config.Agent
|
||||
com.raytheon.uf.edex.datadelivery.harvester.config.OGCAgent
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util-2.5.xsd">
|
||||
|
||||
<util:constant id="dataDeliveryServerKey"
|
||||
static-field="com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants.DATA_DELIVERY_SERVER" />
|
||||
|
||||
<util:constant id="ebxmlRegistryServiceKey"
|
||||
static-field="com.raytheon.uf.common.registry.RegistryConstants.EBXML_REGISTRY_SERVICE" />
|
||||
|
||||
<util:constant id="ebxmlLcmServiceKey"
|
||||
static-field="com.raytheon.uf.common.registry.RegistryConstants.EBXML_LCM_SERVICE" />
|
||||
|
||||
<util:constant id="ebxmlQueryServiceKey"
|
||||
static-field="com.raytheon.uf.common.registry.RegistryConstants.EBXML_QUERY_SERVICE" />
|
||||
|
||||
</beans>
|
|
@ -12,6 +12,9 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Utils;
|
||||
|
@ -31,9 +34,6 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.Agent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.CommunicationStrategy;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.CrawlLauncher;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.HarvesterEvent;
|
||||
|
|
|
@ -22,10 +22,10 @@ package com.raytheon.uf.edex.datadelivery.harvester.crawler;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.ProviderCollectionLinkStore;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,9 @@ import org.quartz.Job;
|
|||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -19,9 +22,6 @@ import com.raytheon.uf.common.serialization.JAXBManager;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.Agent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
|
||||
/**
|
||||
* Abstract Crawl Launcher
|
||||
|
|
|
@ -13,14 +13,14 @@ import java.util.regex.Pattern;
|
|||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.edex.util.Util;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.MainSequenceCrawler.ModelCrawlConfiguration;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.util.ConnectionUtil;
|
||||
import com.sleepycat.je.Environment;
|
||||
|
|
|
@ -32,6 +32,9 @@ import java.util.UUID;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
|
@ -54,9 +57,6 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.common.util.file.FilenameFilters;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.CrawlMetaDataHandler;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.LinkStore;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.ProviderCollectionLinkStore;
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.ProviderCollectionLinkStore;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,9 @@ package com.raytheon.uf.edex.datadelivery.harvester.crawler;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -13,9 +16,6 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.Agent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.cron.HarvesterJobController;
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,14 +10,14 @@ import java.util.TreeSet;
|
|||
import java.util.concurrent.Executors;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.util.ImmutableDate;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.LinkStore;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.ProviderCollectionLinkStore;
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.ProviderCollectionLinkStore;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,9 @@ package com.raytheon.uf.edex.datadelivery.harvester.crawler;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -13,9 +16,6 @@ import com.raytheon.uf.common.serialization.JAXBManager;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.Agent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.cron.HarvesterJobController;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,13 +7,13 @@ import java.util.List;
|
|||
import java.util.concurrent.Executors;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Collection;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.MainSequenceCrawler.ModelCrawlConfiguration;
|
||||
|
||||
import edu.uci.ics.crawler4j.crawler.CrawlConfig;
|
||||
|
|
|
@ -8,10 +8,10 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ProtoCollection;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.ProtoCollection;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.util.OpenDapSeedScanUtilities;
|
||||
|
||||
import edu.uci.ics.crawler4j.crawler.Page;
|
||||
|
|
|
@ -32,6 +32,9 @@ import com.google.common.annotations.VisibleForTesting;
|
|||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Ordering;
|
||||
import com.google.common.collect.TreeMultimap;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.CrawlAgent;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.IDataSetMetaDataVisitor;
|
||||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSetMetaData;
|
||||
|
@ -45,9 +48,6 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.util.ITimer;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.Agent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.CrawlAgent;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.crawler.CrawlLauncher;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.datadelivery.harvester.purge;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
|
||||
/**
|
||||
* Defines a purge for a {@link DataSetMetaData} type. Intentionally
|
||||
|
|
|
@ -35,13 +35,13 @@ import org.apache.http.impl.client.DefaultHttpClient;
|
|||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.datadelivery.harvester.config.HarvesterConfig;
|
||||
import com.raytheon.uf.edex.datadelivery.retrieval.util.ConnectionUtil;
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<harvester xmlns:ns2="com.raytheon.uf.common.datadelivery.registry"
|
||||
xmlns:ns4="http://www.w3.org/1999/xlink" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0"
|
||||
xmlns:ns9="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:4.0" xmlns:ns5="http://www.w3.org/2005/08/addressing"
|
||||
xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:rs:4.0" xmlns:ns7="urn:oasis:names:tc:ebxml-regrep:xsd:query:4.0"
|
||||
xmlns:ns8="urn:oasis:names:tc:ebxml-regrep:xsd:spi:4.0">
|
||||
<provider serviceType="WFS" name="METAROGC">
|
||||
<connection>
|
||||
<!-- for OGC it's your FQDN -->
|
||||
<url>http://127.0.0.1:8085</url>
|
||||
</connection>
|
||||
<providerType>Point</providerType>
|
||||
<projection type="LatLon">
|
||||
<name>MetarLatLon</name>
|
||||
<description>METAR Test LatLon Coverage</description>
|
||||
</projection>
|
||||
</provider>
|
||||
<primaryRegistryHost>127.0.0.1</primaryRegistryHost>
|
||||
<secondaryRegistryHost>127.0.0.1</secondaryRegistryHost>
|
||||
<tertiaryRegistryHost>127.0.0.1</tertiaryRegistryHost>
|
||||
<agent xsi:type="ogcAgent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dateFormat>HHddMMMyyyy</dateFormat>
|
||||
<layer name="metar">
|
||||
<!-- Geographic constraint of metar layer data -->
|
||||
<minx>-120.0</minx>
|
||||
<maxx>-70.0</maxx>
|
||||
<miny>20.0</miny>
|
||||
<maxy>50.0</maxy>
|
||||
<!-- Registry Parameters in metar layer -->
|
||||
<parameter name="report" providerName="report" definition="Full METAR Report"
|
||||
dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="nominalTime" providerName="nominalTime"
|
||||
definition="Time of observation" dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="reportType" providerName="reportType"
|
||||
definition="WMO type of report" dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="correction" providerName="correction"
|
||||
definition="Correction" dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="obsLocation" providerName="obsLocation"
|
||||
definition="Location of Observation" dataType="POINT" units="Degrees"
|
||||
missingValue="-9999" fillValue="-9999" baseType="ObsLocation">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="autoStationType" providerName="autoStationType"
|
||||
definition="Automated Station Type" dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="skyKey" providerName="skyKey" definition="Sky coverage key"
|
||||
dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="skyCoverage" providerName="skyCoverage"
|
||||
definition="Sky coverage" dataType="POINT" baseType="SkyCover"
|
||||
units="%">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="vertVisibility" providerName="vertVisibility"
|
||||
definition="Vertical Visibility" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Integer" units="m">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="skyLayerBase" providerName="skyLayerBase"
|
||||
definition="Sky Base Layer" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Integer">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="visibility" providerName="visibility"
|
||||
definition="Visibility" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="miles">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="weatherKey" providerName="weatherKey"
|
||||
dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="weatherCondition" providerName="weatherCondition"
|
||||
definition="WX coverage" dataType="POINT" baseType="WeatherCondition">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="seaLevelPress" providerName="seaLevelPress"
|
||||
definition="Pressure at sea level" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="Pa">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="temperature" providerName="temperature"
|
||||
definition="Temperature at Surface" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Integer" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="tempFromTenths" providerName="tempFromTenths"
|
||||
definition="Temperature tenths of a degree" dataType="POINT"
|
||||
missingValue="-9999" fillValue="-9999" baseType="Float" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="dewPoint" providerName="dewPoint"
|
||||
definition="Dew Point Temperature" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Integer" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="dewPointTempFromTenths" providerName="dewPointTempFromTenths"
|
||||
definition="Dew Point Temperature tenths of a degree" dataType="POINT"
|
||||
missingValue="-9999" fillValue="-9999" baseType="Float" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="windDir" providerName="windDir"
|
||||
definition="Wind Direction" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="String" units="Deg">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="windSpeed" providerName="windSpeed"
|
||||
dataType="POINT" missingValue="-9999" fillValue="-9999" baseType="Integer"
|
||||
units="kts">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="windGust" providerName="windGust"
|
||||
definition="Wind Gust speed" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Integer" units="kts">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="altimeterInPa" providerName="altimeterInPa"
|
||||
definition="Altimeter Setting in Pascals" dataType="POINT"
|
||||
missingValue="-9999" fillValue="-9999" baseType="Float" units="Pa">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="altimeter" providerName="altimeter"
|
||||
definition="Altimeter Setting" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="in/Hg">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="minTemp24Hour" providerName="minTemp24Hour"
|
||||
definition="Minimum Temperature last 24 Hours" dataType="POINT"
|
||||
missingValue="-9999" fillValue="-9999" baseType="Float" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="maxTemp24Hour" providerName="maxTemp24Hour"
|
||||
definition="Maximum Temperature last 24 Hours" dataType="POINT"
|
||||
missingValue="-9999" fillValue="-9999" baseType="Float" units="F">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="precip1Hour" providerName="precip1Hour"
|
||||
definition="1 Hour Precipitation" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="inch">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="precip3Hour" providerName="precip3Hour"
|
||||
definition="3 Hour Precipitation" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="inch">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="precip6Hour" providerName="precip6Hour"
|
||||
definition="6 Hour Precipitation" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="inch">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="precip24Hour" providerName="precip24Hour"
|
||||
definition="24 Hour Precipitation" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="inch">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="pressChangeChar" providerName="pressChangeChar"
|
||||
definition="Pressure change character" dataType="POINT" baseType="String">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
<parameter name="pressChange3Hour" providerName="pressChange3Hour"
|
||||
definition="3 Hour Pressure Change" dataType="POINT" missingValue="-9999"
|
||||
fillValue="-9999" baseType="Float" units="Pa">
|
||||
<levelType levelType="SFC" />
|
||||
</parameter>
|
||||
</layer>
|
||||
</agent>
|
||||
</harvester>
|
|
@ -19,12 +19,20 @@ Require-Bundle: net.opengis;bundle-version="1.0.2",
|
|||
com.raytheon.uf.common.json;bundle-version="1.0.0",
|
||||
com.sun.xml.bind;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.registry.schemas.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.registry.schemas.iso19115;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.registry.event;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.spatial;bundle-version="1.0.0"
|
||||
Export-Package: com.raytheon.uf.edex.ogc.common,
|
||||
com.raytheon.uf.edex.ogc.common.colormap,
|
||||
com.raytheon.uf.edex.ogc.common.db,
|
||||
com.raytheon.uf.edex.ogc.common.feature,
|
||||
com.raytheon.uf.edex.ogc.common.http,
|
||||
com.raytheon.uf.edex.ogc.common.interfaces,
|
||||
com.raytheon.uf.edex.ogc.common.jaxb,
|
||||
com.raytheon.uf.edex.ogc.common.output,
|
||||
com.raytheon.uf.edex.ogc.common.spatial,
|
||||
|
|
|
@ -37,8 +37,23 @@ import com.raytheon.uf.edex.database.dao.CoreDao;
|
|||
import com.raytheon.uf.edex.database.dao.DaoConfig;
|
||||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
|
||||
/**
|
||||
*
|
||||
* Default Layer Collector
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky initial creation, based on B Clements original
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public abstract class DefaultLayerCollector<L extends SimpleLayer, R extends PluginDataObject>
|
||||
extends LayerCollector {
|
||||
extends LayerCollector<L> {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(DefaultLayerCollector.class);
|
||||
|
|
|
@ -26,30 +26,85 @@ package com.raytheon.uf.edex.ogc.common.db;
|
|||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfigurationManager;
|
||||
import com.raytheon.uf.common.datadelivery.harvester.OGCAgent;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetName;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Levels;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Provider;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.raytheon.uf.edex.database.dao.CoreDao;
|
||||
import com.raytheon.uf.edex.database.dao.DaoConfig;
|
||||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
|
||||
public class LayerCollector {
|
||||
/**
|
||||
*
|
||||
* Layer Collector
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky initial creation, based on B Clements original
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public abstract class LayerCollector<L extends SimpleLayer> {
|
||||
|
||||
protected LayerTransformer transformer;
|
||||
|
||||
protected Log log = LogFactory.getLog(this.getClass());
|
||||
protected L layer;
|
||||
|
||||
protected Coverage coverage;
|
||||
|
||||
protected HashMap<String,Parameter> parameters = null;
|
||||
|
||||
protected HarvesterConfig config = null;
|
||||
|
||||
protected OGCAgent agent = null;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LayerCollector.class);
|
||||
|
||||
public LayerCollector(LayerTransformer transformer) {
|
||||
this.transformer = transformer;
|
||||
setTransformer(transformer);
|
||||
this.config = (HarvesterConfig) HarvesterConfigurationManager.getOGCConfiguration();
|
||||
setAgent((OGCAgent)config.getAgent());
|
||||
storeProvider(config.getProvider());
|
||||
}
|
||||
|
||||
public HarvesterConfig getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfig(HarvesterConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public <T extends SimpleLayer> void clearLayers(Class<T> c)
|
||||
|
@ -73,7 +128,7 @@ public class LayerCollector {
|
|||
sess.save(layer);
|
||||
} else {
|
||||
if (list.size() > 1) {
|
||||
log.warn("Multiple layers found with same name, using first");
|
||||
statusHandler.warn("Multiple layers found with same name, using first");
|
||||
}
|
||||
T old = list.get(0);
|
||||
Set<Date> times = old.getTimes();
|
||||
|
@ -111,8 +166,8 @@ public class LayerCollector {
|
|||
}
|
||||
sess.save(layer);
|
||||
} else {
|
||||
if (list.size() > 1) {
|
||||
log.warn("Multiple layers found with same name, using first");
|
||||
if (!list.isEmpty()) {
|
||||
statusHandler.warn("Multiple layers found with same name, using first");
|
||||
}
|
||||
T old = list.get(0);
|
||||
update(old, layer);
|
||||
|
@ -263,4 +318,196 @@ public class LayerCollector {
|
|||
return tmp.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the DPA config
|
||||
* @return
|
||||
*/
|
||||
public HarvesterConfig getConfiguration() {
|
||||
return config;
|
||||
}
|
||||
|
||||
protected Coverage getCoverage() {
|
||||
return coverage;
|
||||
}
|
||||
|
||||
protected abstract L newLayer();
|
||||
|
||||
protected abstract void setCoverage(String name);
|
||||
|
||||
/**
|
||||
* Store the DataSetMetaData Object to the registry.
|
||||
*
|
||||
* @param metaDatas
|
||||
* The DataSetMetaData Object to store.
|
||||
*/
|
||||
public void storeMetaData(final List<DataSetMetaData> metaDatas,
|
||||
final DataSet dataSet) {
|
||||
|
||||
IDataSetMetaDataHandler handler = DataDeliveryHandlers
|
||||
.getDataSetMetaDataHandler();
|
||||
Iterator<DataSetMetaData> iter = metaDatas.iterator();
|
||||
int size = metaDatas.size();
|
||||
for (int i = 1; i <= size; i++) {
|
||||
statusHandler.info(String.format(
|
||||
"Attempting store of DataSetMetaData[%s/%s]", i, size));
|
||||
final DataSetMetaData dsmd = iter.next();
|
||||
final String url = dsmd.getUrl();
|
||||
|
||||
try {
|
||||
handler.update(dsmd);
|
||||
statusHandler.info("DataSetMetaData [" + url
|
||||
+ "] successfully stored in Registry");
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.info("DataSetMetaData [" + url
|
||||
+ "] failed to store in Registry");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dataSetToStore
|
||||
*/
|
||||
protected void storeDataSetName(DataSet dataSetToStore) {
|
||||
|
||||
DataSetName dsn = new DataSetName();
|
||||
// Set the RegistryObject Id keys for this Object
|
||||
// using the values from the DataSetMetaData Object.
|
||||
dsn.setProviderName(dataSetToStore.getProviderName());
|
||||
dsn.setDataSetType(dataSetToStore.getDataSetType());
|
||||
dsn.setDataSetName(dataSetToStore.getDataSetName());
|
||||
|
||||
// Now add the parameter Objects so we can associate
|
||||
// the DataSetName with parameters..
|
||||
dsn.setParameters(dataSetToStore.getParameters());
|
||||
|
||||
try {
|
||||
DataDeliveryHandlers.getDataSetNameHandler().update(dsn);
|
||||
statusHandler.info("DataSetName object store complete, dataset ["
|
||||
+ dsn.getDataSetName() + "]");
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.error("DataSetName object store failed:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataSet
|
||||
*/
|
||||
protected void storeDataSet(final DataSet dataSet) {
|
||||
|
||||
DataSet dataSetToStore = getDataSetToStore(dataSet);
|
||||
final String dataSetName = dataSetToStore.getDataSetName();
|
||||
IDataSetHandler handler = DataDeliveryHandlers.getDataSetHandler();
|
||||
|
||||
try {
|
||||
handler.update(dataSetToStore);
|
||||
statusHandler.info("Dataset [" + dataSetName
|
||||
+ "] successfully stored in Registry");
|
||||
storeDataSetName(dataSet);
|
||||
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.info("Dataset [" + dataSetName
|
||||
+ "] failed to store in Registry");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure our provider is contained in the Registry
|
||||
* @param provider
|
||||
*/
|
||||
protected void storeProvider(final Provider provider) {
|
||||
|
||||
try {
|
||||
DataDeliveryHandlers.getProviderHandler().update(provider);
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.info("Provider [" + provider.getName()
|
||||
+ "] failed to store in Registry");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a {@link DataSet} already existing with the same name in the
|
||||
* Registry. If so, then combine the objects.
|
||||
*
|
||||
* @param dataSet
|
||||
* the dataSet
|
||||
* @return the dataSet instance that should be stored to the registry
|
||||
*/
|
||||
protected DataSet getDataSetToStore(DataSet dataSet) {
|
||||
try {
|
||||
DataSet result = DataDeliveryHandlers.getDataSetHandler()
|
||||
.getByNameAndProvider(dataSet.getDataSetName(),
|
||||
dataSet.getProviderName());
|
||||
if (result != null) {
|
||||
dataSet.combine(result);
|
||||
}
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to retrieve dataset.", e);
|
||||
}
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a parameter object to the registry. If necessary, also store the
|
||||
* ParameterLevel Objects needed to successfully store the Parameter Object.
|
||||
*
|
||||
* @param parameter
|
||||
* The Parameter Object to store.
|
||||
*/
|
||||
protected void storeParameter(Parameter parameter) {
|
||||
|
||||
try {
|
||||
DataDeliveryHandlers.getParameterHandler().update(parameter);
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.info("Failed to store parameter ["
|
||||
+ parameter.getName() + "]");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get me my level types for this param
|
||||
*
|
||||
* @param cp
|
||||
* @return
|
||||
*/
|
||||
public List<DataLevelType> getDataLevelTypes(Parameter cp) {
|
||||
return cp.getLevelType();
|
||||
}
|
||||
|
||||
public abstract void setParameters(L layer);
|
||||
|
||||
public abstract DataSet getDataSet();
|
||||
|
||||
public abstract DataSetMetaData getDataSetMetaData();
|
||||
|
||||
public abstract DataType getDataType();
|
||||
|
||||
public abstract Levels getLevels(DataLevelType type, String collectionName);
|
||||
|
||||
public LayerTransformer getTransformer() {
|
||||
return transformer;
|
||||
}
|
||||
|
||||
public void setTransformer(LayerTransformer transformer) {
|
||||
this.transformer = transformer;
|
||||
}
|
||||
|
||||
public OGCAgent getAgent() {
|
||||
return agent;
|
||||
}
|
||||
|
||||
public void setAgent(OGCAgent agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
||||
public void setCoverage(Coverage coverage) {
|
||||
this.coverage = coverage;
|
||||
}
|
||||
|
||||
public HashMap<String, Parameter> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,229 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ogc.common.db;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Levels;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.util.LookupManager;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.raytheon.uf.edex.database.dao.CoreDao;
|
||||
import com.raytheon.uf.edex.database.dao.DaoConfig;
|
||||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
import com.raytheon.uf.edex.ogc.common.interfaces.IWCSMetaData;
|
||||
|
||||
/**
|
||||
*
|
||||
* WCS Layer Collector
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky Modified from a class written by Brian Clements
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public abstract class WCSLayerCollector<L extends SimpleLayer, R extends PluginDataObject>
|
||||
extends LayerCollector<L> implements IWCSMetaData {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(WCSLayerCollector.class);
|
||||
|
||||
protected Class<R> recordClass;
|
||||
|
||||
protected Class<L> layerClass;
|
||||
|
||||
protected GriddedDataSet gds = null;
|
||||
|
||||
protected GriddedDataSetMetaData gdsmd = null;
|
||||
|
||||
protected Time time = null;
|
||||
|
||||
|
||||
public WCSLayerCollector(LayerTransformer transformer,
|
||||
Class<L> layerClass, Class<R> recordClass) {
|
||||
super(transformer);
|
||||
this.recordClass = recordClass;
|
||||
this.layerClass = layerClass;
|
||||
}
|
||||
|
||||
public void add(PluginDataObject... pdos) {
|
||||
if (pdos.length > 0) {
|
||||
addAll(Arrays.asList(pdos));
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addAll(Collection<? extends PluginDataObject> coll) {
|
||||
HashMap<String, L> layermap = new HashMap<String, L>(coll.size());
|
||||
for (PluginDataObject pdo : coll) {
|
||||
if (recordClass.equals(pdo.getClass())) {
|
||||
R rec = (R) pdo;
|
||||
String name = getLayerName(rec);
|
||||
L layer = layermap.get(name);
|
||||
if (layer == null) {
|
||||
layer = newLayer();
|
||||
layer.setName(name);
|
||||
if (initializeLayer(layer, rec)) {
|
||||
layermap.put(name, layer);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
addToTimes(layer, rec);
|
||||
addToDims(layer, rec);
|
||||
|
||||
statusHandler.info("Adding layer " + layer.getName());
|
||||
}
|
||||
}
|
||||
for (String key : layermap.keySet()) {
|
||||
try {
|
||||
updateLayer(layermap.get(key));
|
||||
} catch (DataAccessLayerException e) {
|
||||
statusHandler.error("Problem updating the layer table", e);
|
||||
}
|
||||
}
|
||||
|
||||
sendMetaData(layermap, coll);
|
||||
}
|
||||
|
||||
public L newLayer() {
|
||||
try {
|
||||
return layerClass.newInstance();
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.error("Unable to instantiate class: " + layerClass, e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void addToTimes(L layer, R rec) {
|
||||
Date refTime = rec.getDataTime().getRefTime();
|
||||
layer.getTimes().add(refTime);
|
||||
}
|
||||
|
||||
protected void addToDims(L layer, R rec) {
|
||||
// default is to do nothing
|
||||
}
|
||||
|
||||
protected abstract boolean initializeLayer(L layer, R rec);
|
||||
|
||||
protected abstract String getLayerName(R rec);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void purgeExpired() {
|
||||
try {
|
||||
clearLayers(layerClass);
|
||||
DaoConfig conf = DaoConfig.forClass(recordClass);
|
||||
CoreDao dao = new CoreDao(conf);
|
||||
DatabaseQuery q = new DatabaseQuery(recordClass);
|
||||
q.setMaxResults(500);
|
||||
q.addOrder("dataTime.refTime", false);
|
||||
List<R> recs = (List<R>) dao.queryByCriteria(q);
|
||||
addAll(recs);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Problem purging layers", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void purgeAll() {
|
||||
try {
|
||||
clearLayers(layerClass);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("problem purging layers", e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setCoverage(String name) {
|
||||
//TODO: NOt yet implemented
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* WFS uses Point Data type
|
||||
* @return
|
||||
*/
|
||||
public DataType getDataType() {
|
||||
return DataType.GRID;
|
||||
}
|
||||
|
||||
public GriddedDataSet getDataSet() {
|
||||
return gds;
|
||||
}
|
||||
|
||||
public GriddedDataSetMetaData getDataSetMetaData() {
|
||||
return gdsmd;
|
||||
}
|
||||
|
||||
//TODO implement this when we do WCS
|
||||
public Levels getLevels(DataLevelType type, String collectionName) {
|
||||
|
||||
Levels levels = new Levels();
|
||||
|
||||
try {
|
||||
|
||||
double dz = 0.0;
|
||||
|
||||
levels.setName(type.getType().getLevelType());
|
||||
levels.setLevelType(type.getId());
|
||||
|
||||
if (type.getType().equals(LevelType.MB.getLevelType())) {
|
||||
List<Double> levelList = LookupManager.getInstance()
|
||||
.getLevels(collectionName).getLevelXml();
|
||||
levels.setLevel(levelList);
|
||||
|
||||
} else if (type.getType().equals(LevelType.SEAB.getLevelType())) {
|
||||
List<Double> levelList = LookupManager.getInstance()
|
||||
.getLevels(collectionName).getLevelXml();
|
||||
levels.setLevel(levelList);
|
||||
} else {
|
||||
// default added when only one
|
||||
levels.addLevel(Double.NaN);
|
||||
}
|
||||
|
||||
levels.setDz(dz);
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Level info" + collectionName + " url: "
|
||||
+ getDataSetMetaData().getUrl(), e);
|
||||
}
|
||||
|
||||
return levels;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
package com.raytheon.uf.edex.ogc.common.db;
|
||||
/*
|
||||
* The following software products were developed by Raytheon:
|
||||
*
|
||||
* ADE (AWIPS Development Environment) software
|
||||
* CAVE (Common AWIPS Visualization Environment) software
|
||||
* EDEX (Environmental Data Exchange) software
|
||||
* uFrame™ (Universal Framework) software
|
||||
*
|
||||
* Copyright (c) 2010 Raytheon Co.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/org/documents/epl-v10.php
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address:
|
||||
* 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*/
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.harvester.ConfigLayer;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.EnvelopeUtils;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Levels;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PointDataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PointTime;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.WFSPointDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.retrieval.util.LookupManager;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.util.ImmutableDate;
|
||||
import com.raytheon.uf.edex.ogc.common.interfaces.IWFSMetaData;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
*
|
||||
* WFS Layer Collector
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky initial creation
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public abstract class WFSLayerCollector<L extends SimpleLayer> extends LayerCollector<L> implements IWFSMetaData<L> {
|
||||
|
||||
protected WFSPointDataSet wpds = null;
|
||||
|
||||
protected PointDataSetMetaData pdsmd = null;
|
||||
|
||||
protected PointTime time = null;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(WFSLayerCollector.class);
|
||||
|
||||
|
||||
public WFSLayerCollector(LayerTransformer transformer) {
|
||||
super(transformer);
|
||||
}
|
||||
|
||||
public WFSPointDataSet getDataSet() {
|
||||
return wpds;
|
||||
}
|
||||
|
||||
protected void setPointTime(L layer) {
|
||||
// Get the times first
|
||||
time = new PointTime();
|
||||
List<Date> times = new ArrayList<Date>();
|
||||
for (Date time : layer.getTimes()) {
|
||||
times.add(time);
|
||||
}
|
||||
time.setTimes(times);
|
||||
time.setNumTimes(times.size());
|
||||
time.setFormat(getConfiguration().getAgent().getDateFormat());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getConfiguration().getAgent().getDateFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
time.setStart(dateFormat.format(times.get(0)));
|
||||
time.setEnd(dateFormat.format(times.size()-1));
|
||||
}
|
||||
|
||||
protected Time getPointTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
protected void setPointDataSet(L layer) {
|
||||
// set general settings
|
||||
wpds = new WFSPointDataSet();
|
||||
wpds.setCoverage(getCoverage());
|
||||
wpds.setDataSetName(layer.getName());
|
||||
wpds.setProviderName(getConfiguration().getProvider().getName());
|
||||
wpds.setCollectionName(getConfiguration().getProvider().getServiceType().name());
|
||||
// set parameters
|
||||
setParameters(layer);
|
||||
wpds.setParameters(getParameters());
|
||||
// place holder time object
|
||||
PointTime time = new PointTime();
|
||||
ArrayList<Date> dates = new ArrayList<Date>();
|
||||
dates.add(new Date(System.currentTimeMillis()));
|
||||
// TODO set times and format
|
||||
time.setTimes(dates);
|
||||
time.setFormat(getConfiguration().getAgent().getDateFormat());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getConfiguration().getAgent().getDateFormat());
|
||||
time.setStart(dateFormat.format(dates.get(0)));
|
||||
time.setEnd(dateFormat.format(dates.size()-1));
|
||||
wpds.setTime(time);
|
||||
}
|
||||
|
||||
public PointDataSetMetaData getDataSetMetaData() {
|
||||
return pdsmd;
|
||||
}
|
||||
|
||||
protected void setPointDataSetMetaData(L layer) {
|
||||
// set the dataset first
|
||||
setPointDataSet(layer);
|
||||
pdsmd = new PointDataSetMetaData();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(layer.getName()).append(" ");
|
||||
sb.append(layer.getTargetMaxx()).append(", ");
|
||||
sb.append(layer.getTargetMiny()).append(" : ");
|
||||
sb.append(layer.getTargetMinx()).append(", ");
|
||||
sb.append(layer.getTargetMaxy());
|
||||
pdsmd.setDataSetDescription(sb.toString());
|
||||
pdsmd.setDataSetName(layer.getName());
|
||||
pdsmd.setProviderName(getConfiguration().getProvider().getName());
|
||||
StringBuffer sb2 = new StringBuffer();
|
||||
sb2.append(getConfiguration().getProvider().getConnection().getUrl());
|
||||
sb2.append("/");
|
||||
sb2.append(getAgent().getWcs());
|
||||
pdsmd.setUrl(sb2.toString());
|
||||
}
|
||||
|
||||
protected void setCoverage(String name) {
|
||||
coverage = new Coverage();
|
||||
ConfigLayer configLayer = getAgent().getLayer(name);
|
||||
Coordinate lowerRight = new Coordinate(configLayer.getMaxx(),configLayer.getMiny());
|
||||
Coordinate upperLeft = new Coordinate(configLayer.getMinx(),configLayer.getMaxy());
|
||||
ReferencedEnvelope re = EnvelopeUtils.createLatLonEnvelope(lowerRight, upperLeft);
|
||||
coverage.setEnvelope(re);
|
||||
}
|
||||
|
||||
/**
|
||||
* WFS uses Point Data type
|
||||
* @return
|
||||
*/
|
||||
public DataType getDataType() {
|
||||
return DataType.POINT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the metaData to the registry
|
||||
*/
|
||||
public void sendMetaData(L layer) {
|
||||
|
||||
//TODO: A lot of this is preliminary.
|
||||
// As we start doing retrievals (Redmine #752)
|
||||
// we will better figure out exactly what we need to
|
||||
// place into a WFS metadata object.
|
||||
|
||||
// updates the pointTime object
|
||||
setPointTime(layer);
|
||||
//getDataSet().setTime(getPointTime());
|
||||
getDataSetMetaData().setTime(getPointTime());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(getPointTime().getFormat());
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
ImmutableDate date = null;
|
||||
try {
|
||||
date = new ImmutableDate(dateFormat.parse(getPointTime().getEnd()));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
getDataSetMetaData().setDate(date);
|
||||
|
||||
List<DataSetMetaData> dataSetMetaDatas = new ArrayList<DataSetMetaData>();
|
||||
dataSetMetaDatas.add(getDataSetMetaData());
|
||||
|
||||
//storeDataSet(getDataSet());
|
||||
storeMetaData(dataSetMetaDatas, getDataSet());
|
||||
statusHandler.info("*************** Sending MetaData to Registry ***************");
|
||||
}
|
||||
|
||||
public Levels getLevels(DataLevelType type, String collectionName) {
|
||||
|
||||
Levels levels = new Levels();
|
||||
|
||||
try {
|
||||
//TODO: We'll better figure this out when we do retrievals as well
|
||||
double dz = 0.0;
|
||||
|
||||
levels.setName(type.getType().getLevelType());
|
||||
levels.setLevelType(type.getId());
|
||||
|
||||
if (type.getType().equals(LevelType.MB.getLevelType())) {
|
||||
List<Double> levelList = LookupManager.getInstance()
|
||||
.getLevels(collectionName).getLevelXml();
|
||||
levels.setLevel(levelList);
|
||||
|
||||
} else if (type.getType().equals(LevelType.SEAB.getLevelType())) {
|
||||
List<Double> levelList = LookupManager.getInstance()
|
||||
.getLevels(collectionName).getLevelXml();
|
||||
levels.setLevel(levelList);
|
||||
} else {
|
||||
// default added when only one
|
||||
levels.addLevel(Double.NaN);
|
||||
}
|
||||
|
||||
levels.setDz(dz);
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Level info" + collectionName + " url: "
|
||||
+ getDataSetMetaData().getUrl(), e);
|
||||
}
|
||||
|
||||
return levels;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.raytheon.uf.edex.ogc.common.interfaces;
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* WCS Interface
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky Initial
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IWCSMetaData {
|
||||
|
||||
public void sendMetaData(Map<String, ? extends SimpleLayer> layermap,
|
||||
Collection<? extends PluginDataObject> coll);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.raytheon.uf.edex.ogc.common.interfaces;
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* WFS Interface
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky Initial
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IWFSMetaData<L extends SimpleLayer> {
|
||||
|
||||
public void sendMetaData(L layer);
|
||||
|
||||
}
|
|
@ -11,7 +11,6 @@ Require-Bundle: org.springframework;bundle-version="2.5.6",
|
|||
javax.persistence;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.logging;bundle-version="1.1.1",
|
||||
com.raytheon.uf.common.dataplugin.grib;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.edex.database;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
||||
org.hibernate;bundle-version="1.0.0",
|
||||
|
@ -23,7 +22,11 @@ Require-Bundle: org.springframework;bundle-version="2.5.6",
|
|||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.spatial;bundle-version="1.0.0"
|
||||
com.raytheon.uf.common.spatial;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.grib;bundle-version="1.12.1174"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.edex.plugin.grib.ogc
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<constructor-arg ref="grib-camel"/>
|
||||
</bean>
|
||||
|
||||
<bean id="gribLayerCollector" class="com.raytheon.uf.edex.plugin.grib.ogc.GribLayerCollector" >
|
||||
<bean id="gribLayerCollector" class="com.raytheon.uf.edex.plugin.grib.ogc.GribLayerCollector" depends-on="registryManagerInstanceInitializer, registerDataDeliveryHandlers, registerRequestRegistryRouter">
|
||||
<constructor-arg ref="gribLayerTransformer" />
|
||||
</bean>
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||
|
||||
<bean id="gribLayerPluginName" class="java.lang.String">
|
||||
<constructor-arg type="java.lang.String" value="gribLayer" />
|
||||
</bean>
|
||||
|
||||
<bean id="gribLayerProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
|
||||
<property name="pluginName" ref="gribLayerPluginName" />
|
||||
<property name="pluginFQN" value="com.raytheon.uf.edex.plugin.grib.ogc" />
|
||||
<property name="record" value="com.raytheon.uf.edex.plugin.grib.ogc.GribLayer" />
|
||||
</bean>
|
||||
|
||||
<bean factory-bean="pluginRegistry" factory-method="register">
|
||||
<constructor-arg ref="gribLayerPluginName"/>
|
||||
<constructor-arg ref="gribLayerProperties"/>
|
||||
</bean>
|
||||
|
||||
<bean id="gribLayerTransformer" class="com.raytheon.uf.edex.ogc.common.db.LayerTransformer" >
|
||||
<constructor-arg value="grib" />
|
||||
<constructor-arg value="com.raytheon.uf.edex.plugin.grib.ogc.GribLayer" />
|
||||
</bean>
|
||||
|
||||
<bean id="gribWmsSource" class="com.raytheon.uf.edex.plugin.grib.ogc.GribWmsSource" >
|
||||
<constructor-arg ref="gribProperties" />
|
||||
<constructor-arg ref="gribLayerTransformer" />
|
||||
</bean>
|
||||
|
||||
<bean id="gribWcsSource" class="com.raytheon.uf.edex.plugin.grib.ogc.GribWcsSource">
|
||||
<constructor-arg ref="gribProperties" />
|
||||
<constructor-arg ref="gribLayerTransformer" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -2,7 +2,7 @@ package com.raytheon.uf.edex.plugin.grib.ogc;
|
|||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
@ -20,17 +20,39 @@ import com.raytheon.uf.common.dataplugin.grib.GribRecord;
|
|||
import com.raytheon.uf.common.dataplugin.level.Level;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.gridcoverage.GridCoverage;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.ogc.common.db.DefaultLayerCollector;
|
||||
import com.raytheon.uf.edex.ogc.common.db.LayerTransformer;
|
||||
import com.raytheon.uf.edex.ogc.common.db.SimpleDimension;
|
||||
import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
|
||||
import com.raytheon.uf.edex.ogc.common.db.WCSLayerCollector;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
|
||||
/**
|
||||
*
|
||||
* Grib Layer Collector
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 08/09/2012 754 dhladky Modified from a class written by Brian Clements
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class GribLayerCollector extends
|
||||
DefaultLayerCollector<GribLayer, GribRecord> {
|
||||
WCSLayerCollector<GribLayer, GribRecord> {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GribLayerCollector.class);
|
||||
|
||||
public GribLayerCollector(LayerTransformer transformer) {
|
||||
super(transformer, GribLayer.class, GribRecord.class);
|
||||
this.layer = newLayer();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +79,7 @@ public class GribLayerCollector extends
|
|||
} else if (GribDimension.VERSION_DIM.equals(name)) {
|
||||
values.add(String.valueOf(rec.getGridVersion()));
|
||||
} else {
|
||||
log.warn("Unkown grib dimension: " + name);
|
||||
statusHandler.warn("Unkown grib dimension: " + name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +95,7 @@ public class GribLayerCollector extends
|
|||
GribModel model = rec.getModelInfo();
|
||||
GridCoverage cov = model.getLocation();
|
||||
if (cov == null) {
|
||||
log.warn("Recieved record without coverage!");
|
||||
statusHandler.warn("Recieved record without coverage!");
|
||||
return false;
|
||||
}
|
||||
layer.setNx(cov.getNx());
|
||||
|
@ -87,7 +109,7 @@ public class GribLayerCollector extends
|
|||
layer.setTargetMaxy(env.getMaxY());
|
||||
layer.setCrs84Bounds(JTS.toGeometry(env));
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to get crs84 bounds", e);
|
||||
statusHandler.error("Unable to get crs84 bounds", e);
|
||||
return false;
|
||||
}
|
||||
layer.setTimes(new TreeSet<Date>());
|
||||
|
@ -128,11 +150,11 @@ public class GribLayerCollector extends
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void sendMetaData(HashMap<String, GribLayer> layermap,
|
||||
public void sendMetaData(Map<String, ? extends SimpleLayer> layermap,
|
||||
Collection<? extends PluginDataObject> coll) {
|
||||
|
||||
for (Entry<String, GribLayer> entry : layermap.entrySet()) {
|
||||
GribLayer layer = entry.getValue();
|
||||
for (Entry<String, ? extends SimpleLayer> entry : layermap.entrySet()) {
|
||||
GribLayer layer = (GribLayer) entry.getValue();
|
||||
|
||||
// for (GribDimension)
|
||||
|
||||
|
@ -175,4 +197,9 @@ public class GribLayerCollector extends
|
|||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void setParameters(GribLayer layer) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,9 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.edex.wms;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
javax.persistence;bundle-version="1.0.0"
|
||||
javax.persistence;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.edex.plugin.obs.ogc.metar,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
.,\
|
||||
res/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<constructor-arg ref="obsPluginName" />
|
||||
</bean>
|
||||
|
||||
<bean id="metarPointData" class="com.raytheon.edex.plugin.obs.metar.MetarPointDataTransform"/>
|
||||
<bean id="metarPointData" class="com.raytheon.edex.plugin.obs.metar.MetarPointDataTransform" depends-on="registerObsPlugin"/>
|
||||
|
||||
<bean id="obsSeparator" class="com.raytheon.edex.plugin.obs.metar.MetarSeparator" />
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
<constructor-arg ref="obs-camel"/>
|
||||
</bean>
|
||||
|
||||
<bean id="metarLayerCollector" class="com.raytheon.uf.edex.plugin.obs.ogc.metar.MetarLayerCollector" >
|
||||
<bean id="metarLayerCollector" class="com.raytheon.uf.edex.plugin.obs.ogc.metar.MetarLayerCollector" depends-on="registryManagerInstanceInitializer, registerDataDeliveryHandlers, registerRequestRegistryRouter, registerObsPlugin" >
|
||||
<constructor-arg ref="metarLayerTransformer" />
|
||||
</bean>
|
||||
|
||||
|
@ -32,6 +32,18 @@
|
|||
errorHandlerRef="errorHandler"
|
||||
autoStartup="false">
|
||||
|
||||
<!--METAR file route -->
|
||||
<endpoint id="metarFileEndpoint" uri="file:${edex.home}/data/sbn/metar?noop=true&idempotent=false" />
|
||||
|
||||
<route id="metarFileConsumerRoute">
|
||||
<from ref="metarFileEndpoint" />
|
||||
<bean ref="fileToString" />
|
||||
<setHeader headerName="pluginName">
|
||||
<constant>obs</constant>
|
||||
</setHeader>
|
||||
<to uri="jms-generic:queue:Ingest.obs" />
|
||||
</route>
|
||||
|
||||
<!-- Begin METAR routes -->
|
||||
<route id="metarIngestRoute">
|
||||
<from uri="jms-generic:queue:Ingest.obs?destinationResolver=#qpidDurableResolver" />
|
||||
|
@ -57,7 +69,7 @@
|
|||
|
||||
<route id="metarLayerRoute">
|
||||
<from uri="quartz://metar/layers?cron=0+*+*+*+*+?" />
|
||||
<bean ref="metarLayerCollector" method="updateDB" />
|
||||
<bean ref="metarLayerCollector" method="buildLayerUpdate" />
|
||||
</route>
|
||||
|
||||
<route id="metarPurgeExpired">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.raytheon.uf.edex.plugin.obs.ogc.metar;
|
||||
|
||||
|
||||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
|
@ -22,6 +23,7 @@ package com.raytheon.uf.edex.plugin.obs.ogc.metar;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
@ -29,14 +31,16 @@ import java.util.TreeSet;
|
|||
import org.geotools.geometry.jts.JTS;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.raytheon.uf.edex.ogc.common.db.LayerCollector;
|
||||
import com.raytheon.uf.edex.ogc.common.db.LayerTransformer;
|
||||
import com.raytheon.uf.edex.ogc.common.db.WFSLayerCollector;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
/**
|
||||
*
|
||||
|
@ -53,24 +57,22 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class MetarLayerCollector extends LayerCollector {
|
||||
|
||||
private MetarLayer layer = newLayer();
|
||||
public class MetarLayerCollector extends WFSLayerCollector<MetarLayer> {
|
||||
|
||||
private boolean truncate = true;
|
||||
|
||||
private int roundCutoff = 45;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(MetarLayerCollector.class);
|
||||
|
||||
public MetarLayerCollector(LayerTransformer transformer) {
|
||||
super(transformer);
|
||||
|
||||
this.layer = newLayer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds these PDO's as foder for this layer
|
||||
* Adds these PDO's as fodder for this layer
|
||||
*
|
||||
* @param pdos
|
||||
*/
|
||||
|
@ -78,30 +80,59 @@ public class MetarLayerCollector extends LayerCollector {
|
|||
synchronized (layer) {
|
||||
|
||||
SortedSet<Date> times = layer.getTimes();
|
||||
Envelope e = getCoverage().getEnvelope();
|
||||
|
||||
if (e != null) {
|
||||
|
||||
for (PluginDataObject pdo : pdos) {
|
||||
|
||||
if (pdo instanceof MetarRecord) {
|
||||
|
||||
MetarRecord record = (MetarRecord) pdo;
|
||||
|
||||
if (record != null) {
|
||||
|
||||
Coordinate c = record.getLocation().getLocation()
|
||||
.getCoordinate();
|
||||
|
||||
if (c != null) {
|
||||
|
||||
if (e.contains(c)) {
|
||||
|
||||
Calendar time = getTime(record);
|
||||
times.add(time.getTime());
|
||||
statusHandler.debug("Adding metar layer: " + record.toString());
|
||||
statusHandler.info("Adding metar layer: "
|
||||
+ record.toString());
|
||||
} else {
|
||||
statusHandler
|
||||
.info("Metar layer discarded: outside of range: "
|
||||
+ record.getLatitude()
|
||||
+ " "
|
||||
+ record.getLongitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the new times to the layer
|
||||
* Adds the new times to the layer, transmit meta data
|
||||
*/
|
||||
public void updateDB() {
|
||||
public void buildLayerUpdate() {
|
||||
|
||||
synchronized (layer) {
|
||||
try {
|
||||
if (!layer.getTimes().isEmpty()) {
|
||||
updateLayer(layer);
|
||||
statusHandler.info("Updating "+layer.getName()+" # times: "+layer.getTimes().size());
|
||||
sendMetaData(layer);
|
||||
statusHandler.info("Updating "+layer.getName()+": times: "+layer.getTimes().size());
|
||||
layer.getTimes().clear();
|
||||
}
|
||||
} catch (DataAccessLayerException e) {
|
||||
statusHandler.error("problem updating metar layer. "+e);
|
||||
e.printStackTrace();
|
||||
statusHandler.error("problem updating "+layer.getName()+" layer. "+e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +191,15 @@ public class MetarLayerCollector extends LayerCollector {
|
|||
/**
|
||||
* creates a new layer
|
||||
*/
|
||||
private MetarLayer newLayer() {
|
||||
public MetarLayer newLayer() {
|
||||
|
||||
MetarLayer layer = new MetarLayer();
|
||||
layer = new MetarLayer();
|
||||
layer.setName("metar");
|
||||
ReferencedEnvelope env = new ReferencedEnvelope(-180, 180, -90, 90,
|
||||
// set the coverage for this layer
|
||||
setCoverage(layer.getName());
|
||||
Coordinate lowerRight = getCoverage().getLowerRight();
|
||||
Coordinate upperLeft = getCoverage().getUpperLeft();
|
||||
ReferencedEnvelope env = new ReferencedEnvelope(upperLeft.x, lowerRight.x, lowerRight.y, upperLeft.y,
|
||||
MapUtil.LATLON_PROJECTION);
|
||||
layer.setCrs84Bounds(JTS.toGeometry((Envelope) env));
|
||||
layer.setTargetCrsCode("CRS:84");
|
||||
|
@ -174,6 +209,27 @@ public class MetarLayerCollector extends LayerCollector {
|
|||
layer.setTargetMiny(env.getMinY());
|
||||
layer.setTimes(new TreeSet<Date>());
|
||||
|
||||
// create parameters
|
||||
setParameters(layer);
|
||||
// create a point data set metadata object
|
||||
setPointDataSetMetaData(layer);
|
||||
// install main dataset on registry
|
||||
storeDataSet(getDataSet());
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParameters(MetarLayer layer) {
|
||||
|
||||
if (getParameters() == null || getParameters().isEmpty()) {
|
||||
parameters = new HashMap<String, Parameter>();
|
||||
for (Parameter parm: agent.getLayer(layer.getName()).getParameters()) {
|
||||
// place in map
|
||||
parameters.put(parm.getName(), parm);
|
||||
storeParameter(parm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
// Generated on: 2011.11.29 at 09:28:54 AM CST
|
||||
//
|
||||
|
||||
|
||||
package com.raytheon.uf.edex.plugin.obs.ogc.metar.feature;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,11 +30,13 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for metar complex type.
|
||||
* <p>
|
||||
* Java class for metar complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p>
|
||||
* The following schema fragment specifies the expected content contained within
|
||||
* this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="metar">
|
||||
|
@ -84,80 +85,81 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "metar", propOrder = {
|
||||
"report",
|
||||
"nominalTime",
|
||||
"timeObs",
|
||||
"reportType",
|
||||
"correction",
|
||||
"obsLocation",
|
||||
"autoStationType",
|
||||
"skyKey",
|
||||
"skyCoverage",
|
||||
"vertVisibility",
|
||||
"skyLayerBase",
|
||||
"visibility",
|
||||
"weatherKey",
|
||||
"weatherCondition",
|
||||
"seaLevelPress",
|
||||
"temperature",
|
||||
"tempFromTenths",
|
||||
"dewPoint",
|
||||
"dewPointFromTenths",
|
||||
"windDir",
|
||||
"windSpeed",
|
||||
"windGust",
|
||||
"altimeterInPa",
|
||||
"altimeter",
|
||||
"minTemp24Hour",
|
||||
"maxTemp24Hour",
|
||||
"precip1Hour",
|
||||
"precip3Hour",
|
||||
"precip6Hour",
|
||||
"precip24Hour",
|
||||
"pressChangeChar",
|
||||
"pressChange3Hour",
|
||||
"refHour"
|
||||
})
|
||||
|
||||
public class Metar
|
||||
extends AbstractFeatureType
|
||||
{
|
||||
|
||||
@XmlType(name = "metar", propOrder = { "report", "nominalTime", "timeObs",
|
||||
"reportType", "correction", "obsLocation", "autoStationType", "skyKey",
|
||||
"skyCoverage", "vertVisibility", "skyLayerBase", "visibility",
|
||||
"weatherKey", "weatherCondition", "seaLevelPress", "temperature",
|
||||
"tempFromTenths", "dewPoint", "dewPointFromTenths", "windDir",
|
||||
"windSpeed", "windGust", "altimeterInPa", "altimeter", "minTemp24Hour",
|
||||
"maxTemp24Hour", "precip1Hour", "precip3Hour", "precip6Hour",
|
||||
"precip24Hour", "pressChangeChar", "pressChange3Hour", "refHour" })
|
||||
public class Metar extends AbstractFeatureType {
|
||||
|
||||
protected String report;
|
||||
|
||||
protected String nominalTime;
|
||||
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar timeObs;
|
||||
|
||||
protected String reportType;
|
||||
|
||||
protected String correction;
|
||||
|
||||
protected ObsLocation obsLocation;
|
||||
|
||||
protected String autoStationType;
|
||||
|
||||
protected String skyKey;
|
||||
|
||||
protected List<com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover> skyCoverage;
|
||||
|
||||
protected Integer vertVisibility;
|
||||
|
||||
protected Integer skyLayerBase;
|
||||
|
||||
protected Float visibility;
|
||||
|
||||
protected String weatherKey;
|
||||
|
||||
protected List<com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition> weatherCondition;
|
||||
|
||||
protected Float seaLevelPress;
|
||||
|
||||
protected Integer temperature;
|
||||
|
||||
protected Float tempFromTenths;
|
||||
|
||||
protected Integer dewPoint;
|
||||
|
||||
protected Float dewPointFromTenths;
|
||||
|
||||
protected String windDir;
|
||||
|
||||
protected Integer windSpeed;
|
||||
|
||||
protected Integer windGust;
|
||||
|
||||
protected Float altimeterInPa;
|
||||
|
||||
protected Float altimeter;
|
||||
|
||||
protected Float minTemp24Hour;
|
||||
|
||||
protected Float maxTemp24Hour;
|
||||
|
||||
protected Float precip1Hour;
|
||||
|
||||
protected Float precip3Hour;
|
||||
|
||||
protected Float precip6Hour;
|
||||
|
||||
protected Float precip24Hour;
|
||||
|
||||
protected String pressChangeChar;
|
||||
|
||||
protected Float pressChange3Hour;
|
||||
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar refHour;
|
||||
|
||||
|
@ -175,6 +177,7 @@ public class Metar
|
|||
|
||||
/**
|
||||
* copy constructor
|
||||
*
|
||||
* @param record
|
||||
*/
|
||||
public Metar(MetarRecord record) {
|
||||
|
@ -195,7 +198,8 @@ public class Metar
|
|||
this.setWeatherCondition(record.getWeatherCondition());
|
||||
this.setSeaLevelPress(getFloat(record.getSeaLevelPress(), floatNullVal));
|
||||
this.setTemperature(getInt(record.getTemperature(), intNullVal));
|
||||
this.setTempFromTenths(getFloat(record.getTempFromTenths(), floatNullVal));
|
||||
this.setTempFromTenths(getFloat(record.getTempFromTenths(),
|
||||
floatNullVal));
|
||||
this.setDewPoint(getInt(record.getDewPoint(), intNullVal));
|
||||
this.setDewPointFromTenths(getFloat(record.getDewPointFromTenths(),
|
||||
floatNullVal));
|
||||
|
@ -219,9 +223,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the report property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getReport() {
|
||||
|
@ -232,8 +234,7 @@ public class Metar
|
|||
* Sets the value of the report property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setReport(String value) {
|
||||
|
@ -243,9 +244,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the nominalTime property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getNominalTime() {
|
||||
|
@ -256,8 +255,7 @@ public class Metar
|
|||
* Sets the value of the nominalTime property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setNominalTime(String value) {
|
||||
|
@ -267,9 +265,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the timeObs property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
* @return possible object is {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getTimeObs() {
|
||||
|
@ -280,8 +276,7 @@ public class Metar
|
|||
* Sets the value of the timeObs property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
* allowed object is {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setTimeObs(XMLGregorianCalendar value) {
|
||||
|
@ -291,9 +286,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the reportType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getReportType() {
|
||||
|
@ -304,8 +297,7 @@ public class Metar
|
|||
* Sets the value of the reportType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setReportType(String value) {
|
||||
|
@ -315,9 +307,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the correction property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getCorrection() {
|
||||
|
@ -328,8 +318,7 @@ public class Metar
|
|||
* Sets the value of the correction property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setCorrection(String value) {
|
||||
|
@ -339,9 +328,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the obsLocation property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link ObsLocation }
|
||||
* @return possible object is {@link ObsLocation }
|
||||
*
|
||||
*/
|
||||
public ObsLocation getObsLocation() {
|
||||
|
@ -352,8 +339,7 @@ public class Metar
|
|||
* Sets the value of the obsLocation property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link ObsLocation }
|
||||
* allowed object is {@link ObsLocation }
|
||||
*
|
||||
*/
|
||||
public void setObsLocation(ObsLocation value) {
|
||||
|
@ -363,9 +349,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the autoStationType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getAutoStationType() {
|
||||
|
@ -376,8 +360,7 @@ public class Metar
|
|||
* Sets the value of the autoStationType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setAutoStationType(String value) {
|
||||
|
@ -387,9 +370,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the skyKey property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSkyKey() {
|
||||
|
@ -400,8 +381,7 @@ public class Metar
|
|||
* Sets the value of the skyKey property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSkyKey(String value) {
|
||||
|
@ -412,21 +392,21 @@ public class Metar
|
|||
* Gets the value of the skyCoverage property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the skyCoverage property.
|
||||
* This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the skyCoverage property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
*
|
||||
* <pre>
|
||||
* getSkyCoverage().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link SkyCover }
|
||||
* Objects of the following type(s) are allowed in the list {@link SkyCover }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@ -440,9 +420,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the vertVisibility property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getVertVisibility() {
|
||||
|
@ -453,8 +431,7 @@ public class Metar
|
|||
* Sets the value of the vertVisibility property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setVertVisibility(Integer value) {
|
||||
|
@ -464,9 +441,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the skyLayerBase property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getSkyLayerBase() {
|
||||
|
@ -477,8 +452,7 @@ public class Metar
|
|||
* Sets the value of the skyLayerBase property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setSkyLayerBase(Integer value) {
|
||||
|
@ -488,9 +462,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the visibility property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getVisibility() {
|
||||
|
@ -501,8 +473,7 @@ public class Metar
|
|||
* Sets the value of the visibility property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setVisibility(Float value) {
|
||||
|
@ -512,9 +483,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the weatherKey property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWeatherKey() {
|
||||
|
@ -525,8 +494,7 @@ public class Metar
|
|||
* Sets the value of the weatherKey property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWeatherKey(String value) {
|
||||
|
@ -537,13 +505,14 @@ public class Metar
|
|||
* Gets the value of the weatherCondition property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the weatherCondition property.
|
||||
* This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the weatherCondition property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
*
|
||||
* <pre>
|
||||
* getWeatherCondition().add(newItem);
|
||||
* </pre>
|
||||
|
@ -565,9 +534,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the seaLevelPress property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getSeaLevelPress() {
|
||||
|
@ -578,8 +545,7 @@ public class Metar
|
|||
* Sets the value of the seaLevelPress property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setSeaLevelPress(Float value) {
|
||||
|
@ -589,9 +555,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the temperature property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getTemperature() {
|
||||
|
@ -602,8 +566,7 @@ public class Metar
|
|||
* Sets the value of the temperature property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setTemperature(Integer value) {
|
||||
|
@ -613,9 +576,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the tempFromTenths property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getTempFromTenths() {
|
||||
|
@ -626,8 +587,7 @@ public class Metar
|
|||
* Sets the value of the tempFromTenths property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setTempFromTenths(Float value) {
|
||||
|
@ -637,9 +597,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the dewPoint property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getDewPoint() {
|
||||
|
@ -650,8 +608,7 @@ public class Metar
|
|||
* Sets the value of the dewPoint property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setDewPoint(Integer value) {
|
||||
|
@ -661,9 +618,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the dewPointFromTenths property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getDewPointFromTenths() {
|
||||
|
@ -674,8 +629,7 @@ public class Metar
|
|||
* Sets the value of the dewPointFromTenths property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setDewPointFromTenths(Float value) {
|
||||
|
@ -685,9 +639,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the windDir property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWindDir() {
|
||||
|
@ -698,8 +650,7 @@ public class Metar
|
|||
* Sets the value of the windDir property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWindDir(String value) {
|
||||
|
@ -709,9 +660,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the windSpeed property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getWindSpeed() {
|
||||
|
@ -722,8 +671,7 @@ public class Metar
|
|||
* Sets the value of the windSpeed property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setWindSpeed(Integer value) {
|
||||
|
@ -733,9 +681,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the windGust property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
* @return possible object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getWindGust() {
|
||||
|
@ -746,8 +692,7 @@ public class Metar
|
|||
* Sets the value of the windGust property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
* allowed object is {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setWindGust(Integer value) {
|
||||
|
@ -757,9 +702,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the altimeterInPa property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getAltimeterInPa() {
|
||||
|
@ -770,8 +713,7 @@ public class Metar
|
|||
* Sets the value of the altimeterInPa property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setAltimeterInPa(Float value) {
|
||||
|
@ -781,9 +723,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the altimeter property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getAltimeter() {
|
||||
|
@ -794,8 +734,7 @@ public class Metar
|
|||
* Sets the value of the altimeter property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setAltimeter(Float value) {
|
||||
|
@ -805,9 +744,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the minTemp24Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getMinTemp24Hour() {
|
||||
|
@ -818,8 +755,7 @@ public class Metar
|
|||
* Sets the value of the minTemp24Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setMinTemp24Hour(Float value) {
|
||||
|
@ -829,9 +765,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the maxTemp24Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getMaxTemp24Hour() {
|
||||
|
@ -842,8 +776,7 @@ public class Metar
|
|||
* Sets the value of the maxTemp24Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setMaxTemp24Hour(Float value) {
|
||||
|
@ -853,9 +786,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the precip1Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getPrecip1Hour() {
|
||||
|
@ -866,8 +797,7 @@ public class Metar
|
|||
* Sets the value of the precip1Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setPrecip1Hour(Float value) {
|
||||
|
@ -877,9 +807,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the precip3Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getPrecip3Hour() {
|
||||
|
@ -890,8 +818,7 @@ public class Metar
|
|||
* Sets the value of the precip3Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setPrecip3Hour(Float value) {
|
||||
|
@ -901,9 +828,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the precip6Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getPrecip6Hour() {
|
||||
|
@ -914,8 +839,7 @@ public class Metar
|
|||
* Sets the value of the precip6Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setPrecip6Hour(Float value) {
|
||||
|
@ -925,9 +849,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the precip24Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getPrecip24Hour() {
|
||||
|
@ -938,8 +860,7 @@ public class Metar
|
|||
* Sets the value of the precip24Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setPrecip24Hour(Float value) {
|
||||
|
@ -949,9 +870,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the pressChangeChar property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
* @return possible object is {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPressChangeChar() {
|
||||
|
@ -962,8 +881,7 @@ public class Metar
|
|||
* Sets the value of the pressChangeChar property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
* allowed object is {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPressChangeChar(String value) {
|
||||
|
@ -973,9 +891,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the pressChange3Hour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Float }
|
||||
* @return possible object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public Float getPressChange3Hour() {
|
||||
|
@ -986,8 +902,7 @@ public class Metar
|
|||
* Sets the value of the pressChange3Hour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Float }
|
||||
* allowed object is {@link Float }
|
||||
*
|
||||
*/
|
||||
public void setPressChange3Hour(Float value) {
|
||||
|
@ -997,9 +912,7 @@ public class Metar
|
|||
/**
|
||||
* Gets the value of the refHour property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
* @return possible object is {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getRefHour() {
|
||||
|
@ -1010,8 +923,7 @@ public class Metar
|
|||
* Sets the value of the refHour property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
* allowed object is {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setRefHour(XMLGregorianCalendar value) {
|
||||
|
@ -1037,7 +949,8 @@ public class Metar
|
|||
if (from == null) {
|
||||
return null;
|
||||
}
|
||||
com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition to = new com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition(from);
|
||||
com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition to = new com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition(
|
||||
from);
|
||||
return to;
|
||||
}
|
||||
|
||||
|
@ -1050,7 +963,8 @@ public class Metar
|
|||
if (from == null) {
|
||||
return null;
|
||||
}
|
||||
com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover to = new com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover(from);
|
||||
com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover to = new com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover(
|
||||
from);
|
||||
return to;
|
||||
}
|
||||
|
||||
|
@ -1075,7 +989,8 @@ public class Metar
|
|||
try {
|
||||
return DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
|
||||
} catch (DatatypeConfigurationException e) {
|
||||
statusHandler.error("Unable to convert calendar. "+e.getMessage());
|
||||
statusHandler
|
||||
.error("Unable to convert calendar. " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1097,7 +1012,8 @@ public class Metar
|
|||
/**
|
||||
* @param skyCoverage
|
||||
*/
|
||||
private void setSkyCover(Set<com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover> from) {
|
||||
private void setSkyCover(
|
||||
Set<com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover> from) {
|
||||
if (from != null) {
|
||||
List<com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.SkyCover> localSkyCover = getSkyCoverage();
|
||||
for (com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover sc : from) {
|
||||
|
@ -1109,7 +1025,8 @@ public class Metar
|
|||
/**
|
||||
* @param weatherCondition
|
||||
*/
|
||||
private void setWeatherCondition(List<com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition> from) {
|
||||
private void setWeatherCondition(
|
||||
List<com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition> from) {
|
||||
if (from != null) {
|
||||
List<com.raytheon.uf.edex.plugin.obs.ogc.metar.feature.WeatherCondition> localWeatherCondition = getWeatherCondition();
|
||||
for (com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition wc : from) {
|
||||
|
|
Loading…
Add table
Reference in a new issue