use of org.vcell.pathway.persistence.BiopaxProxy.PhysicalEntityProxy in project vcell by virtualcell.
the class PathwayReader method addContentControl.
private boolean addContentControl(Control control, Element element, Element childElement) {
if (addContentInteraction(control, element, childElement)) {
return true;
}
/**
* InteractionImpl controlledInteraction
* Pathway controlledPathway
* String controlType
* ArrayList<Pathway> pathwayControllers
* ArrayList<PhysicalEntity> physicalControllers
*/
if (childElement.getName().equals("CONTROLLER")) {
Element physicalEntityParticipantElement = childElement.getChild("physicalEntityParticipant", bp);
if (physicalEntityParticipantElement != null) {
Element physicalEntityPropertyElement = physicalEntityParticipantElement.getChild("PHYSICAL-ENTITY", bp);
if (physicalEntityPropertyElement != null) {
if (physicalEntityPropertyElement.getChildren().size() == 0) {
PhysicalEntityProxy physicalEntityProxy = new PhysicalEntityProxy();
addAttributes(physicalEntityProxy, physicalEntityPropertyElement);
pathwayModel.add(physicalEntityProxy);
control.addPhysicalController(physicalEntityProxy);
return true;
}
}
}
Element sequenceParticipantElement = childElement.getChild("sequenceParticipant", bp);
if (sequenceParticipantElement != null) {
Element physicalEntityPropertyElement = sequenceParticipantElement.getChild("PHYSICAL-ENTITY", bp);
if (physicalEntityPropertyElement != null) {
if (physicalEntityPropertyElement.getChildren().size() == 0) {
PhysicalEntityProxy physicalEntityProxy = new PhysicalEntityProxy();
addAttributes(physicalEntityProxy, physicalEntityPropertyElement);
pathwayModel.add(physicalEntityProxy);
control.addPhysicalController(physicalEntityProxy);
return true;
}
}
}
// }
return false;
// // is it a pathway controller?
// control.getPathwayControllers().add(addPathway(childElement));
} else if (childElement.getName().equals("CONTROLLED")) {
Attribute resourceAttribute = childElement.getAttribute("resource", rdf);
if (resourceAttribute != null) {
InteractionOrPathwayProxy controlledEntityProxy = new InteractionOrPathwayProxy();
control.setControlledInteraction(controlledEntityProxy);
pathwayModel.add(controlledEntityProxy);
String uri = context.unRelativizeURI(childElement, resourceAttribute.getValue());
controlledEntityProxy.setID(uri);
return true;
}
return false;
} else if (childElement.getName().equals("CONTROL-TYPE")) {
control.setControlType(childElement.getTextTrim());
return true;
} else {
return false;
}
}
Aggregations