Search in sources :

Example 1 with BiochemicalReactionImpl

use of org.vcell.pathway.BiochemicalReactionImpl 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 2 with BiochemicalReactionImpl

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

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

the class AnnotationMapping method createInteraction.

private Interaction createInteraction(ReactionStep reactionStep, ArrayList<Xref> xRef, ArrayList<String> name) {
    Interaction interaction = null;
    if (reactionStep instanceof SimpleReaction) {
        interaction = new BiochemicalReactionImpl();
    } else if (reactionStep instanceof FluxReaction) {
        interaction = new TransportImpl();
    }
    interaction.setName(name);
    interaction.setID("BIOMODEL_" + reactionStep.getName());
    for (Xref ref : xRef) {
        interaction.getxRef().add(ref);
    }
    return interaction;
}
Also used : Xref(org.vcell.pathway.Xref) UnificationXref(org.vcell.pathway.UnificationXref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) SimpleReaction(cbit.vcell.model.SimpleReaction) BiochemicalReactionImpl(org.vcell.pathway.BiochemicalReactionImpl) Interaction(org.vcell.pathway.Interaction) FluxReaction(cbit.vcell.model.FluxReaction) TransportImpl(org.vcell.pathway.TransportImpl)

Aggregations

BiochemicalReactionImpl (org.vcell.pathway.BiochemicalReactionImpl)3 Element (org.jdom.Element)2 BioPaxObject (org.vcell.pathway.BioPaxObject)2 BiochemicalReaction (org.vcell.pathway.BiochemicalReaction)2 TransportWithBiochemicalReaction (org.vcell.pathway.TransportWithBiochemicalReaction)2 FluxReaction (cbit.vcell.model.FluxReaction)1 SimpleReaction (cbit.vcell.model.SimpleReaction)1 Namespace (org.jdom.Namespace)1 GroupObject (org.vcell.pathway.GroupObject)1 Interaction (org.vcell.pathway.Interaction)1 PublicationXref (org.vcell.pathway.PublicationXref)1 RelationshipXref (org.vcell.pathway.RelationshipXref)1 TransportImpl (org.vcell.pathway.TransportImpl)1 UnificationXref (org.vcell.pathway.UnificationXref)1 Xref (org.vcell.pathway.Xref)1