Search in sources :

Example 1 with TransportWithBiochemicalReaction

use of org.vcell.pathway.TransportWithBiochemicalReaction in project vcell by virtualcell.

the class PathwayReader method addObjectTransportWithBiochemicalReaction.

private TransportWithBiochemicalReaction addObjectTransportWithBiochemicalReaction(Element element) {
    TransportWithBiochemicalReaction transportWithBiochemicalReaction = new TransportWithBiochemicalReaction();
    addAttributes(transportWithBiochemicalReaction, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentTransportWithBiochemicalReaction(transportWithBiochemicalReaction, element, childElement)) {
                showUnexpected(childElement, transportWithBiochemicalReaction);
            }
        }
    }
    pathwayModel.add(transportWithBiochemicalReaction);
    return transportWithBiochemicalReaction;
}
Also used : Element(org.jdom.Element) BioPaxObject(org.vcell.pathway.BioPaxObject) TransportWithBiochemicalReaction(org.vcell.pathway.TransportWithBiochemicalReaction)

Example 2 with TransportWithBiochemicalReaction

use of org.vcell.pathway.TransportWithBiochemicalReaction in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectBiochemicalReaction.

private BiochemicalReaction addObjectBiochemicalReaction(Element element) {
    Namespace bp = Namespace.getNamespace("bp", "http://www.biopax.org/release/biopax-level3.owl#");
    if (element.getChild("TransportWithBiochemicalReaction", bp) != null) {
        return addObjectTransportWithBiochemicalReaction(element.getChild("TransportWithBiochemicalReaction", bp));
    }
    BiochemicalReaction biochemicalReaction = new BiochemicalReactionImpl();
    addAttributes(biochemicalReaction, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentBiochemicalReaction(biochemicalReaction, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(biochemicalReaction);
    return biochemicalReaction;
}
Also used : BiochemicalReactionImpl(org.vcell.pathway.BiochemicalReactionImpl) TransportWithBiochemicalReaction(org.vcell.pathway.TransportWithBiochemicalReaction) BiochemicalReaction(org.vcell.pathway.BiochemicalReaction) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) Namespace(org.jdom.Namespace)

Example 3 with TransportWithBiochemicalReaction

use of org.vcell.pathway.TransportWithBiochemicalReaction in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectTransportWithBiochemicalReaction.

private TransportWithBiochemicalReaction addObjectTransportWithBiochemicalReaction(Element element) {
    TransportWithBiochemicalReaction transportWithBiochemicalReaction = new TransportWithBiochemicalReaction();
    addAttributes(transportWithBiochemicalReaction, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentTransportWithBiochemicalReaction(transportWithBiochemicalReaction, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(transportWithBiochemicalReaction);
    return transportWithBiochemicalReaction;
}
Also used : Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) TransportWithBiochemicalReaction(org.vcell.pathway.TransportWithBiochemicalReaction)

Example 4 with TransportWithBiochemicalReaction

use of org.vcell.pathway.TransportWithBiochemicalReaction in project vcell by virtualcell.

the class PathwayProducerBiopax3 method addContentTransportWithBiochemicalReaction.

// deltaG 		DeltaG 		multiple
// kEQ 		KPrime 		multiple
// eCNumber 	String 		multiple
// deltaS 		Float 		multiple
// deltaH 		Float 		multiple
private Element addContentTransportWithBiochemicalReaction(BioPaxObject bpObject, Element element) {
    // element = addContentTransport(bpObject, element);
    element = addContentBiochemicalReaction(bpObject, element);
    TransportWithBiochemicalReaction ob = (TransportWithBiochemicalReaction) bpObject;
    Element tmpElement = null;
    if (ob.getDeltaG() != null && ob.getDeltaG().size() > 0) {
        List<DeltaG> list = ob.getDeltaG();
        for (DeltaG item : list) {
            tmpElement = new Element("deltaG", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getkEQ() != null && ob.getkEQ().size() > 0) {
        List<KPrime> list = ob.getkEQ();
        for (KPrime item : list) {
            tmpElement = new Element("kEQ", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getECNumber() != null && ob.getECNumber().size() > 0) {
        List<String> list = ob.getECNumber();
        for (String item : list) {
            tmpElement = new Element("eCNumber", bp);
            tmpElement.setAttribute("datatype", schemaString, rdf);
            tmpElement.setText(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getDeltaS() != null && ob.getDeltaS().size() > 0) {
        List<Double> list = ob.getDeltaS();
        for (Double item : list) {
            tmpElement = new Element("deltaS", bp);
            tmpElement.setAttribute("datatype", schemaDouble, rdf);
            tmpElement.setText(item.toString());
            element.addContent(tmpElement);
        }
    }
    if (ob.getDeltaH() != null && ob.getDeltaH().size() > 0) {
        List<Double> list = ob.getDeltaH();
        for (Double item : list) {
            tmpElement = new Element("deltaH", bp);
            tmpElement.setAttribute("datatype", schemaDouble, rdf);
            tmpElement.setText(item.toString());
            element.addContent(tmpElement);
        }
    }
    return element;
}
Also used : DeltaG(org.vcell.pathway.DeltaG) Element(org.jdom.Element) PathwayXMLHelper.schemaString(org.vcell.pathway.PathwayXMLHelper.schemaString) TransportWithBiochemicalReaction(org.vcell.pathway.TransportWithBiochemicalReaction) KPrime(org.vcell.pathway.KPrime) PathwayXMLHelper.schemaDouble(org.vcell.pathway.PathwayXMLHelper.schemaDouble)

Aggregations

Element (org.jdom.Element)4 TransportWithBiochemicalReaction (org.vcell.pathway.TransportWithBiochemicalReaction)4 BioPaxObject (org.vcell.pathway.BioPaxObject)3 GroupObject (org.vcell.pathway.GroupObject)2 Namespace (org.jdom.Namespace)1 BiochemicalReaction (org.vcell.pathway.BiochemicalReaction)1 BiochemicalReactionImpl (org.vcell.pathway.BiochemicalReactionImpl)1 DeltaG (org.vcell.pathway.DeltaG)1 KPrime (org.vcell.pathway.KPrime)1 PathwayXMLHelper.schemaDouble (org.vcell.pathway.PathwayXMLHelper.schemaDouble)1 PathwayXMLHelper.schemaString (org.vcell.pathway.PathwayXMLHelper.schemaString)1