java,graph-databases,gremlin,tinkerpop3
Against Tinkerpop3 M6/ titan0.9 M1, the following should work: Set<Vertex> vertices = graph.V().<Vertex>has("name", "jupiter").toSet(); Most of the M6 type issues can be resolved in a similar manner (parameterizing the method that produces the element by the expected type)....
java,server,gremlin,tinkerpop3
As you've found, what you are trying to do won't work because two separate processes cannot work on the embedded Neo4jGraph. As it stands you can't get access to the configured graph instances from the GremlinServer object and I'm not sure I'd change that as I'm not completely sure that...
groovy,gremlin,tinkerpop,tinkerpop3
You're dealing with different class types from each of those results. Consider my console session below: gremlin> g = TinkerFactory.createClassic() ==>tinkergraph[vertices:6 edges:6] gremlin> marko = g.v(1) ==>v[1] gremlin> marko.class ==>class com.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex The above yields a Vertex but as you can see below: gremlin> marko = g.V().has('name','marko') ==>v[1] gremlin> marko.class ==>class...
graph,titan,tinkerpop,tinkerpop3
At this time, TinkerPop 2.x is basically in maintenance-mode only (i.e. we've generally frozen development short of major bug fixes). All effort is focused on TP3 and getting it to GA. GA has been somewhat delayed as TinkerPop moves to its new home as an Apache project: http://tinkerpop.incubator.apache.org/ Unfortunately, we...
I would leverage Gremlin's tree structure and some recursive method calls: import com.google.common.collect.Iterators; import com.tinkerpop.gremlin.process.T; import com.tinkerpop.gremlin.process.Traverser; import com.tinkerpop.gremlin.process.graph.util.Tree; import com.tinkerpop.gremlin.structure.Vertex; import com.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.function.Function; /** * @author Daniel Kuppitz (daniel at...
Well - you could always do this: Vertex v = g.V().has(T.label, "link").<Vertex>has("name", url).next(); and simply explicitly type the last step....
Use jump to recursively traverse down a path and the path step to realize the path traversed: gremlin> g = TinkerFactory.createClassic() ==>tinkergraph[vertices:6 edges:6] gremlin> g.V(1).as('x').out('knows').jump('x'){it.loops<3}{true} ==>v[2] ==>v[4] gremlin> g.V(1).as('x')out().jump('x'){it.get().id() != 5 && it.loops < 6}.path() ==>[v[1], v[4], v[5]] See more details in GremlinDocs: http://www.tinkerpop.com/docs/3.0.0-SNAPSHOT/#jump-step ...
I guess there's some discrepancy between documentation and where Neo4j stands in terms of official release. Neo4j was removed from the repository around M7 at the time TinkerPop started making releases under the Apache Software Foundation (given license conflicts). It was added back to the repository after the M9 release...