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;
}
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;
}
Aggregations