Source code: openfuture/masterdata/test/ManufacturerDataSource.java
1 package openfuture.masterdata.test;
2
3 import java.awt.*;
4 import java.util.*;
5 import openfuture.masterdata.*;
6
7 /**
8 * The class ManufacturerDataSource is a simple (example) data source for
9 * the master data class <tt>Manufacturer</tt>
10 *
11 * Creation date: (09.09.00 22:02:54)
12 * @author: Markus Giebeler
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.<p>
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.<p>
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br>
27 * http://www.gnu.org/copyleft/lesser.html"
28 */
29 public class ManufacturerDataSource implements IMasterDataSource {
30 /**
31 * PaintDataSource constructor comment.
32 */
33 public ManufacturerDataSource() {
34 super();
35 }
36 /**
37 * Provide some instances of <tt>Paint</tt> as simple example
38 */
39 public IMasterDataContainer getMasterData(String type) {
40 Vector v = new Vector();
41 v.addElement(new Manufacturer("WDB", "Mercedes-Benz"));
42 v.addElement(new Manufacturer("WVW", "Volkswagen"));
43 v.addElement(new Manufacturer("WAU", "Audi"));
44 v.addElement(new Manufacturer("1CC", "Chrysler"));
45 v.addElement(new Manufacturer("WOL", "Opel"));
46 v.addElement(new Manufacturer("WFO", "Ford"));
47 v.addElement(new Manufacturer("ZAR", "Alfa Romeo"));
48 v.addElement(new Manufacturer("ZFA", "Fiat"));
49 v.addElement(new Manufacturer("262", "Rover"));
50 v.addElement(new Manufacturer("SAJ", "Jaguar"));
51 v.addElement(new Manufacturer("VF3", "Peugeot"));
52 v.addElement(new Manufacturer("VF7", "Citroen"));
53 v.addElement(new Manufacturer("VF1", "Renault"));
54 v.addElement(new Manufacturer("YV1", "Volvo"));
55 v.addElement(new Manufacturer("ZDF", "Ferrari"));
56 v.addElement(new Manufacturer("SCA", "Rolls-Royce"));
57 v.addElement(new Manufacturer("VSS", "Seat"));
58 v.addElement(new Manufacturer("TNL", "Skoda"));
59 v.addElement(new Manufacturer("JMA", "Mitsubishi"));
60 v.addElement(new Manufacturer("JMZ", "Mazda"));
61 v.addElement(new Manufacturer("JT1", "Toyota"));
62 v.addElement(new Manufacturer("JHM", "Honda"));
63 v.addElement(new Manufacturer("JSA", "Suzuki"));
64 v.addElement(new Manufacturer("KLA", "Daewoo"));
65
66 return new MasterDataContainer(v);
67 }
68 }