Package java.util

Examples of java.util.Date.after()


      } else {
        int aggregationInterval = aggregatedSource.getProperty(
            AGGREGATOR.interval).getInt();
        Date aggregationDueDate = new Date(lastAggregation.getTime()
            + aggregationInterval * 1000);
        if (!aggregationDueDate.after(now)) {
          result.add(new SourceImpl(aggregatedSource.getURI()));
        }
      }
    }
    return result;
View Full Code Here


        time = new W3CDateFormat().parse(downloadAtttempt.getProperty(
            AGGREGATOR.time).getString());
      } catch (ParseException e) {
        throw new RuntimeException(e);
      }
      if ((result == null) || (time.after(result))) {
        result = time;
      }
    }
    return result;
  }
View Full Code Here

    {
        final Date aAsDate = (Date)objectA;
        final Date bAsDate = (Date)objectB;
        int result = 0;

        if (bAsDate.after(aAsDate))
        {
            // set result to a negative integer if the first argument of this
            // method is less than the second
            result = -1;
        }
View Full Code Here

      this.want_end = end;
    }

    protected DataIterator makeDataIterator(StationObsDataset sobs) {
      Date start = sobs.getStartDate();
      if (start.after(want_end))
        return null;
      Date end = sobs.getEndDate();
      if (end.before(want_start))
        return null;
      ucar.unidata.geoloc.Station s = sobs.getStation(stationName);
View Full Code Here

   
    FeedSubscription feed = feedDao.getSubscription(10);
    assertEquals(300,feed.getBookmark().getId());
    assertEquals("",feed.getMatchText());
    assertEquals(true,feed.isAutoImport());
    assertTrue(now.after(feed.getLastSync()));
    assertNull(feed.getPubDate());
   
    feed.setBookmark(new Bookmark(302));
    feed.setMatchText("abcd 123");
    feed.setAutoImport(false);
View Full Code Here

    bookmark.setUser(oldBookmark.getUser());

    // if bookmark.getLastUpdate() == null or it's not after
    // bookmark.getCreatedOn(), then set the date/time to NOW
    Date lupDate = bookmark.getLastUpdated();
    if (lupDate == null || !lupDate.after(bookmark.getCreatedOn())) {
      bookmark.setLastUpdated(GnizrDaoUtil.getNow());
    }

    // check if the link URL defined in the new bookmark
    // is any different from the existing one. if it's a
View Full Code Here

        }
        if(feed.getLastSync() == null || feed.getPubDate() == null){
          logger.info("doCrawl for the very first time: " + feedUrl);
          entries = processSyndFeed(syndFeed, feed);
        }else if(feed.getPubDate() != null){                   
          if(feedPubDate.after(feed.getPubDate())){
            logger.info("doCrawl because remote server pubDate is newer: " + feedUrl + ". Recorded PubDate="
                +feed.getPubDate() + " Server PubDate="+feedPubDate);
            entries = processSyndFeed(syndFeed, feed);
          }else{
            logger.info("doCrawl skip because pubDate is up-to-date: " + ". Recorded PubDate="
View Full Code Here

    Assert.isTrue(!news.isEmpty());

    Date mostRecentDate = null;
    for (INews newsitem : news) {
      Date date = getRecentDate(newsitem);
      if (mostRecentDate == null || date.after(mostRecentDate))
        mostRecentDate = date;
    }

    return mostRecentDate;
  }
View Full Code Here

        /* Feed was visited Today */
        if (date.getTime() > todayMillis)
          new EntityGroupItem(gToday, news);

        /* Feed was visited Yesterday */
        else if (date.after(yesterday))
          new EntityGroupItem(gYesterday, news);

        /* Feed was visited Two Weeks Ago */
        else if (date.after(earlierThisWeek))
          new EntityGroupItem(gEarlierThisWeek, news);
View Full Code Here

        /* Feed was visited Yesterday */
        else if (date.after(yesterday))
          new EntityGroupItem(gYesterday, news);

        /* Feed was visited Two Weeks Ago */
        else if (date.after(earlierThisWeek))
          new EntityGroupItem(gEarlierThisWeek, news);

        /* Feed was visited Last Week */
        else if (date.after(lastWeek))
          new EntityGroupItem(gLastWeek, news);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.