public MetroGraph() throws DAOException {
    DAOFactory factory = DAOFactory.getInstance();
    DaoStation daoStation = factory.getDaoStation();
    DaoMetroGraph daoMetroGraph = factory.getDaoMetroGraph();
    vertices = new ArrayList<Vertex>();


    // 1. Créer des objets Vertex sans Edge
    List<Station> allStations = daoStation.getAllStations();
    for (Station station : allStations) {
      vertices.add(new Vertex(station.getId(), station.getName()));
    }

    // Pour chaque VERTEX dans le graph initialiser des listes d'Edge
    for (Vertex currentVertex : vertices) {
      List<Edge_old> edges = currentVertex.getEdges();
      Station currentStation = allStations.get(currentVertex.getId() - 1);

      // 2. Parcourir toutes les STATIONS VOISINES. Le poids de Edge = distance entre les stations.
      List<Station> neighbors = daoMetroGraph.getNeighbors(currentVertex.getId());
      for (Station neighbor : neighbors) {
        Vertex targetVertex = vertices.get(neighbor.getId() - 1);
        Edge_old newEdge =
            new Edge_old(targetVertex, Geometry.getDistanceBetweenTwoStations(currentStation,
                neighbor));
        edges.add(newEdge);
      }

      // 3. Parcourir toutes les CORRESPONDANCES. Le poids entre les correspondances = distance
      // entre les stations.
      List<Station> transferStations = daoMetroGraph.getTransferStations(currentVertex.getId());
      for (Station transferStation : transferStations) {
        Vertex targetVertex = vertices.get(transferStation.getId() - 1);
        Edge_old newEdge =
            new Edge_old(targetVertex, Geometry.getDistanceBetweenTwoStations(currentStation,
                transferStation));
        edges.add(newEdge);
      }

      // 4. Sauvegarder les Edges
      currentVertex.setEdges(edges);
    }
  }