/*
 * 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 scriptbuilder.structures.ELEMENT;
import scriptbuilder.structures.I_XML_Writable;
import scriptbuilder.structures.ScriptEvent;

/**
 * Data model for a TMT Radio event. A TMT radio transmission has a string
 * message.
 *
 * @author Bryan McGuffin
 */
public class TMTRadioEvent extends ScriptEvent implements I_XML_Writable
{

    public TMTRadioEvent()
    {
        super(ScriptEventType.TMT_RADIO_EVENT);
    }

    public String message = "";

    @Override
    public String toXML()
    {
        String output = openTag(ELEMENT.TMT_RADIO.tag);
        output += message;
        output += closeTag(ELEMENT.TMT_RADIO.tag);
        return output;
    }

    @Override
    public String openTag(String s)
    {
        return "<" + s + ">\n";
    }

    @Override
    public String closeTag(String s)
    {
        return "</" + s + ">\n";
    }

    @Override
    public String emptyTag(String s)
    {
        return "<" + s + "/>\n";
    }
}
