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