From 948ff415cd3571c9f418765b30f1547dd16e84bf Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sun, 27 Jun 2021 18:59:41 +0200 Subject: Latest maven, jacoco and javadoc files --- .../site/jacoco/musichub.business/AudioBook.html | 2 +- .../jacoco/musichub.business/AudioBook.java.html | 24 +++++++++++----------- target/site/jacoco/musichub.business/Category.html | 2 +- .../jacoco/musichub.business/Category.java.html | 10 ++++----- target/site/jacoco/musichub.business/Language.html | 2 +- .../jacoco/musichub.business/Language.java.html | 10 ++++----- .../jacoco/musichub.business/MusicHub.java.html | 21 +++++++++++++++++++ target/site/jacoco/musichub.business/index.html | 2 +- .../jacoco/musichub.business/index.source.html | 2 +- 9 files changed, 48 insertions(+), 27 deletions(-) (limited to 'target/site/jacoco/musichub.business') diff --git a/target/site/jacoco/musichub.business/AudioBook.html b/target/site/jacoco/musichub.business/AudioBook.html index aec1e56..78809c1 100644 --- a/target/site/jacoco/musichub.business/AudioBook.html +++ b/target/site/jacoco/musichub.business/AudioBook.html @@ -1 +1 @@ -AudioBook

AudioBook

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total164 of 1640 %10 of 100 %1717393999
createXMLElement(Document, Element)450 %n/a11101011
setLanguage(String)290 %50 %557711
setCategory(String)290 %50 %557711
AudioBook(Element)200 %n/a114411
AudioBook(String, String, int, String, String, String, String)140 %n/a114411
AudioBook(String, String, int, String, String, String)130 %n/a114411
toString()80 %n/a111111
getLanguage()30 %n/a111111
getCategory()30 %n/a111111
\ No newline at end of file +AudioBook

AudioBook

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total117 of 16428 %8 of 1020 %1217273949
createXMLElement(Document, Element)450 %n/a11101011
AudioBook(Element)200 %n/a114411
setLanguage(String)151448 %4120 %454701
setCategory(String)151448 %4120 %454701
AudioBook(String, String, int, String, String, String, String)140 %n/a114411
toString()80 %n/a111111
AudioBook(String, String, int, String, String, String)13100 %n/a010401
getLanguage()3100 %n/a010101
getCategory()3100 %n/a010101
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/AudioBook.java.html b/target/site/jacoco/musichub.business/AudioBook.java.html index 33a7924..d8fc192 100644 --- a/target/site/jacoco/musichub.business/AudioBook.java.html +++ b/target/site/jacoco/musichub.business/AudioBook.java.html @@ -14,10 +14,10 @@ public class AudioBook extends AudioElement { } public AudioBook(String title, String artist, int lengthInSeconds, String content, String language, String category) { - super(title, artist, lengthInSeconds, content); - this.setLanguage(language); - this.setCategory(category); - } + super(title, artist, lengthInSeconds, content); + this.setLanguage(language); + this.setCategory(category); + } public AudioBook(Element xmlElement) { super(xmlElement); @@ -26,32 +26,32 @@ public class AudioBook extends AudioElement { } public Language getLanguage() { - return this.language; + return this.language; } public void setLanguage(String language) { - switch (language.toLowerCase()) { + switch (language.toLowerCase()) { default -> this.language = Language.ENGLISH; - case "french" -> this.language = Language.FRENCH; + case "french" -> this.language = Language.FRENCH; case "german" -> this.language = Language.GERMAN; case "spanish" -> this.language = Language.SPANISH; case "italian" -> this.language = Language.ITALIAN; } - } + } public Category getCategory() { - return this.category; + return this.category; } public void setCategory(String category) { - switch (category.toLowerCase()) { + switch (category.toLowerCase()) { default -> this.category = Category.YOUTH; - case "novel" -> this.category = Category.NOVEL; + case "novel" -> this.category = Category.NOVEL; case "theater" -> this.category = Category.THEATER; case "documentary" -> this.category = Category.DOCUMENTARY; case "speech" -> this.category = Category.SPEECH; } - } + } public String toString() { diff --git a/target/site/jacoco/musichub.business/Category.html b/target/site/jacoco/musichub.business/Category.html index d7e4df0..690ad21 100644 --- a/target/site/jacoco/musichub.business/Category.html +++ b/target/site/jacoco/musichub.business/Category.html @@ -1 +1 @@ -Category

Category

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total49 of 490 %0 of 0n/a336633
static {...}380 %n/a112211
Category(String, int, String)80 %n/a113311
getCategory()30 %n/a111111
\ No newline at end of file +Category

Category

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total3 of 4993 %0 of 0n/a131613
getCategory()30 %n/a111111
static {...}38100 %n/a010201
Category(String, int, String)8100 %n/a010301
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/Category.java.html b/target/site/jacoco/musichub.business/Category.java.html index cdef51f..1d815b6 100644 --- a/target/site/jacoco/musichub.business/Category.java.html +++ b/target/site/jacoco/musichub.business/Category.java.html @@ -1,12 +1,12 @@ Category.java

Category.java

package musichub.business;
 
-public enum Category {
-    YOUTH("youth"), NOVEL("novel"), THEATER("theater"), DOCUMENTARY("documentary"), SPEECH("speech");
+public enum Category {
+    YOUTH("youth"), NOVEL("novel"), THEATER("theater"), DOCUMENTARY("documentary"), SPEECH("speech");
     private final String category;
 
-    Category(String category) {
-        this.category = category;
-    }
+    Category(String category) {
+        this.category = category;
+    }
 
     public String getCategory() {
         return category;
diff --git a/target/site/jacoco/musichub.business/Language.html b/target/site/jacoco/musichub.business/Language.html
index 604af85..72d4236 100644
--- a/target/site/jacoco/musichub.business/Language.html
+++ b/target/site/jacoco/musichub.business/Language.html
@@ -1 +1 @@
-Language

Language

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total49 of 490 %0 of 0n/a336633
static {...}380 %n/a112211
Language(String, int, String)80 %n/a113311
getLanguage()30 %n/a111111
\ No newline at end of file +Language

Language

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total3 of 4993 %0 of 0n/a131613
getLanguage()30 %n/a111111
static {...}38100 %n/a010201
Language(String, int, String)8100 %n/a010301
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/Language.java.html b/target/site/jacoco/musichub.business/Language.java.html index f974811..4c55c9d 100644 --- a/target/site/jacoco/musichub.business/Language.java.html +++ b/target/site/jacoco/musichub.business/Language.java.html @@ -1,12 +1,12 @@ Language.java

Language.java

package musichub.business;
 
-public enum Language {
-    FRENCH("french"), ENGLISH("english"), ITALIAN("italian"), SPANISH("spanish"), GERMAN("german");
+public enum Language {
+    FRENCH("french"), ENGLISH("english"), ITALIAN("italian"), SPANISH("spanish"), GERMAN("german");
     private final String language;
 
-    Language(String language) {
-        this.language = language;
-    }
+    Language(String language) {
+        this.language = language;
+    }
 
     public String getLanguage() {
         return language;
diff --git a/target/site/jacoco/musichub.business/MusicHub.java.html b/target/site/jacoco/musichub.business/MusicHub.java.html
index b9dfd09..d150675 100644
--- a/target/site/jacoco/musichub.business/MusicHub.java.html
+++ b/target/site/jacoco/musichub.business/MusicHub.java.html
@@ -339,5 +339,26 @@ public class MusicHub {
         }
 
     }
+
+    public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException {
+        Scanner scanner = new Scanner(System.in);
+        System.out.println("Entrez le titre ou l'artiste de la musique que vous souhaitez chercher dans la base de données");
+        String word = scanner.next().toLowerCase(Locale.ROOT);
+        List<AudioElement> searchResult = new ArrayList<>();
+        for(AudioElement el : elements){
+            if(el.getTitle().toLowerCase(Locale.ROOT).contains(word) || el.getArtist().toLowerCase(Locale.ROOT).contains(word)){
+                searchResult.add(el);
+                System.out.println(el);
+            }
+        }
+
+        if(searchResult.isEmpty()){
+            System.err.println("Aucun résultat pour votre recherche");
+        }
+        if (searchResult.size()==1){
+            this.getAudioElement(searchResult, searchResult.get(0).getTitle());
+        }
+    }
+
 }
 
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/index.html b/target/site/jacoco/musichub.business/index.html index 3178b04..359d516 100644 --- a/target/site/jacoco/musichub.business/index.html +++ b/target/site/jacoco/musichub.business/index.html @@ -1 +1 @@ -musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 551 of 2 06324 %152 of 16910 %14317238149959811115
MusicHub8030 %1140 %7979195195222211
Album3300 %140 %161684849911
AudioBook1640 %100 %171739399911
AudioElement8518168 %9218 %111630724901
Language490 %n/a33663311
Category490 %n/a33663311
PlayList3217084 %5964 %5149530701
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
Song105100 %6100 %0120260701
Genre56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 412 of 2 06331 %150 of 16911 %1341723594995081815
MusicHub8030 %1140 %7979195195222211
Album3300 %140 %161684849911
AudioBook1174728 %8220 %121727394901
AudioElement8518168 %9218 %111630724901
PlayList3217084 %5964 %5149530701
SortByAuthor90 %n/a22222211
SortByDate90 %n/a22222211
SortByGenre90 %n/a22222211
NoAlbumFoundException0 %n/a11221111
NoPlayListFoundException0 %n/a11221111
NoElementFoundException0 %n/a11221111
Language4693 %n/a13161301
Category4693 %n/a13161301
Song105100 %6100 %0120260701
Genre56100 %n/a03060301
\ No newline at end of file diff --git a/target/site/jacoco/musichub.business/index.source.html b/target/site/jacoco/musichub.business/index.source.html index 967ff25..21f0bb6 100644 --- a/target/site/jacoco/musichub.business/index.source.html +++ b/target/site/jacoco/musichub.business/index.source.html @@ -1 +1 @@ -musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 551 of 2 06324 %152 of 16910 %14317238149959811115
MusicHub.java8300 %1140 %8585201201282844
Album.java3300 %140 %161684849911
AudioBook.java1640 %100 %171739399911
AudioElement.java8518168 %9218 %111630724901
Language.java490 %n/a33663311
Category.java490 %n/a33663311
PlayList.java3217084 %5964 %5149530701
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Song.java105100 %6100 %0120260701
Genre.java56100 %n/a03060301
\ No newline at end of file +musichub.business

musichub.business

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 412 of 2 06331 %150 of 16911 %1341723594995081815
MusicHub.java8300 %1140 %8585201201282844
Album.java3300 %140 %161684849911
AudioBook.java1174728 %8220 %121727394901
AudioElement.java8518168 %9218 %111630724901
PlayList.java3217084 %5964 %5149530701
NoAlbumFoundException.java0 %n/a11221111
NoPlayListFoundException.java0 %n/a11221111
NoElementFoundException.java0 %n/a11221111
Language.java4693 %n/a13161301
Category.java4693 %n/a13161301
Song.java105100 %6100 %0120260701
Genre.java56100 %n/a03060301
\ No newline at end of file -- cgit v1.2.3