2 package net.sf.openrocket.preset.xml;
4 import net.sf.openrocket.preset.ComponentPreset;
5 import net.sf.openrocket.preset.InvalidComponentPresetException;
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;
13 * Engine block preset XML handler.
15 @XmlRootElement(name = "EngineBlock")
16 @XmlAccessorType(XmlAccessType.FIELD)
17 public class EngineBlockDTO extends BodyTubeDTO {
20 * Default constructor.
22 public EngineBlockDTO() {
26 * Most-useful constructor that maps a EngineBlock preset to a EngineBlockDTO.
28 * @param thePreset the preset
30 * @throws net.sf.openrocket.util.BugException thrown if the expected engine block keys are not in the preset
32 public EngineBlockDTO(ComponentPreset thePreset) {
37 public ComponentPreset asComponentPreset(List<MaterialDTO> materials) throws InvalidComponentPresetException {
38 return super.asComponentPreset(ComponentPreset.Type.ENGINE_BLOCK, materials);