public void putModel(BiopolisModel model)
     throws BiopolisActiveException, SQLException, BiopolisGeneralException,
         BiopolisActiveException, BiopolisModelStructureException {
   if (this.isInitialized()) {
     throw new BiopolisActiveException();
   }
   BiopolisSortedModel smodel = new BiopolisSortedModel(model);
   String json = new Gson().toJson(model, BiopolisModel.class);
   this.alterSystem(smodel.asDiff(), json, false);
 }
 public void updateModel(BiopolisModel newmodel)
     throws BiopolisInactiveException, SQLException, BiopolisGeneralException,
         BiopolisModelExtensionException, BiopolisModelStructureException {
   WSResult<BiopolisModel> result = this.describeModel();
   BiopolisModel oldmodel = result.result[0];
   BiopolisSortedModel soldmodel = new BiopolisSortedModel(oldmodel);
   BiopolisSortedModel snewmodel = new BiopolisSortedModel(newmodel);
   BiopolisDiff diff = soldmodel.getDiff(snewmodel);
   String json = new Gson().toJson(newmodel, BiopolisModel.class);
   this.alterSystem(diff, json, true);
 }