Search in sources :

Example 1 with RelationshipTypeVocabularyProxy

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

the class PathwayReaderBiopax3 method addObjectRelationshipTypeVocabulary.

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

Aggregations

Element (org.jdom.Element)1 BioPaxObject (org.vcell.pathway.BioPaxObject)1 GroupObject (org.vcell.pathway.GroupObject)1 RelationshipTypeVocabulary (org.vcell.pathway.RelationshipTypeVocabulary)1 RelationshipTypeVocabularyProxy (org.vcell.pathway.persistence.BiopaxProxy.RelationshipTypeVocabularyProxy)1