de.unihd.dbs.uima.annotator.heideltime.processors
public class HolidayProcessor extends GenericProcessor
Constructor and Description |
---|
HolidayProcessor()
Constructor just calls the parent constructor here.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluateCalculationFunctions(org.apache.uima.jcas.JCas jcas)
This function replaces function calls from the resource files with their TIMEX value.
|
java.lang.String |
getEasterSunday(int year)
Get the date of Eastersunday in a given year
|
java.lang.String |
getEasterSunday(int year,
int days)
Get the date of a day relative to Easter Sunday in a given year.
|
java.lang.String |
getWeekdayOfMonth(int number,
int weekday,
int month,
int year)
Get the date of a the first, second, third etc. weekday in a month
|
java.lang.String |
getWeekdayRelativeTo(java.lang.String date,
int weekday,
int number,
boolean count_itself)
Get the date of a weekday relative to a date, e.g. first Wednesday before 11-23
|
void |
initialize(org.apache.uima.UimaContext aContext)
not needed here
|
void |
process(org.apache.uima.jcas.JCas jcas)
all the functionality was put into evaluateCalculationFunctions().
|
public HolidayProcessor()
public void initialize(org.apache.uima.UimaContext aContext)
initialize
in class GenericProcessor
public void process(org.apache.uima.jcas.JCas jcas)
process
in class GenericProcessor
public void evaluateCalculationFunctions(org.apache.uima.jcas.JCas jcas)
jcas
- public java.lang.String getEasterSunday(int year, int days)
year
- days
- public java.lang.String getEasterSunday(int year)
year
- public java.lang.String getWeekdayRelativeTo(java.lang.String date, int weekday, int number, boolean count_itself)
date
- weekday
- number
- count_itself
- public java.lang.String getWeekdayOfMonth(int number, int weekday, int month, int year)
number
- weekday
- month
- year
-