From 7ae48b2b9d749520ee28b7370f9c7c46a337529b Mon Sep 17 00:00:00 2001 From: yvesf Date: Tue, 12 Apr 2011 14:04:56 +0200 Subject: Windows-Screenshots; Neue maven reports --- .../de/dhbw/horb/calendar/dualis/DualisConnection.java | 6 ++++-- .../java/de/dhbw/horb/calendar/ics/VEventComponent.java | 17 ++++++++++------- .../java/de/dhbw/horb/calendar/servlet/ICSServlet.java | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'src/main/java/de') diff --git a/src/main/java/de/dhbw/horb/calendar/dualis/DualisConnection.java b/src/main/java/de/dhbw/horb/calendar/dualis/DualisConnection.java index 89e566c..efb7943 100644 --- a/src/main/java/de/dhbw/horb/calendar/dualis/DualisConnection.java +++ b/src/main/java/de/dhbw/horb/calendar/dualis/DualisConnection.java @@ -181,8 +181,9 @@ public class DualisConnection { private void getEventsFromPage(HtmlPage page, final List events) { for (HtmlElement elem : page.getElementsByTagName("div")) { - if (!elem.getAttribute("class").equals("tbMonthDay")) + if (!elem.getAttribute("class").equals("tbMonthDay")) { continue; + } final Calendar cday = Calendar.getInstance(); Object dayTitle = elem .getFirstByXPath("div[@class='tbsubhead']/a/@title"); @@ -199,8 +200,9 @@ public class DualisConnection { continue; } for (HtmlElement appLink : elem.getElementsByTagName("a")) { - if (!appLink.getAttribute("class").equals("apmntLink")) + if (!appLink.getAttribute("class").equals("apmntLink")) { continue; + } // title="08:15 - 10:45 / HOR-121 / Open Source Systeme" String desc = StringUtils.strip(appLink.getAttribute("title")); java.util.regex.Matcher matcher = appLinkPattern.matcher(desc); diff --git a/src/main/java/de/dhbw/horb/calendar/ics/VEventComponent.java b/src/main/java/de/dhbw/horb/calendar/ics/VEventComponent.java index bfc2162..0472dea 100644 --- a/src/main/java/de/dhbw/horb/calendar/ics/VEventComponent.java +++ b/src/main/java/de/dhbw/horb/calendar/ics/VEventComponent.java @@ -3,6 +3,9 @@ package de.dhbw.horb.calendar.ics; import java.util.Calendar; import java.util.TimeZone; +/** + * VEvent Component of iCalendar + */ public class VEventComponent extends AbstractICSType { public Calendar dtstamp = Calendar.getInstance(); public Calendar dtstart = Calendar.getInstance(); @@ -43,32 +46,32 @@ public class VEventComponent extends AbstractICSType { public static class Builder { VEventComponent event = new VEventComponent(); - public Builder dtstamp(Calendar cstart) { + public Builder dtstamp(final Calendar cstart) { event.dtstamp = cstart; return this; } - public Builder dtstart(Calendar cstart) { + public Builder dtstart(final Calendar cstart) { event.dtstart = cstart; return this; } - public Builder dtend(Calendar cend) { + public Builder dtend(final Calendar cend) { event.dtend = cend; return this; } - public Builder summary(String summary) { + public Builder summary(final String summary) { event.summary = summary; return this; } - public Builder description(String description) { + public Builder description(final String description) { event.description = description; return this; } - public Builder location(String location) { + public Builder location(final String location) { event.location = location; return this; } @@ -77,7 +80,7 @@ public class VEventComponent extends AbstractICSType { return event; } - public Builder status(String status) { + public Builder status(final String status) { event.status = status; return this; } diff --git a/src/main/java/de/dhbw/horb/calendar/servlet/ICSServlet.java b/src/main/java/de/dhbw/horb/calendar/servlet/ICSServlet.java index a76f781..de9f83f 100644 --- a/src/main/java/de/dhbw/horb/calendar/servlet/ICSServlet.java +++ b/src/main/java/de/dhbw/horb/calendar/servlet/ICSServlet.java @@ -39,4 +39,4 @@ public class ICSServlet extends AuthenticatedServlet { } response.getOutputStream().write(calendar.serialize().getBytes()); } -} \ No newline at end of file +} -- cgit v1.2.1