GORA-437 added mapping file to gora-tutorial

Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/51e4a341
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/51e4a341
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/51e4a341

Branch: refs/heads/master
Commit: 51e4a34145f39e03f3bb0eda20918125e44df907
Parents: c0031ab
Author: cihad guzel <cguz...@gmail.com>
Authored: Sat Aug 20 19:24:40 2016 +0300
Committer: cihad guzel <cguz...@gmail.com>
Committed: Sun Aug 21 22:56:09 2016 +0300

----------------------------------------------------------------------
 gora-tutorial/conf/gora-couchdb-mapping.xml | 41 ++++++++++++++++++++++++
 gora-tutorial/conf/gora.properties          |  3 +-
 gora-tutorial/pom.xml                       | 12 +++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/51e4a341/gora-tutorial/conf/gora-couchdb-mapping.xml
----------------------------------------------------------------------
diff --git a/gora-tutorial/conf/gora-couchdb-mapping.xml 
b/gora-tutorial/conf/gora-couchdb-mapping.xml
new file mode 100644
index 0000000..2cbee77
--- /dev/null
+++ b/gora-tutorial/conf/gora-couchdb-mapping.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<!--
+  Gora Mapping file for CouchDB Backend
+-->
+<gora-otd>
+
+  <class name="org.apache.gora.tutorial.log.generated.Pageview" 
keyClass="java.lang.Long" document="AccessLog">
+    <field name="url"/>
+    <field name="timestamp"/>
+    <field name="ip"/>
+    <field name="httpMethod"/>
+    <field name="httpStatusCode"/>
+    <field name="responseSize"/>
+    <field name="referrer"/>
+    <field name="userAgent"/>
+  </class>
+
+  <class name="org.apache.gora.tutorial.log.generated.MetricDatum" 
keyClass="java.lang.String" document="Metrics">
+    <field name="metricDimension"/>
+    <field name="timestamp"/>
+    <field name="metric"/>
+  </class>
+
+</gora-otd>

http://git-wip-us.apache.org/repos/asf/gora/blob/51e4a341/gora-tutorial/conf/gora.properties
----------------------------------------------------------------------
diff --git a/gora-tutorial/conf/gora.properties 
b/gora-tutorial/conf/gora.properties
index 5084216..80de06d 100644
--- a/gora-tutorial/conf/gora.properties
+++ b/gora-tutorial/conf/gora.properties
@@ -17,6 +17,7 @@
 ##gora.datastore.default is the default detastore implementation to use 
 ##if it is not passed to the DataStoreFactory#createDataStore() method.
 gora.datastore.default=org.apache.gora.hbase.store.HBaseStore
+#gora.datastore.default=org.apache.gora.couchdb.store.CouchDBStore
 #gora.datastore.default=org.apache.gora.cassandra.store.CassandraStore
 #gora.datastore.default=org.apache.gora.solr.store.SolrStore
 
@@ -57,4 +58,4 @@ 
gora.cache.datastore.default=org.apache.gora.jcache.store.JCacheStore
 
gora.datastore.jcache.provider=com.hazelcast.cache.impl.HazelcastServerCachingProvider
 
#gora.datastore.jcache.provider=com.hazelcast.client.cache.impl.HazelcastClientCachingProvider
 #gora.datastore.jcache.hazelcast.config=hazelcast-client.xml
-gora.datastore.jcache.hazelcast.config=hazelcast.xml
\ No newline at end of file
+gora.datastore.jcache.hazelcast.config=hazelcast.xml

http://git-wip-us.apache.org/repos/asf/gora/blob/51e4a341/gora-tutorial/pom.xml
----------------------------------------------------------------------
diff --git a/gora-tutorial/pom.xml b/gora-tutorial/pom.xml
index ab6892f..422d0e7 100644
--- a/gora-tutorial/pom.xml
+++ b/gora-tutorial/pom.xml
@@ -110,6 +110,11 @@
 
     <dependency>
       <groupId>org.apache.gora</groupId>
+      <artifactId>gora-couchdb</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.gora</groupId>
       <artifactId>gora-cassandra</artifactId>
     </dependency>
 
@@ -157,6 +162,13 @@
       </exclusions>
     </dependency>
 
+    <!-- Apache CouchDB java client -->
+    <dependency>
+      <groupId>org.ektorp</groupId>
+      <artifactId>org.ektorp</artifactId>
+      <version>1.4.2</version>
+    </dependency>
+
   </dependencies>
 
 </project>

Reply via email to