use of org.vcell.pathway.SequenceLocation 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.SequenceLocation in project vcell by virtualcell.
the class PathwayReader method addObjectSequenceLocation.
private SequenceLocation addObjectSequenceLocation(Element element) {
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, sequenceLocation);
}
}
}
pathwayModel.add(sequenceLocation);
return sequenceLocation;
}
use of org.vcell.pathway.SequenceLocation in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentEntityFeature.
// featureLocation SequenceLocation multiple
// featureLocationType SequenceRegionVocabulary multiple
// memberFeature EntityFeature multiple
// evidence Evidence multiple
private Element addContentEntityFeature(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
EntityFeature ob = (EntityFeature) bpObject;
Element tmpElement = null;
if (ob.getFeatureLocation() != null && ob.getFeatureLocation().size() > 0) {
List<SequenceLocation> list = ob.getFeatureLocation();
for (SequenceLocation item : list) {
tmpElement = new Element("featureLocation", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getFeatureLocationType() != null && ob.getFeatureLocationType().size() > 0) {
List<SequenceRegionVocabulary> list = ob.getFeatureLocationType();
for (SequenceRegionVocabulary item : list) {
tmpElement = new Element("featureLocationType", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getMemberFeature() != null && ob.getMemberFeature().size() > 0) {
List<EntityFeature> list = ob.getMemberFeature();
for (EntityFeature item : list) {
tmpElement = new Element("memberFeature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEvidence() != null && ob.getEvidence().size() > 0) {
List<Evidence> list = ob.getEvidence();
for (Evidence item : list) {
tmpElement = new Element("evidence", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.SequenceLocation in project vcell by virtualcell.
the class MatcheableTest method null2.
@Test
public void null2() {
TimeStep t = null;
SequenceLocation sl = null;
assertTrue(Matchable.areEqual(t, t));
assertTrue(Matchable.areEqual(t, sl));
assertTrue(Matchable.areEqual(t, null));
}
Aggregations