public Map<Vertex<T>,Integer> shortestPath(Graph<T> graph,Vertex<T> startVertex){
        
        Map<Vertex<T>,Integer> distance = new HashMap<Vertex<T>,Integer>();
        TopologicalSort<T> sort = new TopologicalSort<T>();
        Deque<Vertex<T>> deque = sort.topSort(graph);
        distance.put(startVertex, 0);
        while(!deque.isEmpty()){
            Vertex<T> vertex = deque.poll();
            for(Edge<T> edge : vertex.getEdges()){
                if(getDistance(edge.getVertex2(),distance) > getDistance(edge.getVertex1(),distance) + edge.getWeight()){
                    distance.put(edge.getVertex2(), getDistance(edge.getVertex1(),distance) + edge.getWeight());
                }
            }
        }
        
        return distance;
    }
http://www.geeksforgeeks.org/shortest-path-for-directed-acyclic-graphs/
src/com/interview/graph/DAGShortestPathTopological.java