smr.setNodeProperties(nps);
smr.setSysParams(sysParams);
smr.setDescription(species.getName() + " " + propertiesConfig.getProperty("addNewSpeciesTypeDescription"));
smr.setSaveLastTimestepOnly(false);
ManipulationResponse response = new ManipulationResponse();
try {
response = (ManipulationResponse) svc.executeManipulationRequest(smr);
//TODO: Write web service call to database
} catch (RemoteException e) {
e.printStackTrace();
}
String errMsg = response.getMessage();
if (errMsg != null) {
System.out.println("Error (addNewSpeciesType): " + errMsg);
return null;
} else {
logTime("Total Time (Add New Species Type): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
System.out.println("Adding: [" + species.getNodeIndex() + "] " + species.getName() + " " + species.getCurrentBiomass());
}
return response.getManipulationId();
}