String sourceId = draftEdge.getSource().getId();
String targetId = draftEdge.getTarget().getId();
Node source = graph.getNode(sourceId);
Node target = graph.getNode(targetId);
Object type = draftEdge.getType();
int edgeType = graphModel.addEdgeType(type);
Edge edge = graph.getEdge(source, target, edgeType);
switch (container.getEdgeDefault()) {
case DIRECTED:
edge = factory.newEdge(id, source, target, edgeType, draftEdge.getWeight(), true);