Package com.tinkerpop.blueprints.impls.orient

Examples of com.tinkerpop.blueprints.impls.orient.OrientVertexType.createProperty()


      OrientGraphNoTx g = factory.getNoTx();

      try {
        System.out.println("Creating vertex class Client" + s + " against server " + g + "...");
        OrientVertexType t = g.createVertexType("Client" + s);
        t.createProperty("name", OType.STRING).setMandatory(true);

        System.out.println("Creating vertex class Knows" + s + " against server " + g + "...");
        g.createEdgeType("Knows" + s);
      } finally {
        g.shutdown();
View Full Code Here


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

    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");
View Full Code Here

  public void testEmbeddedListAsVertexProperty() {
    OrientGraph g = new OrientGraph(URL, "admin", "admin");

    try {
      OrientVertexType vertexType = g.createVertexType("EmbeddedClass");
      vertexType.createProperty("embeddedList", OType.EMBEDDEDLIST);

      OrientVertex vertex = g.addVertex("class:EmbeddedClass");

      List<ODocument> embeddedList = new ArrayList<ODocument>();
      ODocument docOne = new ODocument();
View Full Code Here

    final OrientGraphNoTx graph = factory.getNoTx();
    try {
      if (graph.getVertexType("Client") == null) {
        final OrientVertexType clientType = graph.createVertexType("Client");

        final OrientVertexType.OrientVertexProperty property = clientType.createProperty("uid", OType.STRING);
        property.createIndex(OClass.INDEX_TYPE.UNIQUE_HASH_INDEX);

        // CREATE ONE CLUSTER PER THREAD
        for (int i = 0; i < getThreads(); ++i) {
          System.out.println("Creating cluster: client_" + i + "...");
View Full Code Here

    try {
      if (graph.getVertexType("Client") == null) {
        final OrientVertexType clientType = graph.createVertexType("Client");

        final OrientVertexType.OrientVertexProperty property = clientType.createProperty("uid", OType.STRING);
        //property.createIndex(OClass.INDEX_TYPE.UNIQUE_HASH_INDEX);

        // CREATE ONE CLUSTER PER THREAD
        for (int i = 0; i < getThreads(); ++i) {
          System.out.println("Creating cluster: client_" + i + "...");
View Full Code Here

    try {
      if (graph.getVertexType("Client") == null) {
        final OrientVertexType clientType = graph.createVertexType("Client");

        final OrientVertexType.OrientVertexProperty property = clientType.createProperty("uid", OType.STRING);
        // property.createIndex(OClass.INDEX_TYPE.UNIQUE_HASH_INDEX);

        // CREATE ONE CLUSTER PER THREAD
        for (int i = 0; i < getThreads(); ++i) {
          System.out.println("Creating cluster: client_" + i + "...");
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.