use of org.vcell.pathway.persistence.BiopaxProxy.BioSourceProxy in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectBioSource.
private BioSource addObjectBioSource(Element element) {
if (element.getChildren().size() == 0) {
BioSourceProxy proxy = new BioSourceProxy();
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("BioSource")) {
BioSource thingie = addObjectBioSource(childElement);
pathwayModel.add(thingie);
return thingie;
}
}
}
BioSource bioSource = new BioSource();
addAttributes(bioSource, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentBioSource(bioSource, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(bioSource);
return bioSource;
}
Aggregations