/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TestRest.converter;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import java.net.URI;

/**
 *
 * @author aparnab
 */
public class AmplitudeConverter {
    @XmlAttribute
    private String publicID;
    @XmlAttribute
    private String xlink;

    public AmplitudeConverter(){

    }
    
    public AmplitudeConverter(Long arid, URI uri){
        this.setPublicID(arid);
        this.setXlink(arid, uri);
    }

    public void setPublicID(Long arid){
        this.publicID = "smi:data.scec.org/amplitude/" + arid;
    }

    public void setXlink(Long arid, URI uri){
        this.xlink = uri.toString().replace("events", "amplitudes")+ "?ampid=" + arid;
    }

}
