2 package net.sf.openrocket.preset.xml;
4 import net.sf.openrocket.preset.ComponentPreset;
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlElement;
9 import javax.xml.bind.annotation.XmlRootElement;
12 * Bulkhead preset XML handler.
14 @XmlRootElement(name = "BulkHead")
15 @XmlAccessorType(XmlAccessType.FIELD)
16 public class BulkHeadDTO extends BaseComponentDTO {
18 @XmlElement(name = "OutsideDiameter")
19 private double outsideDiameter;
20 @XmlElement(name = "Length")
21 private double length;
23 public BulkHeadDTO() {
27 * Most-useful constructor that maps a BulkHead preset to a BulkHeadDTO.
29 * @param thePreset the preset
31 * @throws net.sf.openrocket.util.BugException thrown if the expected bulk head keys are not in the preset
33 public BulkHeadDTO(final ComponentPreset thePreset) {
35 setOutsideDiameter(thePreset.get(ComponentPreset.OUTER_DIAMETER));
36 setLength(thePreset.get(ComponentPreset.LENGTH));
39 public double getOutsideDiameter() {
40 return outsideDiameter;
43 public void setOutsideDiameter(final double theOutsideDiameter) {
44 outsideDiameter = theOutsideDiameter;
47 public double getLength() {
51 public void setLength(final double theLength) {