public de.unihannover.sim.labysim.model.graph.Labyrinth getGraphLabyrinth(){
		HashMap<Integer, de.unihannover.sim.labysim.model.graph.Node> _nodes = new HashMap<Integer, de.unihannover.sim.labysim.model.graph.Node>();
		LinkedList<de.unihannover.sim.labysim.model.graph.Edge> _edges = new LinkedList<de.unihannover.sim.labysim.model.graph.Edge>();
		
		// Reads the xml file
		XmlIO _xmlio = new XmlIO();
		_xmlio.readFile(this._filename+".xml");
		Document _doc = _xmlio.getDocument();
		
		// Read labyrinth data.
		NodeList _xmlNodes = _doc.getElementsByTagName("labyrinth");
		Node _xmlNode = _xmlNodes.item(0);
		NamedNodeMap _xmlAttributes = _xmlNode.getAttributes();
		int _startNode = Integer.parseInt(_xmlAttributes.getNamedItem("start").getNodeValue());
		int _endNode = Integer.parseInt(_xmlAttributes.getNamedItem("end").getNodeValue());
		
		_nodes.put(_startNode, new de.unihannover.sim.labysim.model.graph.Node(_startNode, true, false));
		_nodes.put(_endNode, new de.unihannover.sim.labysim.model.graph.Node(_endNode, false, true));
		
		// Work on all edges of the labyrintrh. 
		_xmlNodes = _doc.getElementsByTagName("edge");
		for(int i = 0;i< _xmlNodes.getLength();i++){
			_xmlNode = _xmlNodes.item(i);
			_xmlAttributes = _xmlNode.getAttributes();
			int _nodeA = Integer.parseInt(_xmlAttributes.getNamedItem("nodeA").getNodeValue());
			int _nodeB = Integer.parseInt(_xmlAttributes.getNamedItem("nodeB").getNodeValue());
			int _length = Integer.parseInt(_xmlAttributes.getNamedItem("length").getNodeValue());
			
			de.unihannover.sim.labysim.model.graph.Node _nodeAObj;
			if(_nodes.containsKey(_nodeA)){
				_nodeAObj = _nodes.get(_nodeA);				
			}
			else {
				_nodeAObj = new de.unihannover.sim.labysim.model.graph.Node(_nodeA, false, false);
				_nodes.put(_nodeA, _nodeAObj);
			}
			
			de.unihannover.sim.labysim.model.graph.Node _nodeBObj;
			if(_nodes.containsKey(_nodeB)){
				_nodeBObj = _nodes.get(_nodeB);				
			}
			else {
				_nodeBObj = new de.unihannover.sim.labysim.model.graph.Node(_nodeB, false, false);
				_nodes.put(_nodeB, _nodeBObj);
			}
			
			de.unihannover.sim.labysim.model.graph.Edge _edgeObj = new Edge(_edges.size(), _length, _nodeAObj, _nodeBObj);
			_edges.add(_edgeObj);			
		}
		
		de.unihannover.sim.labysim.model.graph.Labyrinth _labyrinthObj = new Labyrinth(_edges);
		
		return _labyrinthObj;
	}