tim@217: package de.intevation.gnv.timeseries.gap;
sascha@779:
ingo@781: import java.io.Serializable;
ingo@781:
ingo@810: /**
ingo@810: * A class representing a timegap. TimeGap
s are used in timeseries
ingo@810: * charts to identify gaps taking account for the resolution of the x-axis
ingo@810: * range.
ingo@810: *
ingo@810: * @author Tim Englich
ingo@810: */
ingo@781: public interface TimeGap extends Serializable {
sascha@778:
tim@217: public final static String TIME_UNIT_MINUTE = "m";
tim@217: public final static String TIME_UNIT_HOUR = "h";
tim@217: public final static String TIME_UNIT_DAY = "D";
tim@217: public final static String TIME_UNIT_WEEK = "W";
tim@217: public final static String TIME_UNIT_MONTH = "M";
tim@217: public final static String TIME_UNIT_YEAR = "Y";
sascha@778:
tim@217: public final static long MINUTE_IN_MILLIS = 60 * 1000;
tim@217: public final static long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
tim@217: public final static long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS;
tim@217: public final static long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS;
sascha@778:
sascha@778:
tim@217: /**
tim@217: * Returns the Lookup-Key for the TimeGap
ingo@810: *
ingo@810: * @return the timegap key.
tim@217: */
tim@217: int getKey();
sascha@778:
tim@217: /**
tim@217: * Returns the Value of the TimeValue in the Unit which is also given.
ingo@810: *
ingo@810: * @return the timegap value.
tim@217: */
tim@217: int getValue();
sascha@778:
tim@217: /**
tim@217: * Returns the Unit of the Timegap (e.g. Minutes, Hours, Days, Weeks, Months, Years)
ingo@810: *
ingo@810: * @return the timegap unit.
tim@217: */
tim@217: String getUnit();
tim@217:
tim@217: }
sascha@836: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :