// Path: src/app/musicplayer/util/Resources.java
// public final class Resources {
// 
//     public static final String FXML = "/app/musicplayer/view/";
//     public static final String IMG = "/app/musicplayer/util/img/";
//     public static final String CSS = "/app/musicplayer/util/css/";
//     public static String JAR;
//     public static final String APIBASE = "http://ws.audioscrobbler.com/2.0/?";
//     public static final String APIKEY = "57ee3318536b23ee81d6b27e36997cde";
// 
//     private Resources() {}
// }


import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import app.musicplayer.util.Resources;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
        this.id = id;
        this.title = title;
        this.songs = null;
        this.placeholder = placeholder;
    }

    public int getId() {
        return this.id;
    }

    public String getTitle() {
        return this.title;
    }

    public String getPlaceholder() {
        return this.placeholder;
    }

    public ObservableList<Song> getSongs() {
        return FXCollections.observableArrayList(this.songs);
    }
    
    public void addSong(Song song) {
    	if (!songs.contains(song)) {

    		songs.add(song);

    		try {
    			DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
    			DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
// Path: src/app/musicplayer/util/Resources.java
// public final class Resources {
// 
//     public static final String FXML = "/app/musicplayer/view/";
//     public static final String IMG = "/app/musicplayer/util/img/";
//     public static final String CSS = "/app/musicplayer/util/css/";
//     public static String JAR;
//     public static final String APIBASE = "http://ws.audioscrobbler.com/2.0/?";
//     public static final String APIKEY = "57ee3318536b23ee81d6b27e36997cde";
// 
//     private Resources() {}
// }


// Path: src/app/musicplayer/model/Playlist.java
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import app.musicplayer.util.Resources;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

        this.id = id;
        this.title = title;
        this.songs = null;
        this.placeholder = placeholder;
    }

    public int getId() {
        return this.id;
    }

    public String getTitle() {
        return this.title;
    }

    public String getPlaceholder() {
        return this.placeholder;
    }

    public ObservableList<Song> getSongs() {
        return FXCollections.observableArrayList(this.songs);
    }
    
    public void addSong(Song song) {
    	if (!songs.contains(song)) {

    		songs.add(song);

    		try {
    			DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
    			DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
    			Document doc = docBuilder.parse(Resources.JAR + "library.xml");