KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > nava > informa > impl > basic > Image


1 //
2
// Informa -- RSS Library for Java
3
// Copyright (c) 2002 by Niko Schmuck
4
//
5
// Niko Schmuck
6
// http://sourceforge.net/projects/informa
7
// mailto:niko_schmuck@users.sourceforge.net
8
//
9
// This library is free software.
10
//
11
// You may redistribute it and/or modify it under the terms of the GNU
12
// Lesser General Public License as published by the Free Software Foundation.
13
//
14
// Version 2.1 of the license should be included with this distribution in
15
// the file LICENSE. If the license is not included with this distribution,
16
// you may find a copy at the FSF web site at 'www.gnu.org' or 'www.fsf.org',
17
// or you may write to the Free Software Foundation, 675 Mass Ave, Cambridge,
18
// MA 02139 USA.
19
//
20
// This library is distributed in the hope that it will be useful,
21
// but WITHOUT ANY WARRANTY; without even the implied waranty of
22
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
// Lesser General Public License for more details.
24
//
25

26
27 // $Id: Image.java,v 1.11 2003/10/15 10:04:18 niko_schmuck Exp $
28

29 package de.nava.informa.impl.basic;
30
31 import java.net.URL JavaDoc;
32 import de.nava.informa.core.ImageIF;
33
34 /**
35  * In-Memory implementation of the ImageIF interface.
36  *
37  * @author Niko Schmuck (niko@nava.de)
38  */

39 public class Image implements ImageIF, java.io.Serializable JavaDoc {
40
41   private long id;
42   private String JavaDoc title;
43   private String JavaDoc description;
44   private URL JavaDoc location;
45   private URL JavaDoc link;
46   private int width;
47   private int height;
48
49   public Image() {
50     this("[Unknown Image]", null, null);
51   }
52
53   public Image(String JavaDoc title, URL JavaDoc location, URL JavaDoc link) {
54     this.id = IdGenerator.getInstance().getId();
55     this.title = title;
56     this.location = location;
57     this.link = link;
58   }
59
60   // --------------------------------------------------------------
61
// implementation of ImageIF interface
62
// --------------------------------------------------------------
63

64   public long getId() {
65     return id;
66   }
67
68   public void setId(long id) {
69     this.id = id;
70   }
71
72   public String JavaDoc getTitle() {
73     return title;
74   }
75
76   public void setTitle(String JavaDoc title) {
77     this.title = title;
78   }
79
80   public String JavaDoc getDescription() {
81     return description;
82   }
83
84   public void setDescription(String JavaDoc description) {
85     this.description = description;
86   }
87
88   public URL JavaDoc getLocation() {
89     return location;
90   }
91
92   public void setLocation(URL JavaDoc location) {
93     this.location = location;
94   }
95
96   public URL JavaDoc getLink() {
97     return link;
98   }
99
100   public void setLink(URL JavaDoc link) {
101     this.link = link;
102   }
103
104   public int getWidth() {
105     return width;
106   }
107
108   public void setWidth(int width) {
109     this.width = width;
110   }
111
112   public int getHeight() {
113     return height;
114   }
115
116   public void setHeight(int height) {
117     this.height = height;
118   }
119
120 }
121
Popular Tags