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 GeneSetController()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SessionBoundGeneSetValueObject
addSessionGroup(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<SessionBoundGeneSetValueObject>
addSessionGroups(Collection<SessionBoundGeneSetValueObject> geneSetVos, Boolean modificationBased)
Deprecated.Collection<GeneSetValueObject>
addUserAndSessionGroups(Collection<GeneSetValueObject> geneSetVos)
AJAX adds the gene group to the sessionString
canCurrentUserEditGroup(GeneSetValueObject gsvo)
AJAX returns a JSON string encoding whether the current user owns the group and whether the group is db-backedCollection<GeneSetValueObject>
create(Collection<GeneSetValueObject> geneSetVos)
AJAX create an entities in the database based on the value objects passed inCollection<GeneSetValueObject>
findGeneSetsByGene(Long geneId)
Given a Gemma Gene Id will find all gene groups that the current user is allowed to useCollection<GeneSetValueObject>
findGeneSetsByName(String query, Long taxonId)
Collection<Long>
getGeneIdsInGroup(Long groupId)
AJAXCollection<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 groupCollection<GeneSetValueObject>
getUserAndSessionGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns the current users gene sets as well as their session gene setsCollection<SessionBoundGeneSetValueObject>
getUserSessionGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns just the current users gene setsCollection<DatabaseBackedGeneSetValueObject>
getUsersGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns just the current users gene setsDatabaseBackedGeneSetValueObject
load(Long id)
AJAX - load with the IDs filled inCollection<DatabaseBackedGeneSetValueObject>
remove(Collection<DatabaseBackedGeneSetValueObject> vos)
AJAX Given a valid gene group will remove it from db (if the user has permissons to do so).Collection<SessionBoundGeneSetValueObject>
removeSessionGroups(Collection<SessionBoundGeneSetValueObject> vos)
Deprecated.Collection<GeneSetValueObject>
removeUserAndSessionGroups(Collection<GeneSetValueObject> vos)
AJAX Given valid gene groups will remove them from the session or the database appropriately.org.springframework.web.servlet.ModelAndView
showGeneSet(javax.servlet.http.HttpServletRequest request)
If the current user has access to given gene group will return the gene ids in the gene group;Collection<DatabaseBackedGeneSetValueObject>
update(Collection<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.DatabaseBackedGeneSetValueObject
updateNameDesc(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.SessionBoundGeneSetValueObject
updateSessionGroup(SessionBoundGeneSetValueObject vos)
AJAX updates a session groupCollection<SessionBoundGeneSetValueObject>
updateSessionGroups(Collection<SessionBoundGeneSetValueObject> vos)
Deprecated.Collection<GeneSetValueObject>
updateUserAndSessionGroups(Collection<GeneSetValueObject> vos)
AJAX Updates the session group and user database groups.
-
-
-
Method Detail
-
addSessionGroups
@Deprecated public Collection<SessionBoundGeneSetValueObject> addSessionGroups(Collection<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 SessionBoundGeneSetValueObject addSessionGroup(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
- gsvomodificationBased
- whether the set was modified by the user- Returns:
- gene set vo
-
addUserAndSessionGroups
public Collection<GeneSetValueObject> addUserAndSessionGroups(Collection<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(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<GeneSetValueObject> create(Collection<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<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<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<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 idlimit
- 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<GeneSetValueObject> getUserAndSessionGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns the current users gene sets as well as their session gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
getUserSessionGeneGroups
public Collection<SessionBoundGeneSetValueObject> getUserSessionGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns just the current users gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
getUsersGeneGroups
public Collection<DatabaseBackedGeneSetValueObject> getUsersGeneGroups(boolean privateOnly, Long taxonId)
AJAX Returns just the current users gene sets- Parameters:
privateOnly
- private onlytaxonId
- if non-null, restrict the groups by ones which have genes in the given taxon.- Returns:
- gene set vos
-
load
public DatabaseBackedGeneSetValueObject load(Long id)
AJAX - load with the IDs filled in- Parameters:
id
- id- Returns:
- gene set vos
-
remove
public Collection<DatabaseBackedGeneSetValueObject> remove(Collection<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<SessionBoundGeneSetValueObject> removeSessionGroups(Collection<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<GeneSetValueObject> removeUserAndSessionGroups(Collection<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(javax.servlet.http.HttpServletRequest request)
If the current user has access to given gene group will return the gene ids in the gene group;- Parameters:
request
- request- Returns:
- model and view
-
update
public Collection<DatabaseBackedGeneSetValueObject> update(Collection<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 updatedgeneIds
- gene ids
-
updateNameDesc
public DatabaseBackedGeneSetValueObject updateNameDesc(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<SessionBoundGeneSetValueObject> updateSessionGroups(Collection<SessionBoundGeneSetValueObject> vos)
Deprecated.AJAX Updates the session group.- Parameters:
vos
- vos- Returns:
- gene set vos
-
updateSessionGroup
public SessionBoundGeneSetValueObject updateSessionGroup(SessionBoundGeneSetValueObject vos)
AJAX updates a session group- Parameters:
vos
- vos- Returns:
- gene set vo
-
updateUserAndSessionGroups
public Collection<GeneSetValueObject> updateUserAndSessionGroups(Collection<GeneSetValueObject> vos)
AJAX Updates the session group and user database groups.- Parameters:
vos
- vos- Returns:
- gene set vos
-
-