use of org.vcell.pathway.Evidence in project vcell by virtualcell.
the class PathwayReader method addObjectEvidence.
private Evidence addObjectEvidence(Element element) {
if (element.getName().equals("EVIDENCE")) {
Element evidenceChild = element.getChild("evidence", bp);
if (evidenceChild != null) {
element = evidenceChild;
}
}
Evidence evidence = new Evidence();
addAttributes(evidence, element);
for (Object child : element.getChildren()) {
if (child instanceof Element) {
Element childElement = (Element) child;
if (!addContentEvidence(evidence, element, childElement)) {
showUnexpected(childElement, evidence);
}
}
}
pathwayModel.add(evidence);
return evidence;
}
use of org.vcell.pathway.Evidence in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentPathwayStep.
// stepProcess Interaction multiple
// stepProcess Pathway multiple
// nextStep PathwayStep multiple
// evidence Evidence multiple
private Element addContentPathwayStep(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
PathwayStep ob = (PathwayStep) bpObject;
Element tmpElement = null;
if (ob.getStepProcessInteraction() != null && ob.getStepProcessInteraction().size() > 0) {
List<Interaction> list = ob.getStepProcessInteraction();
for (Interaction item : list) {
tmpElement = new Element("stepProcess", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getStepProcessPathway() != null && ob.getStepProcessPathway().size() > 0) {
List<Pathway> list = ob.getStepProcessPathway();
for (Pathway item : list) {
tmpElement = new Element("stepProcess", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getNextStep() != null && ob.getNextStep().size() > 0) {
List<PathwayStep> list = ob.getNextStep();
for (PathwayStep item : list) {
tmpElement = new Element("nextStep", 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.Evidence in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentEntity.
// dataSource Provenance multiple
// availability String multiple
// name String multiple
// xref Xref multiple
// evidence Evidence multiple
private Element addContentEntity(BioPaxObject bpObject, Element element) {
element = addContentBioPaxObject(bpObject, element);
Entity ob = (Entity) bpObject;
Element tmpElement = null;
if (ob.getDataSource() != null && ob.getDataSource().size() > 0) {
ArrayList<Provenance> list = ob.getDataSource();
for (Provenance item : list) {
tmpElement = new Element("dataSource", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getAvailability() != null && ob.getAvailability().size() > 0) {
ArrayList<String> list = ob.getAvailability();
for (String item : list) {
tmpElement = new Element("availability", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(item);
element.addContent(tmpElement);
}
}
if (ob.getName() != null && ob.getName().size() > 0) {
ArrayList<String> list = ob.getName();
for (String item : list) {
tmpElement = new Element("name", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(item);
element.addContent(tmpElement);
}
}
if (ob.getxRef() != null && ob.getxRef().size() > 0) {
ArrayList<Xref> list = ob.getxRef();
for (Xref item : list) {
String elementName = "xref";
tmpElement = new Element(elementName, bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEvidence() != null && ob.getEvidence().size() > 0) {
ArrayList<Evidence> list = ob.getEvidence();
for (Evidence item : list) {
tmpElement = new Element("evidence", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getSBSubEntity() != null && ob.getSBSubEntity().size() > 0) {
ArrayList<SBEntity> list = ob.getSBSubEntity();
for (SBEntity item : list) {
tmpElement = new Element("sbSubEntity", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
return element;
}
use of org.vcell.pathway.Evidence in project vcell by virtualcell.
the class PathwayProducerBiopax3 method addContentEntityReference.
// memberEntityReference EntityReference multiple
// entityReferenceType EntityReferenceTypeVocabulary single
// entityFeature EntityFeature multiple
// name String multiple
// xref Xref multiple
// evidence Evidence multiple
private Element addContentEntityReference(BioPaxObject bpObject, Element element) {
element = addContentUtilityClass(bpObject, element);
EntityReference ob = (EntityReference) bpObject;
Element tmpElement = null;
if (ob.getMemberEntityReference() != null && ob.getMemberEntityReference().size() > 0) {
List<EntityReference> list = ob.getMemberEntityReference();
for (EntityReference item : list) {
tmpElement = new Element("memberEntityReference", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getEntityReferenceType() != null) {
tmpElement = new Element("entityReferenceType", bp);
addIDToProperty(tmpElement, ob.getEntityReferenceType());
mustPrintObject(ob.getEntityReferenceType());
element.addContent(tmpElement);
}
if (ob.getEntityFeature() != null && ob.getEntityFeature().size() > 0) {
List<EntityFeature> list = ob.getEntityFeature();
for (EntityFeature item : list) {
tmpElement = new Element("entityFeature", bp);
addIDToProperty(tmpElement, item);
mustPrintObject(item);
element.addContent(tmpElement);
}
}
if (ob.getName() != null && ob.getName().size() > 0) {
List<String> list = ob.getName();
for (String item : list) {
tmpElement = new Element("name", bp);
tmpElement.setAttribute("datatype", schemaString, rdf);
tmpElement.setText(item);
element.addContent(tmpElement);
}
}
if (ob.getxRef() != null && ob.getxRef().size() > 0) {
List<Xref> list = ob.getxRef();
for (Xref item : list) {
tmpElement = new Element("xref", 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.Evidence 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;
}
Aggregations