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


Java ApiOperation类代码示例

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


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

示例1: saveProject

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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.ApiOperation; //导入依赖的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: jumpToNextGene

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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: track

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = GENE_URL + REFERENCE_ID_FIELD + "}/variation/protein/get", method = RequestMethod.POST)
@ApiOperation(
        value = "Returns reconstructed protein sequence matched to the given query of gene track, "
                + "taking into account variations.",
        notes = "It provides data for a protein sequence 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/>" +
                "Body: <br/><br/>" +
                "<b>variations: result of call /gene/{" + REFERENCE_ID_FIELD + "}/protein/get <br/>" +
                "<b>trackquery:<br/>" +
                "1) <b>" + REFERENCE_ID_FIELD + "</b> specifies ID of reference genome;<br/>" +
                "2) <b>id</b> specifies ID of a track;<br/>" +
                "3) <b>chromosomeId</b> specifies ID of a chromosome corresponded to a track;<br/>" +
                "4) <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/>" +
                "5) <b>endIndex</b> is the last base position for a requested window. " +
                "It is treated inclusively;<br/>" +
                "6) <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)
public Result<Track<MrnaProteinSequenceVariants>> loadProteinSequenceForVariations(
        @RequestBody final ProteinSequenceVariationQuery psVariationQuery, @PathVariable final Long referenceId)
    throws GeneReadingException {
    return Result.success(proteinSequenceManager.loadProteinSequenceWithVariations(psVariationQuery, referenceId));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:27,代码来源:GeneController.java

示例5: moveProject

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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.ApiOperation; //导入依赖的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: registerVcfFile

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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: jumpToPrevGene

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的package包/类
@RequestMapping (value = "/vcf/{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<Variation> jumpToPrevGene(@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,
                                                                false, fileUrl, indexUrl));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:22,代码来源:VcfController.java

示例9: track

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/maf/track/get", method = RequestMethod.POST)
@ApiOperation(
        value = "Returns data matched the given query to fill in a MAF track.",
        notes = "It provides data for a MAF 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<MafRecord>> loadTrack(@RequestBody final TrackQuery trackQuery)
        throws IOException {
    final Track<MafRecord> track = convertToTrack(trackQuery);
    return Result.success(mafManager.loadFeatures(track));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:24,代码来源:MafController.java

示例10: saveCytobands

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的package包/类
@ResponseBody
@RequestMapping(value = "/cytobands/upload", method = RequestMethod.POST,
    consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@ApiOperation(
    value = "Handles cytobands upload pointing to a corresponded genome that has to be available in the system.",
    notes = "The following cytobands file types are supported: *.txt and *.txt.gz.<br/>" +
        "It results in a payload that provides corresponded genome ID, also a message about succeeded upload " +
        "is sent back.",
    produces = MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(
    value = {@ApiResponse(code = HTTP_STATUS_OK, message = API_STATUS_DESCRIPTION)
    })
public final Result<Long> saveCytobands(@RequestParam("referenceId") final Long referenceId,
                                        @RequestParam("saveFile") final MultipartFile multipart)
    throws IOException {
    final File tmpFile = transferToTempFile(multipart);
    cytobandManager.saveCytobands(referenceId, tmpFile);
    return Result.success(referenceId, getMessage("info.cytobands.upload.done",
        multipart.getOriginalFilename()));
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:21,代码来源:CytobandController.java

示例11: registerGeneFile

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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

示例12: jumpToPrevGene

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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

示例13: fetchExons

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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

示例14: registerBamFile

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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

示例15: loadConsensusSequence

import com.wordnik.swagger.annotations.ApiOperation; //导入依赖的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


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