Class GeneSetController

java.lang.Object
ubic.gemma.web.controller.genome.gene.GeneSetController

@Controller @RequestMapping("/geneSet") public class GeneSetController extends Object
Exposes GeneSetServices methods over ajax. Some methods take and return collections to be compatible with Store interfaces (which, as of May 2014, we do not use)
Author:
kelsey
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject
    addSessionGroup(ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject gsvo, Boolean modificationBased)
    * AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.
    Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject>
    addSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> geneSetVos, Boolean modificationBased)
    Deprecated. 
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    addUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> geneSetVos)
    AJAX adds the gene group to the session
    canCurrentUserEditGroup(ubic.gemma.model.genome.gene.GeneSetValueObject gsvo)
    AJAX returns a JSON string encoding whether the current user owns the group and whether the group is db-backed
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    create(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> geneSetVos)
    AJAX create an entities in the database based on the value objects passed in
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    Given a Gemma Gene Id will find all gene groups that the current user is allowed to use
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    findGeneSetsByName(String query, Long taxonId)
     
    AJAX
    Collection<ubic.gemma.model.genome.gene.GeneValueObject>
    getGenesInGroup(Long groupId, Integer limit)
    AJAX If the current user has access to given gene group, will return the gene value objects in the gene group
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    getUserAndSessionGeneGroups(boolean privateOnly, Long taxonId)
    AJAX Returns the current users gene sets as well as their session gene sets
    Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject>
    getUserSessionGeneGroups(boolean privateOnly, Long taxonId)
    AJAX Returns just the current users gene sets
    Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject>
    getUsersGeneGroups(boolean privateOnly, Long taxonId)
    AJAX Returns just the current users gene sets
    ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject
    load(Long id)
    AJAX - load with the IDs filled in
    Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject>
    remove(Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> vos)
    AJAX Given a valid gene group will remove it from db (if the user has permissons to do so).
    Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject>
    removeSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> vos)
    Deprecated. 
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    removeUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> vos)
    AJAX Given valid gene groups will remove them from the session or the database appropriately.
    org.springframework.web.servlet.ModelAndView
    If the current user has access to given gene group will return the gene ids in the gene group;
    Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject>
    update(Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> geneSetVos)
    AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.
    void
    updateMembers(Long groupId, Collection<Long> geneIds)
    AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.
    ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject
    updateNameDesc(ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject geneSetVO)
    AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.
    ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject
    updateSessionGroup(ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject vos)
    AJAX updates a session group
    Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject>
    updateSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> vos)
    Deprecated. 
    Collection<ubic.gemma.model.genome.gene.GeneSetValueObject>
    updateUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> vos)
    AJAX Updates the session group and user database groups.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GeneSetController

      public GeneSetController()
  • Method Details

    • addSessionGroups

      @Deprecated public Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> addSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> geneSetVos, Boolean modificationBased)
      Deprecated.
      AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.
      Parameters:
      geneSetVos - value object constructed on the client.
      modificationBased - whether the set was modified by the user
      Returns:
      collection of added session groups (with updated reference.id etc)
    • addSessionGroup

      public ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject addSessionGroup(ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject gsvo, Boolean modificationBased)
      * AJAX adds the gene group to the session, used by SessionGeneGroupStore and SessionDatasetGroupStore sets the groups taxon value and reference.
      Parameters:
      gsvo - gsvo
      modificationBased - whether the set was modified by the user
      Returns:
      gene set vo
    • addUserAndSessionGroups

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> addUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> geneSetVos)
      AJAX adds the gene group to the session
      Parameters:
      geneSetVos - value object constructed on the client.
      Returns:
      id of the new gene group
    • canCurrentUserEditGroup

      public String canCurrentUserEditGroup(ubic.gemma.model.genome.gene.GeneSetValueObject gsvo)
      AJAX returns a JSON string encoding whether the current user owns the group and whether the group is db-backed
      Parameters:
      gsvo - gsvo
      Returns:
      string
    • create

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> create(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> geneSetVos)
      AJAX create an entities in the database based on the value objects passed in
      Parameters:
      geneSetVos - value objects constructed on the client.
      Returns:
      value objects converted from the newly created entities
    • findGeneSetsByGene

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> findGeneSetsByGene(Long geneId)
      Given a Gemma Gene Id will find all gene groups that the current user is allowed to use
      Parameters:
      geneId - gene id
      Returns:
      collection of geneSetValueObject
    • findGeneSetsByName

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> findGeneSetsByName(String query, Long taxonId)
      Parameters:
      query - string to match to a gene set.
      taxonId - taxon id
      Returns:
      collection of GeneSetValueObject
    • getGenesInGroup

      public Collection<ubic.gemma.model.genome.gene.GeneValueObject> getGenesInGroup(Long groupId, Integer limit)
      AJAX If the current user has access to given gene group, will return the gene value objects in the gene group
      Parameters:
      groupId - group id
      limit - if greater than zero, limit to how many genes are returned (for previews)
      Returns:
      gene vos
    • getGeneIdsInGroup

      public Collection<Long> getGeneIdsInGroup(Long groupId)
      AJAX
      Parameters:
      groupId - group id
      Returns:
      ids of genes in the gene set.
    • getUserAndSessionGeneGroups

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> getUserAndSessionGeneGroups(boolean privateOnly, Long taxonId)
      AJAX Returns the current users gene sets as well as their session gene sets
      Parameters:
      privateOnly - private only
      taxonId - if non-null, restrict the groups by ones which have genes in the given taxon.
      Returns:
      gene set vos
    • getUserSessionGeneGroups

      public Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> getUserSessionGeneGroups(boolean privateOnly, Long taxonId)
      AJAX Returns just the current users gene sets
      Parameters:
      privateOnly - private only
      taxonId - if non-null, restrict the groups by ones which have genes in the given taxon.
      Returns:
      gene set vos
    • getUsersGeneGroups

      public Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> getUsersGeneGroups(boolean privateOnly, Long taxonId)
      AJAX Returns just the current users gene sets
      Parameters:
      privateOnly - private only
      taxonId - if non-null, restrict the groups by ones which have genes in the given taxon.
      Returns:
      gene set vos
    • load

      public ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject load(Long id)
      AJAX - load with the IDs filled in
      Parameters:
      id - id
      Returns:
      gene set vos
    • remove

      public Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> remove(Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> vos)
      AJAX Given a valid gene group will remove it from db (if the user has permissons to do so).
      Parameters:
      vos - vos
      Returns:
      gene set vos
    • removeSessionGroups

      @Deprecated public Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> removeSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> vos)
      Deprecated.
      AJAX Given a valid gene group will remove it from the session.
      Parameters:
      vos - vos
      Returns:
      gene set vos
    • removeUserAndSessionGroups

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> removeUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> vos)
      AJAX Given valid gene groups will remove them from the session or the database appropriately.
      Parameters:
      vos - vos
      Returns:
      gene set vos
    • showGeneSet

      @RequestMapping(value="/showGeneSet.html", method={GET,HEAD}) public org.springframework.web.servlet.ModelAndView showGeneSet(@RequestParam("id") Long id)
      If the current user has access to given gene group will return the gene ids in the gene group;
    • update

      public Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> update(Collection<ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject> geneSetVos)
      AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.
      Parameters:
      geneSetVos - vos
      Returns:
      gene set vos
    • updateMembers

      public void updateMembers(Long groupId, Collection<Long> geneIds)
      AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice. Cannot update name or description, just members
      Parameters:
      groupId - id of the gene set being updated
      geneIds - gene ids
    • updateNameDesc

      public ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject updateNameDesc(ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject geneSetVO)
      AJAX Updates the given gene group (permission permitting) with the given list of geneIds Will not allow the same gene to be added to the gene set twice.
      Parameters:
      geneSetVO - gene set vos
      Returns:
      gene set vo
    • updateSessionGroups

      @Deprecated public Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> updateSessionGroups(Collection<ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject> vos)
      Deprecated.
      AJAX Updates the session group.
      Parameters:
      vos - vos
      Returns:
      gene set vos
    • updateSessionGroup

      public ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject updateSessionGroup(ubic.gemma.model.genome.gene.SessionBoundGeneSetValueObject vos)
      AJAX updates a session group
      Parameters:
      vos - vos
      Returns:
      gene set vo
    • updateUserAndSessionGroups

      public Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> updateUserAndSessionGroups(Collection<ubic.gemma.model.genome.gene.GeneSetValueObject> vos)
      AJAX Updates the session group and user database groups.
      Parameters:
      vos - vos
      Returns:
      gene set vos