KeyIndexableGraph.removeVertex
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.tinkerpop.blueprints.KeyIndexableGraph.removeVertex(Showing top 3 results out of 315)

origin: com.tinkerpop.blueprints/blueprints-test

public void testKeyIndicesConsistentWithElementRemoval() throws Exception {
  KeyIndexableGraph graph = (KeyIndexableGraph) graphTest.generateGraph();
  graph.createKeyIndex("foo", Vertex.class);
  Vertex v1 = graph.addVertex(null);
  v1.setProperty("foo", 42);
  vertexCount(graph, 1);
  graph.removeVertex(v1);
  vertexCount(graph, 0);
  assertEquals(0, count(graph.getVertices("foo", 42)));
  graph.shutdown();
}
origin: com.tinkerpop.blueprints/blueprints-core

public void removeVertex(final Vertex vertex) {
  verifyNativeElement(vertex);
  baseGraph.removeVertex(((IdVertex) vertex).getBaseVertex());
}
origin: com.tinkerpop.blueprints/blueprints-graph-sail

private void removeEdge(final Edge edge) {
  Vertex h = edge.getVertex(Direction.IN);
  Vertex t = edge.getVertex(Direction.OUT);
  store.graph.removeEdge(edge);
  if (!h.getEdges(Direction.IN).iterator().hasNext() && !h.getEdges(Direction.OUT).iterator().hasNext()) {
    try {
      store.graph.removeVertex(h);
    } catch (IllegalStateException ex) {
      // Just keep going.  This is a hack for Neo4j vertices which appear in more than
      // one to-be-deleted edge.
    }
  }
  if (!t.getEdges(Direction.OUT).iterator().hasNext() && !t.getEdges(Direction.IN).iterator().hasNext()) {
    try {
      store.graph.removeVertex(t);
    } catch (IllegalStateException ex) {
      // Just keep going.  This is a hack for Neo4j vertices which appear in more than
      // one to-be-deleted edge.
    }
  }
}
com.tinkerpop.blueprintsKeyIndexableGraphremoveVertex

Popular methods of KeyIndexableGraph

  • createKeyIndex
    Create an automatic indexing structure for indexing provided key for element class.
  • getIndexedKeys
    Return all the index keys associated with a particular element class.
  • addEdge
  • dropKeyIndex
    Remove an automatic indexing structure associated with indexing provided key for element class.
  • getEdges
  • removeEdge
  • shutdown
  • addVertex
  • getFeatures
  • getVertices
  • getEdge
  • getVertex
  • getEdge,
  • getVertex,
  • query

Popular classes and methods

  • getSystemService (Context)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • Container (java.awt)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)