Search in sources :

Example 11 with Control

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

the class PathwayProducerBiopax3 method addContentControl.

// controller 		Pathway 		multiple
// controller 		PhysicalEntity 	multiple
// controlType 	String 			single
// controlled 		Interaction 	single
// controlled 		Pathway 		single
private Element addContentControl(BioPaxObject bpObject, Element element) {
    element = addContentInteraction(bpObject, element);
    Control ob = (Control) bpObject;
    Element tmpElement = null;
    if (ob.getPathwayControllers() != null && ob.getPathwayControllers().size() > 0) {
        List<Pathway> list = ob.getPathwayControllers();
        for (Pathway item : list) {
            tmpElement = new Element("controller", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getPhysicalControllers() != null && ob.getPhysicalControllers().size() > 0) {
        List<PhysicalEntity> list = ob.getPhysicalControllers();
        for (PhysicalEntity item : list) {
            tmpElement = new Element("controller", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getControlType() != null && ob.getControlType().length() > 0) {
        tmpElement = new Element("controlType", bp);
        tmpElement.setAttribute("datatype", schemaString, rdf);
        tmpElement.setText(ob.getControlType());
        element.addContent(tmpElement);
    }
    if (ob.getControlledInteraction() != null) {
        tmpElement = new Element("controlled", bp);
        addIDToProperty(tmpElement, ob.getControlledInteraction());
        mustPrintObject(ob.getControlledInteraction());
        element.addContent(tmpElement);
    }
    if (ob.getControlledPathway() != null) {
        tmpElement = new Element("controlled", bp);
        addIDToProperty(tmpElement, ob.getControlledPathway());
        mustPrintObject(ob.getControlledPathway());
        element.addContent(tmpElement);
    }
    return element;
}
Also used : Control(org.vcell.pathway.Control) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Pathway(org.vcell.pathway.Pathway) Element(org.jdom.Element)

Example 12 with Control

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

the class PathwayReader method addObjectControl.

private Control addObjectControl(Element controlElement) {
    Control control = new Control();
    addAttributes(control, controlElement);
    for (Object child : controlElement.getChildren()) {
        if (child instanceof Element) {
            if (!addContentControl(control, controlElement, (Element) child)) {
                showUnexpected((Element) child, control);
            }
        }
    }
    pathwayModel.add(control);
    return control;
}
Also used : Control(org.vcell.pathway.Control) Element(org.jdom.Element) BioPaxObject(org.vcell.pathway.BioPaxObject)

Aggregations

Control (org.vcell.pathway.Control)12 BioPaxObject (org.vcell.pathway.BioPaxObject)8 PhysicalEntity (org.vcell.pathway.PhysicalEntity)7 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)5 GroupObject (org.vcell.pathway.GroupObject)4 Element (org.jdom.Element)3 Complex (org.vcell.pathway.Complex)3 Conversion (org.vcell.pathway.Conversion)3 SBEntity (org.vcell.pathway.sbpax.SBEntity)3 SBMeasurable (org.vcell.pathway.sbpax.SBMeasurable)3 Dna (org.vcell.pathway.Dna)2 Interaction (org.vcell.pathway.Interaction)2 InteractionParticipant (org.vcell.pathway.InteractionParticipant)2 Pathway (org.vcell.pathway.Pathway)2 Protein (org.vcell.pathway.Protein)2 Rna (org.vcell.pathway.Rna)2 SmallMolecule (org.vcell.pathway.SmallMolecule)2 SBOTerm (org.vcell.pathway.sbo.SBOTerm)2 SBVocabulary (org.vcell.pathway.sbpax.SBVocabulary)2