diff options
Diffstat (limited to 'src/musichub/business/MusicHub.java')
-rw-r--r-- | src/musichub/business/MusicHub.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/musichub/business/MusicHub.java b/src/musichub/business/MusicHub.java index 38e2214..f7cf137 100644 --- a/src/musichub/business/MusicHub.java +++ b/src/musichub/business/MusicHub.java @@ -6,8 +6,12 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import java.io.IOException; import java.util.*; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.UnsupportedAudioFileException; + class SortByDate implements Comparator<Album> { public int compare(Album a1, Album a2) { return a1.getDate().compareTo(a2.getDate()); @@ -326,4 +330,13 @@ public class MusicHub { } xmlHandler.createXMLFile(document, ELEMENTS_FILE_PATH); } + + public void getAudioElement(List<AudioElement> audios, String elementTitle) throws NoAlbumFoundException, UnsupportedAudioFileException, IOException, LineUnavailableException { + for (AudioElement el : audios) { + if (el.getTitle().equalsIgnoreCase(elementTitle)) { + el.manageAudioElement(); + } + } + + } }
\ No newline at end of file |