The Currently model
/** * @param <IN> the inbound Entity * @param <OUT> the outbound entity */ public interface EdgeEntity<OUT, IN> { /** * Gets the inbound entity * * @return the inbound entity */ IN getInbound(); /** * Gets the outbound entity * * @return the outbound entity */ OUT getOutbound(); }
However, this current version does not support very well when there are more than one Edge types, e.g.: give this code:
Person ada =...; Technology java = ...; Technology cloud = ...; graph.edge(ada, "lives" "Sao Paulo"); graph.edge(ada, "works", cloud); graph.edge(ada, "works", java);
EdgeEntity<Person,?> edges = graph.getTraversalEdge(); //that gonna return both: cities and technology edge
That makes me not full confidence in this current API.
what I thought:
public interface EdgeEntity { T <T> getInbound()throws ClassCastException; T <T> getOutbound()throws ClassCastException; }
public interface EdgeEntity { Object getInbound(); Object getOutbound(); }
To know more about Graph API: https://dzone.com/articles/have-a-fun-moment-with-graph-and-java
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/5c783859-b649-46f5-b744-ddabb50a68d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.