wiki:GritsGlycovaultManager

Glycovault Manager

This page documents the Glycovault Manager plugin. Glycovault Manager Plugin is meant to manage the three basic things in Glycovault :

  • SimpleType (vaguely similar to Descriptor in Grits)
  • GroupType (vaguely similar to DescriptorGroup in Grits)
  • PhysicalObjectType (vaguely similar to Template in Grits)
  • SourceSample (vaguely similar to Component Grits)

The main GlycovaultManager class inherits FormEditor and consists of three pages

  • SimpleTypeManagementPage
  • GroupTypeManagementPage
  • PhysicalObjectTypeManagementPage
  • SourceSampleManagementPage

All the above pages inherits AbstractGlycovaultManagementPage which in turn inherits AbstractmanagementPage from Sample Manager in the sample plugin.

Similar to SampleManager, this also has the same architecture where the RightSideSection is the parent class of RightSideSectionGlycoVault. This RightSideSectionGlycoVault has additional field called GlycovaultObjectWithFeatures[] cachedObjects and overwrites public void setSelectedObject(ClassesWithFeatures selectedObject). While selecting the object for right side display it checks if the selected object was stored in cache or else downloads it from glycaovault and stores it in the cache. the checking for cache is only done for objects which have already been submitted to the Glycovault and are not editable anymore. The following piece of code is added here :

    public void setSelectedObject(ClassesWithFeatures selectedObject)
    {
        
        if(selectedObject != null)
        {
            this.editable = selectedObject.isEditable();
            if(!this.editable)
            {
                String selectedObjectName = selectedObject.getLabel(); 
                this.selectedObject = getSelectedObjectFromCache(selectedObjectName);
                if(this.selectedObject == null)
                {
                    this.selectedObject = downloadSelectedObject(selectedObjectName);
                    if(this.selectedObject != null)
                    {
                        storeSelectedObjectInCache(this.selectedObject);
                    }
                    else
                    {
                        MessageDialog.openWarning(page.getManagedForm().getForm().getShell(), "Download Problem", 
                                "Could not download the selected item from the server : "
                                        + selectedObjectName);
                        this.selectedObject = selectedObject;
                    }
                }
            }
            else
            {
                this.selectedObject = selectedObject;
            }
            this.reset();
        }
        else
        {
            rightSideSection.setText(Config.GLYCOVAULT_NO_SELECTION_TITLE);
            rightSideSection.setExpanded(false);
        }
    }

RightSideSectionGlycoVault is further inherited by RightSideSimpleTypeSection, RightSideGroupTypeSection, RightSidePhysicalObjectTypeSection and RightSideSourceSampleSection. Each of these classes have their own implementation for downloading the selectedObject (by using its name) and submit action for submitting their respective items.

RightSideSourceSampleSection

Relation between PhysicalObjectType and List of Descriptors in the Sample. One can preload the list of descriptors into the tree that displays its "isDescribedBy" members. One can add only the descriptors with DescriptorType that are members of the selected PhysicalObjectType. If the descriptorType is not there in the physicalObjectType then user decides if the he/she wants to keep the template or else can cancel the addition of this new descriptor.

Last modified 9 years ago Last modified on 11/07/2014 12:39:56 AM