Search in sources :

Example 1 with ModificationFeature

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

the class PathwayReaderBiopax3 method addObjectModificationFeature.

private ModificationFeature addObjectModificationFeature(Element element) {
    ModificationFeature modificationFeature = new ModificationFeatureImpl();
    addAttributes(modificationFeature, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentModificationFeature(modificationFeature, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(modificationFeature);
    return modificationFeature;
}
Also used : ModificationFeatureImpl(org.vcell.pathway.ModificationFeatureImpl) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) ModificationFeature(org.vcell.pathway.ModificationFeature)

Example 2 with ModificationFeature

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

the class PathwayProducerBiopax3 method addContentModificationFeature.

// modificationType 	SequenceModificationVocabulary 	single
private Element addContentModificationFeature(BioPaxObject bpObject, Element element) {
    element = addContentEntityFeature(bpObject, element);
    ModificationFeature ob = (ModificationFeature) bpObject;
    Element tmpElement = null;
    if (ob.getModificationType() != null) {
        tmpElement = new Element("modificationType", bp);
        addIDToProperty(tmpElement, ob.getModificationType());
        mustPrintObject(ob.getModificationType());
        element.addContent(tmpElement);
    }
    return element;
}
Also used : Element(org.jdom.Element) ModificationFeature(org.vcell.pathway.ModificationFeature)

Example 3 with ModificationFeature

use of org.vcell.pathway.ModificationFeature 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)

Aggregations

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