Search in sources :

Example 1 with ControlledVocabulary

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

the class PathwayProducerBiopax3 method addContentControlledVocabulary.

// term	String		multiple
// xref	Xref		multiple
private Element addContentControlledVocabulary(BioPaxObject bpObject, Element element) {
    element = addContentUtilityClass(bpObject, element);
    ControlledVocabulary ob = (ControlledVocabulary) bpObject;
    Element tmpElement = null;
    if (ob.getxRef() != null && ob.getxRef().size() > 0) {
        List<Xref> list = ob.getxRef();
        for (Xref item : list) {
            tmpElement = new Element("xref", bp);
            addIDToProperty(tmpElement, item);
            mustPrintObject(item);
            element.addContent(tmpElement);
        }
    }
    if (ob.getTerm() != null && ob.getTerm().size() > 0) {
        List<String> list = ob.getTerm();
        for (String item : list) {
            tmpElement = new Element("term", bp);
            tmpElement.setAttribute("datatype", schemaString, rdf);
            tmpElement.setText(item);
            element.addContent(tmpElement);
        }
    }
    return element;
}
Also used : ControlledVocabulary(org.vcell.pathway.ControlledVocabulary) Xref(org.vcell.pathway.Xref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) Element(org.jdom.Element) PathwayXMLHelper.schemaString(org.vcell.pathway.PathwayXMLHelper.schemaString)

Example 2 with ControlledVocabulary

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

the class PathwayReaderBiopax3 method addObjectControlledVocabulary.

private ControlledVocabulary addObjectControlledVocabulary(Element element) {
    ControlledVocabulary controlledVocabulary = new ControlledVocabulary();
    addAttributes(controlledVocabulary, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentControlledVocabulary(controlledVocabulary, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(controlledVocabulary);
    return controlledVocabulary;
}
Also used : ControlledVocabulary(org.vcell.pathway.ControlledVocabulary) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject)

Example 3 with ControlledVocabulary

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

the class PathwayReader method addObjectControlledVocabulary.

private ControlledVocabulary addObjectControlledVocabulary(Element element) {
    ControlledVocabulary controlledVocabulary = new ControlledVocabulary();
    addAttributes(controlledVocabulary, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentControlledVocabulary(controlledVocabulary, element, childElement)) {
                showUnexpected(childElement, controlledVocabulary);
            }
        }
    }
    pathwayModel.add(controlledVocabulary);
    return controlledVocabulary;
}
Also used : ControlledVocabulary(org.vcell.pathway.ControlledVocabulary) Element(org.jdom.Element) BioPaxObject(org.vcell.pathway.BioPaxObject)

Aggregations

Element (org.jdom.Element)3 ControlledVocabulary (org.vcell.pathway.ControlledVocabulary)3 BioPaxObject (org.vcell.pathway.BioPaxObject)2 GroupObject (org.vcell.pathway.GroupObject)1 PathwayXMLHelper.schemaString (org.vcell.pathway.PathwayXMLHelper.schemaString)1 PublicationXref (org.vcell.pathway.PublicationXref)1 RelationshipXref (org.vcell.pathway.RelationshipXref)1 Xref (org.vcell.pathway.Xref)1