[ https://issues.apache.org/jira/browse/TINKERPOP-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15209622#comment-15209622 ]
Marko A. Rodriguez edited comment on TINKERPOP-1237 at 3/24/16 2:47 AM: ------------------------------------------------------------------------ This ticket should also add {{by()}}-modulation {{TraversalRings}} to {{PropertyMapStep}}. Also, if still efficient, {{PropertyMapStep}} should extend {{ProjectStep}} and thus, the concept of "forward projection" is born. * {{select()}}: backwards selection (indefinitely into the past) * {{step()}]: forward projection (one step in the future) * {{project()}}: forward projection (indefinitely into the future) A whole new dimension of thinking here. This categorization of steps is orthogonal to the {{map}}, {{flatMap}}, {{filter}}, {{sideEffect}} categorization. was (Author: okram): This ticket should also add {{by()}}-modulation {{TraversalRings}} to {{PropertyMapStep}}. Also, if still efficient, {{PropertyMapStep}} should extend {{ProjectMapStep}} and thus, the concept of "forward projection" is born. * {{select()}}: backwards selection (indefinitely into the past) * {{step()}]: forward projection (one step in the future) * {{project()}}: forward projection (indefinitely into the future) A whole new dimension of thinking here. This categorization of steps is orthogonal to the {{map}}, {{flatMap}}, {{filter}}, {{sideEffect}} categorization. > ProjectMap: For the Love of Die Faterland > ----------------------------------------- > > Key: TINKERPOP-1237 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1237 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.1.1-incubating > Reporter: Marko A. Rodriguez > Assignee: Daniel Kuppitz > > {code} > gremlin> g.V(1).out("knows"). > project("a","b").by("name").by(outE().count()) > ==>{a:josh, b:2} > ==>{a:vadas, b:0} > {code} > Its like {{select()}} by inverted -- thus, {{project()}}! Moreover, its a > generalization of {{valueMap()}} and {{propertyMap}}. > {code} > public class ProjectStep<S,E> extends MapStep<S,Map<String,E>> { > TraversalRing<S,E> ... > String... keys; > public Map<String,E> map(final Traverser.Admin<S> traverser) { > final Map<String,E> result = new HashMap<>(keys.length); > for(final String key : keys) { > result.put(key, TraversalUtil.apply(traverser, traversalRing.next()); > } > traversalRing.reset(); > return result; > } > } > {code} > cc/ Mein Obergruppenführer [~mbroecheler]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)