You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new object that simply defines the name of a Vertex. Graph.propertyMissing should be changed to return VertexNameSpec instead of VertexSpec. This will eliminate the need for single quotes around vertex names within the dsl.
Examples
rename methods in edge closure
graph {
edge(A, B) {
renameOne 'C'
}
}
Could be changed to:
graph {
edge(A, B) {
renameOne C
}
}
'C' could be replaced with C. Since C is not a property of Graph propertyMissing will be called and return a new VertexNameSpec.
Strings will still need to be supported for method calls and properties outside of the dsl. For example BreadthFirstTraversal has the property root. This is a String and will remain a String. A new method should be added to support setting that property using a VertexNameSpec.
apply VertexNameSpec to the Graph
Any VertexNameSpec passed to these methods need to be treated as a normal VertexSpec. This means they need to be applied to the graph not just used as a reference to a Vertex.
connectsTo and connectsFrom should accept a VertexSpec
This will allow more nested strucures when defining a graph.
graph {
vertex A {
connectsTo B {
connectsTo C {
connectsTo D
}
}
}
}
update readme
All examples in the readme that use the graph {...} entry point should use this feature.
The text was updated successfully, but these errors were encountered:
moaxcp
changed the title
Methods that take vertex names should also take VertexSpec
Methods that take vertex names should also take VertexNameSpec
Jun 30, 2017
* [#82](#82) Methods that take vertex names should also take VertexNameSpec
* [#84](#84) Configure gradle to fail for codenarc violations and jacoc verification
* [#87](#87) TraversalSpec should return VertexNameSpec when property or method is missing
* [#85](#85) Traversal methods should accept a root param
VertexNameSpec
A new object that simply defines the name of a Vertex. Graph.propertyMissing should be changed to return VertexNameSpec instead of VertexSpec. This will eliminate the need for single quotes around vertex names within the dsl.
Examples
rename methods in edge closure
Could be changed to:
'C' could be replaced with C. Since C is not a property of Graph propertyMissing will be called and return a new VertexNameSpec.
connectsTo and connectsFrom
could become
root in traversal methods
could become
Strings
Strings will still need to be supported for method calls and properties outside of the dsl. For example BreadthFirstTraversal has the property root. This is a String and will remain a String. A new method should be added to support setting that property using a VertexNameSpec.
apply VertexNameSpec to the Graph
Any VertexNameSpec passed to these methods need to be treated as a normal VertexSpec. This means they need to be applied to the graph not just used as a reference to a Vertex.
connectsTo and connectsFrom should accept a VertexSpec
This will allow more nested strucures when defining a graph.
update readme
All examples in the readme that use the graph {...} entry point should use this feature.
The text was updated successfully, but these errors were encountered: