Search in sources :

Example 1 with SBVocabularyProxy

use of org.vcell.pathway.persistence.BiopaxProxy.SBVocabularyProxy in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectSBVocabulary.

private SBVocabulary addObjectSBVocabulary(Element element) {
    if (element.getChildren().size() == 0) {
        SBVocabularyProxy proxy = new SBVocabularyProxy();
        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("SBVocabulary")) {
                SBVocabulary thingie = addObjectSBVocabulary(childElement);
                pathwayModel.add(thingie);
                return thingie;
            }
        }
    }
    SBVocabulary sbVocabulary = new SBVocabulary();
    addAttributes(sbVocabulary, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentControlledVocabulary(sbVocabulary, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(sbVocabulary);
    return sbVocabulary;
}
Also used : SBVocabulary(org.vcell.pathway.sbpax.SBVocabulary) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) SBVocabularyProxy(org.vcell.pathway.persistence.BiopaxProxy.SBVocabularyProxy)

Aggregations

Element (org.jdom.Element)1 BioPaxObject (org.vcell.pathway.BioPaxObject)1 GroupObject (org.vcell.pathway.GroupObject)1 SBVocabularyProxy (org.vcell.pathway.persistence.BiopaxProxy.SBVocabularyProxy)1 SBVocabulary (org.vcell.pathway.sbpax.SBVocabulary)1