Package com.tinkerpop.blueprints.util.wrappers.batch

Examples of com.tinkerpop.blueprints.util.wrappers.batch.BatchGraph.addVertex()


      List<FaunusVertex> faunusVertexList = FaunusGraphSONUtility.fromJSON(inputStream);

      // add vertices w/ properties to graph, also saving id->id mapping for edge creation
      Vertex blueprintsVertex;
      for (FaunusVertex faunusVertex : faunusVertexList) {
        blueprintsVertex = graph.addVertex(faunusVertex.getIdAsLong());
        for (String property : faunusVertex.getPropertyKeys()) {
          blueprintsVertex.setProperty(property, faunusVertex.getProperty(property));
        }
        faunusToBlueprintsId.put(faunusVertex.getIdAsLong(), (Long) blueprintsVertex.getId());
      }
View Full Code Here


                            } else {
                                edgeEndVertices[i] = graph.getVertex(vertexMappedIdMap.get(vertexIds[i]));
                            }

                            if (null == edgeEndVertices[i]) {
                                edgeEndVertices[i] = graph.addVertex(vertexIds[i]);
                                if (vertexIdKey != null)
                                    // Default to standard ID system (in case no mapped
                                    // ID is found later)
                                    vertexMappedIdMap.put(vertexIds[i], vertexIds[i]);
                            }
View Full Code Here

                    String elementName = reader.getName().getLocalPart();

                    if (elementName.equals(GraphMLTokens.NODE)) {
                        Vertex currentVertex = graph.getVertex(vertexId);
                        if (currentVertex == null) {
                            currentVertex = graph.addVertex(vertexId);
                        }

                        for (Entry<String, Object> prop : vertexProps.entrySet()) {
                            currentVertex.setProperty(prop.getKey(), prop.getValue());
                        }
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.