use of cbit.vcell.solver.MathOverrides.Element in project vcell by virtualcell.
the class SimulationTable method getSimulationRep.
public SimulationRep getSimulationRep(ResultSet rset, DatabaseSyntax dbSyntax) throws IllegalArgumentException, SQLException, DataAccessException {
KeyValue scKey = new KeyValue(rset.getBigDecimal(table.id.toString()));
String name = rset.getString(table.name.toString());
BigDecimal branchID = rset.getBigDecimal(table.versionBranchID.toString());
KeyValue ownerRef = new KeyValue(rset.getBigDecimal(table.ownerRef.toString()));
String ownerName = rset.getString(UserTable.table.userid.toString());
User owner = new User(ownerName, ownerRef);
KeyValue mathKey = new KeyValue(rset.getBigDecimal(table.mathRef.toString()));
String taskDesc = rset.getString(table.taskDescription.toString());
SolverTaskDescription solverTaskDescription = null;
try {
solverTaskDescription = new SolverTaskDescription(new CommentStringTokenizer(taskDesc));
} catch (DataAccessException e) {
System.out.println("SimulationTable:getSimulationRep(): failed to parse solver task description, exception=[" + e.getMessage() + "]::\n[[[" + taskDesc + "]]]\n");
// e.printStackTrace();
}
CommentStringTokenizer mathOverridesTokenizer = getMathOverridesTokenizer(rset, dbSyntax);
List<Element> mathOverrideElements = MathOverrides.parseOverrideElementsFromVCML(mathOverridesTokenizer);
return new SimulationRep(scKey, branchID, name, owner, mathKey, solverTaskDescription, mathOverrideElements.toArray(new MathOverrides.Element[0]));
}
Aggregations