Search in sources :

Example 1 with SequenceRegionVocabulary

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;
}
Also used : Element(org.jdom.Element) SequenceRegionVocabularyProxy(org.vcell.pathway.persistence.BiopaxProxy.SequenceRegionVocabularyProxy) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) SequenceRegionVocabulary(org.vcell.pathway.SequenceRegionVocabulary)

Example 2 with 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;
}
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)

Example 3 with SequenceRegionVocabulary

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

Aggregations

Element (org.jdom.Element)3 SequenceRegionVocabulary (org.vcell.pathway.SequenceRegionVocabulary)3 BioPaxObject (org.vcell.pathway.BioPaxObject)2 EntityFeature (org.vcell.pathway.EntityFeature)1 Evidence (org.vcell.pathway.Evidence)1 GroupObject (org.vcell.pathway.GroupObject)1 SequenceLocation (org.vcell.pathway.SequenceLocation)1 SequenceRegionVocabularyProxy (org.vcell.pathway.persistence.BiopaxProxy.SequenceRegionVocabularyProxy)1