Search in sources :

Example 1 with Evidence

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;
}
Also used : Element(org.jdom.Element) Evidence(org.vcell.pathway.Evidence) BioPaxObject(org.vcell.pathway.BioPaxObject)

Example 2 with 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;
}
Also used : BiochemicalPathwayStep(org.vcell.pathway.BiochemicalPathwayStep) PathwayStep(org.vcell.pathway.PathwayStep) Interaction(org.vcell.pathway.Interaction) MolecularInteraction(org.vcell.pathway.MolecularInteraction) GeneticInteraction(org.vcell.pathway.GeneticInteraction) Pathway(org.vcell.pathway.Pathway) Element(org.jdom.Element) Evidence(org.vcell.pathway.Evidence)

Example 3 with Evidence

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;
}
Also used : SBEntity(org.vcell.pathway.sbpax.SBEntity) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Entity(org.vcell.pathway.Entity) Provenance(org.vcell.pathway.Provenance) Xref(org.vcell.pathway.Xref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) Element(org.jdom.Element) Evidence(org.vcell.pathway.Evidence) PathwayXMLHelper.schemaString(org.vcell.pathway.PathwayXMLHelper.schemaString) SBEntity(org.vcell.pathway.sbpax.SBEntity)

Example 4 with Evidence

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;
}
Also used : EntityFeature(org.vcell.pathway.EntityFeature) Xref(org.vcell.pathway.Xref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) Element(org.jdom.Element) EntityReference(org.vcell.pathway.EntityReference) Evidence(org.vcell.pathway.Evidence) PathwayXMLHelper.schemaString(org.vcell.pathway.PathwayXMLHelper.schemaString)

Example 5 with Evidence

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;
}
Also used : EntityFeature(org.vcell.pathway.EntityFeature) Element(org.jdom.Element) SequenceLocation(org.vcell.pathway.SequenceLocation) Evidence(org.vcell.pathway.Evidence) SequenceRegionVocabulary(org.vcell.pathway.SequenceRegionVocabulary)

Aggregations

Element (org.jdom.Element)8 Evidence (org.vcell.pathway.Evidence)8 BioPaxObject (org.vcell.pathway.BioPaxObject)2 EntityFeature (org.vcell.pathway.EntityFeature)2 PathwayXMLHelper.schemaString (org.vcell.pathway.PathwayXMLHelper.schemaString)2 PublicationXref (org.vcell.pathway.PublicationXref)2 RelationshipXref (org.vcell.pathway.RelationshipXref)2 Xref (org.vcell.pathway.Xref)2 BiochemicalPathwayStep (org.vcell.pathway.BiochemicalPathwayStep)1 Entity (org.vcell.pathway.Entity)1 EntityReference (org.vcell.pathway.EntityReference)1 GeneticInteraction (org.vcell.pathway.GeneticInteraction)1 GroupObject (org.vcell.pathway.GroupObject)1 Interaction (org.vcell.pathway.Interaction)1 MolecularInteraction (org.vcell.pathway.MolecularInteraction)1 Pathway (org.vcell.pathway.Pathway)1 PathwayStep (org.vcell.pathway.PathwayStep)1 PhysicalEntity (org.vcell.pathway.PhysicalEntity)1 Provenance (org.vcell.pathway.Provenance)1 SequenceLocation (org.vcell.pathway.SequenceLocation)1