Class AnnotationsWebService


  • @Service
    @Path("/annotations")
    public class AnnotationsWebService
    extends Object
    RESTful interface for annotations.
    Author:
    tesarst
    • Constructor Detail

      • AnnotationsWebService

        public AnnotationsWebService()
        Required by spring
      • AnnotationsWebService

        @Autowired
        public AnnotationsWebService​(ubic.gemma.core.ontology.OntologyService ontologyService,
                                     ubic.gemma.core.search.SearchService searchService,
                                     ubic.gemma.persistence.service.common.description.CharacteristicService characteristicService,
                                     ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService expressionExperimentService,
                                     DatasetArgService datasetArgService,
                                     TaxonArgService taxonArgService)
        Constructor for service autowiring
    • Method Detail

      • getAnnotationsChildren

        @GET
        @Path("/children")
        @Produces("application/json")
        public List<AnnotationsWebService.AnnotationSearchResultValueObject> getAnnotationsChildren​(@QueryParam("uri")
                                                                                                    String termUri,
                                                                                                    @QueryParam("direct") @DefaultValue("false")
                                                                                                    boolean direct)
        Obtain the children of a given annotation.

        This is plural as we might add support for querying multiple annotations at once in the future.

      • searchAnnotations

        @GET
        @Path("/search")
        @Produces("application/json")
        public ResponseDataObject<List<AnnotationsWebService.AnnotationSearchResultValueObject>> searchAnnotations​(@QueryParam("query") @DefaultValue("")
                                                                                                                   StringArrayArg query)
        Does a search for annotation tags based on the given string.
        Parameters:
        query - the search query. Either plain text, or an ontology term URI
        Returns:
        response data object with a collection of found terms, each wrapped in a CharacteristicValueObject.
        See Also:
        for better description of the search process., for the output object structure.
      • searchDatasets

        @GET
        @Path("/search/datasets")
        @Produces("application/json")
        public QueriedAndFilteredAndPaginatedResponseDataObject<ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject> searchDatasets​(@QueryParam("query") @DefaultValue("")
                                                                                                                                                       StringArrayArg query,
                                                                                                                                                       @QueryParam("filter") @DefaultValue("")
                                                                                                                                                       FilterArg<ubic.gemma.model.expression.experiment.ExpressionExperiment> filterArg,
                                                                                                                                                       @QueryParam("offset") @DefaultValue("0")
                                                                                                                                                       OffsetArg offset,
                                                                                                                                                       @QueryParam("limit") @DefaultValue("20")
                                                                                                                                                       LimitArg limit,
                                                                                                                                                       @QueryParam("sort") @DefaultValue("+id")
                                                                                                                                                       SortArg<ubic.gemma.model.expression.experiment.ExpressionExperiment> sortArg)
        Does a search for datasets containing characteristics matching the given string. If filterArg, offset, limit or sortArg parameters are provided.
        Parameters:
        query - the search query. Either plain text, or an ontology term URI
        Returns:
        response data object with a collection of dataset that match the search query.
        See Also:
        for better description of the search process.
      • searchDatasetsByQueryInPath

        @GET
        @Path("/search/{query}/datasets")
        @Produces("application/json")
        public QueriedAndFilteredAndPaginatedResponseDataObject<ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject> searchDatasetsByQueryInPath​(@PathParam("query") @DefaultValue("")
                                                                                                                                                                    StringArrayArg query,
                                                                                                                                                                    @QueryParam("filter") @DefaultValue("")
                                                                                                                                                                    FilterArg<ubic.gemma.model.expression.experiment.ExpressionExperiment> filterArg,
                                                                                                                                                                    @QueryParam("offset") @DefaultValue("0")
                                                                                                                                                                    OffsetArg offset,
                                                                                                                                                                    @QueryParam("limit") @DefaultValue("20")
                                                                                                                                                                    LimitArg limit,
                                                                                                                                                                    @QueryParam("sort") @DefaultValue("+id")
                                                                                                                                                                    SortArg<ubic.gemma.model.expression.experiment.ExpressionExperiment> sortArg)