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