Hi Marc, Use createVertexType and createEdgeType from OrientBaseGraph to create classes for vertex and edges.
Also i cant find a method to create a cluster. I have many 1000 of classes > and i want to cluster them because some of the classes have the same topic. For this purpose is better to use class inheritance and abstract classes. Clusters is something different in OrientDB. They are used to group records. Class can contain multiple clusters, but not vice verse. Best regards, Artem Orobets * Orient Technologiesthe Company behind OrientDB* 2014-04-07 11:41 GMT+03:00 Marc Tigges <[email protected]>: > Hallo, > > im playing a little bit with orientdb and java and unfortunately i cant > find how i > can create clusters and classes in java code. > > This is how i actually create Vertices: > > TransactionalGraph graph = new OrientGraph(path, "admin", "admin"); > > Vertex newVertex graph.addVertex("class:person"); > newVertex.setProperty("firstname", "Peter"); > newVertex.setProperty("lastname", "Gibson"); > > graph.commit(); > graph.shutdown(); > > As you can see i set the class of the new Vertex to "class:person" but i > didnt > create the class. Does orientdb automatically create the class if it is > missing? > The mehtods from the TransactionalGraph arent giving me a possibilitiy to > create classes manually. > > Also i cant find a method to create a cluster. I have many 1000 of classes > and i want to cluster them because some of the classes have the same topic. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
