@Override
	public boolean insertAlbum(Album album) {
		
		AlbumXML albumXML = new AlbumXML();
		int lastAlbumID = 0;

		try {
			CDOrganizer cdOrganizer = XmlDAOFactory.unmarschallFile();

			for (ArtistXML a : cdOrganizer.getArtistList()) {
				
				if (a.getID() == album.getArtist().getId()) {
				
					if ( a.getAlbumList() != null) {
						for (AlbumXML b : a.getAlbumList()) {
							
							lastAlbumID = b.getID();
							
							if (b.getTitle().equals(album.getTitle())) {
								System.out.println("Albumname existiert bereits bei dem Artist!");
								return false;
							}
						
						}
					
					}
			        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
			        
					albumXML.setID(lastAlbumID +1);
					albumXML.setReleaseDate(formatter.format(album.getReleaseDate()));
					albumXML.setTitle(album.getTitle());

					//albumXML.setArtist(a);

					a.addAlbum(albumXML);
					
					XmlDAOFactory.marshallFile(cdOrganizer);
				}
			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return true;

	}