19 package org.turro.plugin.command;
21 import java.text.DateFormat;
22 import java.text.SimpleDateFormat;
23 import java.util.Date;
24 import java.util.TimeZone;
25 import org.turro.string.Strings;
26 import org.turro.elephant.context.ElephantContext;
27 import org.turro.html.HTMLGenerator;
28 import org.turro.util.CompareUtil;
36 private Date start, end;
37 private boolean duration;
38 private String title, image, inside, link;
45 this.duration = duration;
97 DateFormat df =
new SimpleDateFormat(
"yyyy/MM/dd HH:mm:ss");
98 df.setTimeZone(TimeZone.getTimeZone(
"GMT"));
101 (start !=
null ?
"start=\"" + df.format(start) +
"\"" :
null),
102 (end !=
null ?
"end=\"" + df.format(end) +
"\"" :
null),
103 (duration ?
"isDuration=\"true\"" :
null),
104 (!Strings.isBlank(title) ?
"title=\"" + Strings.escapeXML(title) +
"\"" :
null),
106 (!Strings.isBlank(link) ?
"link=\"" + Strings.escapeXML(link) +
"\"" :
null)
109 if(!Strings.isBlank(inside)) {
120 int result = CompareUtil.compare(start, o.start);
122 result = CompareUtil.compare(end, o.end);
125 result = CompareUtil.compare(title, o.title);
static String getRootWebPath()
HTMLGenerator endAllTags()
HTMLGenerator write(String value)
HTMLGenerator startTag(String tag)
void setLink(String link)
void setStart(Date start)
int compareTo(TimelineEvent o)
void setInside(String inside)
void setTitle(String title)
void setImage(String image)
void setDuration(boolean duration)