Search in sources :

Example 1 with CovalentBindingFeature

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

the class PathwayReaderBiopax3 method addObjectCovalentBindingFeature.

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

Example 2 with CovalentBindingFeature

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

the class PathwayProducerBiopax3 method addContentCovalentBindingFeature.

// if child of ModificationFeature element:
// intraMolecular 	Boolean 						single
// bindsTo 		BindingFeature 					single
// if child of BindingFeature element:
// modificationType 	SequenceModificationVocabulary 	single
private Element addContentCovalentBindingFeature(BioPaxObject bpObject, Element element) {
    // we fill all 3 fields regardless of parent, final object will be valid either way
    element = addContentEntityFeature(bpObject, element);
    CovalentBindingFeature ob = (CovalentBindingFeature) bpObject;
    Element tmpElement = null;
    if (ob.getIntraMolecular() != null) {
        tmpElement = new Element("intraMolecular", bp);
        tmpElement.setAttribute("datatype", schemaBoolean, rdf);
        tmpElement.setText(ob.getIntraMolecular().toString());
        element.addContent(tmpElement);
    }
    if (ob.getBindsTo() != null) {
        tmpElement = new Element("bindsTo", bp);
        addIDToProperty(tmpElement, ob.getBindsTo());
        mustPrintObject(ob.getBindsTo());
        element.addContent(tmpElement);
    }
    if (ob.getModificationType() != null) {
        tmpElement = new Element("modificationType", bp);
        addIDToProperty(tmpElement, ob.getModificationType());
        mustPrintObject(ob.getModificationType());
        element.addContent(tmpElement);
    }
    return element;
}
Also used : CovalentBindingFeature(org.vcell.pathway.CovalentBindingFeature) Element(org.jdom.Element)

Example 3 with CovalentBindingFeature

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

the class PathwayReader method addObjectCovalentBindingFeature.

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

Aggregations

Element (org.jdom.Element)3 CovalentBindingFeature (org.vcell.pathway.CovalentBindingFeature)3 BioPaxObject (org.vcell.pathway.BioPaxObject)2 GroupObject (org.vcell.pathway.GroupObject)1