Search in sources :

Example 26 with RbmModelContainer

use of cbit.vcell.model.Model.RbmModelContainer in project vcell by virtualcell.

the class ModelTable method getRbmForDatabase.

public static String getRbmForDatabase(Model model) {
    // add the rbmModelContainer elements
    RbmModelContainer rbmModelContainer = model.getRbmModelContainer();
    if (rbmModelContainer != null && !rbmModelContainer.isEmpty()) {
        Xmlproducer xmlProducer = new Xmlproducer(false);
        Element rbmModelContainerElement = xmlProducer.getXML(rbmModelContainer);
        Document doc = new Document();
        Element clone = (Element) rbmModelContainerElement.clone();
        doc.setRootElement(clone);
        String xmlString = XmlUtil.xmlToString(doc, false);
        return xmlString;
    // System.out.println(xmlString);
    }
    return null;
}
Also used : Xmlproducer(cbit.vcell.xml.Xmlproducer) RbmModelContainer(cbit.vcell.model.Model.RbmModelContainer) Element(org.jdom.Element) Document(org.jdom.Document)

Aggregations

RbmModelContainer (cbit.vcell.model.Model.RbmModelContainer)26 MolecularType (org.vcell.model.rbm.MolecularType)12 Element (org.jdom.Element)10 BioModel (cbit.vcell.biomodel.BioModel)9 ArrayList (java.util.ArrayList)9 Model (cbit.vcell.model.Model)8 ReactionRule (cbit.vcell.model.ReactionRule)7 SimulationContext (cbit.vcell.mapping.SimulationContext)5 RbmObservable (cbit.vcell.model.RbmObservable)5 ReactionStep (cbit.vcell.model.ReactionStep)5 Structure (cbit.vcell.model.Structure)5 SpeciesContextSpec (cbit.vcell.mapping.SpeciesContextSpec)4 ParticleMolecularType (cbit.vcell.math.ParticleMolecularType)4 SpeciesContext (cbit.vcell.model.SpeciesContext)4 MathModel (cbit.vcell.mathmodel.MathModel)3 Expression (cbit.vcell.parser.Expression)3 SpeciesPattern (org.vcell.model.rbm.SpeciesPattern)3 Geometry (cbit.vcell.geometry.Geometry)2 BioEvent (cbit.vcell.mapping.BioEvent)2 GeometryContext (cbit.vcell.mapping.GeometryContext)2