/* * 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.StringTokenizer; import scriptbuilder.structures.ELEMENT; import scriptbuilder.structures.I_XML_Writable; import scriptbuilder.structures.ScriptEvent; import scriptbuilder.structures.XMLWriter; /** * Data model for a CAD incident event. CAD events have a string description of * what is occurring at that time, and may or may not have sub-events. * * @author Bryan McGuffin */ public class CADEvent extends ScriptEvent implements I_XML_Writable { public CADEvent() { super(ScriptEventType.CAD_EVENT); } public boolean hasSubEvents = false; public String detail = ""; @Override public String toXML() { StringTokenizer tok = new StringTokenizer(detail, "\n"); String output = ""; while (tok.hasMoreTokens()) { output += XMLWriter.simpleTag(tok.nextToken(), ELEMENT.DETAIL); } return output; } }