Package com.tinkerpop.blueprints.impls.orient

Examples of com.tinkerpop.blueprints.impls.orient.OrientGraph.shutdown()


    bsubVertex = db.addVertex("class:rawField");
    bsubVertex.setProperty("name", "bsub");
    asubVertex.addEdge("hasParent", aVertex);
    bsubVertex.addEdge("hasParent", bVertex);
    db.commit();
    db.shutdown();
  }

  private void tryLabelQuery() {
    OrientGraph db = new OrientGraph("memory:temp", "admin", "admin");
    Iterable<Vertex> vs = db.getVertices();
View Full Code Here


      for (Vertex rc : rcs) {
        System.out.println("GOT RC: " + rc);
      }
    }
    db.commit();
    db.shutdown();
  }

  private void runEdgeTest() {
    reparent(asubVertex, bVertex);
    reparent(asubVertex, aVertex);
View Full Code Here

    try {
      if (g.getVertexType("VC1") == null) {
        g.createVertexType("VC1");
      }
    } finally {
      g.shutdown();
    }
    g = new OrientGraph(URL, "admin", "admin");
    try {
      // System.out.println(g.getIndexedKeys(Vertex.class,true)); this will print VC1.p1
      if (g.getIndex("VC1.p1", Vertex.class) == null) {// this will return null. I do not know why
View Full Code Here

            "UNIQUE"), new Parameter<String, OType>("keytype", OType.STRING));
      }
    } catch (OIndexException e) {
      // ignore because the index may exist
    } finally {
      g.shutdown();
    }

    g = new OrientGraph(URL, "admin", "admin");
    String val1 = System.currentTimeMillis() + "";
    try {
View Full Code Here

    String val1 = System.currentTimeMillis() + "";
    try {
      Vertex v = g.addVertex("class:VC1");
      v.setProperty("p1", val1);
    } finally {
      g.shutdown();
    }
    g = new OrientGraph(URL, "admin", "admin");
    try {
      Vertex v = g.addVertex("class:VC1");
      v.setProperty("p1", val1);
View Full Code Here

    try {
      Vertex v = g.addVertex("class:VC1");
      v.setProperty("p1", val1);
    } finally {
      try {
        g.shutdown();
        fail("must throw duplicate key here!");
      } catch (ORecordDuplicatedException e) {
        // ok
      }
View Full Code Here

      vertex.setProperty("embeddedList", embeddedList);

      final Object id = vertex.getId();

      g.shutdown();
      g = new OrientGraph(URL, "admin", "admin");

      vertex = g.getVertex(id);
      embeddedList = vertex.getProperty("embeddedList");
View Full Code Here

      Assert.assertEquals(docOne.field("prop"), "docOne");

      docTwo = embeddedList.get(1);
      Assert.assertEquals(docTwo.field("prop"), "docTwo");
    } finally {
      g.shutdown();
    }
  }

  @Test
  public void testGetEdgesUpdate() {
View Full Code Here

        counter++;
      }

      Assert.assertEquals(2, counter);
    } finally {
      g.shutdown();
    }
  }
}
View Full Code Here

      OrientEdge friend = (OrientEdge) luca.addEdge("Friend", jay);

      assertFalse(friend.isLightweight());

    } finally {
      g.shutdown();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.