Residue.java [src/nodes] Revision: default Date:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package nodes;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLStreamException;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.xml.sax.SAXException;
import static utils.Constants.ID;
import static utils.Constants.NAME;
import utils.TranslatorException;
/**
*
* @author Brad
*/
public abstract class Residue {
protected String name;
protected String id;
protected double residueAmount;
public String getName() {
return name;
}
public String getID() {
return id;
}
public void setID(String key) {
id = key;
}
public double getResidueAmount() {
return residueAmount;
}
public void setResidueAmount(double residueAmount) {
this.residueAmount = residueAmount;
}
public void readJSONData(JSONObject jres) throws JSONException {
name = jres.getString(NAME);
id = jres.getString(ID);
}
public abstract void parseLMODData(JSONObject data) throws XMLStreamException, ParserConfigurationException, SAXException, IOException, TranslatorException, JSONException;
}