(no commit message)
[utils] / crawler / kiss / src / main / java / org / wamblee / crawler / kiss / guide / Channel.java
1 /*
2  * Copyright 2005 the original author or authors.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.wamblee.crawler.kiss.guide;
18
19 import java.util.Collections;
20 import java.util.List;
21
22
23 /**
24  * Represents the programme for a tv channel.
25  *
26  * @author Erik Brakkee
27  */
28 public class Channel {
29
30     /**
31      * TV channel name. 
32      */
33     private String _name;
34
35     /**
36      * List of programs in chronological order. 
37      */
38     private List<Program> _programs;
39
40     /**
41      * Constructs the channel. 
42      * @param aName Channel name.
43      * @param aPrograms Programs. 
44      */
45     public Channel(String aName, List<Program> aPrograms) {
46         _name = aName;
47         _programs = aPrograms;
48     }
49
50     /**
51      * Gets the channel name. 
52      * @return channel name. 
53      */
54     public String getName() {
55         return _name;
56     }
57
58     /**
59      * Gets the list of program. 
60      * @return Programs. 
61      */
62     public List<Program> getPrograms() {
63         return Collections.unmodifiableList(_programs);
64     }
65
66     /**
67      * Accepts a visitor. 
68      * @param aVisitor Visitor. 
69      */
70     public void accept(Visitor aVisitor) {
71         aVisitor.visitChannel(this);
72     }
73 }