Search in sources :

Example 11 with GeneSetValueObject

use of ubic.gemma.model.genome.gene.GeneSetValueObject in project Gemma by PavlidisLab.

the class SearchResultDisplayObject method setValues.

/**
 * this method does not set the publik variable for the returned object (cannot autowire security service from here)
 *
 * @param searchResult search result
 */
private void setValues(SearchResult searchResult) {
    // if it's a search result, grab the underlying object
    Class<?> searchResultClass = searchResult.getResultClass();
    // class-specific construction
    if (searchResult.getResultObject() instanceof GeneValueObject) {
        GeneValueObject gene = (GeneValueObject) searchResult.getResultObject();
        this.setValues(gene);
    } else if (searchResult.getResultObject() instanceof Gene) {
        Gene gene = (Gene) searchResult.getResultObject();
        this.setValues(gene);
    } else if (searchResult.getResultObject() instanceof GeneSetValueObject) {
        GeneSetValueObject geneSet = (GeneSetValueObject) searchResult.getResultObject();
        this.setValues(geneSet);
    } else if (searchResult.getResultObject() instanceof ExpressionExperimentValueObject) {
        ExpressionExperimentValueObject ee = (ExpressionExperimentValueObject) searchResult.getResultObject();
        this.setValues(ee);
    } else if (searchResult.getResultObject() instanceof ExpressionExperimentSetValueObject) {
        ExpressionExperimentSetValueObject eeSet = (ExpressionExperimentSetValueObject) searchResult.getResultObject();
        this.setValues(eeSet);
    } else {
        this.isGroup = false;
        this.size = -1;
        this.taxonId = (long) -1;
        this.taxonName = "unknown";
        this.name = "Unhandled type";
        this.description = "Unhandled result type: " + searchResultClass;
        this.memberIds = null;
    }
}
Also used : ExpressionExperimentSetValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentSetValueObject) GeneValueObject(ubic.gemma.model.genome.gene.GeneValueObject) Gene(ubic.gemma.model.genome.Gene) ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) SessionBoundGeneSetValueObject(ubic.gemma.core.genome.gene.SessionBoundGeneSetValueObject) GeneSetValueObject(ubic.gemma.model.genome.gene.GeneSetValueObject)

Example 12 with GeneSetValueObject

use of ubic.gemma.model.genome.gene.GeneSetValueObject in project Gemma by PavlidisLab.

the class GeneSetController method showGeneSet.

/**
 * If the current user has access to given gene group will return the gene ids in the gene group;
 *
 * @param request request
 * @return model and view
 */
@RequestMapping(value = "/showGeneSet.html", method = RequestMethod.GET)
public ModelAndView showGeneSet(HttpServletRequest request) {
    ModelAndView mav = new ModelAndView("geneSet.detail");
    GeneSetValueObject geneSet = this.getGeneSetFromRequest(request);
    mav.addObject("geneSetId", geneSet.getId());
    mav.addObject("geneSetName", geneSet.getName());
    return mav;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) GeneSetValueObject(ubic.gemma.model.genome.gene.GeneSetValueObject) DatabaseBackedGeneSetValueObject(ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject) SessionBoundGeneSetValueObject(ubic.gemma.core.genome.gene.SessionBoundGeneSetValueObject) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

GeneSetValueObject (ubic.gemma.model.genome.gene.GeneSetValueObject)12 DatabaseBackedGeneSetValueObject (ubic.gemma.model.genome.gene.DatabaseBackedGeneSetValueObject)8 SessionBoundGeneSetValueObject (ubic.gemma.core.genome.gene.SessionBoundGeneSetValueObject)6 HashSet (java.util.HashSet)4 GeneValueObject (ubic.gemma.model.genome.gene.GeneValueObject)3 StopWatch (org.apache.commons.lang3.time.StopWatch)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ModelAndView (org.springframework.web.servlet.ModelAndView)2 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 CoexpressionMetaValueObject (ubic.gemma.core.analysis.expression.coexpression.CoexpressionMetaValueObject)1 CoexpressionValueObjectExt (ubic.gemma.core.analysis.expression.coexpression.CoexpressionValueObjectExt)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1 ExpressionExperimentSetValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentSetValueObject)1 ExpressionExperimentValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject)1 Gene (ubic.gemma.model.genome.Gene)1 Taxon (ubic.gemma.model.genome.Taxon)1 GeneSetMember (ubic.gemma.model.genome.gene.GeneSetMember)1 CharacteristicValueObject (ubic.gemma.model.genome.gene.phenotype.valueObject.CharacteristicValueObject)1