@SuppressWarnings( "unchecked" )
	public DefaultUmlDiagram toDiagram( UmlDiagramData data, DefaultUmlDiagramRepository repository ) {
		Graph graph = new Graph();
		DefaultUmlDiagram diagram = new DefaultUmlDiagram( graph, repository );
		diagram.setCurrentUniqueId( data.getNextUnqiueId() );

		for( Data<?> itemData : data ) {
			DataConverter<?, Data<Item>, ?> converter = getConverterFor( itemData.getKey() );
			DefaultItem<?> item = converter.toItem( (Data<Item>) itemData, diagram );
			item.makeVisible();
		}

		return diagram;
	}