java - OrientDb graph TRAVERSE between two vertex with conditions -
this graph schema (little part):
busstation class extends v (vertex). every busstation element has stationid property value (1,2,3,4,5...).
bus class extends e (edge). every bus element has 3 properties:
busid: id of bus between 2 station (long)departure: time when bus went station (datetime)arrival: time when bus came on next station (datetime)
i want find $path busstation stationid = 1 busstation stationid = 5. when execute query through editor/java code:
select $path path (traverse oute(bus), inv(busstation) select * busstation stationid = 1 strategy breadth_first) @rid == #17:3509 i shortest path, have conditions must follow:
first want on same bus longer posible. means if on
stationid = 1busbusid = 1onstationid = 2wantbusid = 1, onstationid = 3on, , onstationid = 4because don't havebusid = 1pick 1 of possible ability.second filter on arrival time of 1 bus , departure bus bus. must watch out if bus arrive on station in 09:00, must pick busstation buses have departure time after arrive time (09:00).
do have idea how thru query can filter conditions?

Comments
Post a Comment