public class YearlyCalendarKeyword extends CalendarKeyword
Modifier | Constructor and Description |
---|---|
protected |
YearlyCalendarKeyword(org.w3c.dom.Element keyword,
java.lang.String string) |
|
YearlyCalendarKeyword(UC4ObjectName name)
Constructs a new
YearlyCalendarKeyword . |
|
YearlyCalendarKeyword(UC4ObjectName name,
int nYear,
int startWithYear)
Constructs a new
YearlyCalendarKeyword . |
Modifier and Type | Method and Description |
---|---|
void |
addDate(DateTime date)
Adds a date to the selected dates.
|
DateTime |
getIntervalEndDate()
Returns the end date of the interval.
|
int |
getIntervalEveryDay()
Returns the interval in days.
|
DateTime |
getIntervalStartDate()
Returns the start date of the interval.
|
int |
getNYear()
Returns the interval in years.
|
int |
getStartYear()
Returns the start year for the interval.
|
boolean |
hasDefinedInterval()
Returns
true if this yearly keyword has a defined interval. |
void |
inDefinedInterval(int everyNday,
boolean beginOfYear,
DateTime start,
DateTime end)
Defines an interval for this yearly keyword.
|
boolean |
isGroup()
Returns
true if this is a group keyword. |
boolean |
isIntervalBeginOfYear()
Returns
true if the beginning of the year is set for the interval. |
boolean |
isMonthly()
Returns
true if this is a monthly keyword. |
boolean |
isOnDefinedCalendarDays()
Returns
true if the definition of calendar days is selected. |
boolean |
isRoll()
Returns
true if this is a roll keyword. |
boolean |
isStatic()
Returns
true if this is a static keyword. |
boolean |
isWeekly()
Returns
true if this is a weekly keyword. |
boolean |
isYearly()
Returns
true if this is a yearly keyword. |
void |
removeAllDates()
Removes all selected dates.
|
boolean |
removeDate(DateTime date)
Removes the specified date from the selected dates.
|
protected void |
save(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element parent)
Saves the keyword under the specified parent element
|
java.util.Iterator<DateTime> |
selectedDates()
Returns an iterator over
DateTime . |
void |
selectOnDefinedCalendarDays()
If this method is called the selected calendar days are used.
|
void |
setNYear(int nYear)
Sets the interval in years.
|
void |
setStartYear(int startYear)
Sets the start year for the interval.
|
containsDate, equals, getCalendarName, getErrorMessageInsert, getErrorMessageNumber, getErrorText, getName, getPreCalculatedDates, hashCode, invalidateCalculatedDates, loadCalculatedDays, setCalendarName, setErrorMessageInsert, setErrorMessageNumber, setErrorText, setName, toString
protected YearlyCalendarKeyword(org.w3c.dom.Element keyword, java.lang.String string)
public YearlyCalendarKeyword(UC4ObjectName name, int nYear, int startWithYear)
YearlyCalendarKeyword
.name
- Name of the calendar keywordnYear
- Every n year, integer between 1 and 1000startWithYear
- Year to start with, integer between 1 and 3000public YearlyCalendarKeyword(UC4ObjectName name)
YearlyCalendarKeyword
.
The interval is set to 1 starting with the current year.name
- Name of the calendar keywordpublic void selectOnDefinedCalendarDays()
inDefinedInterval
).public boolean isOnDefinedCalendarDays()
true
if the definition of calendar days is selected.public java.util.Iterator<DateTime> selectedDates()
DateTime
.
This iterator can be used to read the selected dates and remove dates using the remove method
of the Iterator
.public void addDate(DateTime date)
date
- Datepublic boolean removeDate(DateTime date)
date
- Datepublic void removeAllDates()
public void inDefinedInterval(int everyNday, boolean beginOfYear, DateTime start, DateTime end)
everyNday
- Every n day, integer between 1 and 365beginOfYear
- Direction for day counting, true means that every n day from the beginning of the year is countedstart
- Start dateend
- End datepublic boolean isIntervalBeginOfYear()
true
if the beginning of the year is set for the interval.public DateTime getIntervalEndDate()
public int getIntervalEveryDay()
public DateTime getIntervalStartDate()
public boolean hasDefinedInterval()
true
if this yearly keyword has a defined interval.
If this method returns false
single dates are selected for this yearly keyword.public int getNYear()
public void setNYear(int nYear)
nYear
- Integer containg the inverval in yearspublic int getStartYear()
public void setStartYear(int startYear)
startYear
- Integer containg the start yearpublic boolean isStatic()
CalendarKeyword
true
if this is a static keyword.isStatic
in class CalendarKeyword
public boolean isWeekly()
CalendarKeyword
true
if this is a weekly keyword.isWeekly
in class CalendarKeyword
public boolean isMonthly()
CalendarKeyword
true
if this is a monthly keyword.isMonthly
in class CalendarKeyword
public boolean isYearly()
CalendarKeyword
true
if this is a yearly keyword.isYearly
in class CalendarKeyword
public boolean isGroup()
CalendarKeyword
true
if this is a group keyword.isGroup
in class CalendarKeyword
public boolean isRoll()
CalendarKeyword
true
if this is a roll keyword.isRoll
in class CalendarKeyword
protected void save(com.uc4.util.XMLDocument doc, org.w3c.dom.Element parent)
CalendarKeyword
save
in class CalendarKeyword
doc
- XML Documentparent
- Parent element