/**
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 *
 * Copyright (C)
 * <a href="http://www.inab.org">Spanish National Institute of Bioinformatics (INB)</a>
 * <a href="http://www.bsc.es">Barcelona Supercomputing Center (BSC)</a>
 * <a href="http://inb.bsc.es">Computational Node 6</a>
 */

package org.inb.biomoby.shared.message;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Dmitry Repchevsky
 */

@XmlRootElement(name="mobyException")
public class MobyException implements Serializable
{
    public static enum SEVERITY {error, warning, information};
    
    private SEVERITY severity;
    private String refQueryID;
    private String refElement;
    
    private String exceptionCode;
    private String exceptionMessage;
    
    @XmlAttribute
    public SEVERITY getSeverity()
    {
        return severity;
    }
    
    public void setSeverity(SEVERITY severity)
    {
        this.severity = severity;
    }
    
    @XmlAttribute
    public String getRefQueryID()
    {
        return refQueryID;
    }

    public void setRefQueryID(String refQueryID)
    {
        this.refQueryID = refQueryID;
    }

    @XmlAttribute
    public String getRefElement()
    {
        return refElement;
    }

    public void setRefElement(String refElement)
    {
        this.refElement = refElement;
    }
    
    public String getExceptionCode()
    {
        return exceptionCode;
    }

    public void setExceptionCode(String exceptionCode)
    {
        this.exceptionCode = exceptionCode;
    }

    public String getExceptionMessage()
    {
        return exceptionMessage;
    }

    public void setExceptionMessage(String exceptionMessage)
    {
        this.exceptionMessage = exceptionMessage;
    }    
}
