use of org.unipop.structure.UniVertex in project unipop by unipop-graph.
the class RestController method addVertex.
@Override
public Vertex addVertex(AddVertexQuery uniQuery) {
UniVertex vertex = new UniVertex(uniQuery.getProperties(), 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;
}
Aggregations