Repository: incubator-rya Updated Branches: refs/heads/master 36f271b69 -> f00a3f3e0
RYA-268 Adding Geoindexing Profile to Web project. Closes #166. Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/f00a3f3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/f00a3f3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/f00a3f3e Branch: refs/heads/master Commit: f00a3f3e0e283bf1b0c83675aab4475f5f0e8d50 Parents: 36f271b Author: Aaron Mihalik <[email protected]> Authored: Fri Jun 2 15:52:30 2017 -0400 Committer: Caleb Meier <[email protected]> Committed: Wed Jul 12 20:46:56 2017 -0700 ---------------------------------------------------------------------- extras/rya.geoindexing/pom.xml | 12 ---- pom.xml | 10 +++ web/web.rya/pom.xml | 39 +++++++++-- .../webapp/WEB-INF/spring/spring-cloudbase.xml | 50 -------------- .../WEB-INF/spring/spring-mongodb-geo.xml | 69 ++++++++++++++++++++ .../WEB-INF/spring/spring-root-mongodb-geo.xml | 53 +++++++++++++++ 6 files changed, 164 insertions(+), 69 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/extras/rya.geoindexing/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.geoindexing/pom.xml b/extras/rya.geoindexing/pom.xml index c528aea..c0eff1d 100644 --- a/extras/rya.geoindexing/pom.xml +++ b/extras/rya.geoindexing/pom.xml @@ -26,18 +26,6 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <geotools.version>14.3</geotools.version> </properties> - <repositories> - <repository> - <id>osgeo</id> - <name>Open Source Geospatial Foundation Repository</name> - <url>http://download.osgeo.org/webdav/geotools/</url> - </repository> - <repository> - <id>boundlessgeo</id> - <name>Boundless Geospatial Software and Open Source GISâ Repository</name> - <url>https://repo.boundlessgeo.com/main/</url> - </repository> - </repositories> <dependencies> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 8e06885..5bf6b23 100644 --- a/pom.xml +++ b/pom.xml @@ -951,6 +951,16 @@ under the License. <enabled>true</enabled> </snapshots> </repository> + <repository> + <id>osgeo</id> + <name>Open Source Geospatial Foundation Repository</name> + <url>http://download.osgeo.org/webdav/geotools/</url> + </repository> + <repository> + <id>boundlessgeo</id> + <name>Boundless Geospatial Software and Open Source GISâ Repository</name> + <url>https://repo.boundlessgeo.com/main/</url> + </repository> </repositories> <scm> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/web/web.rya/pom.xml ---------------------------------------------------------------------- diff --git a/web/web.rya/pom.xml b/web/web.rya/pom.xml index b3918d9..299aa94 100644 --- a/web/web.rya/pom.xml +++ b/web/web.rya/pom.xml @@ -186,12 +186,37 @@ under the License. <database.implementation>accumulo</database.implementation> </properties> </profile> - <profile> - <id>mongodb</id> - <properties> - <db.specified>true</db.specified> - <database.implementation>mongodb</database.implementation> - </properties> - </profile> + <profile> + <id>mongodb</id> + <properties> + <db.specified>true</db.specified> + <database.implementation>mongodb</database.implementation> + </properties> + </profile> + <profile> + <id>geoindexing</id> + <properties> + <db.specified>true</db.specified> + <database.implementation>mongodb-geo</database.implementation> + </properties> + <dependencies> + <dependency> + <groupId>org.apache.rya</groupId> + <artifactId>rya.geoindexing</artifactId> + <version>${project.version}</version> + <!-- GeoWave brings in org.springframework jars that are not compatible with web.rya versions --> + <exclusions> + <exclusion> + <groupId>mil.nga.giat</groupId> + <artifactId>geowave-datastore-accumulo</artifactId> + </exclusion> + <exclusion> + <groupId>mil.nga.giat</groupId> + <artifactId>geowave-adapter-vector</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </profile> </profiles> </project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/web/web.rya/src/main/webapp/WEB-INF/spring/spring-cloudbase.xml ---------------------------------------------------------------------- diff --git a/web/web.rya/src/main/webapp/WEB-INF/spring/spring-cloudbase.xml b/web/web.rya/src/main/webapp/WEB-INF/spring/spring-cloudbase.xml deleted file mode 100644 index 5e90e77..0000000 --- a/web/web.rya/src/main/webapp/WEB-INF/spring/spring-cloudbase.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" - xmlns:context="http://www.springframework.org/schema/context" - xmlns:oxm="http://www.springframework.org/schema/oxm" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd - http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd"> - - <bean id="zkInstance" class="cloudbase.core.client.ZooKeeperInstance"> - <constructor-arg value="${instance.name}"/> - <constructor-arg value="${instance.zk}"/> - </bean> - - <bean id="connector" class="cloudbase.core.client.Connector"> - <constructor-arg ref="zkInstance"/> - <constructor-arg value="${instance.username}"/> - <constructor-arg value="${instance.password}"/> - </bean> - - <bean id="conf" class="org.apache.rya.cloudbase.CloudbaseRdfConfiguration"> - <property name="tablePrefix" value="${rya.tableprefix}"/> - <property name="displayQueryPlan" value="${rya.displayqueryplan}"/> - </bean> - - <bean id="ryaDAO" class="org.apache.rya.cloudbase.CloudbaseRyaDAO" init-method="init" destroy-method="destroy"> - <property name="connector" ref="connector"/> - <property name="conf" ref="conf"/> - </bean> -</beans> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/web/web.rya/src/main/webapp/WEB-INF/spring/spring-mongodb-geo.xml ---------------------------------------------------------------------- diff --git a/web/web.rya/src/main/webapp/WEB-INF/spring/spring-mongodb-geo.xml b/web/web.rya/src/main/webapp/WEB-INF/spring/spring-mongodb-geo.xml new file mode 100644 index 0000000..5780314 --- /dev/null +++ b/web/web.rya/src/main/webapp/WEB-INF/spring/spring-mongodb-geo.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:oxm="http://www.springframework.org/schema/oxm" + xmlns:hdp="http://www.springframework.org/schema/hadoop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd + http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd + http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd"> + + + <hdp:configuration id="hadoopConf"> + sc.useMongo=true + </hdp:configuration> + + <bean id="conf" class="org.apache.rya.mongodb.MongoDBRdfConfiguration"> + <constructor-arg ref="hadoopConf"/> + <property name="collectionName" value="${mongo.db.collectionprefix}"/> + <property name="tablePrefix" value="${mongo.db.collectionprefix}"/> + <property name="mongoInstance" value="${mongo.db.instance}"/> + <property name="mongoPort" value="${mongo.db.port}"/> + <property name="mongoDBName" value="${mongo.db.name}"/> + <property name="displayQueryPlan" value="${rya.displayqueryplan}"/> + <property name="useStats" value="false"/> + <property name="additionalIndexers"> + <list> + <value type="java.lang.Class">org.apache.rya.indexing.mongodb.geo.MongoGeoIndexer</value> + </list> + </property> + <property name="optimizers"> + <list> + <value type="java.lang.Class">org.apache.rya.indexing.GeoEnabledFilterFunctionOptimizer</value> + </list> + </property> + </bean> + + + <bean id="mongoClient" class="org.apache.rya.mongodb.MongoConnectorFactory" factory-method="getMongoClient"> + <constructor-arg ref="conf"/> + </bean> + + <bean id="ryaDAO" class="org.apache.rya.mongodb.MongoDBRyaDAO" init-method="init" destroy-method="destroy"> + <constructor-arg ref="conf"/> + <constructor-arg ref="mongoClient"/> + </bean> + + +</beans> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/f00a3f3e/web/web.rya/src/main/webapp/WEB-INF/spring/spring-root-mongodb-geo.xml ---------------------------------------------------------------------- diff --git a/web/web.rya/src/main/webapp/WEB-INF/spring/spring-root-mongodb-geo.xml b/web/web.rya/src/main/webapp/WEB-INF/spring/spring-root-mongodb-geo.xml new file mode 100644 index 0000000..43fc319 --- /dev/null +++ b/web/web.rya/src/main/webapp/WEB-INF/spring/spring-root-mongodb-geo.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xmlns:context="http://www.springframework.org/schema/context" + 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.5.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> + + <bean id="environmentProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location" value="classpath:environment.properties"/> + </bean> + + <context:component-scan base-package="org.apache.cloud.rdf.web.sail" /> + + <import resource="spring-security.xml"/> + <import resource="spring-mongodb-geo.xml"/> + + <bean id="inferenceEngine" class="org.apache.rya.rdftriplestore.inference.InferenceEngine" init-method="init" destroy-method="destroy"> + <property name="ryaDAO" ref="ryaDAO"/> + <property name="conf" ref="conf"/> + </bean> + + <bean id="rts" class="org.apache.rya.rdftriplestore.RdfCloudTripleStore"> + <property name="ryaDAO" ref="ryaDAO"/> + <property name="inferenceEngine" ref="inferenceEngine"/> + <property name="conf" ref="conf"/> + </bean> + + <bean id="sailRepo" class="org.apache.rya.rdftriplestore.RyaSailRepository" init-method="initialize" destroy-method="shutDown"> + <constructor-arg ref="rts"/> + </bean> +</beans>
