use of org.vcell.pathway.SequenceInterval in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectSequenceLocation.
private SequenceLocation addObjectSequenceLocation(Element element) {
if (element.getChildren().size() == 0) {
// if there are no children it must be a resource inside another object
SequenceLocationProxy proxy = new SequenceLocationProxy();
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("SequenceInterval")) {
SequenceInterval thingie = addObjectSequenceInterval(childElement);
pathwayModel.add(thingie);
return thingie;
}
} else if (child instanceof Element) {
Element childElement = (Element) child;
if (childElement.getName().equals("SequenceSite")) {
SequenceSite thingie = addObjectSequenceSite(childElement);
pathwayModel.add(thingie);
return thingie;
}
}
}
SequenceLocation sequenceLocation = new SequenceLocation();
addAttributes(sequenceLocation, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentSequenceLocation(sequenceLocation, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(sequenceLocation);
return sequenceLocation;
}
use of org.vcell.pathway.SequenceInterval in project vcell by virtualcell.
the class PathwayReaderBiopax3 method addObjectSequenceInterval.
private SequenceInterval addObjectSequenceInterval(Element element) {
SequenceInterval sequenceInterval = new SequenceInterval();
addAttributes(sequenceInterval, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentSequenceInterval(sequenceInterval, element, childElement)) {
showUnexpected(childElement);
}
}
}
pathwayModel.add(sequenceInterval);
return sequenceInterval;
}
use of org.vcell.pathway.SequenceInterval in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentSequenceInterval.
// sequenceIntervalBegin SequenceSite single
// sequenceIntervalEnd SequenceSite single
private Element addContentSequenceInterval(BioPaxObject bpObject, Element element) {
element = addContentSequenceLocation(bpObject, element);
SequenceInterval ob = (SequenceInterval) bpObject;
Element tmpElement = null;
if (ob.getSequenceIntervalBegin() != null) {
tmpElement = new Element("sequenceIntervalBegin", bp);
addIDToProperty(tmpElement, ob.getSequenceIntervalBegin());
mustPrintObject(ob.getSequenceIntervalBegin());
element.addContent(tmpElement);
}
if (ob.getSequenceIntervalEnd() != null) {
tmpElement = new Element("sequenceIntervalEnd", bp);
addIDToProperty(tmpElement, ob.getSequenceIntervalEnd());
mustPrintObject(ob.getSequenceIntervalEnd());
element.addContent(tmpElement);
}
return element;
}
use of org.vcell.pathway.SequenceInterval in project vcell by virtualcell.
the class PathwayReader method addObjectSequenceInterval.
private SequenceInterval addObjectSequenceInterval(Element element) {
SequenceInterval sequenceInterval = new SequenceInterval();
addAttributes(sequenceInterval, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentSequenceInterval(sequenceInterval, element, childElement)) {
showUnexpected(childElement, sequenceInterval);
}
}
}
pathwayModel.add(sequenceInterval);
return sequenceInterval;
}
Aggregations