class ElementFactoryImpl implements ElementDraft.Factory {

    protected final static AtomicInteger NODE_IDS = new AtomicInteger();
    protected final static AtomicInteger EDGE_IDS = new AtomicInteger();
    protected final ImportContainerImpl container;

    protected AtomicInteger nextSequentialNodeId = new AtomicInteger();

    public ElementFactoryImpl(ImportContainerImpl container) {
        this.container = container;
    }

    @Override
    public NodeDraftImpl newNodeDraft() {
        return new NodeDraftImpl(container, String.valueOf(NODE_IDS.getAndIncrement()),
            nextSequentialNodeId.getAndIncrement());
    }

    @Override
    public NodeDraftImpl newNodeDraft(String id) {<FILL_FUNCTION_BODY>}

    @Override
    public EdgeDraftImpl newEdgeDraft() {
        return new EdgeDraftImpl(container, String.valueOf(EDGE_IDS.getAndIncrement()));
    }

    @Override
    public EdgeDraftImpl newEdgeDraft(String id) {
        if (id == null) {
            String message = NbBundle.getMessage(ElementFactoryImpl.class, "ElementFactoryException_NullEdgeId");
            container.getReport().logIssue(new Issue(message, Issue.Level.CRITICAL));
        }
        return new EdgeDraftImpl(container, id);
    }
}

        if (id == null) {
            String message = NbBundle.getMessage(ElementFactoryImpl.class, "ElementFactoryException_NullNodeId");
            container.getReport().logIssue(new Issue(message, Issue.Level.CRITICAL));
        }
        return new NodeDraftImpl(container, id, nextSequentialNodeId.getAndIncrement());
    
<no_super_class>