org.archive.wayback.partition
Class ToolBarData

java.lang.Object
  extended by org.archive.wayback.partition.ToolBarData

public class ToolBarData
extends Object

Author:
brad

Field Summary
 CaptureSearchResult curResult
          current result being shown
 CaptureSearchResult monthNextResult
          Earliest Result one month after current, or null
 List<Partition<CaptureSearchResult>> monthPartitions
          List> for months
 CaptureSearchResult monthPrevResult
          Latest Result one month before current, or null
 CaptureSearchResult nextResult
          Earliest Result after current, or null
 CaptureSearchResult prevResult
          Latest Result before current, or null
 CaptureSearchResults results
          the CaptureSearchResults object from the ResourceIndex.
 CaptureSearchResult yearNextResult
          Earliest Result one year after current, or null
 List<Partition<Partition<CaptureSearchResult>>> yearPartitions
          List>> for years
 CaptureSearchResult yearPrevResult
          Latest Result one year before current, or null
 
Constructor Summary
ToolBarData(UIResults uiResults)
           
 
Method Summary
static Date addDay(Date date, int amt)
          Increment a Date object by +/- some days
static Date addMonth(Date date, int amt)
          Increment a Date object by +/- some months
static Date addYear(Date date, int amt)
          Increment a Date object by +/- some years
 String computeGraphString(String formatKey, int width, int height)
           
 Date getFirstResultDate()
           
 Date getLastResultDate()
           
 long getResultCount()
           
 String makeReplayURL(CaptureSearchResult result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

yearPrevResult

public CaptureSearchResult yearPrevResult
Latest Result one year before current, or null


monthPrevResult

public CaptureSearchResult monthPrevResult
Latest Result one month before current, or null


prevResult

public CaptureSearchResult prevResult
Latest Result before current, or null


nextResult

public CaptureSearchResult nextResult
Earliest Result after current, or null


monthNextResult

public CaptureSearchResult monthNextResult
Earliest Result one month after current, or null


yearNextResult

public CaptureSearchResult yearNextResult
Earliest Result one year after current, or null


curResult

public CaptureSearchResult curResult
current result being shown


results

public CaptureSearchResults results
the CaptureSearchResults object from the ResourceIndex.


yearPartitions

public List<Partition<Partition<CaptureSearchResult>>> yearPartitions
List>> for years


monthPartitions

public List<Partition<CaptureSearchResult>> monthPartitions
List> for months

Constructor Detail

ToolBarData

public ToolBarData(UIResults uiResults)
Parameters:
uiResults - the UIResults holding replay info
Method Detail

computeGraphString

public String computeGraphString(String formatKey,
                                 int width,
                                 int height)
Parameters:
formatKey - String template for format Dates
width - pixel width of resulting graph
height - pixel height of resulting graph
Returns:
String argument which will generate a graph for the results

makeReplayURL

public String makeReplayURL(CaptureSearchResult result)
Parameters:
result - Restul to draw replay URL for
Returns:
String absolute URL that will replay result

getResultCount

public long getResultCount()
Returns:
the total number of results

getFirstResultDate

public Date getFirstResultDate()
Returns:
the Date of the first capture in the result set

getLastResultDate

public Date getLastResultDate()
Returns:
the Date of the last capture in the result set

addYear

public static Date addYear(Date date,
                           int amt)
Increment a Date object by +/- some years

Parameters:
date - Date to +/- some years from
amt - number of years to add/remove
Returns:
new Date object offset by the indicated years

addMonth

public static Date addMonth(Date date,
                            int amt)
Increment a Date object by +/- some months

Parameters:
date - Date to +/- some months from
amt - number of months to add/remove
Returns:
new Date object offset by the indicated months

addDay

public static Date addDay(Date date,
                          int amt)
Increment a Date object by +/- some days

Parameters:
date - Date to +/- some days from
amt - number of days to add/remove
Returns:
new Date object offset by the indicated days


Copyright © 2005-2011 Internet Archive. All Rights Reserved.