1 package cz.cuni.amis.pogamut.usar2004.agent.module.datatypes;
2
3 import cz.cuni.amis.pogamut.usar2004.agent.module.configuration.*;
4
5
6
7
8
9
10
11
12 public enum ConfigType
13 {
14 GROUND_VEHICLE(ConfigGround.class, "GroundVehicle"),
15 LEGGED_ROBOT(ConfigLegged.class, "LeggedRobot"),
16 NAUTIC_VEHICLE(ConfigNautic.class, "NauticVehicle"),
17 AERIAL_VEHICLE(ConfigAerial.class, "AerialVehicle"),
18 SENSOR(ConfigSensor.class, "Sensor"),
19 EFFECTER(ConfigEffecter.class, "Effecter"),
20 MISSION_PACKAGE(ConfigMissionPackage.class, "MisPkg");
21 private String kind;
22 private Class clazz;
23
24
25
26
27
28
29 ConfigType(Class clazz, String kind)
30 {
31 this.kind = kind;
32 this.clazz = clazz;
33 }
34
35
36
37
38
39
40
41
42
43 public static ConfigType getType(String type)
44 {
45 for(ConfigType geoType : ConfigType.values())
46 {
47 if(geoType.kind.equalsIgnoreCase(type))
48 {
49 return geoType;
50 }
51 }
52 return SENSOR;
53 }
54
55
56
57
58
59
60 public Class getModuleClass()
61 {
62 return this.clazz;
63 }
64 }