/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package scriptbuilder.structures.events; import java.util.ArrayList; import scriptbuilder.structures.ELEMENT; import scriptbuilder.structures.I_XML_Writable; import scriptbuilder.structures.ScriptEvent; import scriptbuilder.structures.XMLBuilder; /** * Data model for a CHP radio event. A CHP radio transmission has a * conversation, with dialog between a field unit and a dispatch center. It also * has an audio file which has that conversation acted out. * * @author Bryan McGuffin */ public class CHPRadioEvent extends ScriptEvent implements I_XML_Writable, I_AudioEvent { /** * Constructor. */ public CHPRadioEvent() { super(ScriptEventType.CHP_RADIO_EVENT); } /** * List of the lines of dialog in this event. */ public ArrayList lines = new ArrayList(); /** * List of the corresponding roles for each line of dialog. */ public ArrayList roles = new ArrayList(); /** * Path for the audio file to be played during this event. */ public String radioFile = ""; /** * ID */ public String id = ""; /** * Returns the contents of the CHPRadioEvent to make recording easier. * @return a string with the script to be said */ public String toScriptFile() { String fileContents = ""; for(int lineIndex=0;lineIndex