Search in sources :

Example 11 with Complex

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

the class PathwayReaderBiopax3 method addObjectComplex.

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

Example 12 with Complex

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

the class PathwayProducerBiopax3 method addContentComplex.

// componentStoichiometry 	Stoichiometry 		multiple
// component 				PhysicalEntity 		multiple
private Element addContentComplex(BioPaxObject bpObject, Element element) {
    element = addContentPhysicalEntity(bpObject, element);
    Complex ob = (Complex) bpObject;
    Element tmpElement = null;
    if (ob.getComponentStoichiometry() != null && ob.getComponentStoichiometry().size() > 0) {
        List<Stoichiometry> list = ob.getComponentStoichiometry();
        for (Stoichiometry item : list) {
            tmpElement = new Element("componentStoichiometry", bp);
            // if(item instanceof RdfObjectProxy) {
            // tmpElement.setAttribute("resource", ((RdfObjectProxy)item).getResource(), rdf);
            // } else {
            // tmpElement.setAttribute("resource", item.resourceFromID(), rdf);
            // }
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getComponents() != null && ob.getComponents().size() > 0) {
        List<PhysicalEntity> list = ob.getComponents();
        for (PhysicalEntity item : list) {
            tmpElement = new Element("component", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    return element;
}
Also used : Stoichiometry(org.vcell.pathway.Stoichiometry) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Element(org.jdom.Element) Complex(org.vcell.pathway.Complex)

Aggregations

Complex (org.vcell.pathway.Complex)12 BioPaxObject (org.vcell.pathway.BioPaxObject)10 GroupObject (org.vcell.pathway.GroupObject)8 PhysicalEntity (org.vcell.pathway.PhysicalEntity)8 HashSet (java.util.HashSet)6 Protein (org.vcell.pathway.Protein)6 SmallMolecule (org.vcell.pathway.SmallMolecule)6 Element (org.jdom.Element)5 ArrayList (java.util.ArrayList)4 Dna (org.vcell.pathway.Dna)4 Rna (org.vcell.pathway.Rna)4 Control (org.vcell.pathway.Control)3 DnaRegion (org.vcell.pathway.DnaRegion)3 Interaction (org.vcell.pathway.Interaction)3 InteractionParticipant (org.vcell.pathway.InteractionParticipant)3 RnaRegion (org.vcell.pathway.RnaRegion)3 Set (java.util.Set)2 Conversion (org.vcell.pathway.Conversion)2 Entity (org.vcell.pathway.Entity)2 MolecularInteraction (org.vcell.pathway.MolecularInteraction)2