Package com.tinkerpop.blueprints.impls.orient

Examples of com.tinkerpop.blueprints.impls.orient.OrientEdgeType


    final OrientVertexType vertexType = graph.createVertexType("TestVertex");
    vertexType.createProperty("uuid", OType.STRING);
    vertexType.createIndex("TestVertexUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");

    final OrientEdgeType edgeType = graph.createEdgeType("TestEdge");
    edgeType.createProperty("uuid", OType.STRING);
    edgeType.createIndex("TestEdgeUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");
    graph.shutdown();
  }
View Full Code Here


    graph = new OrientGraph(DB_URL);
    graph.setAutoStartTx(false);
    graph.commit();

    if (graph.getEdgeType("Knows") == null) {
      OrientEdgeType knows = graph.createEdgeType("Knows");
      OrientVertexType person = graph.createVertexType("Person");

      person.createEdgeProperty(Direction.OUT, "Knows").setOrdered(true);
    }
View Full Code Here

    OrientGraph g = new OrientGraph(URL, "admin", "admin");
    try {
      if (g.getVertexType("Profile") == null)
        g.createVertexType("Profile");
      if (g.getEdgeType("Friend") == null) {
        final OrientEdgeType f = g.createEdgeType("Friend");
        f.createProperty("in", OType.LINK);
        f.createProperty("out", OType.LINK);
        f.createIndex("Friend.in_out", OClass.INDEX_TYPE.UNIQUE, "in", "out");

      }

      OrientVertex luca = g.addVertex("class:Profile", "name", "Luca");
      OrientVertex jay = g.addVertex("class:Profile", "name", "Jay");
View Full Code Here

TOP

Related Classes of com.tinkerpop.blueprints.impls.orient.OrientEdgeType

Copyright © 2018 www.massapicom. 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.