Hi Daniel,
Probably better explained with an example that closely represents what I'm trying to do. Think class inheritance and properties on a class. Say I have something like this:-
class Child extends Parent {
name = "Child"
prop1 = "some child prop 1"
}
class Parent extends Grandparent {
name = "Parent"
prop1 = "some parent prop 1"
prop2 = "some parent prop 2"
}
class Grandparent {
name = "Grandparent"
prop2 = "some grandparent prop 2"
prop3 = "some grandparent prop 3"
}
Each class is a vertex. They are related by "Extends" relationships. I want to do two types of traversals, one being an extension of the other:-
1) Give me all the properties for the "Child" class. Results will be:-
name = "Child" (from Child)
prop1 = "some child prop1" (from Child)
prop2 = "some parent prop2" (from Parent)
prop3 = "some grandparent prop3" (from Grandparent)
2) Give me a subset of properties, for example, the "name" and "prop3" properties for "Child". Results will be:-
name = "Child" (from Child)
prop3 = "some grandparent prop3" (from Grandparent)
And for completeness:- Give me the "name" and "prop3" properties for "Parent" (i.e. change starting point). Results will be:-
name = "Parent" (from Parent)
prop3 = "some grandparent prop3" (from Grandparent)
Hopefully this does a better job of explaining what I'm trying to do. I appreciate your help.
Thanks
Dave
P.S. Another way to think of it is that I need to buy 10 things from the store (traversal 2 above). I go to the first store and they only have 5. I go to the second store and find 3 more. I go to the 3rd store and find one more. There's no more stores in my little town so I return home without the last item but am happy I found 9 out of 10. Essentially, it's a pattern that I'm trying to understand the best way to traverse with Tinkerpop 3. Thx.