- public Element getXmlReport() {
- DocumentFactory factory = DocumentFactory.getInstance();
- Element report = factory.createElement("report");
-
- for (RecordingResult result : RecordingResult.values()) {
- if (_recordings.get(result).size() > 0) {
- Element recordingResult = report.addElement("recorded").addAttribute("result", result.toString());
-
- for (Program program : _recordings.get(result)) {
- recordingResult.add(program.asXml());
- }
- }
- }
-
-
- if ( _interestingShows.size() > 0 ) {
- Element interesting = report.addElement("interesting");
- for (String category: _interestingShows.keySet()) {
- Element categoryElem = interesting;
- if ( category.length() > 0 ) {
- categoryElem = interesting.addElement("category");
- categoryElem.addAttribute("name", category);
- }
- for (Program program: _interestingShows.get(category)) {
- categoryElem.add(program.asXml());
- }
+ private boolean recordingConflictExists(
+ Set<TimeInterval> aPreviouslyRecorded, TimeInterval aInterval) {
+ for (TimeInterval recordedInterval : aPreviouslyRecorded) {
+ if (aInterval.overlap(recordedInterval)) {
+ return true;