View Javadoc

1   /***
2    Copyright (C) 2005 The Java Community
3   
4    This program is free software; you can redistribute it and/or modify  it under
5    the terms of the GNU General Public License as published by  the Free Software
6    Foundation; either version 2 of the License, or  (at your option) any later
7    version.
8   
9    This program is distributed in the hope that it will be useful,  but WITHOUT
10   ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS
11   FOR A PARTICULAR PURPOSE. See the  GNU General Public License for more details.
12  
13   You should have received a copy of the GNU General Public License  along with
14   this program; if not, write to the Free Software  Foundation, Inc., 59 Temple
15   Place, Suite 330, Boston, MA 02111-1307 USA.
16   */
17  package org.bejug.javacareers.feeder.model;
18  
19  import java.util.ArrayList;
20  import java.util.Collection;
21  
22  import org.bejug.javacareers.jobs.model.JobOffer;
23  
24  /***
25   * List of JobEntries with a common source
26   *
27   * @author Bavo (last modified by $Author: schauwvliege $
28   * @version $Revision: 1.2 $ - $Date: 2005/09/13 08:11:17 $
29   */
30  public class JobList extends ArrayList {
31  
32      /***
33       * source for this collection of jobs
34       */
35      private String source;
36  
37      /***
38       * Creates a new collection (List) of JobEntry elements from a given source
39       *
40       * @param source Source where the entries originated from
41       */
42      public JobList(String source) {
43          this.source = source;
44      }
45  
46      /***
47       * Creates a new collection (List) of JobEntry elements from a given source
48       *
49       * @param source Source where the entries originated from
50       * @param items  Collection of items to start with
51       */
52      public JobList(String source, Collection items) {
53          this.source = source;
54          addAll(items);
55  
56      }
57  
58      /***
59       * Adds a job entry to the list
60       *
61       * @param entry the job entry
62       */
63      public void addJobOffer(JobOffer entry) {
64          add(entry);
65      }
66  
67      /***
68       * Gets the name of the source
69       *
70       * @return name of the source (usually website)
71       */
72      public String getSource() {
73          return source;
74      }
75  
76      /***
77       * Gets a string representation of this Object
78       *
79       * @return String representation
80       */
81      public String toString() {
82          final StringBuffer buf = new StringBuffer();
83          buf.append("JobList");
84          buf.append("{source=").append(source);
85          buf.append('}');
86          return buf.toString();
87      }
88  }
89  
90  /***
91   * $Log: JobList.java,v $
92   * Revision 1.2  2005/09/13 08:11:17  schauwvliege
93   * organize imports
94   *
95   * Revision 1.1  2005/08/26 07:58:29  ge0ffrey
96   * split up the sources in service, serviceimpl and webclient
97   *
98   * Revision 1.3  2005/08/10 09:04:47  bavo_jcs
99   * Optimized imports according to checkstyle
100  *
101  * Revision 1.2  2005/06/09 08:18:43  bejug_cc
102  * Fix initial import
103  *
104  * Revision 1.3  2005/05/31 11:56:19  bbr
105  * deleted JobEntry
106  *
107  * Revision 1.2  2005/05/24 11:52:39  bbr
108  * Using spring sheduling
109  *
110  * Revision 1.1  2005/05/23 17:04:57  sja
111  * Moved to org.bejug.javacareers.feeder package.
112  *
113  * Revision 1.1  2005/05/23 08:46:33  PSONG09
114  * added feeder source files to project
115  *
116  * Revision 1.7  2005/05/11 11:53:25  bavo_jcs
117  * refactored
118  * - conform to conventions
119  * - some javadoc
120  * - Added FeederTask design
121  *
122  * Revision 1.6  2005/05/10 16:03:39  bavo_jcs
123  * cleanup
124  *
125  * Revision 1.5  2005/05/10 11:32:48  bavo_jcs
126  * integrated with services from JavaCareers Web
127  *
128  * Revision 1.4  2005/05/09 15:48:42  bavo_jcs
129  * added RSS generator
130  * cleanup/javadoc TODO
131  *
132  * Revision 1.3  2005/05/02 15:37:37  bavo_jcs
133  * Added Javadocs
134  *
135  * Revision 1.2  2005/05/02 14:49:47  bavo_jcs
136  * no message
137  *
138  * Revision 1.1.1.1  2005/04/26 14:13:50  stephan_janssen
139  * Initial import
140  *
141  * Revision 1.1.1.1  2005/04/26 12:58:31  sja
142  * Initial Release
143  *
144  * Revision 1.1.1.1  2005/04/26 12:51:26  sja
145  * Initial Release
146  *
147  */