Ejemplo n.º 1
0
 protected List<Tweet> selectTweets(LocalDateTime referenceDate, List<Tweet> tweets) {
   final List<Tweet> aux = new ArrayList<>();
   if (referenceDate != null && tweets != null && !tweets.isEmpty()) {
     for (Tweet m : tweets) {
       int day = timeManager.handleDay(referenceDate, m.getCreatedAt(), 1, 90);
       if (day >= 1 && day <= 90) {
         aux.add(m);
       }
     }
   }
   return aux;
 }
Ejemplo n.º 2
0
 /**
  * @param referenceDate
  * @param metaRetweets
  * @return
  */
 protected List<MetaRetweet> selectRetweets(
     LocalDateTime referenceDate, List<MetaRetweet> metaRetweets) {
   final List<MetaRetweet> aux = new ArrayList<>();
   if (referenceDate != null && metaRetweets != null && !metaRetweets.isEmpty()) {
     for (MetaRetweet m : metaRetweets) {
       int day = timeManager.handleDay(referenceDate, m.getRetweetDate(), 1, 90);
       if (day >= 1 && day <= 90) {
         aux.add(m);
       }
     }
   }
   return aux;
 }