当前位置: 首页>>代码示例>>Java>>正文


Java ApiResponse类代码示例

本文整理汇总了Java中com.wordnik.swagger.annotations.ApiResponse的典型用法代码示例。如果您正苦于以下问题:Java ApiResponse类的具体用法?Java ApiResponse怎么用?Java ApiResponse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ApiResponse类属于com.wordnik.swagger.annotations包,在下文中一共展示了ApiResponse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: saveProject

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping(value = "/project/save", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(
        value = "Creates new project or updates existing one",
        notes = "New project should contain a name field. Updated project should contain id and name fields. <br/>"
                + "Optional parameter parentId stands for creating a new project as a nested project for existing "
                + "one, specified by parentId parameter. Works only for creation of a new project. <br/>"
                + "To move an existing project to another parent project, use <b>/project/{projectId}/move</b> "
                + "service",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<ProjectVO> saveProject(@RequestBody ProjectVO project, @RequestParam(required = false) Long parentId)
    throws FeatureIndexException {
    return Result.success(ProjectConverter.convertTo(projectManager.saveProject(ProjectConverter.convertFrom(
        project), parentId)));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:19,代码来源:ProjectController.java

示例2: loadVariation

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/vcf/variation/load", method = RequestMethod.POST)
@ApiOperation(
        value = "Returns extended data for a variation",
        notes = "Provides extended data about the particular variation: </br>" +
                "info field : Additional information that is presented in INFO column</br>" +
                "genotypeInfo field : Genotype information for a specific sample</br>",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Variation> loadVariation(@RequestBody final VariationQuery query,
                                       @RequestParam(required = false) final String fileUrl,
                                       @RequestParam(required = false) final String indexUrl)
    throws FeatureFileReadingException {
    if (fileUrl == null) {
        return Result.success(vcfManager.loadVariation(query));
    } else {
        return Result.success(vcfManager.loadVariation(query, fileUrl, indexUrl));
    }
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:22,代码来源:VcfController.java

示例3: sample

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping (value = "/vcf/{chromosomeId}/next", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(
        value = "Returns the next feature for a given track",
        notes = "Returns the next feature for a given track in a given chromosome. </br>" +
                "Searches from given parameter 'fromPosition' (required), from a given sample (parameter " +
                "'sampleId', optional)",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Variation> jumpToNextGene(@RequestParam int fromPosition,
                                    @PathVariable(value = "chromosomeId") long chromosomeId,
                                    @RequestParam(required = false) Long trackId,
                                    @RequestParam(required = false) Long sampleId,
                                    @RequestParam(required = false) final String fileUrl,
                                    @RequestParam(required = false) final String indexUrl)
        throws VcfReadingException {
    return Result.success(vcfManager.getNextOrPreviousVariation(fromPosition, trackId, sampleId, chromosomeId,
                                                                true, fileUrl, indexUrl));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:22,代码来源:VcfController.java

示例4: database

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/externaldb/ensembl/{geneId}/get", method = RequestMethod.GET)
@ApiOperation(value = "Ensembl: Retrieves information on gene using geneId.",
        notes = "Ensembl database (http://rest.ensembl.org/) is being queried for information by gene " +
                "identifier <i>in any database</i>. Gene information in JSON form is returned by Ensembl, " +
                "this information is converted to presentation required by NGGB.<br/><br/>" +
                "Examples of id which could be used as a parameter to this service:<br/><br/>" +
                "ENSG00000106683 -- Ensembl ID<br/>" +
                "FBgn0000008 -- Fly Base ID<br/>",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(value = { @ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION) })
public Result<EnsemblEntryVO> fetchEnsemblData(@PathVariable(value = "geneId") final String geneId)
        throws ExternalDbUnavailableException {

    Assert.notNull(geneId, getMessage(MessagesConstants.ERROR_GENEID_NOT_SPECIFIED));
    EnsemblEntryVO ensemblEntryVO = ensemblDataManager.fetchEnsemblEntry(geneId);

    return Result.success(ensemblEntryVO, getMessage(SUCCESS, ENSEMBL));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:20,代码来源:ExternalDBController.java

示例5: moveProject

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping(value = "/project/{projectId}/move", method = RequestMethod.PUT)
@ResponseBody
@ApiOperation(
    value = "Moves a project to a parent project",
    notes = "Moves an existing project, specified by projectId path variable, to a parent project, specified by "
            + "parentID parameter. To move a project to top level, pass no "
            + "parameter",
    produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
    value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
    })
public Result<Boolean> moveProject(@PathVariable Long projectId, @RequestParam(required = false) Long parentId)
    throws FeatureIndexException {
    projectManager.moveProjectToParent(projectId, parentId);
    return Result.success(true);
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:17,代码来源:ProjectController.java

示例6: deleteProject

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping(value = "/project/{projectId}", method = RequestMethod.DELETE)
@ResponseBody
@ApiOperation(
        value = "Deletes a project, specified by project ID",
        notes = "Deletes a project with all it's items and bookmarks",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Boolean> deleteProject(@PathVariable final long projectId,
                                     @RequestParam(name = "force", required = false, defaultValue = "false")
                                             Boolean force) throws IOException {
    Project deletedProject = projectManager.deleteProject(projectId, force);
    return Result.success(true, MessageHelper.getMessage(MessagesConstants.INFO_PROJECT_DELETED, deletedProject
            .getId(), deletedProject.getName()));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:17,代码来源:ProjectController.java

示例7: system

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/vcf/register", method = RequestMethod.POST)
@ApiOperation(
        value = "Registers a VCF file in the system.",
        notes = "Registers a file, stored in a file system (for now). Registration request has the following " +
                "properties: <br/>" +
                "1) referenceId - a reference, for which file is being registered <br/>" +
                "2) path - a path to file </br>" +
                "3) indexPath - <i>optional</i> a path to an index file<br/>" +
                "4) name - <i>optional</i> a name for VCF track",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<VcfFile> registerVcfFile(@RequestBody
                                           FeatureIndexedFileRegistrationRequest request) {
    return Result.success(vcfManager.registerVcfFile(request));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:19,代码来源:VcfController.java

示例8: findFilesByName

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/dataitem/search", method = RequestMethod.GET)
@ApiOperation(
        value = "Finds all files registered on the server by a specified file name",
        notes = "Finds all files registered on the server by a specified file name</br>" +
                "Input arguments:</br>" +
                "<b>name</b> - search query for the file name,</br>" +
                "<b>strict</b> - if true a strict, case sensitive search is performed, " +
                "otherwise a substring, case insensitive search is performed.",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public final Result<List<BiologicalDataItem>> findFilesByName(@RequestParam(value = "name") final String name,
        @RequestParam(value = "strict", required = false, defaultValue = "true") final boolean strict) {
    return Result.success(dataItemManager.findFilesByName(name, strict));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:18,代码来源:DataItemController.java

示例9: system

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/gene/register", method = RequestMethod.POST)
@ApiOperation(
        value = "Registers a gene file in the system.",
        notes = "Registers a file, stored in a file system (for now). Registration request has the following " +
                "properties: <br/>" +
                "1) " + REFERENCE_ID_FIELD + " - a reference, for which file is being registered <br/>" +
                "2) path - a path to file </br>" +
                "3) indexPath - <i>optional</i> a path to an index file<br/>" +
                "4) name - <i>optional</i> a name for gene track",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<GeneFile> registerGeneFile(@RequestBody
                                             FeatureIndexedFileRegistrationRequest request) {
    return Result.success(gffManager.registerGeneFile(request));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:19,代码来源:GeneController.java

示例10: track

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/gene/transcript/track/get", method = RequestMethod.POST)
@ApiOperation(
        value = "Returns data matched the given query to fill in a gene track with transcripts.",
        notes = "It provides data for a gene track with the given scale factor between the beginning position " +
                "with the first base having position 1 and ending position inclusive in a target chromosome. " +
                "All parameters are mandatory and described below:<br/><br/>" +
                "1) <b>id</b> specifies ID of a track;<br/>" +
                "2) <b>chromosomeId</b> specifies ID of a chromosome corresponded to a track;<br/>" +
                "3) <b>startIndex</b> is the most left base position for a requested window. The first base in a " +
                "chromosome always has got position  = 1;<br/>" +
                "4) <b>endIndex</b> is the last base position for a requested window. <br/>" +
                "5) <b>scaleFactor</b> specifies an inverse value to number of bases per one visible element on a" +
                " track (e.g., pixel) - IS IGNORED FOR NOW",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Track<GeneTranscript>> loadTrackWithTranscript(@RequestBody final TrackQuery trackQuery,
        @RequestParam(required = false) final String fileUrl,
        @RequestParam(required = false) final String indexUrl)
    throws GeneReadingException {
    return Result.success(gffManager.loadGenesTranscript(Query2TrackConverter.convertToTrack(trackQuery),
            fileUrl, indexUrl));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:26,代码来源:GeneController.java

示例11: sample

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping(value = "/gene/{trackId}/{chromosomeId}/prev", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(
        value = "Returns the previous feature for a given track",
        notes = "Returns the previous feature for a given track in a given chromosome. <br/>" +
                "Searches from given parameter 'fromPosition' (required), from a given sample (parameter " +
                "'sampleId', optional)",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Gene> jumpToPrevGene(@RequestParam int fromPosition,
                                   @PathVariable(value = "trackId") long geneFileId,
                                   @PathVariable(value = "chromosomeId") long chromosomeId) throws IOException {
    return Result.success(gffManager.getNextOrPreviousFeature(fromPosition, geneFileId, chromosomeId, false));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:17,代码来源:GeneController.java

示例12: fetchExons

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@RequestMapping(value = "/gene/exons/viewport", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(
        value = "Returns exons of the track",
        notes = "Returns all exons of the track on a given interval, specified by:<br/>" +
                "<ul><li>centerPosition - a position of a view port's center on the reference</li>" +
                "<li>viewPortSize - a size of a view port in bps</li>" +
                "<li>intronLength - a value, determine how much of intron region lengths should be shown in bps" +
                "Affects the amount of exons fitted in a view port</li></ul>",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<List<Block>> fetchExons(@RequestBody ExonViewPortQuery query) throws IOException {
    return Result.success(gffManager.loadExonsInViewPort(query.getId(), query.getChromosomeId(),
            query.getCenterPosition(), query.getViewPortSize(), query.getIntronLength()));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:18,代码来源:GeneController.java

示例13: system

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/bam/register", method = RequestMethod.POST)
@ApiOperation(
        value = "Registers a BAM file in the system.",
        notes = "Registers a file, stored in a file system (for now). Registration request has the following " +
                "properties: <br/>" +
                "1) referenceId - a reference, for which file is being registered <br/>" +
                "2) path - a path to file </br>" +
                "3) type - resource type of file: FILE / URL / S3<br/>" +
                "4) indexPath - <i>optional</i> a path to an index file (.bai)<br/>" +
                "5) name - <i>optional</i> a name for BAM track<br/>" +
                "6) s3BucketId - <i>optional</i> necessarily for cases when type is S3",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<BamFile> registerBamFile(@RequestBody IndexedFileRegistrationRequest request) throws IOException {
    return Result.success(bamManager.registerBam(request));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:20,代码来源:BamController.java

示例14: track

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/bam/consensus/get", method = RequestMethod.POST)
@ApiOperation(
        value = "Returns consensus sequence for specified BAM file range.",
        notes = "It provides data about consensus sequence for specified BAM file range " +
                "with the given scale factor between the " +
                "beginning position with the first base having position 1 and ending position inclusive in a " +
                "target chromosome. All parameters are mandatory and described below:<br/><br/>" +
                "1) <b>id</b> specifies ID of a track;<br/>" +
                "2) <b>chromosomeId</b> specifies ID of a chromosome corresponded to a track;<br/>" +
                "3) <b>startIndex</b> is the most left base position for a requested window. The first base " +
                "in a chromosome always has got position 1;<br/>" +
                "4) <b>endIndex</b> is the last base position for a requested window. It is treated " +
                "inclusively;<br/>" +
                "5) <b>scaleFactor</b> specifies an inverse value to number of bases per one visible " +
                "element on a track (e.g., pixel).",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Track<Sequence> loadConsensusSequence(@RequestBody final TrackQuery query) throws IOException {
    return bamManager.calculateConsensusSequence(convertToTrack(query));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:24,代码来源:BamController.java

示例15: saveBucket

import com.wordnik.swagger.annotations.ApiResponse; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/bucket/save", method = RequestMethod.POST)
@ApiOperation(
        value = "Registers a bucket in the system.",
        notes = "Registers a bucket, stored in a BD. Registration request has the following " +
                "properties: <br/>" +
                "1) accessKeyId - access key ID <br/>" +
                "2) secretAccessKey - secret access key </br>" +
                "3) bucketName - <i>optional</i> a name for bucket.",
        produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
        value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
        })
public Result<Bucket> saveBucket(@RequestBody Bucket bucket) {
    return Result.success(bucketManager.saveBucket(bucket));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:17,代码来源:BucketController.java


注:本文中的com.wordnik.swagger.annotations.ApiResponse类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。