private boolean depthFirstSearchRecursive(VertexType vertex, VertexType fromVertex, PreWorkPostWorkHandler<VertexType> handler)
            throws InvalidVertexException {
        //TODO:Implementing non-recursive version
        //int vertexId = vertex.getId();
        vertex.setMark(true);
        if (handler != null)
            if (handler.doPreWork(fromVertex, vertex))
                return true;
        dispatchEvent(new PreWorkEvent<VertexType, EdgeType>(fromVertex, vertex, graph));
        EventUtils.algorithmStep(this, "visit: " + vertex.getId());
        VertexType lastInDepthVertex = vertex;

        for (VertexType i : graph) {
            if (graph.isEdge(vertex, i)) {
                if (!i.getMark()) {
                    lastInDepthVertex = i;
                    if (depthFirstSearchRecursive(i, vertex, handler))
                        return true;
                }
            }
        }

        dispatchEvent(new PostWorkEvent<VertexType, EdgeType>(lastInDepthVertex, vertex, graph));
        EventUtils.algorithmStep(this, "leave: " + vertex.getId());

        if (handler != null)
            if (handler.doPostWork(lastInDepthVertex, vertex))
                return true;

        return false;
    }