Tabnine Logo
GremlinPipeline.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.tinkerpop.gremlin.java.GremlinPipeline
constructor

Best Java code snippets using com.tinkerpop.gremlin.java.GremlinPipeline.<init> (Showing top 20 results out of 315)

origin: org.jboss.windup.graph.frames/windup-frames

/**
 * Start a gremlin pipeline
 * 
 * @param starts
 * @return Start a gremlin pipeline at an element
 */
public <E> GremlinPipeline<C, E> gremlin(Object starts) {
  return new GremlinPipeline<C, E>(starts);
}
origin: com.tinkerpop/frames

/**
 * Start a gremlin pipeline
 * 
 * @param starts
 * @return Start a gremlin pipeline at an element
 */
public <E> GremlinPipeline<C, E> gremlin(Object starts) {
  return new GremlinPipeline<C, E>(starts);
}
origin: org.jboss.windup.graph.frames/windup-frames

/**
 * @return A gremlin pipeline at the context element
 */
public <E> GremlinPipeline<C, E> gremlin() {
  return new GremlinPipeline<C, E>(it());
}
origin: apache/incubator-atlas

  @Override
  protected Pipe getQueryPipe() {
    return new GremlinPipeline().has("__typeName", "Taxonomy");
  }
}
origin: com.tinkerpop/frames

/**
 * @return A gremlin pipeline at the context element
 */
public <E> GremlinPipeline<C, E> gremlin() {
  return new GremlinPipeline<C, E>(it());
}
origin: apache/incubator-atlas

protected GremlinPipeline getRootVertexPipeline() {
  return new GremlinPipeline(unWrapVertices());
}
origin: socialsensor/graphdb-benchmarks

public double getNodeInDegree(Vertex vertex)
{
  GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).in(SIMILAR);
  return (double) pipe.count();
}
origin: socialsensor/graphdb-benchmarks

@Override
public int getNodeCount()
{
  long nodeCount = new GremlinPipeline<Object, Object>(titanGraph).V().count();
  return (int) nodeCount;
}
origin: socialsensor/graphdb-benchmarks

public double getNodeOutDegree(Vertex vertex)
{
  GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).out(SIMILAR);
  return (double) pipe.count();
}
origin: socialsensor/graphdb-benchmarks

@Override
public Set<Integer> getNeighborsIds(int nodeId)
{
  Set<Integer> neighbors = new HashSet<Integer>();
  Vertex vertex = titanGraph.getVertices(NODE_ID, nodeId).iterator().next();
  GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).out(SIMILAR);
  Iterator<Vertex> iter = pipe.iterator();
  while (iter.hasNext())
  {
    Integer neighborId = iter.next().getProperty(NODE_ID);
    neighbors.add(neighborId);
  }
  return neighbors;
}
origin: apache/incubator-atlas

  @Override
  public Boolean compute(Object vertices) {
    GremlinPipeline p = new GremlinPipeline(Collections.singleton(vertices));
    p.add(excludePipeline);
    return p.gather().toList().isEmpty();
  }
}
origin: apache/incubator-atlas

  protected Pipe getQueryPipe() {
    return new GremlinPipeline().has(Constants.ENTITY_TEXT_PROPERTY_KEY).
        hasNot(Constants.ENTITY_TYPE_PROPERTY_KEY, "Taxonomy");
  }
}
origin: socialsensor/graphdb-benchmarks

@Override
public Set<Integer> getCommunitiesConnectedToNodeCommunities(int nodeCommunities)
{
  Set<Integer> communities = new HashSet<Integer>();
  Iterable<Vertex> vertices = titanGraph.getVertices(NODE_COMMUNITY, nodeCommunities);
  for (Vertex vertex : vertices)
  {
    GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).out(SIMILAR);
    Iterator<Vertex> iter = pipe.iterator();
    while (iter.hasNext())
    {
      int community = iter.next().getProperty(COMMUNITY);
      communities.add(community);
    }
  }
  return communities;
}
origin: com.thinkaurelius.titan/titan-test-jre6

  @Override
  public void run() {
    for (int t = 1; t <= trials; t++) {
      TitanTransaction tx = graph.newTransaction();
      TitanVertex v = tx.getVertex(vids[random.nextInt(numV)]);
      for (int r = 0; r < repetitions; r++) {
        assertEquals((int) Math.pow(numE, 2), Iterables.size(new GremlinPipeline<Vertex, Vertex>(v)
            .out(label).out(label)
        ));
      }
      tx.commit();
    }
  }
});
origin: apache/incubator-atlas

  @Override
  protected Pipe getQueryPipe() {
    GremlinPipeline p;
    if (termPath.getTaxonomyName().equals("*")) {
      p = new GremlinPipeline().has("Taxonomy.name").out();
    } else {
      p = new GremlinPipeline().has("Taxonomy.name", termPath.getTaxonomyName()).out().
          has(Constants.ENTITY_TYPE_PROPERTY_KEY, Text.PREFIX, termPath.getFullyQualifiedName());
    }
    return p;
  }
}
origin: socialsensor/graphdb-benchmarks

@Override
public void shortestPath(final Vertex fromNode, Integer node)
{
  final Vertex v2 = titanGraph.getVertices(NODE_ID, node).iterator().next();
  @SuppressWarnings("rawtypes")
  final GremlinPipeline<String, List> pathPipe = new GremlinPipeline<String, List>(fromNode).as(SIMILAR)
    .out(SIMILAR).loop(SIMILAR, new PipeFunction<LoopBundle<Vertex>, Boolean>() {
      // @Override
      public Boolean compute(LoopBundle<Vertex> bundle)
      {
        return bundle.getLoops() < 5 && !bundle.getObject().equals(v2);
      }
    }).path();
}
origin: org.jboss.windup.rules.apps/rules-java

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();
}
origin: org.jboss.windup.rules.apps/rules-java

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;
}
origin: org.jboss.windup.rules.apps/rules-java-ee

  @Override
  public void query(GraphRewrite event, GremlinPipeline<Vertex, Vertex> pipeline)
  {
    pipeline.has(DoctypeMetaModel.PROPERTY_PUBLIC_ID, Text.REGEX, hibernateRegex);
    FramedGraphQuery systemIDQuery = event.getGraphContext().getQuery().type(DoctypeMetaModel.class)
          .has(DoctypeMetaModel.PROPERTY_SYSTEM_ID, Text.REGEX, hibernateRegex);
    GremlinPipeline<Vertex, Vertex> systemIdPipeline = new GremlinPipeline<>(systemIDQuery.vertices());
    pipeline.add(systemIdPipeline);
    pipeline.dedup();
  }
};
origin: org.jboss.windup.rules.apps/rules-java-ee

  @Override
  public void query(GraphRewrite event, GremlinPipeline<Vertex, Vertex> pipeline)
  {
    pipeline.has(DoctypeMetaModel.PROPERTY_PUBLIC_ID, Text.REGEX, hibernateRegex);
    FramedGraphQuery systemIDQuery = event.getGraphContext().getQuery().type(DoctypeMetaModel.class)
          .has(DoctypeMetaModel.PROPERTY_SYSTEM_ID, Text.REGEX, hibernateRegex);
    GremlinPipeline<Vertex, Vertex> systemIdPipeline = new GremlinPipeline<>(systemIDQuery.vertices());
    pipeline.add(systemIdPipeline);
    pipeline.dedup();
  }
};
com.tinkerpop.gremlin.javaGremlinPipeline<init>

Popular methods of GremlinPipeline

  • out
    Add an OutPipe to the end of the Pipeline. Emit the adjacent outgoing vertices of the incoming verte
  • has
    Add an IdFilterPipe, LabelFilterPipe, or PropertyFilterPipe to the end of the Pipeline. If the incom
  • in
    Add a InPipe to the end of the Pipeline. Emit the adjacent incoming vertices for the incoming vertex
  • add
    Add an arbitrary pipe to the GremlinPipeline
  • as
    Wrap the previous step in an AsPipe. Useful for naming steps and is used in conjunction with various
  • iterator
  • back
    Add a BackFilterPipe to the end of the Pipeline. The object that was seen namedSteps ago is emitted.
  • both
    Add a BothPipe to the end of the Pipeline. Emit both the incoming and outgoing adjacent vertices for
  • dedup
    Add a DuplicateFilterPipe to the end of the Pipeline. Will only emit the object if the object genera
  • hasNot
    Add an IdFilterPipe, LabelFilterPipe, or PropertyFilterPipe to the end of the Pipeline. If the incom
  • outE
    Add an OutEdgesPipe to the end of the Pipeline. Emit the outgoing edges for the incoming vertex.
  • toList
    Return a list of all the objects in the pipeline.
  • outE,
  • toList,
  • V,
  • _,
  • addPipe,
  • aggregate,
  • bothE,
  • count,
  • enablePath

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now