/*
 * 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 PickConverter {
    @XmlAttribute
    private String publicID;
    @XmlAttribute
    private String xlink;

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

    public void setPublicID(Long arid){
        this.publicID = "smi:data.scec.org/pick/" + arid.toString();
    }
    public void setXlink(Long arid, Long orid, URI uri){
        this.xlink = uri.toString().replace("events","picks")+ "?arid=" + arid + "&orid=" + orid;
    }
}
