KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > AudioVisual


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation.
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 /**
18  * See Main.java.
19  */

20  
21 public class AudioVisual implements Item {
22
23     private int yearMade;
24     private String JavaDoc category;
25     private String JavaDoc name;
26     private String JavaDoc desc;
27     private Integer JavaDoc runtime;
28     private String JavaDoc type;
29
30     // note: digester can convert a string in the xml file to an int.
31
public void setYearMade(int yearMade) {
32         this.yearMade = yearMade;
33     }
34
35     public void setCategory(String JavaDoc category) {
36         this.category = category;
37     }
38
39     public void setName(String JavaDoc name) {
40         this.name = name;
41     }
42
43     public void setDesc(String JavaDoc desc) {
44         this.desc = desc;
45     }
46
47     // note: digester can convert a string in the xml file to an Integer
48
public void setRuntime(Integer JavaDoc runtime) {
49         this.runtime = runtime;
50     }
51
52     public void setType(String JavaDoc type) {
53         this.type = type;
54     }
55
56     public void print() {
57         System.out.println("AudioVisual:");
58         System.out.println(" type=" + type);
59         System.out.println(" yearMade=" + yearMade);
60         System.out.println(" category=" + category);
61         System.out.println(" name=" + name);
62         System.out.println(" desc=" + desc);
63         System.out.println(" runtime=" + runtime);
64     }
65 }
66
67
Popular Tags