summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2011-03-31 00:38:32 +0200
committerbju <bju@maxi.fritz.box>2011-03-31 00:38:32 +0200
commit99c8ef0c1bd6551bbb39658c0c7fe2a4e0b09e3f (patch)
tree64782217cd53b6808f4dfc0ec365e1bbd7a47e36 /vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
parent32ba3fb9f2a1f7b073b3a121762385ac237a2af8 (diff)
downloadvdr-manager-99c8ef0c1bd6551bbb39658c0c7fe2a4e0b09e3f.tar.gz
vdr-manager-99c8ef0c1bd6551bbb39658c0c7fe2a4e0b09e3f.tar.bz2
Renamed from AndroVDR to VDR-Manager
Diffstat (limited to 'vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
new file mode 100644
index 0000000..e228565
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
@@ -0,0 +1,65 @@
+package de.bjusystems.vdrmanager.data;
+
+import java.util.Date;
+
+/**
+ * Class for EPG events
+ * @author bju
+ */
+public class Epg implements Event {
+
+ private final String channelNumber;
+ private final String channelName;
+ private final String title;
+ private final String description;
+ private final Date start;
+ private final Date stop;
+ private Timer timer;
+
+ public Epg(final String line) {
+
+ final String[] words = line.split(":");
+
+ channelNumber = words[0].substring(1);
+ channelName = words[1];
+ start = new Date(Long.parseLong(words[2])*1000);
+ stop = new Date(Long.parseLong(words[3])*1000);
+ title = words[4];
+ description = words.length > 5 ? words[5] : "";
+ }
+
+ public String getChannelNumber() {
+ return channelNumber;
+ }
+ public String getChannelName() {
+ return channelName;
+ }
+ public String getTitle() {
+ return title;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public Date getStart() {
+ return start;
+ }
+ public Date getStop() {
+ return stop;
+ }
+
+ public Timer getTimer() {
+ return timer;
+ }
+
+ public void setTimer(final Timer timer) {
+ this.timer = timer;
+ }
+
+ public TimerState getTimerState() {
+ if (timer == null) {
+ return TimerState.None;
+ } else {
+ return timer.getTimerState();
+ }
+ }
+}