[32/50] [abbrv] atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine

2018-11-01 Thread amestry
ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of 
GremlinScriptEngine


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/942a5382
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/942a5382
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/942a5382

Branch: refs/heads/branch-1.0
Commit: 942a5382c9517b8ebe9ed1f99def6bacd9c6a706
Parents: 6973830
Author: apoorvnaik 
Authored: Tue Oct 23 15:39:29 2018 -0700
Committer: Ashutosh Mestry 
Committed: Thu Nov 1 15:42:58 2018 -0700

--
 graphdb/api/pom.xml |   5 +
 .../atlas/repository/graphdb/AtlasGraph.java|  21 +-
 .../repository/graphdb/AtlasGraphTraversal.java |  91 
 .../graphdb/AtlasGraphTraversalSource.java  |  40 
 .../graphdb/janus/AtlasJanusGraph.java  |  19 ++
 .../graphdb/janus/AtlasJanusGraphTraversal.java | 232 +++
 .../org/apache/atlas/query/GremlinQuery.java|  18 +-
 7 files changed, 409 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/pom.xml
--
diff --git a/graphdb/api/pom.xml b/graphdb/api/pom.xml
index e13c4cb..6e0f050 100644
--- a/graphdb/api/pom.xml
+++ b/graphdb/api/pom.xml
@@ -46,6 +46,11 @@
 org.codehaus.jettison
 jettison
 
+
+org.apache.tinkerpop
+gremlin-core
+3.3.3
+
 
 
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
--
diff --git 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
index 31d2085..09eab28 100644
--- 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
+++ 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
@@ -17,18 +17,17 @@
  */
 package org.apache.atlas.repository.graphdb;
 
+import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.groovy.GroovyExpression;
+import org.apache.atlas.type.AtlasType;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Map;
 import java.util.Set;
 
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-
-import org.apache.atlas.exception.AtlasBaseException;
-import org.apache.atlas.groovy.GroovyExpression;
-import org.apache.atlas.type.AtlasType;
-
 /**
  * Represents a graph.
  *
@@ -144,6 +143,14 @@ public interface AtlasGraph {
 AtlasGraphQuery query();
 
 /**
+ * Start a graph traversal
+ * @return
+ */
+AtlasGraphTraversal V(Object ... vertexIds);
+
+AtlasGraphTraversal E(Object ... edgeIds);
+
+/**
  * Creates an index query.
  *
  * @param indexName index name

http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
--
diff --git 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
new file mode 100644
index 000..881bb1e
--- /dev/null
+++ 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
@@ -0,0 +1,91 @@
+/**
+ * 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.
+ */
+package org.apache.atlas.repository.graphdb;
+
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+import java.util.Collection;
+import java.util.List;
+import 

atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine

2018-10-25 Thread apoorvnaik
Repository: atlas
Updated Branches:
  refs/heads/master 927753159 -> 5317a7215


ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of 
GremlinScriptEngine


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/5317a721
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/5317a721
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/5317a721

Branch: refs/heads/master
Commit: 5317a7215e21321235c1b9cc99d61d78b10659eb
Parents: 9277531
Author: apoorvnaik 
Authored: Tue Oct 23 15:39:29 2018 -0700
Committer: apoorvnaik 
Committed: Thu Oct 25 11:29:55 2018 -0700

--
 graphdb/api/pom.xml |   5 +
 .../atlas/repository/graphdb/AtlasGraph.java|  21 +-
 .../repository/graphdb/AtlasGraphTraversal.java |  91 
 .../graphdb/AtlasGraphTraversalSource.java  |  40 
 .../graphdb/janus/AtlasJanusGraph.java  |  19 ++
 .../graphdb/janus/AtlasJanusGraphTraversal.java | 232 +++
 .../org/apache/atlas/query/GremlinQuery.java|  38 ---
 7 files changed, 401 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/pom.xml
--
diff --git a/graphdb/api/pom.xml b/graphdb/api/pom.xml
index 14b273f..58ca51a 100644
--- a/graphdb/api/pom.xml
+++ b/graphdb/api/pom.xml
@@ -46,6 +46,11 @@
 org.codehaus.jettison
 jettison
 
+
+org.apache.tinkerpop
+gremlin-core
+3.3.3
+
 
 
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
--
diff --git 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
index 31d2085..09eab28 100644
--- 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
+++ 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
@@ -17,18 +17,17 @@
  */
 package org.apache.atlas.repository.graphdb;
 
+import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.groovy.GroovyExpression;
+import org.apache.atlas.type.AtlasType;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Map;
 import java.util.Set;
 
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-
-import org.apache.atlas.exception.AtlasBaseException;
-import org.apache.atlas.groovy.GroovyExpression;
-import org.apache.atlas.type.AtlasType;
-
 /**
  * Represents a graph.
  *
@@ -144,6 +143,14 @@ public interface AtlasGraph {
 AtlasGraphQuery query();
 
 /**
+ * Start a graph traversal
+ * @return
+ */
+AtlasGraphTraversal V(Object ... vertexIds);
+
+AtlasGraphTraversal E(Object ... edgeIds);
+
+/**
  * Creates an index query.
  *
  * @param indexName index name

http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
--
diff --git 
a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
new file mode 100644
index 000..881bb1e
--- /dev/null
+++ 
b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java
@@ -0,0 +1,91 @@
+/**
+ * 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.
+ */
+package org.apache.atlas.repository.graphdb;
+
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import