Search in sources :

Example 1 with BiochemicalReaction

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

the class PathwayProducerBiopax3 method addContentBiochemicalReaction.

// deltaG 		DeltaG 		multiple
// kEQ 		KPrime 		multiple
// eCNumber 	String 		multiple
// deltaS 		Float 		multiple
// deltaH 		Float 		multiple
private Element addContentBiochemicalReaction(BioPaxObject bpObject, Element element) {
    element = addContentConversion(bpObject, element);
    BiochemicalReaction ob = (BiochemicalReaction) 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) TransportWithBiochemicalReaction(org.vcell.pathway.TransportWithBiochemicalReaction) BiochemicalReaction(org.vcell.pathway.BiochemicalReaction) Element(org.jdom.Element) PathwayXMLHelper.schemaString(org.vcell.pathway.PathwayXMLHelper.schemaString) KPrime(org.vcell.pathway.KPrime) PathwayXMLHelper.schemaDouble(org.vcell.pathway.PathwayXMLHelper.schemaDouble)

Example 2 with BiochemicalReaction

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

the class PathwayReader method addObjectBiochemicalReaction.

private BiochemicalReaction addObjectBiochemicalReaction(Element element) {
    BiochemicalReaction biochemicalReaction = new BiochemicalReactionImpl();
    addAttributes(biochemicalReaction, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentBiochemicalReaction(biochemicalReaction, element, (Element) child)) {
                showUnexpected((Element) child, biochemicalReaction);
            }
        }
    }
    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) BioPaxObject(org.vcell.pathway.BioPaxObject)

Example 3 with BiochemicalReaction

use of org.vcell.pathway.BiochemicalReaction 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)

Aggregations

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