thanks
// ndy
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> g = TinkerGraph.open()
==>tinkergraph[vertices:0 edges:0]
gremlin> marko = g.addVertex(label,"instance","name","marko")
==>v[0]
gremlin> markoSmell = g.addVertex(label,"instance","smellProperty","smelly")
==>v[2]
gremlin> markoSmellAttachment = g.addVertex(label,"instance","name","SmellyPicture")
==>v[4]
gremlin> marko.addEdge("smell",markoSmell)
==>e[6][0-smell->2]
gremlin> markoSmell.addEdge("attachment",markoSmellAttachment)
==>e[7][2-attachment->4]
gremlin> nick = g.addVertex(label,"instance","name","nick")
==>v[8]
gremlin> nickSmell = g.addVertex(label,"instance","smellProperty","sweet")
==>v[10]
gremlin> nick.addEdge("smell",nickSmell)
==>e[12][8-smell->10]
gremlin> g.V()
==>v[0]
==>v[2]
==>v[4]
==>v[8]
==>v[10]
gremlin> g.E()
==>e[6][0-smell->2]
==>e[7][2-attachment->4]
==>e[12][8-smell->10]
gremlin> g.V().outE("smell")
==>e[6][0-smell->2]
==>e[12][8-smell->10]
gremlin> g.V().out("smell").has("smellProperty","smelly")
==>v[2]
gremlin> g.V().out("smell").outE("attachment")
==>e[7][2-attachment->4]
gremlin> g.V().out("smell").as("a").union(g.of().has("smellProperty","smelly",g.of().as("b").out("attachment").has("name","SmellyPicture").back("b").back("a")
gremlin> g
groovysh_parse: 3: expecting ')', found 'g' @ line 3, column 1.
g
^
1 error
Display stack trace? [yN] gn
gremlin> g.V()
groovysh_parse: 3: expecting ')', found 'g' @ line 3, column 1.
g.V()
^
1 error
Display stack trace? [yN] n
gremlin> g
groovysh_parse: 3: expecting ')', found 'g' @ line 3, column 1.
g
^
1 error
Display stack trace? [yN] y
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
groovysh_parse: 3: expecting ')', found 'g' @ line 3, column 1.
g
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:106)
at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:148)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359)
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142)
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108)
at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236)
at org.codehaus.groovy.tools.shell.RigidParser.parse(Parser.groovy:157)
at org.codehaus.groovy.tools.shell.Parser.parse(Parser.groovy:73)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:172)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1208)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1208)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at com.tinkerpop.gremlin.console.Console.<init>(Console.groovy:95)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at com.tinkerpop.gremlin.console.Console.main(Console.groovy:248)
gremlin>
gremlin> g.V().out("smell").as("a").union(g.of().has("smellProperty","smelly"),g.of().as("b").out("attachment").has("name","SmellyPicture")).back("b").back("a")
java.lang.IllegalStateException
Display stack trace? [yN] y
java.lang.IllegalStateException
at com.tinkerpop.gremlin.structure.Graph.of(Graph.java:149)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
Caused by: java.lang.NullPointerException
at com.tinkerpop.gremlin.structure.Graph.of(Graph.java:147)
... 42 more
just lin in my Java.
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
gremlin> :plugin list
==>tinkerpop.server
==>tinkerpop.gephi
==>tinkerpop.utilities
==>tinkerpop.sugar
==>tinkerpop.tinkergraph
gremlin> :plugin use tinkerpop.tinkergraph
==>tinkerpop.tinkergraph activated
gremlin> :plugin use tinkerpop.utilities
==>tinkerpop.utilities activated
gremlin> g = TinkerGraph.open()
==>tinkergraph[vertices:0 edges:0]
gremlin> g.addVertex(label,"instance","name","marko")
==>v[0]
gremlin> g.V().union(g.of().as('a').has("name","marko").back('a'))
Side effects do not have a value for provided key: a
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Side effects do not have a value for provided key: a
at com.tinkerpop.gremlin.process.Traversal$SideEffects$Exceptions.sideEffectDoesNotExist(Traversal.java:432)
at com.tinkerpop.gremlin.process.util.DefaultTraversalSideEffects.get(DefaultTraversalSideEffects.java:103)
at com.tinkerpop.gremlin.process.Traverser.get(Traverser.java:91)
at com.tinkerpop.gremlin.process.graph.step.map.BackStep.lambda$new$370(BackStep.java:21)
at com.tinkerpop.gremlin.process.graph.step.map.BackStep$$Lambda$22/1968298538.apply(Unknown Source)
at com.tinkerpop.gremlin.process.graph.step.map.MapStep.processNextStart(MapStep.java:27)
at com.tinkerpop.gremlin.process.util.AbstractStep.hasNext(AbstractStep.java:105)
at com.tinkerpop.gremlin.process.util.DefaultTraversal.hasNext(DefaultTraversal.java:77)
at com.tinkerpop.gremlin.process.graph.step.branch.UnionStep.processNextStart(UnionStep.java:30)
at com.tinkerpop.gremlin.process.util.AbstractStep.hasNext(AbstractStep.java:105)
at com.tinkerpop.gremlin.process.util.DefaultTraversal.hasNext(DefaultTraversal.java:77)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at com.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
at org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:370)
at org.codehaus.groovy.tools.shell.Groovysh.this$3$setLastResult(Groovysh.groovy)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:159)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:121)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:93)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at com.tinkerpop.gremlin.console.Console.<init>(Console.groovy:99)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at com.tinkerpop.gremlin.console.Console.main(Console.groovy:252)
gremlin>
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/8f749c7b-6c4c-43dd-a532-122390c1366f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seX0Y%3Ds6dFSQonp81Z5vh2x7kfWJ7nGCJzOk36Uvm4Dx-Q%40mail.gmail.com.
g.V().union(g.of().filter { it.get().out().hasNext() }, g.of().has('name'))
g.V().union(has(out()), has('name'))
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CALUY%3DD1pjppCeYZbtq%2B75OMLkB%3DyEPePydXxOmRx1m1f7wnoqw%40mail.gmail.com.