Beispiel #1
0
 /**
  * Returns the five most common terms of the tweetsOfEvent that belong to this event.
  *
  * @return A List of Strings with the most common terms.
  * @see generateCommonTerms generateCommonTerms() method.
  */
 public final List<String> getCommonTerms() {
   if (!commonTerms.isEmpty()) {
     return commonTerms;
   } else {
     PrintUtilities.printWarningMessageln("No common terms have been calculated yet!");
     PrintUtilities.printInfoMessageln(
         "Run " + PeakFindingEvent.class + "." + "generateCommonTerms() method first.");
     return null;
   }
 }
Beispiel #2
0
 /**
  * Returns the five most common terms as a single String.
  *
  * @return A String containing the five most common terms.
  * @see #getCommonTerms() getCommonTerms() method.
  */
 public final String getCommonTermsAsString() {
   if (commonTerms.isEmpty()) {
     PrintUtilities.printWarningMessageln("No common terms have been calculated yet!");
     PrintUtilities.printInfoMessageln(
         "Run " + PeakFindingEvent.class + "." + "generateCommonTerms() method first.");
     return null;
   }
   String commonTermsString = "";
   for (String term : commonTerms) {
     commonTermsString = commonTermsString + term + " ";
   }
   return commonTermsString;
 }