@Override public Vertex createElement(Map<String, Object> fields) { Map<String, Object> properties = getProperties(fields); return new UniVertex(properties, this, graph); } }
@Override public Vertex createElement(Map<String, Object> fields) { Map<String, Object> properties = getProperties(fields); if (properties == null) return null; return new UniVertex(properties, this, graph); }
@Override public Vertex createElement(Map<String, Object> fields) { Map<String, Object> properties = getProperties(fields); if(properties == null) return null; return new UniVertex(properties, this, graph); } @Override
@Override public Vertex createElement(Map<String, Object> fields) { Map<String, Object> properties = getProperties(fields); if (properties == null) return null; return new UniVertex(properties, this, graph); }
@Override public Vertex createElement(Map<String, Object> fields) { Map<String, Object> properties = getProperties(fields); if(properties == null) return null; return new UniVertex(properties, this, graph); }
@Override public Vertex addVertex(AddVertexQuery uniQuery) { return new UniVertex(uniQuery.getProperties(), null, graph); }
@Override public Vertex addVertex(AddVertexQuery uniQuery) { UniVertex vertex = new UniVertex(uniQuery.getProperties(), null, graph); // try { if (index(this.vertexSchemas, vertex, true)) return vertex; // } catch (DocumentAlreadyExistsException ex) { // logger.warn("Document already exists in elastic", ex); // throw Graph.Exceptions.vertexWithIdAlreadyExists(vertex.id()); // } return null; }
@Override public Vertex addVertex(AddVertexQuery uniQuery) { UniVertex vertex = new UniVertex(uniQuery.getProperties(), null, this.graph); try { if (this.insert(this.vertexSchemas, vertex)) { return vertex; } } catch (DataAccessException ex) { throw Graph.Exceptions.vertexWithIdAlreadyExists(vertex.id()); } return vertex; }
@Override public Vertex addVertex(AddVertexQuery uniQuery) { UniVertex vertex = new UniVertex(uniQuery.getProperties(), null, graph); for (RestVertexSchema vertexSchema : vertexSchemas) { try { BaseRequest baseRequest = vertexSchema.addElement(vertex); if (baseRequest == null) return vertex; baseRequest.asJson(); } catch (UnirestException e) { e.printStackTrace(); } catch (NoSuchElementException e) { continue; } } return vertex; }