use of cbit.vcell.math.FastInvariant in project vcell by virtualcell.
the class Xmlproducer method getXML.
/**
* This method returns a XML representation of a FastSystemImplicit object.
* Creation date: (3/2/2001 4:05:28 PM)
* @return Element
* @param param cbit.vcell.math.FastSystemImplicit
*/
private Element getXML(FastSystem param) {
Element fastsystem = new Element(XMLTags.FastSystemTag);
// Add Fast Invariant subelements
Element fastinvariant;
Enumeration<FastInvariant> enum_fi = param.getFastInvariants();
while (enum_fi.hasMoreElements()) {
fastinvariant = new Element(XMLTags.FastInvariantTag);
FastInvariant fi = enum_fi.nextElement();
fastinvariant.addContent(mangleExpression(fi.getFunction()));
fastsystem.addContent(fastinvariant);
}
// Add FastRate subelements
Element fastrate;
Enumeration<FastRate> enum_fr = param.getFastRates();
while (enum_fr.hasMoreElements()) {
FastRate fr = (FastRate) enum_fr.nextElement();
fastrate = new Element(XMLTags.FastRateTag);
fastrate.addContent(mangleExpression(fr.getFunction()));
fastsystem.addContent(fastrate);
}
return fastsystem;
}
use of cbit.vcell.math.FastInvariant in project vcell by virtualcell.
the class ITextWriter method writeFastSystem.
protected void writeFastSystem(Section container, FastSystem fs) throws DocumentException {
Table eqTable = getTable(2, 100, 1, 2, 2);
eqTable.addCell(createCell(VCML.FastSystem, getBold(DEF_HEADER_FONT_SIZE), 2, 1, Element.ALIGN_CENTER, true));
eqTable.endHeaders();
Enumeration<FastInvariant> enum_fi = fs.getFastInvariants();
while (enum_fi.hasMoreElements()) {
FastInvariant fi = enum_fi.nextElement();
eqTable.addCell(createCell(VCML.FastInvariant, getFont()));
eqTable.addCell(createCell(fi.getFunction().infix(), getFont()));
}
Enumeration<FastRate> enum_fr = fs.getFastRates();
while (enum_fr.hasMoreElements()) {
FastRate fr = enum_fr.nextElement();
eqTable.addCell(createCell(VCML.FastRate, getFont()));
eqTable.addCell(createCell(fr.getFunction().infix(), getFont()));
}
container.add(eqTable);
}
Aggregations