Search in sources :

Example 1 with StoichiometryProxy

use of org.vcell.pathway.persistence.BiopaxProxy.StoichiometryProxy in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectStoichiometry.

private Stoichiometry addObjectStoichiometry(Element element) {
    if (element.getChildren().size() == 0) {
        // if there are no children it must be a resource inside another object
        StoichiometryProxy proxy = new StoichiometryProxy();
        addAttributes(proxy, element);
        pathwayModel.add(proxy);
        return proxy;
    }
    Stoichiometry stoichiometry = new Stoichiometry();
    addAttributes(stoichiometry, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentStoichiometry(stoichiometry, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(stoichiometry);
    return stoichiometry;
}
Also used : Stoichiometry(org.vcell.pathway.Stoichiometry) StoichiometryProxy(org.vcell.pathway.persistence.BiopaxProxy.StoichiometryProxy) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject)

Aggregations

Element (org.jdom.Element)1 BioPaxObject (org.vcell.pathway.BioPaxObject)1 GroupObject (org.vcell.pathway.GroupObject)1 Stoichiometry (org.vcell.pathway.Stoichiometry)1 StoichiometryProxy (org.vcell.pathway.persistence.BiopaxProxy.StoichiometryProxy)1