本文整理匯總了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)));
}
示例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));
}
}
示例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));
}
示例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));
}
示例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);
}
示例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()));
}
示例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));
}
示例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));
}
示例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));
}
示例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()));
}
示例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));
}
示例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));
}
示例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()));
}
示例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));
}
示例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));
}