use of org.vcell.pathway.persistence.BiopaxProxy.ProvenanceProxy in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectProvenance.
private Provenance addObjectProvenance(Element element) {
if (element.getChildren().size() == 0) {
// if there are no children it must be a resource inside another object
ProvenanceProxy proxy = new ProvenanceProxy();
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("Provenance")) {
Provenance thingie = addObjectProvenance(childElement);
pathwayModel.add(thingie);
return thingie;
}
}
}
Provenance provenance = new Provenance();
addAttributes(provenance, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentProvenance(provenance, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(provenance);
return provenance;
}
Aggregations