Package nl.vpro.io.prepr.domain
Class PreprEventWithDay
- java.lang.Object
-
- nl.vpro.io.prepr.domain.PreprEventWithDay
-
public class PreprEventWithDay extends Object
The guides call returns data in format which is often unsuitable for processing. It will group by day, but broadcasts may span days. Also, the contained event objects are not self contained, and need the day to calculate the actual time. I don't know yet how it works with time zones. This class wraps thePreprEvent
withLocalDate
object to get a complete small bundle of information which can be used as an entry in lists which represent a schedule. The utilityasRange()
returns the actual range the event is representing. Theappend(PreprEventWithDay)
utility targets to be able to 'glue' events together.- Since:
- 0.9
- Author:
- Michiel Meeuwissen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(PreprEventWithDay next)
com.google.common.collect.Range<Instant>
asRange()
static List<PreprEventWithDay>
fromSchedule(@NonNull PreprSchedule unfilteredResult, @NonNull ZoneId zoneId, @NonNull LocalDateTime from, @NonNull LocalDateTime until)
static List<PreprEventWithDay>
fromSchedule(@NonNull PreprSchedule unfilteredResult, ZoneId zoneId)
Optional<PreprTimeline>
getFirstTimeline()
Instant
getFrom()
PreprShow
getShow()
List<PreprTimeline>
getTimelines()
Instant
getUntil()
PreprUsers
getUsers()
String
showId()
-
-
-
Method Detail
-
getFrom
public Instant getFrom()
-
getUntil
public Instant getUntil()
-
getTimelines
public List<PreprTimeline> getTimelines()
-
getShow
public PreprShow getShow()
-
getFirstTimeline
public Optional<PreprTimeline> getFirstTimeline()
-
getUsers
public PreprUsers getUsers()
-
asRange
public com.google.common.collect.Range<Instant> asRange()
-
append
public void append(PreprEventWithDay next)
-
showId
public String showId()
-
fromSchedule
public static List<PreprEventWithDay> fromSchedule(@NonNull PreprSchedule unfilteredResult, ZoneId zoneId)
-
fromSchedule
public static List<PreprEventWithDay> fromSchedule(@NonNull PreprSchedule unfilteredResult, @NonNull ZoneId zoneId, @NonNull LocalDateTime from, @NonNull LocalDateTime until)
-
-