/*
 * 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 witness event. A witness has a name, a phone number, and a
 * street address.
 *
 * @author Bryan McGuffin
 */
public class WitnessEvent extends ScriptEvent implements I_XML_Writable
{

    /**
     * Constructor. Generate a new script event that has a witness event icon.
     */
    public WitnessEvent()
    {
        super(ScriptEventType.WITNESS_EVENT);
    }

    public String witnessAddress = "";

    public String witnessName = "";

    public String witnessNum = "";

    @Override
    public String toXML()
    {
        return emptyTag(ELEMENT.WITNESS.tag + " Name=\"" + witnessName + "\" Address=\""
                + witnessAddress + "\" PhoneNum=\"" + witnessNum + "\"");
    }

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

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

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

}
