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

package TestRest.converter;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import java.util.List;
import java.util.ArrayList;
import java.net.URI;

import TestRest.Assocamo;
import TestRest.Amp;

/**
 *
 * @author aparnab
 */
@XmlRootElement(name="amplitude")
public class AmplitudesConverter {
    @XmlAttribute
    private String publicID = "smi:data.scec.org/amplitude/";
    private URI uri;

    private Assocamo entity;

    @XmlElement(name="amp")
    private List<AmpConverter> amp;

    @XmlElement(name="type")
    private String type;

     public AmplitudesConverter(){
    }

     public AmplitudesConverter(Assocamo entity, URI uri){
        this.entity = entity;
        this.uri = uri;
        this.setPublicID(12324343L);
        Amp a = entity.getAmp();

        this.amp = new ArrayList<AmpConverter>();
        AmpConverter temp = new AmpConverter();
        temp.setValue(a.getAmplitude());
        this.amp.add(temp);
        
        this.type = a.getAmptype();
        
    }

     public void setPublicID(Long ampID){
        this.publicID = this.publicID + ampID;
    }
}
