1
15
16 package gate.config;
17
18 import java.util.*;
19
20 import gate.Factory;
21 import gate.FeatureMap;
22 import gate.creole.ResourceInstantiationException;
23 import gate.util.GateSaxException;
24 import gate.util.Strings;
25
26
27
30 class SystemData
31 {
32
33 protected static final boolean DEBUG = false;
34
35
36 SystemData() {
37 }
39
40 List prList = new ArrayList();
41
42
43 List lrList = new ArrayList();
44
45
46 String systemName = new String("name not set");
47
48
49 String controllerTypeName = new String("controller type name not set");
50
51
54 void createSystem() throws GateSaxException
55 {
56 if(controllerTypeName.equalsIgnoreCase("none")){
58 return;
60 }
61 try {
62 FeatureMap controllerParams = Factory.newFeatureMap();
63 Collection controller = (Collection)
64 Factory.createResource(controllerTypeName, controllerParams);
65 controller.addAll(prList);
66 } catch(ResourceInstantiationException e) {
67 throw new GateSaxException(
68 "Couldn't create controller for SYSTEM: " +
69 systemName + "; problem was: " + Strings.getNl() + e
70 );
71 }
72 }
74 }