use of org.vcell.pathway.persistence.BiopaxProxy.XrefProxy in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectXref.
private Xref addObjectXref(Element element) {
Namespace bp = Namespace.getNamespace("bp", "http://www.biopax.org/release/biopax-level3.owl#");
if (element.getChild("UnificationXref", bp) != null) {
UnificationXref xref = addObjectUnificationXref(element.getChild("UnificationXref", bp));
return xref;
}
if (element.getChild("RelationshipXref", bp) != null) {
RelationshipXref xref = addObjectRelationshipXref(element.getChild("RelationshipXref", bp));
return xref;
}
if (element.getChild("PublicationXref", bp) != null) {
PublicationXref xref = addObjectPublicationXref(element.getChild("PublicationXref", bp));
return xref;
}
if (element.getChildren().size() == 0) {
XrefProxy xref = new XrefProxy();
addAttributes(xref, element);
pathwayModel.add(xref);
return xref;
} else {
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
showUnexpected(childElement);
}
}
Xref xref = new Xref();
pathwayModel.add(xref);
System.out.println("should never happen");
return xref;
}
}
use of org.vcell.pathway.persistence.BiopaxProxy.XrefProxy in project vcell by virtualcell.
the class PathwayReader method addObjectXref.
private Xref addObjectXref(Element element) {
Namespace bp = Namespace.getNamespace("bp", "http://www.biopax.org/release/biopax-level2.owl#");
if (element.getChild("unificationXref", bp) != null) {
UnificationXref xref = addObjectUnificationXref(element.getChild("unificationXref", bp));
return xref;
}
if (element.getChild("relationshipXref", bp) != null) {
RelationshipXref xref = addObjectRelationshipXref(element.getChild("relationshipXref", bp));
return xref;
}
if (element.getChild("publicationXref", bp) != null) {
PublicationXref xref = addObjectPublicationXref(element.getChild("publicationXref", bp));
return xref;
}
if (element.getChildren().size() == 0) {
XrefProxy xref = new XrefProxy();
addAttributes(xref, element);
pathwayModel.add(xref);
return xref;
} else {
Xref xref = new Xref();
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentXref(xref, element, childElement)) {
showUnexpected(childElement, xref);
}
}
}
pathwayModel.add(xref);
System.out.println("should never happen");
return xref;
}
}
Aggregations