View Javadoc

1   package cz.cuni.amis.pogamut.sposh.elements;
2   
3   /**
4    * All elements that can exists in the plan and their type names that will be
5    * used in the path.
6    */
7   public enum LapType {
8   
9       ACTION("A", "Action", TriggeredAction.class),
10      ACTION_PATTERN("AP", "Action pattern", ActionPattern.class),
11      ADOPT("AD", "Adopt", Adopt.class),
12      COMPETENCE("C", "Competence", Competence.class),
13      COMPETENCE_ELEMENT("CE", "Choice", CompetenceElement.class),
14      DRIVE_COLLECTION("DC", "Drive collection", DriveCollection.class),
15      DRIVE_ELEMENT("DE", "drive", DriveElement.class),
16      PLAN("P", "Plan", PoshPlan.class),
17      SENSE("S", "Sense", Sense.class);
18  
19      private final String pathName;
20      private final String displayName;
21      private final Class<?> typeClass;
22  
23      private LapType(String name, String displayName, Class<?> typeClass) {
24          this.pathName = name;
25          this.displayName = displayName;
26          this.typeClass = typeClass;
27      }
28  
29      /**
30       * @return Name of type, use in {@link LapPath}, e.g. "S" for {@link Sense}.
31       */
32      public String getName() {
33          return pathName;
34      }
35  
36      public String getDisplayName() {
37          return displayName;
38      }
39      
40      public Class<?> getTypeClass() {
41          return typeClass;
42      }
43  }