Search in sources :

Example 1 with BindingFeature

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

the class PathwayProducerBiopax3 method addContentBindingFeature.

// intraMolecular 	Boolean 		single
// bindsTo 		BindingFeature 	single
private Element addContentBindingFeature(BioPaxObject bpObject, Element element) {
    element = addContentEntityFeature(bpObject, element);
    BindingFeature ob = (BindingFeature) 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);
    }
    return element;
}
Also used : CovalentBindingFeature(org.vcell.pathway.CovalentBindingFeature) BindingFeature(org.vcell.pathway.BindingFeature) Element(org.jdom.Element)

Example 2 with BindingFeature

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

the class PathwayReader method addObjectBindingFeature.

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

Example 3 with BindingFeature

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

the class PathwayReaderBiopax3 method addObjectEntityFeature.

private EntityFeature addObjectEntityFeature(Element element) {
    if (element.getChildren().size() == 0) {
        EntityFeatureProxy proxy = new EntityFeatureProxy();
        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("BindingFeature")) {
                BindingFeature thingie = addObjectBindingFeature(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("FragmentFeature")) {
                FragmentFeature thingie = addObjectFragmentFeature(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("ModificationFeature")) {
                ModificationFeature thingie = addObjectModificationFeature(childElement);
                pathwayModel.add(thingie);
                return thingie;
            }
        }
    }
    EntityFeature entityFeature = new EntityFeatureImpl();
    addAttributes(entityFeature, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentEntityFeature(entityFeature, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(entityFeature);
    return entityFeature;
}
Also used : CovalentBindingFeature(org.vcell.pathway.CovalentBindingFeature) BindingFeature(org.vcell.pathway.BindingFeature) FragmentFeature(org.vcell.pathway.FragmentFeature) EntityFeature(org.vcell.pathway.EntityFeature) EntityFeatureProxy(org.vcell.pathway.persistence.BiopaxProxy.EntityFeatureProxy) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) ModificationFeature(org.vcell.pathway.ModificationFeature) EntityFeatureImpl(org.vcell.pathway.EntityFeatureImpl)

Example 4 with BindingFeature

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

the class PathwayReaderBiopax3 method addObjectBindingFeature.

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

Aggregations

Element (org.jdom.Element)4 BindingFeature (org.vcell.pathway.BindingFeature)4 CovalentBindingFeature (org.vcell.pathway.CovalentBindingFeature)4 BioPaxObject (org.vcell.pathway.BioPaxObject)3 BindingFeatureImpl (org.vcell.pathway.BindingFeatureImpl)2 GroupObject (org.vcell.pathway.GroupObject)2 EntityFeature (org.vcell.pathway.EntityFeature)1 EntityFeatureImpl (org.vcell.pathway.EntityFeatureImpl)1 FragmentFeature (org.vcell.pathway.FragmentFeature)1 ModificationFeature (org.vcell.pathway.ModificationFeature)1 EntityFeatureProxy (org.vcell.pathway.persistence.BiopaxProxy.EntityFeatureProxy)1