com.lightdev.lib.holiday.client
Interface CalendarEvent


public interface CalendarEvent

This interface is not used on the client side and will be moved out of the client library in future versions. It is used on the server only and is implemented by classes representing calendar events on the server.

Version:
1, March 10, 2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, Redistribution and use are subject to terms and conditions of the Light Development Basic License agreement as layed out at http://www.lightdev.com/license/Light_Development_Basic_License.txt

Field Summary
static String ATTR_INDEX
          attribute name for XML representation
static String ATTR_SIZE
          attribute name for XML representation
static String DESC_KEY_DETAILS
          key to identify a descriptive text
static String DESC_KEY_NAME
          key to identify a descriptive text
static String DESC_KEY_OCC_DESC
          key to identify a descriptive text
static int EVENT_TYPE_COUNT
          constant that identifies the number of event types modeled by this library
static int EVENT_TYPE_DAY_GREGORIAN_DATE_RELATION
          constant to identify an event that occurs on a given weekday relative to a fixed gregorian date
static int EVENT_TYPE_DAY_WEEK_MONTH_GREGORIAN
          constant to identify an event that occurs on e.g. the third Monday in January
static int EVENT_TYPE_EASTER_RELATION
          constant to identify an event that occurs on a day relative to western easter
static int EVENT_TYPE_FIXED_CHINESE_DATE
          constant to identify an event that occurs on a date determined with a special computation algorithm
static int EVENT_TYPE_FIXED_GREGORIAN_DATE
          constant to identify an event that occurs on a fixed gregorian date
static int EVENT_TYPE_FIXED_HEBREW_DATE
          constant to identify an event that occurs on a fixed hebrew date
static int EVENT_TYPE_FIXED_HINDU_DATE
          constant to identify an event that occurs on a fixed hindu date
static int EVENT_TYPE_FIXED_ISLAMIC_DATE
          constant to identify an event that occurs on a fixed islamic date
static int EVENT_TYPE_SOLAR
          constant to identify an event whose occurrence depends on a solar event
static int EVENT_TYPE_SPECIAL_ALGORITHM_DATE
          constant to identify an event that occurs on a date determined with a special computation algorithm
static String TAG_HOLIDAY
          tag name for XML representation
static String TAG_NAME
          tag name for XML representation
static String TAG_OCC_DEF
          tag name for XML representation
static String TAG_OCC_FIELD
          tag name for XML representation
static String TAG_TYPE
          tag name for XML representation
 
Method Summary
 String getDescription(String key)
          get a descriptive text related to this event
 int getEventType()
          get the type of event this should return an integer id that corresponds to event classes, i.e.
 Object getId()
          get the id of this event object
 String getName()
          get the name of this event
 long[] getOccurrenceDefinition()
          get the occurrence field array this event is defined by
 String getOccurrenceName()
          get the name of the method the occurrence of this event is determined by
 void setDescription(String key, String desc)
          set a descriptive text related to this event
 void setEventType(int type)
          set the type of this event one of CalendarEvent.EVENT_TYPE_FIXED_GREGORIAN_DATE, CalendarEvent.EVENT_TYPE_EASTER_RELATION, etc.
 void setId(Object id)
          set the id of this event object
 void setName(String name)
          set the name of this CalendarEvent
 void setOccurrenceDefinition(int index, long value)
          set a field of the occurrence definition
 void setOccurrenceDefinition(long[] def)
          set the occurrence definition of this event
 String toString()
          get the string representation of this object
 

Field Detail

EVENT_TYPE_COUNT

static final int EVENT_TYPE_COUNT
constant that identifies the number of event types modeled by this library

See Also:
Constant Field Values

EVENT_TYPE_FIXED_GREGORIAN_DATE

static final int EVENT_TYPE_FIXED_GREGORIAN_DATE
constant to identify an event that occurs on a fixed gregorian date

See Also:
Constant Field Values

EVENT_TYPE_DAY_WEEK_MONTH_GREGORIAN

static final int EVENT_TYPE_DAY_WEEK_MONTH_GREGORIAN
constant to identify an event that occurs on e.g. the third Monday in January

See Also:
Constant Field Values

EVENT_TYPE_DAY_GREGORIAN_DATE_RELATION

static final int EVENT_TYPE_DAY_GREGORIAN_DATE_RELATION
constant to identify an event that occurs on a given weekday relative to a fixed gregorian date

See Also:
Constant Field Values

EVENT_TYPE_EASTER_RELATION

static final int EVENT_TYPE_EASTER_RELATION
constant to identify an event that occurs on a day relative to western easter

See Also:
Constant Field Values

EVENT_TYPE_FIXED_HEBREW_DATE

static final int EVENT_TYPE_FIXED_HEBREW_DATE
constant to identify an event that occurs on a fixed hebrew date

See Also:
Constant Field Values

EVENT_TYPE_FIXED_ISLAMIC_DATE

static final int EVENT_TYPE_FIXED_ISLAMIC_DATE
constant to identify an event that occurs on a fixed islamic date

See Also:
Constant Field Values

EVENT_TYPE_SPECIAL_ALGORITHM_DATE

static final int EVENT_TYPE_SPECIAL_ALGORITHM_DATE
constant to identify an event that occurs on a date determined with a special computation algorithm

See Also:
Constant Field Values

EVENT_TYPE_FIXED_CHINESE_DATE

static final int EVENT_TYPE_FIXED_CHINESE_DATE
constant to identify an event that occurs on a date determined with a special computation algorithm

See Also:
Constant Field Values

EVENT_TYPE_SOLAR

static final int EVENT_TYPE_SOLAR
constant to identify an event whose occurrence depends on a solar event

See Also:
Constant Field Values

EVENT_TYPE_FIXED_HINDU_DATE

static final int EVENT_TYPE_FIXED_HINDU_DATE
constant to identify an event that occurs on a fixed hindu date

See Also:
Constant Field Values

TAG_HOLIDAY

static final String TAG_HOLIDAY
tag name for XML representation

See Also:
Constant Field Values

TAG_NAME

static final String TAG_NAME
tag name for XML representation

See Also:
Constant Field Values

TAG_TYPE

static final String TAG_TYPE
tag name for XML representation

See Also:
Constant Field Values

TAG_OCC_DEF

static final String TAG_OCC_DEF
tag name for XML representation

See Also:
Constant Field Values

TAG_OCC_FIELD

static final String TAG_OCC_FIELD
tag name for XML representation

See Also:
Constant Field Values

ATTR_INDEX

static final String ATTR_INDEX
attribute name for XML representation

See Also:
Constant Field Values

ATTR_SIZE

static final String ATTR_SIZE
attribute name for XML representation

See Also:
Constant Field Values

DESC_KEY_DETAILS

static final String DESC_KEY_DETAILS
key to identify a descriptive text

See Also:
Constant Field Values

DESC_KEY_OCC_DESC

static final String DESC_KEY_OCC_DESC
key to identify a descriptive text

See Also:
Constant Field Values

DESC_KEY_NAME

static final String DESC_KEY_NAME
key to identify a descriptive text

See Also:
Constant Field Values
Method Detail

toString

String toString()
get the string representation of this object

Overrides:
toString in class Object
Returns:
the object represented as a string

getName

String getName()
get the name of this event

Returns:
the event name

setName

void setName(String name)
set the name of this CalendarEvent

Parameters:
name - the new name

getOccurrenceDefinition

long[] getOccurrenceDefinition()
get the occurrence field array this event is defined by

Returns:
the occurrence definition

getOccurrenceName

String getOccurrenceName()
get the name of the method the occurrence of this event is determined by

Returns:
the occurence method name

getEventType

int getEventType()
get the type of event

this should return an integer id that corresponds to event classes, i.e. one of CalendarEvent.EVENT_TYPE_FIXED_GREGORIAN_DATE, CalendarEvent.EVENT_TYPE_EASTER_RELATION, etc.

Returns:
int the event type indicator

setEventType

void setEventType(int type)
set the type of this event

one of CalendarEvent.EVENT_TYPE_FIXED_GREGORIAN_DATE, CalendarEvent.EVENT_TYPE_EASTER_RELATION, etc.

Parameters:
type - int the type

setOccurrenceDefinition

void setOccurrenceDefinition(long[] def)
set the occurrence definition of this event

Parameters:
def - long[] the definition

setOccurrenceDefinition

void setOccurrenceDefinition(int index,
                             long value)
set a field of the occurrence definition

Parameters:
index - int the identifier index
value - long the value to set

setId

void setId(Object id)
set the id of this event object

Parameters:
id - Object the id

getId

Object getId()
get the id of this event object

Returns:
Object the id or null if it has none

setDescription

void setDescription(String key,
                    String desc)
set a descriptive text related to this event

Parameters:
key - String the key to identify the descriptive text
desc - String text describing an event property or detail

getDescription

String getDescription(String key)
get a descriptive text related to this event

Parameters:
key - String the key to identify the descriptive text