Search in sources :

Example 1 with RelationshipTypeVocabulary

use of org.vcell.pathway.RelationshipTypeVocabulary in project vcell by virtualcell.

the class PathwayProducerBiopax3 method addContentRelationshipXref.

private Element addContentRelationshipXref(BioPaxObject bpObject, Element element) {
    element = addContentXref(bpObject, element);
    RelationshipXref ob = (RelationshipXref) bpObject;
    Element tmpElement = null;
    if (ob.getRelationshipType() != null && ob.getRelationshipType().size() > 0) {
        ArrayList<RelationshipTypeVocabulary> list = ob.getRelationshipType();
        for (RelationshipTypeVocabulary item : list) {
            tmpElement = new Element("relationshipType", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    return element;
}
Also used : Element(org.jdom.Element) RelationshipTypeVocabulary(org.vcell.pathway.RelationshipTypeVocabulary) RelationshipXref(org.vcell.pathway.RelationshipXref)

Example 2 with RelationshipTypeVocabulary

use of org.vcell.pathway.RelationshipTypeVocabulary in project vcell by virtualcell.

the class PathwayReader method addObjectRelationshipTypeVocabulary.

private RelationshipTypeVocabulary addObjectRelationshipTypeVocabulary(Element element) {
    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, relationshipTypeVocabulary);
            }
        }
    }
    pathwayModel.add(relationshipTypeVocabulary);
    return relationshipTypeVocabulary;
}
Also used : Element(org.jdom.Element) RelationshipTypeVocabulary(org.vcell.pathway.RelationshipTypeVocabulary) BioPaxObject(org.vcell.pathway.BioPaxObject)

Example 3 with RelationshipTypeVocabulary

use of org.vcell.pathway.RelationshipTypeVocabulary 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)3 RelationshipTypeVocabulary (org.vcell.pathway.RelationshipTypeVocabulary)3 BioPaxObject (org.vcell.pathway.BioPaxObject)2 GroupObject (org.vcell.pathway.GroupObject)1 RelationshipXref (org.vcell.pathway.RelationshipXref)1 RelationshipTypeVocabularyProxy (org.vcell.pathway.persistence.BiopaxProxy.RelationshipTypeVocabularyProxy)1