[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164742#comment-16164742 ]
Kevin Gallardo commented on TINKERPOP-1474: ------------------------------------------- [~spmallette] so is the goal for the Java GLV to have the Vertex class be removed of its Properties methods? Like {{v.property('name')}}, etc etc I think the issue here was more about the Graph {{structure}} objects like Vertex, Edge, and so on which do not have a properties in the class definition itself. In Java, whether the object sent over the wire is a Detached or Reference element, the object returned by the Tinkerpop API always extends Vertex, which has an API for properties even though if the object sent is a Reference, calling to properties will return empty results. In the Python GLV, currently whether a Vertex sent is Detached or Reference, the Vertex class does not have an API to gather properties out of the Vertex. > API Alignment Between Java Gremlin Graph Structure and GLVs > ----------------------------------------------------------- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io > Affects Versions: 3.2.2 > Reporter: Adam Holmberg > Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)