/*
 *  T-Mass general data class
 *
 *  2004 - 2011 Frantisek Zboril jr.
 *  Faculty of Information Technology
 *  zborilf@fit.vutbr.cz
 *  http://www.fit.vutbr.cz/~zborilf
 *
 * (C) Brno University of Technology
 * Freeware licence VUT v Brně
 * https://wis.fit.vutbr.cz/FIT/db/dir.php/dr/VZ2007/externiInformace/softwareNaWebu/Priloha2_rozh23.pdf

 */

package jTMass.core.jTMassModel.jModelData;

public abstract class TModelData {

    public static final String _Broadcast="~broadcast~";
    String PSender;
    String PReceiver;
    TContent PContent;
    
    // ==== CLONE DATA =====
    
    public abstract TModelData cloneData();

    // ===== READERS / WRITERS =====

    public String getSender(){
        return(PSender);
    }

    public String getReceiver(){
        return(PReceiver);
    }
        
    public String getContentEx(){
        return(getContentS());
    }

    public String getContentS(){
        if(PContent==null)
            return("No Data");
        else
            return(PContent.getContent());
    }

    public TContent getContent(){
        return(PContent);
    }

    public void setSender(String element){
        PSender=element;
    }

    public void setReceiver(String element){
        PReceiver=element;
    }

    // ===== CONSTRUCTOR =====

    public TModelData(String sender, String receiver,TContent content){
        PSender=sender;
        PReceiver=receiver;
        PContent=content;
    }

}