1
|
1 package org.mpi.openmind.repository.utils.ismi;
|
|
2
|
|
3 import java.io.Serializable;
|
|
4
|
|
5 import org.apache.commons.lang.StringUtils;
|
|
6 import org.joda.time.DateTime;
|
|
7 import org.joda.time.chrono.GregorianChronology;
|
|
8 import org.joda.time.chrono.IslamicChronology;
|
|
9 import org.joda.time.chrono.JulianChronology;
|
|
10 import org.json.JSONException;
|
|
11 import org.json.JSONObject;
|
|
12
|
|
13
|
|
14 public class ISMICalendar implements Serializable {
|
|
15 private static final long serialVersionUID = 1L;
|
|
16
|
|
17 public static String FROM = "from";
|
|
18 public static String UNTIL = "until";
|
|
19 public static String YEAR = "year";
|
|
20 public static String ADD_INF = "additional_info";
|
|
21 public static String CALENDAR_TYPE = "calendar_type";
|
|
22 public static String INPUT_FORM = "input_form";
|
|
23 public static String STATE = "state";
|
|
24 public static String DATE = "date";
|
|
25 public static String DATE_IN_TEXT = "date_in_text";
|
|
26
|
|
27 public static String INPUT_FORM_YEAR = "Year";
|
|
28 public static String INPUT_FORM_DATE = "Date";
|
|
29 public static String INPUT_FORM_FULL_DATE = "Full date";
|
|
30 public static String INPUT_FORM_RANGE = "Range";
|
|
31 public static String INPUT_FORM_FULL_RANGE = "Full range";
|
|
32
|
|
33 public static String TYPE_GREGORIAN = "Gregorian";
|
|
34 public static String TYPE_ISLAMIC = "Islamic";
|
|
35 public static String TYPE_JULIAN = "Julian";
|
|
36
|
|
37 public static String STATE_UNKNOWN = "unknown";
|
|
38 public static String STATE_KNOWN = "known";
|
|
39 public static String STATE_NOT_CHECKED = "not checked";
|
|
40
|
|
41 private String inputForm;
|
|
42 private String calendarType;
|
|
43
|
|
44 private ISMIDate fromGregorian = new ISMIDate();
|
|
45 private ISMIDate untilGregorian = new ISMIDate();
|
|
46 private String additionalInfo;
|
|
47
|
|
48 private Integer currentYear;
|
|
49 private ISMIDate currentFrom = new ISMIDate();
|
|
50 private ISMIDate currentUntil = new ISMIDate();
|
|
51
|
|
52 private String dateInText;
|
|
53
|
|
54 private String state;
|
|
55
|
|
56 public ISMICalendar(){
|
|
57 this.calendarType = TYPE_GREGORIAN;
|
|
58 this.inputForm = INPUT_FORM_YEAR;
|
|
59 this.state = STATE_NOT_CHECKED;
|
|
60 }
|
|
61
|
|
62 public ISMICalendar(String jsonString){
|
|
63 if(StringUtils.isNotEmpty(jsonString)){
|
|
64 try {
|
|
65 JSONObject json = new JSONObject(jsonString);
|
|
66 this.state = json.getString(STATE);
|
|
67 if(StringUtils.isNotEmpty(state)){
|
|
68 if(state.equals(STATE_KNOWN)){
|
|
69
|
|
70 this.additionalInfo = json.getString(ADD_INF);
|
|
71 this.calendarType = json.getString(CALENDAR_TYPE);
|
|
72 this.inputForm = json.getString(INPUT_FORM);
|
|
73
|
|
74 if(inputForm.equals(INPUT_FORM_YEAR)){
|
|
75 this.fromGregorian = new ISMIDate(json.getJSONObject(FROM));
|
|
76 this.untilGregorian = new ISMIDate(json.getJSONObject(UNTIL));
|
|
77 this.currentYear = json.getInt(YEAR);
|
|
78 }else if(inputForm.equals(INPUT_FORM_RANGE)){
|
|
79 this.fromGregorian = new ISMIDate(json.getJSONObject(FROM));
|
|
80 this.untilGregorian = new ISMIDate(json.getJSONObject(UNTIL));
|
|
81 if(calendarType.equals(TYPE_GREGORIAN)){
|
|
82 this.currentFrom = new ISMIDate(json.getJSONObject(FROM));
|
|
83 this.currentUntil = new ISMIDate(json.getJSONObject(UNTIL));
|
|
84 }else if(calendarType.equals(TYPE_ISLAMIC)){
|
|
85 this.currentFrom = new ISMIDate(this.fromGregorian.getIslamicDateTime());
|
|
86 this.currentUntil = new ISMIDate(this.untilGregorian.getIslamicDateTime());
|
|
87 }else if(calendarType.equals(TYPE_JULIAN)){
|
|
88 this.currentFrom = new ISMIDate(this.fromGregorian.getJulianDateTime());
|
|
89 this.currentUntil = new ISMIDate(this.untilGregorian.getJulianDateTime());
|
|
90 }
|
|
91 }else if(inputForm.equals(INPUT_FORM_DATE)){
|
|
92 this.fromGregorian = new ISMIDate(json.getJSONObject(DATE));
|
|
93 if(calendarType.equals(TYPE_GREGORIAN)){
|
|
94 this.currentFrom = new ISMIDate(json.getJSONObject(DATE));
|
|
95 }else if(calendarType.equals(TYPE_ISLAMIC)){
|
|
96 this.currentFrom = new ISMIDate(this.fromGregorian.getIslamicDateTime());
|
|
97 }else if(calendarType.equals(TYPE_JULIAN)){
|
|
98 this.currentFrom = new ISMIDate(this.fromGregorian.getJulianDateTime());
|
|
99 }
|
|
100 }
|
|
101
|
|
102 if(json.has("dayOfWeekFrom")){
|
|
103 this.currentFrom.setDayOfWeek(json.getInt("dayOfWeekFrom"));
|
|
104 }
|
|
105 if(json.has("dayOfWeekUntil")){
|
|
106 this.currentUntil.setDayOfWeek(json.getInt("dayOfWeekUntil"));
|
|
107 }
|
|
108 if(json.has("dayOfWeek")){
|
|
109 this.currentFrom.setDayOfWeek(json.getInt("dayOfWeek"));
|
|
110 }
|
|
111
|
|
112 }else if(state.equals(STATE_NOT_CHECKED) || state.equals(STATE_UNKNOWN)){
|
|
113 if(json.has(DATE_IN_TEXT)){
|
|
114 this.dateInText = json.getString(DATE_IN_TEXT);
|
|
115 }
|
|
116 this.calendarType = TYPE_GREGORIAN;
|
|
117 this.inputForm = INPUT_FORM_YEAR;
|
|
118 }
|
|
119 }
|
|
120
|
|
121 } catch (Exception e) {
|
|
122 e.printStackTrace();
|
|
123 this.state = STATE_NOT_CHECKED;
|
|
124 this.calendarType = TYPE_GREGORIAN;
|
|
125 this.inputForm = INPUT_FORM_YEAR;
|
|
126 }
|
|
127 }else{
|
|
128 this.calendarType = TYPE_GREGORIAN;
|
|
129 this.inputForm = INPUT_FORM_YEAR;
|
|
130 this.state = STATE_NOT_CHECKED;
|
|
131 }
|
|
132 }
|
|
133
|
|
134 public void update(){
|
|
135
|
|
136 if(inputForm.equals(INPUT_FORM_RANGE)){
|
|
137 if(isUntilOlderThanFrom()){
|
|
138 if(calendarType.equals(TYPE_GREGORIAN)){
|
|
139 this.inputGregorianRange();
|
|
140 }else if(calendarType.equals(TYPE_ISLAMIC)){
|
|
141 this.inputIslamicRange();
|
|
142 }else if(calendarType.equals(TYPE_JULIAN)){
|
|
143 this.inputJulianRange();
|
|
144 }
|
|
145 }
|
|
146
|
|
147 }else if(inputForm.equals(INPUT_FORM_YEAR)){
|
|
148 if(calendarType.equals(TYPE_GREGORIAN)){
|
|
149 this.inputGregorianYear();
|
|
150 }else if(calendarType.equals(TYPE_ISLAMIC)){
|
|
151 this.inputIslamicYear();
|
|
152 }else if(calendarType.equals(TYPE_JULIAN)){
|
|
153 this.inputJulianYear();
|
|
154 }
|
|
155 }else if(inputForm.equals(INPUT_FORM_DATE)){
|
|
156 if(calendarType.equals(TYPE_GREGORIAN)){
|
|
157 this.inputGregorianFrom();
|
|
158 }else if(calendarType.equals(TYPE_ISLAMIC)){
|
|
159 this.inputIslamicFrom();
|
|
160 }else if(calendarType.equals(TYPE_JULIAN)){
|
|
161 this.inputJulianFrom();
|
|
162 }
|
|
163 }
|
|
164 }
|
|
165
|
|
166 public boolean isDeployable(){
|
|
167 return (!this.state.equals(STATE_NOT_CHECKED) && !this.state.equals(STATE_UNKNOWN));
|
|
168 }
|
|
169
|
|
170 public String getFormattedRange(){
|
|
171 if(inputForm != null){
|
|
172 String from = this.fromGregorian.toString();
|
|
173 if(this.inputForm.equals(INPUT_FORM_DATE)){
|
|
174 return "[" + from + "]";
|
|
175 }else{
|
|
176
|
|
177 String until = this.untilGregorian.toString();
|
|
178 if(StringUtils.isNotEmpty(from) && StringUtils.isNotEmpty(until)){
|
|
179 return "[FROM: " + from + " TO: " + until + "]";
|
|
180 }
|
|
181 }
|
|
182 }
|
|
183 return null;
|
|
184 }
|
|
185
|
|
186 public String getFormattedIslamicRange(){
|
|
187 if(inputForm != null){
|
|
188 String from = this.fromGregorian.toIslamicString();
|
|
189 if(this.inputForm.equals(INPUT_FORM_DATE)){
|
|
190 return "[" + from + "]";
|
|
191 }else{
|
|
192 String until = this.untilGregorian.toIslamicString();
|
|
193 if(StringUtils.isNotEmpty(from) && StringUtils.isNotEmpty(until)){
|
|
194 return "[FROM: " + from + " TO: " + until + "]";
|
|
195 }
|
|
196 }
|
|
197 }
|
|
198 return null;
|
|
199 }
|
|
200
|
|
201 public String getFormattedJulianRange(){
|
|
202 if(inputForm != null){
|
|
203 String from = this.fromGregorian.toJulianString();
|
|
204 if(this.inputForm.equals(INPUT_FORM_DATE)){
|
|
205 return "[" + from + "]";
|
|
206 }else{
|
|
207 String until = this.untilGregorian.toJulianString();
|
|
208 if(StringUtils.isNotEmpty(from) && StringUtils.isNotEmpty(until)){
|
|
209 return "[FROM: " + from + " TO: " + until + "]";
|
|
210 }
|
|
211 }
|
|
212 }
|
|
213 return null;
|
|
214 }
|
|
215
|
|
216 public String getCalendarAsHtml(){
|
|
217 StringBuilder sb = new StringBuilder();
|
|
218
|
|
219 if(isDeployable()){
|
|
220 sb.append("<table align=\"left\">");
|
|
221
|
|
222 sb.append("<tr>");
|
|
223 sb.append("<th align=\"left\">Gregorian:</th>");
|
|
224 sb.append("<th align=\"left\">" + this.getFormattedRange() + "</th>");
|
|
225 sb.append("</tr>");
|
|
226
|
|
227 sb.append("<tr>");
|
|
228 sb.append("<th align=\"left\">Islamic:</th>");
|
|
229 sb.append("<th align=\"left\">" + this.getFormattedIslamicRange() + "</th>");
|
|
230 sb.append("</tr>");
|
|
231
|
|
232 sb.append("<tr>");
|
|
233 sb.append("<th align=\"left\">Julian:</th>");
|
|
234 sb.append("<th align=\"left\">" + this.getFormattedJulianRange() + "</th>");
|
|
235 sb.append("</tr>");
|
|
236
|
|
237 sb.append("</table>");
|
|
238 }else if(this.state.equals(STATE_UNKNOWN)){
|
18
|
239 sb.append("Unknown");
|
1
|
240 }else{
|
|
241 sb.append("Not checked");
|
|
242 if(StringUtils.isNotEmpty(this.dateInText)){
|
|
243 sb.append("=" + this.dateInText);
|
|
244 }
|
|
245 }
|
|
246
|
|
247 return sb.toString();
|
|
248 }
|
|
249
|
|
250
|
|
251 private void inputGregorianRange(){
|
|
252 this.inputGregorianFrom();
|
|
253 try{
|
|
254 DateTime gregrorian =
|
|
255 new DateTime(currentUntil.getYear(), currentUntil.getMonth(), currentUntil.getDayOfMonth(), 0, 0, 0, 0, GregorianChronology.getInstance());
|
|
256 this.untilGregorian = new ISMIDate(gregrorian.withChronology(GregorianChronology.getInstance()));
|
|
257 if(isDayInWeek(currentUntil.getDayOfWeek())){
|
|
258 this.untilGregorian.setDayOfWeek(currentUntil.getDayOfWeek());
|
|
259 }
|
|
260 }catch (Exception e) {
|
|
261 //this.addGeneralMsg("In until date - " + e.getMessage());
|
|
262 e.printStackTrace();
|
|
263 }
|
|
264 }
|
|
265
|
|
266 private void inputGregorianFrom(){
|
|
267 try{
|
|
268 DateTime gregorian =
|
|
269 new DateTime(currentFrom.getYear(), currentFrom.getMonth(), currentFrom.getDayOfMonth(), 0, 0, 0, 0, GregorianChronology.getInstance());
|
|
270 this.fromGregorian = new ISMIDate(gregorian);
|
|
271 if(isDayInWeek(currentFrom.getDayOfWeek())){
|
|
272 this.fromGregorian.setDayOfWeek(currentFrom.getDayOfWeek());
|
|
273 }
|
|
274 }catch (Exception e) {
|
|
275 //this.addGeneralMsg("In from date - " + e.getMessage());
|
|
276 e.printStackTrace();
|
|
277 }
|
|
278 }
|
|
279
|
|
280 private void inputIslamicRange(){
|
|
281 this.inputIslamicFrom();
|
|
282 try{
|
|
283 DateTime islamic =
|
|
284 new DateTime(currentUntil.getYear(), currentUntil.getMonth(), currentUntil.getDayOfMonth(), 0, 0, 0, 0, IslamicChronology.getInstance());
|
|
285 DateTime gregorian = islamic.withChronology(GregorianChronology.getInstance());
|
|
286 this.untilGregorian = new ISMIDate(gregorian);
|
|
287 if(isDayInWeek(currentUntil.getDayOfWeek())){
|
|
288 this.untilGregorian.setDayOfWeek(gregorian.getDayOfWeek());
|
|
289 }else{
|
|
290 this.untilGregorian.setAmbiguity(2);
|
|
291 }
|
|
292 }catch (Exception e) {
|
|
293 //this.addGeneralMsg("In until date - " + e.getMessage());
|
|
294 e.printStackTrace();
|
|
295 }
|
|
296 }
|
|
297
|
|
298 private void inputIslamicFrom(){
|
|
299 try{
|
|
300 DateTime islamic =
|
|
301 new DateTime(currentFrom.getYear(), currentFrom.getMonth(), currentFrom.getDayOfMonth(), 0, 0, 0, 0, IslamicChronology.getInstance());
|
|
302 DateTime gregorian = islamic.withChronology(GregorianChronology.getInstance());
|
|
303 this.fromGregorian = new ISMIDate(gregorian);
|
|
304 if(isDayInWeek(currentFrom.getDayOfWeek())){
|
|
305 this.fromGregorian.setDayOfWeek(gregorian.getDayOfWeek());
|
|
306 }else{
|
|
307 this.fromGregorian.setAmbiguity(2);
|
|
308 }
|
|
309 }catch (Exception e) {
|
|
310 //this.addGeneralMsg("In from date - " + e.getMessage());
|
|
311 e.printStackTrace();
|
|
312 }
|
|
313 }
|
|
314
|
|
315
|
|
316 private void inputJulianRange(){
|
|
317 this.inputJulianFrom();
|
|
318 DateTime julian = null;
|
|
319 try{
|
|
320 julian =
|
|
321 new DateTime(currentUntil.getYear(), currentUntil.getMonth(), currentUntil.getDayOfMonth(), 0, 0, 0, 0, JulianChronology.getInstance());
|
|
322 DateTime gregorian = julian.withChronology(GregorianChronology.getInstance());
|
|
323 this.untilGregorian = new ISMIDate(gregorian);
|
|
324 if(isDayInWeek(currentUntil.getDayOfWeek())){
|
|
325 this.untilGregorian.setDayOfWeek(gregorian.getDayOfWeek());
|
|
326 }
|
|
327 }catch (Exception e) {
|
|
328 //this.addGeneralMsg("In until date - " + e.getMessage());
|
|
329 e.printStackTrace();
|
|
330 }
|
|
331 }
|
|
332
|
|
333 private void inputJulianFrom(){
|
|
334 DateTime julian = null;
|
|
335 try{
|
|
336 julian =
|
|
337 new DateTime(currentFrom.getYear(), currentFrom.getMonth(), currentFrom.getDayOfMonth(), 0, 0, 0, 0, JulianChronology.getInstance());
|
|
338 DateTime gregorian = julian.withChronology(GregorianChronology.getInstance());
|
|
339 this.fromGregorian = new ISMIDate(gregorian);
|
|
340 if(isDayInWeek(currentFrom.getDayOfWeek())){
|
|
341 this.fromGregorian.setDayOfWeek(gregorian.getDayOfWeek());
|
|
342 }
|
|
343 }catch (Exception e) {
|
|
344 //addGeneralMsg("In from date - " + e.getMessage());
|
|
345 e.printStackTrace();
|
|
346 }
|
|
347 }
|
|
348
|
|
349 public void inputGregorianYear(){
|
|
350 if(inputForm.equals(INPUT_FORM_YEAR) && currentYear != null){
|
|
351 this.fromGregorian = new ISMIDate(new DateTime(currentYear, 1, 1, 0, 0, 0, 0, GregorianChronology.getInstance()));
|
|
352 this.untilGregorian = new ISMIDate(new DateTime(currentYear, 12, 31, 0, 0, 0, 0, GregorianChronology.getInstance()));
|
|
353 }
|
|
354 }
|
|
355
|
|
356 public void inputIslamicYear(){
|
|
357 if(this.currentYear < 1 || this.currentYear > 292271022){
|
|
358 //this.addGeneralMsg("year must be in the range [1,292271022]");
|
|
359 }else {
|
|
360 DateTime islamic =
|
|
361 new DateTime(currentYear, 1, 1, 0, 0, 0, 0, IslamicChronology.getInstance());
|
|
362 DateTime gregorian = islamic.withChronology(GregorianChronology.getInstance());
|
|
363 this.fromGregorian = new ISMIDate(gregorian);
|
|
364 this.fromGregorian.setAmbiguity(2);
|
|
365 this.fromGregorian.setDayOfWeek(null);
|
|
366
|
|
367 islamic =
|
|
368 new DateTime(currentYear, 12, 29, 0, 0, 0, 0, IslamicChronology.getInstance());
|
|
369 gregorian = islamic.withChronology(GregorianChronology.getInstance());
|
|
370 this.untilGregorian = new ISMIDate(gregorian);
|
|
371 this.untilGregorian.setAmbiguity(2);
|
|
372 this.untilGregorian.setDayOfWeek(null);
|
|
373 }
|
|
374 }
|
|
375
|
|
376 public void inputJulianYear(){
|
|
377 if(this.currentYear < 1){
|
|
378 //this.addGeneralMsg("Value 0 for year is not supported");
|
|
379 }else{
|
|
380 DateTime julian =
|
|
381 new DateTime(currentYear, 1, 1, 0, 0, 0, 0, JulianChronology.getInstance());
|
|
382 DateTime gregorian = julian.withChronology(GregorianChronology.getInstance());
|
|
383 this.fromGregorian = new ISMIDate(gregorian);
|
|
384 this.fromGregorian.setDayOfWeek(null);
|
|
385
|
|
386 julian =
|
|
387 new DateTime(currentYear, 12, 31, 0, 0, 0, 0, JulianChronology.getInstance());
|
|
388 gregorian = julian.withChronology(GregorianChronology.getInstance());
|
|
389 this.untilGregorian = new ISMIDate(gregorian);
|
|
390 this.untilGregorian.setDayOfWeek(null);
|
|
391 }
|
|
392 }
|
|
393
|
|
394
|
|
395 public String toJSONString(){
|
|
396 this.update();
|
|
397 JSONObject json = this.toJSON();
|
|
398 if(json != null){
|
|
399 return json.toString();
|
|
400 }
|
|
401 return "";
|
|
402 }
|
|
403
|
|
404 public JSONObject toJSON(){
|
|
405 JSONObject json = new JSONObject();
|
|
406 if(state.equals(STATE_KNOWN)){
|
|
407 try {
|
|
408
|
|
409 if(inputForm.equals(INPUT_FORM_YEAR)){
|
|
410 json.put(YEAR, this.currentYear);
|
|
411 json.put(FROM, this.fromGregorian.toJSON());
|
|
412 json.put(UNTIL, this.untilGregorian.toJSON());
|
|
413 }else if(inputForm.equals(INPUT_FORM_RANGE)){
|
|
414 json.put(FROM, this.fromGregorian.toJSON());
|
|
415 json.put(UNTIL, this.untilGregorian.toJSON());
|
|
416 if(isDayInWeek(currentFrom.getDayOfWeek())){
|
|
417 json.put("dayOfWeekFrom", currentFrom.getDayOfWeek());
|
|
418 }
|
|
419 if(isDayInWeek(currentUntil.getDayOfWeek())){
|
|
420 json.put("dayOfWeekUntil", currentUntil.getDayOfWeek());
|
|
421 }
|
|
422 }else if(inputForm.equals(INPUT_FORM_DATE)){
|
|
423 json.put(DATE, this.fromGregorian.toJSON());
|
|
424 if(isDayInWeek(currentFrom.getDayOfWeek())){
|
|
425 json.put("dayOfWeek", currentFrom.getDayOfWeek());
|
|
426 }
|
|
427 }
|
|
428
|
|
429 json.put(STATE, this.state);
|
|
430 json.put(ADD_INF, additionalInfo);
|
|
431 json.put(CALENDAR_TYPE, this.calendarType);
|
|
432 json.put(INPUT_FORM, this.inputForm);
|
|
433
|
|
434 } catch (JSONException e) {
|
|
435 e.printStackTrace();
|
|
436 }
|
|
437 return json;
|
|
438 }else if(state.equals(STATE_UNKNOWN)){
|
|
439 try {
|
|
440 json.put(STATE, this.state);
|
|
441 } catch (JSONException e) {
|
|
442 e.printStackTrace();
|
|
443 }
|
|
444 return json;
|
|
445 }else if(state.equals(STATE_NOT_CHECKED) && StringUtils.isNotEmpty(dateInText)){
|
|
446 try {
|
|
447 json.put(STATE, this.state);
|
|
448 json.put(DATE_IN_TEXT, this.dateInText);
|
|
449 } catch (JSONException e) {
|
|
450 e.printStackTrace();
|
|
451 }
|
|
452 return json;
|
|
453 }
|
|
454 return null;
|
|
455 }
|
|
456
|
|
457 public boolean isUntilOlderThanFrom(){
|
|
458 if(this.currentFrom.getYear() != null && this.currentUntil.getYear() != null){
|
|
459 if(this.currentFrom.getYear() < this.currentUntil.getYear()){
|
|
460 return true;
|
|
461 }else if(this.currentFrom.getYear().equals(this.currentUntil.getYear())){
|
|
462 if(this.currentFrom.getMonth() != null && this.currentUntil.getMonth() != null){
|
|
463 if(this.currentFrom.getMonth() < this.currentUntil.getMonth()){
|
|
464 return true;
|
|
465 }else if(this.currentFrom.getMonth().equals(this.currentUntil.getMonth())){
|
|
466 if(this.currentFrom.getDayOfMonth() != null && this.currentUntil.getDayOfMonth() != null){
|
|
467 if(this.currentFrom.getDayOfMonth() < this.currentUntil.getDayOfMonth()){
|
|
468 return true;
|
|
469 }
|
|
470 }
|
|
471 }
|
|
472 }
|
|
473 }
|
|
474 }
|
|
475 return false;
|
|
476 }
|
|
477
|
|
478 private boolean isDayInWeek(Integer day){
|
|
479 if(day == null)
|
|
480 return false;
|
|
481 if(day >= 1 && day <= 7){
|
|
482 return true;
|
|
483 }
|
|
484 return false;
|
|
485 }
|
|
486
|
|
487 public ISMIDate getFromGregorian() {
|
|
488 return fromGregorian;
|
|
489 }
|
|
490 public void setFromGregorian(ISMIDate fromGregorian) {
|
|
491 this.fromGregorian = fromGregorian;
|
|
492 }
|
|
493 public ISMIDate getUntilGregorian() {
|
|
494 return untilGregorian;
|
|
495 }
|
|
496 public void setUntilGregorian(ISMIDate untilGregorian) {
|
|
497 this.untilGregorian = untilGregorian;
|
|
498 }
|
|
499
|
|
500 public String getInputForm() {
|
|
501 return inputForm;
|
|
502 }
|
|
503
|
|
504 public void setInputForm(String inputForm) {
|
|
505 this.inputForm = inputForm;
|
|
506 }
|
|
507
|
|
508 public String getCalendarType() {
|
|
509 return calendarType;
|
|
510 }
|
|
511
|
|
512 public void setCalendarType(String calendarType) {
|
|
513 this.calendarType = calendarType;
|
|
514 }
|
|
515
|
|
516 public String getAdditionalInfo() {
|
|
517 return additionalInfo;
|
|
518 }
|
|
519
|
|
520 public void setAdditionalInfo(String additionalInfo) {
|
|
521 this.additionalInfo = additionalInfo;
|
|
522 }
|
|
523
|
|
524 public Integer getCurrentYear() {
|
|
525 return currentYear;
|
|
526 }
|
|
527
|
|
528 public void setCurrentYear(Integer currentYear) {
|
|
529 this.currentYear = currentYear;
|
|
530 }
|
|
531
|
|
532 public ISMIDate getCurrentFrom() {
|
|
533 return currentFrom;
|
|
534 }
|
|
535
|
|
536 public void setCurrentFrom(ISMIDate currentFrom) {
|
|
537 this.currentFrom = currentFrom;
|
|
538 }
|
|
539
|
|
540 public ISMIDate getCurrentUntil() {
|
|
541 return currentUntil;
|
|
542 }
|
|
543
|
|
544 public void setCurrentUntil(ISMIDate currentUntil) {
|
|
545 this.currentUntil = currentUntil;
|
|
546 }
|
|
547
|
|
548 public String getState() {
|
|
549 return state;
|
|
550 }
|
|
551
|
|
552 public void setState(String state) {
|
|
553 this.state = state;
|
|
554 }
|
|
555
|
|
556 public String getDateInText() {
|
|
557 return dateInText;
|
|
558 }
|
|
559
|
|
560 public void setDateInText(String dateInText) {
|
|
561 this.dateInText = dateInText;
|
|
562 }
|
|
563 }
|
|
564
|