+ BODY_TUBE(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.INNER_DIAMETER,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ NOSE_CONE(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.SHAPE,
+ ComponentPreset.AFT_OUTER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_LENGTH,
+ ComponentPreset.LENGTH }),
+
+ TRANSITION(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.SHAPE,
+ ComponentPreset.FORE_OUTER_DIAMETER,
+ ComponentPreset.FORE_SHOULDER_DIAMETER,
+ ComponentPreset.FORE_SHOULDER_LENGTH,
+ ComponentPreset.AFT_OUTER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_LENGTH,
+ ComponentPreset.LENGTH }),
+
+ TUBE_COUPLER(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.INNER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ BULK_HEAD(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ CENTERING_RING(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.INNER_DIAMETER,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ ENGINE_BLOCK(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.INNER_DIAMETER,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ LAUNCH_LUG(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.INNER_DIAMETER,
+ ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.LENGTH }),
+
+ STREAMER(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.LENGTH,
+ ComponentPreset.WIDTH,
+ ComponentPreset.THICKNESS,
+ ComponentPreset.MATERIAL }),
+
+ PARACHUTE(new TypedKey<?>[] {
+ ComponentPreset.MANUFACTURER,
+ ComponentPreset.PARTNO,
+ ComponentPreset.DESCRIPTION,
+ ComponentPreset.DIAMETER,
+ ComponentPreset.SIDES,
+ ComponentPreset.LINE_COUNT,
+ ComponentPreset.LINE_LENGTH,
+ ComponentPreset.LINE_MATERIAL,
+ ComponentPreset.MATERIAL });
+
+ TypedKey<?>[] displayedColumns;
+
+ Type(TypedKey<?>[] displayedColumns) {
+ this.displayedColumns = displayedColumns;
+ }
+
+ public List<Type> getCompatibleTypes() {
+ return compatibleTypeMap.get(Type.this);
+ }
+
+ public TypedKey<?>[] getDisplayedColumns() {
+ return displayedColumns;
+ }
+
+ private static Map<Type, List<Type>> compatibleTypeMap = new HashMap<Type, List<Type>>();
+
+ static {
+ compatibleTypeMap.put(BODY_TUBE, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
+ compatibleTypeMap.put(TUBE_COUPLER, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
+ compatibleTypeMap.put(LAUNCH_LUG, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
+ compatibleTypeMap.put(CENTERING_RING, Arrays.asList(CENTERING_RING, ENGINE_BLOCK));
+ compatibleTypeMap.put(NOSE_CONE, Arrays.asList(NOSE_CONE, TRANSITION));
+ }
+