/** * Add a InPipe to the end of the Pipeline. * Emit the adjacent incoming vertices for the incoming vertex. * * @param labels the edge labels to traverse * @return the extended Pipeline */ public GremlinPipeline<S, Vertex> in(final String... labels) { return this.in(Integer.MAX_VALUE, labels); }
public double getNodeInDegree(Vertex vertex) { GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).in(SIMILAR); return (double) pipe.count(); }
public boolean isMavenConfiguration(XmlFileModel resource) { return (new GremlinPipeline<Vertex, Vertex>(resource.asVertex())).in("xmlFacet").as("facet") .has(WindupVertexFrame.TYPE_PROP, this.getTypeValueForSearch()).back("facet") .iterator().hasNext(); }
userList = pipe.start(repo).in(EdgeType.REPOCOLLABORATOR).toList(); log.info("Collaboators: {}", userList.size()); users.addAll(userList); userList = pipe.start(repo).in(EdgeType.REPOWATCHED).toList(); log.info("Watchers: {}", userList.size()); users.addAll(userList); userList = pipe.start(repo).out(EdgeType.ISSUE).in(EdgeType.ISSUEOWNER).dedup().toList(); log.info("Issue owners: {}", userList.size()); users.addAll(userList); userList = pipe.start(repo).out(EdgeType.ISSUE).out(EdgeType.ISSUECOMMENT).in(EdgeType.ISSUECOMMENTOWNER).dedup().toList(); log.info("Issue Comment owners: {}", userList.size()); users.addAll(userList); userList = pipe.start(repo).out(EdgeType.PULLREQUEST).in(EdgeType.PULLREQUESTOWNER).dedup().toList(); log.info("Pull Request owners: {}", userList.size()); users.addAll(userList); out(EdgeType.PULLREQUESTDISCUSSION).in(). has(PropertyName.TYPE, VertexType.USER).dedup().toList(); log.info("Discussion users: {}", userList.size());
public MavenProjectModel getMavenConfigurationFromResource(XmlFileModel resource) { @SuppressWarnings("unchecked") Iterator<Vertex> v = (Iterator<Vertex>) (new GremlinPipeline<Vertex, Vertex>(resource.asVertex())) .in("xmlFacet").as("facet") .has(WindupVertexFrame.TYPE_PROP, this.getTypeValueForSearch()).back("facet") .iterator(); if (v.hasNext()) { return getGraphContext().getFramed().frame(v.next(), this.getType()); } return null; }