use of org.vcell.pathway.persistence.BiopaxProxy.SBEntityProxy in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectSBEntity.
// ---------------- addObject section ---------------------
//
private SBEntity addObjectSBEntity(Element element) {
if (element.getChildren().size() == 0) {
SBEntityProxy proxy = new SBEntityProxy();
addAttributes(proxy, element);
pathwayModel.add(proxy);
return proxy;
}
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (childElement.getName().equals("SBMeasurable")) {
SBMeasurable thingie = addObjectSBMeasurable(childElement);
pathwayModel.add(thingie);
return thingie;
} else if (childElement.getName().equals("SBState")) {
SBState thingie = addObjectSBState(childElement);
pathwayModel.add(thingie);
return thingie;
}
}
}
SBEntity sbSubEntity = new SBEntityImpl();
if (element.getAttributes().size() > 0) {
addAttributes(sbSubEntity, element);
}
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentSBEntity(sbSubEntity, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(sbSubEntity);
return sbSubEntity;
}
Aggregations