package es.upvmaster.fullmediaplayer;

import java.util.Vector;

/**
 * Created by crpor on 06/08/2016.
 */
public class ListaMedios {
    private String name;
    private String author;
    private String url;
    private String nameFile;
    private String info;
    private boolean parental;
    private Vector<Medio> stations;

    public ListaMedios() {
        this("","","","","",false);
    }

    public ListaMedios(String name, String author, String url, String nameFile, String info, boolean parental) {
        this.name = name;
        this.author = author;
        this.url = url;
        this.nameFile = nameFile;
        this.info = info;
        this.parental = parental;
        this.stations = new Vector<Medio>();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getNameFile() {
        return nameFile;
    }

    public void setNameFile(String nameFile) {
        this.nameFile = nameFile;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public boolean getParental() {
        return parental;
    }

    public void setParental(boolean parental) {
        this.parental = parental;
    }

    public Vector<Medio> getStations() {
        return stations;
    }

    public void setStations(Vector<Medio> stations) {
        this.stations = stations;
    }

    public boolean mediosCargados() {
        return this.stations.size()>0;
    }

    public void vaciarListaMedios() {
        this.stations.clear();
    }

    public void agregarMedio(Medio medio) { this.stations.add(medio); }

    public void eliminarMedio(int posicion) {
        if (posicion>=0 && posicion<this.stations.size()) this.stations.remove(posicion);
    }
}
