Package com.tinkerpop.blueprints.impls.orient

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


    ODocument missionImpossible = graph.addVertex("class:Movie", "name", "Mission: Impossible", "year", 1996).getRecord();
    totalElements++;
    ODocument youHaveGotMail = graph.addVertex("class:Movie", "name", "You've Got Mail","year", 1998).getRecord();
    totalElements++;

    graph.addEdge(null,graph.getVertex(tomCruise), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(missionImpossible), "actorIn");
    totalElements++;
View Full Code Here


    ODocument youHaveGotMail = graph.addVertex("class:Movie", "name", "You've Got Mail","year", 1998).getRecord();
    totalElements++;

    graph.addEdge(null,graph.getVertex(tomCruise), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(missionImpossible), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(youHaveGotMail), "actorIn");
    totalElements++;
View Full Code Here

    graph.addEdge(null,graph.getVertex(tomCruise), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(missionImpossible), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(youHaveGotMail), "actorIn");
    totalElements++;

    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(megRyan),"friend");
View Full Code Here

    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(topGun), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(missionImpossible), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(youHaveGotMail), "actorIn");
    totalElements++;

    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(megRyan),"friend");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(nicoleKidman), "married").setProperty("year", 1990);
View Full Code Here

    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(missionImpossible), "actorIn");
    totalElements++;
    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(youHaveGotMail), "actorIn");
    totalElements++;

    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(megRyan),"friend");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(nicoleKidman), "married").setProperty("year", 1990);
    totalElements++;

    graph.commit();
View Full Code Here

    graph.addEdge(null, graph.getVertex(megRyan), graph.getVertex(youHaveGotMail), "actorIn");
    totalElements++;

    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(megRyan),"friend");
    totalElements++;
    graph.addEdge(null, graph.getVertex(tomCruise), graph.getVertex(nicoleKidman), "married").setProperty("year", 1990);
    totalElements++;

    graph.commit();
  }
View Full Code Here

  public void t() {
    OrientGraph graph = new OrientGraph("memory:" + TestOutInChain.class.getSimpleName(), "admin", "admin");

    Vertex vUser = graph.addVertex("class:User");
    Vertex vCar = graph.addVertex("class:Car");
    graph.addEdge("class:Owns", vUser, vCar, null);

    graph.commit();

    Iterable<Vertex> res = graph.command(new OCommandSQL("select expand( out('Owns') ) from User")).execute();
    assertTrue(res.iterator().hasNext());
View Full Code Here

      ODocument foo = graph.addVertex("class:Foo", "prop", "test1").getRecord();

      // Comment out these two lines and the test will succeed. The issue appears to be related to an edge
      // connecting a deleted vertex during a transaction
      ODocument bar = graph.addVertex("class:Bar", "prop", "test1").getRecord();
      ODocument sees = graph.addEdge(null, graph.getVertex(foo), graph.getVertex(bar), "Sees").getRecord();
      graph.commit();

      List<ODocument> foos = graph.getRawGraph().query(new OSQLSynchQuery("select * from Foo"));
      Assert.assertEquals(foos.size(), 1);

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.