public class MonthlyCalendarKeyword extends CalendarKeyword
Modifier | Constructor and Description |
---|---|
protected |
MonthlyCalendarKeyword(org.w3c.dom.Element keyword,
java.lang.String string) |
|
MonthlyCalendarKeyword(UC4ObjectName name)
Constructs a new
MonthlyCalendarKeyword . |
|
MonthlyCalendarKeyword(UC4ObjectName name,
int nMonth,
int startMonth,
int endMonth)
Constructs a new
MonthlyCalendarKeyword . |
Modifier and Type | Method and Description |
---|---|
void |
addDate(java.lang.Integer day)
Adds a day to the selected days.
|
int |
getEndMonth()
Returns the number of the end month of the monthly interval.
|
java.lang.Integer |
getIntervalEndDay()
Returns the end day of the interval.
|
int |
getIntervalEveryDay()
Returns the interval in days.
|
java.lang.Integer |
getIntervalStartDay()
Returns the start day of the interval.
|
int |
getNMonth()
Returns the period in month.
|
int |
getStartMonth()
Returns the number of the start month of the monthly interval.
|
boolean |
hasDefinedInterval()
Returns
true if this yearly keyword has a defined interval. |
void |
inDefinedInterval(int everyNday,
boolean beginOfMonth,
java.lang.Integer start,
java.lang.Integer end)
Defines an interval for this monthly keyword.
|
boolean |
isGroup()
Returns
true if this is a group keyword. |
boolean |
isIntervalBeginOfMonth()
Returns the direction for counting the days.
|
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. |
boolean |
removeDate(java.lang.Integer day)
Removes the specified day from the selected days.
|
protected void |
save(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element parent)
Saves the keyword under the specified parent element
|
java.util.Iterator<java.lang.Integer> |
selectedDates()
Returns an iterator over
Integer . |
void |
selectOnDefinedCalendarDays(boolean beginOfMonth)
If this method is called the selected calendar days are used.
|
void |
setEndMonth(int endMonth)
Sets the number of the end month of the monthly interval.
|
void |
setNMonth(int month)
Sets the period in month.
|
void |
setStartMonth(int startMonth)
Sets the number of the start month of the monthly interval.
|
containsDate, equals, getCalendarName, getErrorMessageInsert, getErrorMessageNumber, getErrorText, getName, getPreCalculatedDates, hashCode, invalidateCalculatedDates, loadCalculatedDays, setCalendarName, setErrorMessageInsert, setErrorMessageNumber, setErrorText, setName, toString
protected MonthlyCalendarKeyword(org.w3c.dom.Element keyword, java.lang.String string)
public MonthlyCalendarKeyword(UC4ObjectName name, int nMonth, int startMonth, int endMonth)
MonthlyCalendarKeyword
.name
- Name of the calendar keywordnMonth
- Every n month, integer between 1 and 12startMonth
- Start from month, integer beetween 1 and 12endMonth
- End with month, integer beetween 1 and 12public MonthlyCalendarKeyword(UC4ObjectName name)
MonthlyCalendarKeyword
.
Every 1 Month starting with month 1 and ending with 12 is selected.name
- Name of the calendar keywordpublic void selectOnDefinedCalendarDays(boolean beginOfMonth)
inDefinedInterval
).beginOfMonth
- Direction to count the days, if false days are counted from the end of the monthpublic boolean isOnDefinedCalendarDays()
true
if the definition of calendar days is selected.public java.util.Iterator<java.lang.Integer> selectedDates()
Integer
.
The integer contains the number of the day.
This iterator can be used to read the selected days and remove days using the remove method
of the Iterator
.public void addDate(java.lang.Integer day)
day
- Daypublic boolean removeDate(java.lang.Integer day)
day
- Daypublic int getEndMonth()
public void setEndMonth(int endMonth)
endMonth
- End month, integer between 1 and 12public void inDefinedInterval(int everyNday, boolean beginOfMonth, java.lang.Integer start, java.lang.Integer end)
everyNday
- Every n day, integer between 1 and 365beginOfMonth
- Direction for day counting, true means that every n day from the beginning of the year is countedstart
- Start dayend
- End daypublic boolean isIntervalBeginOfMonth()
public java.lang.Integer getIntervalEndDay()
public int getIntervalEveryDay()
public java.lang.Integer getIntervalStartDay()
public int getNMonth()
public void setNMonth(int month)
month
- Integer containing the periodpublic int getStartMonth()
public void setStartMonth(int startMonth)
startMonth
- Start month, integer between 1 and 12public 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 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