Search in sources :

Example 11 with NodeReference

use of cbit.vcell.model.NodeReference in project vcell by virtualcell.

the class Xmlproducer method getXML.

/**
 * This method returns a XML representation of a diagram object type.
 * Creation date: (2/27/2001 5:13:26 PM)
 * @return Element
 * @param param cbit.vcell.model.Diagram
 */
private Element getXML(Diagram param) {
    Element diagram = new Element(XMLTags.DiagramTag);
    // add attributes
    diagram.setAttribute(XMLTags.NameAttrTag, mangle(param.getName()));
    diagram.setAttribute(XMLTags.StructureAttrTag, mangle(param.getStructure().getName()));
    // Add NodeReferences subelements
    for (NodeReference node : param.getNodeFullList()) {
        diagram.addContent(getXML(node));
    }
    for (NodeReference node : param.getNodeMoleculeList()) {
        diagram.addContent(getXML(node));
    }
    for (NodeReference node : param.getNodeRuleList()) {
        diagram.addContent(getXML(node));
    }
    return diagram;
}
Also used : NodeReference(cbit.vcell.model.NodeReference) Element(org.jdom.Element)

Aggregations

NodeReference (cbit.vcell.model.NodeReference)11 RuleParticipantSignature (cbit.vcell.model.RuleParticipantSignature)8 ArrayList (java.util.ArrayList)7 Shape (cbit.gui.graph.Shape)6 FluxReaction (cbit.vcell.model.FluxReaction)6 Point (java.awt.Point)5 Structure (cbit.vcell.model.Structure)4 RuleParticipantLongSignature (cbit.vcell.model.RuleParticipantLongSignature)3 RuleParticipantShortSignature (cbit.vcell.model.RuleParticipantShortSignature)3 SimpleReaction (cbit.vcell.model.SimpleReaction)3 ReactionRule (cbit.vcell.model.ReactionRule)2 Element (org.jdom.Element)2 Diagram (cbit.vcell.model.Diagram)1 Mode (cbit.vcell.model.NodeReference.Mode)1 ReactionRuleShortSignature (cbit.vcell.model.ReactionRuleShortSignature)1