Search in sources :

Example 1 with SequenceRegionVocabularyProxy

use of org.vcell.pathway.persistence.BiopaxProxy.SequenceRegionVocabularyProxy 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)

Aggregations

Element (org.jdom.Element)1 BioPaxObject (org.vcell.pathway.BioPaxObject)1 GroupObject (org.vcell.pathway.GroupObject)1 SequenceRegionVocabulary (org.vcell.pathway.SequenceRegionVocabulary)1 SequenceRegionVocabularyProxy (org.vcell.pathway.persistence.BiopaxProxy.SequenceRegionVocabularyProxy)1