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