Issue #2098 Updates for WFS/DPA improvements
Change-Id: Ia0d68d1faf5f4b9da8c8f683f459a1a3e5dac0cf Former-commit-id:077483ac8d
[formerly24a3c8b24b
] [formerly0a45c77520
] [formerly077483ac8d
[formerly24a3c8b24b
] [formerly0a45c77520
] [formerlyac4aeeec45
[formerly0a45c77520
[formerly dc668631168388501efb8753ecb4cff8b9025456]]]] Former-commit-id:ac4aeeec45
Former-commit-id:c6667a985b
[formerly02c9778ff6
] [formerly 5137d7223b27c55203fb556e742da0b258a5b687 [formerly36005754b5
]] Former-commit-id: 537d3271a6f623d2d977a5dd1e54e8eb620e9a2d [formerly6cef334d9a
] Former-commit-id:b670a20106
This commit is contained in:
parent
956a4d0937
commit
d3e4994152
8 changed files with 79 additions and 28 deletions
|
@ -2,7 +2,7 @@
|
||||||
<serviceConfig name="WFS">
|
<serviceConfig name="WFS">
|
||||||
<!-- Date format used by WFS providers -->
|
<!-- Date format used by WFS providers -->
|
||||||
<dateConfig>
|
<dateConfig>
|
||||||
<format>yyyy-MM-dd'T'HH:mm:ss.SSSZ</format>
|
<format>yyyy-MM-dd'T'HH:mm:ss.SSS</format>
|
||||||
</dateConfig>
|
</dateConfig>
|
||||||
|
|
||||||
<constant name="BLANK" value=""/>
|
<constant name="BLANK" value=""/>
|
||||||
|
@ -35,6 +35,6 @@
|
||||||
<constant name="OUTPUTFORMAT" value="text/xml"/>
|
<constant name="OUTPUTFORMAT" value="text/xml"/>
|
||||||
<constant name="FORWARD_SLASH" value="/"/>
|
<constant name="FORWARD_SLASH" value="/"/>
|
||||||
<constant name="DEFAULT_CRS" value="crs:84"/>
|
<constant name="DEFAULT_CRS" value="crs:84"/>
|
||||||
<constant name="MAX" value="maxfeatures=3000"/>
|
<constant name="MAX" value="5000"/>
|
||||||
|
|
||||||
</serviceConfig>
|
</serviceConfig>
|
|
@ -2,4 +2,6 @@
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -5,9 +5,3 @@ Bundle-SymbolicName: com.raytheon.uf.edex.dataprovideragent
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
Require-Bundle: com.raytheon.uf.edex.purgesrv;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.common.datadelivery.request;bundle-version="1.0.0"
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
//
|
||||||
|
// Placeholder for src directory
|
||||||
|
//
|
||||||
|
|
||||||
|
package com.raytheon.uf.edex.dataprovideragent;
|
|
@ -21,8 +21,10 @@ package com.raytheon.uf.edex.ogc.registry;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.datadelivery.harvester.Agent;
|
||||||
import com.raytheon.uf.common.datadelivery.harvester.ConfigLayer;
|
import com.raytheon.uf.common.datadelivery.harvester.ConfigLayer;
|
||||||
import com.raytheon.uf.common.datadelivery.harvester.HarvesterConfig;
|
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.harvester.OGCAgent;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
|
@ -90,12 +92,16 @@ public class RegistryFeatureTypeModifier implements IFeatureTypeModifier {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ConfigLayer getConfigLayer(String name) {
|
public ConfigLayer getConfigLayer(String name) {
|
||||||
ConfigLayer layer = null;
|
|
||||||
if (config.getAgent() != null) {
|
if (layer == null) {
|
||||||
if (config.getAgent() instanceof OGCAgent) {
|
Agent agent = getHarvesterConfig().getAgent();
|
||||||
layer = ((OGCAgent) config.getAgent()).getLayer(name);
|
if (agent != null) {
|
||||||
|
if (agent instanceof OGCAgent) {
|
||||||
|
layer = ((OGCAgent) agent).getLayer(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,5 +152,18 @@ public class RegistryFeatureTypeModifier implements IFeatureTypeModifier {
|
||||||
|
|
||||||
return crs;
|
return crs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Harvester Configuration
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected HarvesterConfig getHarvesterConfig() {
|
||||||
|
|
||||||
|
if (config == null) {
|
||||||
|
config = HarvesterConfigurationManager.getOGCConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||||
|
|
||||||
<bean id="registerDataDeliveryHandlers" class="java.lang.String">
|
|
||||||
<!-- required for depends-on -->
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="madisDecoder" class="com.raytheon.uf.edex.plugin.madis.MadisDecoder">
|
<bean id="madisDecoder" class="com.raytheon.uf.edex.plugin.madis.MadisDecoder">
|
||||||
<constructor-arg ref="madisPluginName" />
|
<constructor-arg ref="madisPluginName" />
|
||||||
</bean>
|
</bean>
|
||||||
|
@ -42,12 +38,6 @@
|
||||||
<constructor-arg ref="madis-camel" />
|
<constructor-arg ref="madis-camel" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="madisLayerCollector"
|
|
||||||
class="com.raytheon.uf.edex.plugin.madis.ogc.MadisLayerCollector"
|
|
||||||
depends-on="registerDataDeliveryHandlers, registerRequestRegistryRouter, registerMadisPlugin">
|
|
||||||
<constructor-arg ref="madisLayerTransformer" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="madisSeparator" class="com.raytheon.uf.edex.plugin.madis.MadisSeparator"
|
<bean id="madisSeparator" class="com.raytheon.uf.edex.plugin.madis.MadisSeparator"
|
||||||
depends-on="jmsIngestMadisConfig, jms-madis, madisThreadPool">
|
depends-on="jmsIngestMadisConfig, jms-madis, madisThreadPool">
|
||||||
<constructor-arg
|
<constructor-arg
|
||||||
|
@ -139,9 +129,10 @@
|
||||||
<bean ref="madisDecoder" method="decode" />
|
<bean ref="madisDecoder" method="decode" />
|
||||||
<bean ref="madisRegistryAddon" method="filter" />
|
<bean ref="madisRegistryAddon" method="filter" />
|
||||||
<bean ref="madisPointData" method="toPointData" />
|
<bean ref="madisPointData" method="toPointData" />
|
||||||
|
<bean ref="persist" method="persist"/>
|
||||||
|
<bean ref="index" method="index"/>
|
||||||
<bean ref="madisLayerCollector" method="add" />
|
<bean ref="madisLayerCollector" method="add" />
|
||||||
<!-- we don't need to alert on DPA, just save -->
|
<bean ref="processUtil" method="log"/>
|
||||||
<to uri="direct-vm:persistIndex" />
|
|
||||||
</pipeline>
|
</pipeline>
|
||||||
<doCatch>
|
<doCatch>
|
||||||
<exception>java.lang.Throwable</exception>
|
<exception>java.lang.Throwable</exception>
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
com.raytheon.uf.edex.registry.ebxml.services.query.adhoc.AdhocQueryExpression
|
com.raytheon.uf.edex.registry.ebxml.services.query.adhoc.AdhocQueryExpression
|
||||||
com.raytheon.uf.edex.registry.ebxml.services.rest.RestResponse
|
|
|
@ -21,6 +21,9 @@ package com.raytheon.uf.common.comm;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.FileReader;
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -125,7 +128,10 @@ public class HttpProxiedValidClientCredentialsTest {
|
||||||
|
|
||||||
MockWfsRequestBuilder wrb = new MockWfsRequestBuilder(getRetrievalAttribute());
|
MockWfsRequestBuilder wrb = new MockWfsRequestBuilder(getRetrievalAttribute());
|
||||||
String request = wrb.getRequest();
|
String request = wrb.getRequest();
|
||||||
|
//String request = getRequest("/home/dhladky/Desktop/good.xml");
|
||||||
|
System.out.println(request);
|
||||||
URI uri = new URI(conn.getUrl());
|
URI uri = new URI(conn.getUrl());
|
||||||
|
//URI uri = new URI("http://stormy.oma.us.ray.com:8085/wfs");
|
||||||
HttpPost post = new HttpPost(uri);
|
HttpPost post = new HttpPost(uri);
|
||||||
System.out.println("HTTPS URL: "+conn.getUrl());
|
System.out.println("HTTPS URL: "+conn.getUrl());
|
||||||
|
|
||||||
|
@ -235,8 +241,8 @@ public class HttpProxiedValidClientCredentialsTest {
|
||||||
|
|
||||||
private Time getTime() {
|
private Time getTime() {
|
||||||
|
|
||||||
String startDateString = "2013-07-29T17:00:00.000";
|
String startDateString = "2013-08-30T12:40:00.000";
|
||||||
String endDateString = "2013-07-29T18:00:00.000";
|
String endDateString = "2013-08-30T14:15:00.000";
|
||||||
|
|
||||||
Time time = new Time();
|
Time time = new Time();
|
||||||
time.setFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
|
time.setFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
|
||||||
|
@ -247,4 +253,39 @@ public class HttpProxiedValidClientCredentialsTest {
|
||||||
|
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* Used in cases where you have XML you want to read in and test
|
||||||
|
* @param path
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getRequest(String path) {
|
||||||
|
|
||||||
|
StringBuffer fileData = new StringBuffer(1000);
|
||||||
|
BufferedReader reader = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
reader = new BufferedReader(new FileReader(path));
|
||||||
|
char[] buf = new char[1024];
|
||||||
|
int numRead = 0;
|
||||||
|
while ((numRead = reader.read(buf)) != -1) {
|
||||||
|
String readData = String.valueOf(buf, 0, numRead);
|
||||||
|
fileData.append(readData);
|
||||||
|
buf = new char[1024];
|
||||||
|
}
|
||||||
|
reader.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("Didn't read file correctly!" + e);
|
||||||
|
} finally {
|
||||||
|
if (reader != null) {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fileData.toString();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue