create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / preset / xml / TubeCouplerDTO.java
1
2 package net.sf.openrocket.preset.xml;
3
4 import net.sf.openrocket.preset.ComponentPreset;
5 import net.sf.openrocket.preset.InvalidComponentPresetException;
6
7 import javax.xml.bind.annotation.XmlAccessType;
8 import javax.xml.bind.annotation.XmlAccessorType;
9 import javax.xml.bind.annotation.XmlRootElement;
10 import java.util.List;
11
12 /**
13  * Tube coupler preset XML handler.
14  */
15 @XmlRootElement(name = "TubeCoupler")
16 @XmlAccessorType(XmlAccessType.FIELD)
17 public class TubeCouplerDTO extends BodyTubeDTO {
18
19     /**
20      * Default constructor.
21      */
22     public TubeCouplerDTO() {
23     }
24
25     /**
26      * Most-useful constructor that maps a TubeCoupler preset to a TubeCouplerDTO.
27      *
28      * @param thePreset  the preset
29      *
30      * @throws net.sf.openrocket.util.BugException thrown if the expected tube coupler keys are not in the preset
31      */
32     public TubeCouplerDTO(ComponentPreset thePreset) {
33         super(thePreset);
34     }
35
36     @Override
37     public ComponentPreset asComponentPreset(List<MaterialDTO> materials) throws InvalidComponentPresetException {
38         return super.asComponentPreset(ComponentPreset.Type.TUBE_COUPLER, materials);
39     }
40 }