/**
 * 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.XmlTransient;

/**
 * @author Dmitry Repchevsky
 */

@XmlTransient
public class AbstractMobyElement implements Serializable
{
    protected String articleName;
    
    AbstractMobyElement() {}

    @XmlAttribute(name="articleName", namespace="")
    public void setArticleName(String articleName)
    {
        this.articleName = articleName;
    }
    
    public String getArticleName()
    {
        return articleName;
    }
    
    // hack around Moby specification bug where it allows attributes with or without namespaces
    // this leads to two attributes in xml schema... these accessors are for JAXB only because
    // they are unaccessible from a client

    @XmlAttribute(name="articleName", namespace="http://www.biomoby.org/moby")
    void setFixedArticleName(String articleName)
    {
        this.articleName = articleName;
    }
    
    String getFixedArticleName()
    {
        return null; // always return null (we do not want to put it twice)
    }
}
