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


Java Path类代码示例

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


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

示例1: getVisulaizationData

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
/**
    * 
    * @param visId
    * @return
    */
   @GET
   @Path("datasets/{datasetId}/visualizations/{visualizationId}")
   @ResourceListApi(description = "Get the visualization graph")
   @Produces(MediaType.APPLICATION_XML)
   @Consumes(MediaType.TEXT_PLAIN)
   @ApiResponses(value = { @ApiResponse(code = 200, message = "Success") })
   @Summary("Returns the visualization graph to be consumed by the client.")
   public HttpResponse getVisulaizationData(@PathParam("visualizationId") String visId) {

log.info("expertsId:: " + visId);
DatabaseHandler dbHandler = null;
dbHandler = new DatabaseHandler("healthcare", "root", "");
String visGraph = dbHandler.getVisGraph(Long.parseLong(visId));

String fileContentsString = "data:" + "text/xml" + ";base64," + Base64.encodeBase64String(visGraph.getBytes());

HttpResponse res = new HttpResponse(fileContentsString, 200);
res.setHeader("content-type", "text/xml");
res.setStatus(200);

return res;
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:28,代码来源:ExpertRecommenderService.java

示例2: getGraph

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
   @Path("download/{filename}")
   public HttpResponse getGraph(@PathParam("filename") String filename) {

byte[] data = LocalFileManager.getFile(filename);
String fileContentsString = null;
try {
    fileContentsString = new String(data, "UTF-8");
} catch (UnsupportedEncodingException e) {
    e.printStackTrace();
}
log.info(fileContentsString);

HttpResponse res = new HttpResponse(fileContentsString, 200);
res.setHeader("content-type", "text/xml");

return res;
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:19,代码来源:ExpertRecommenderService.java

示例3: saveClickPositions

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@POST
   @Path("datasets/{datasetId}/position")
   public void saveClickPositions(@PathParam(value = "datasetId") String datasetId,
    @QueryParam(name = "expertsId", defaultValue = "-1") String expertsId, @QueryParam(name = "position", defaultValue = "-1") int position) {

String databaseName = getDatabaseName(datasetId);
if (databaseName == null) {
    // Throw custom exception.
}

DatabaseHandler dbHandler = null;
dbHandler = new DatabaseHandler(databaseName, "root", "");

// log.info("USRNAME:: " + username);
try {
    TableUtils.createTableIfNotExists(dbHandler.getConnectionSource(), UserClickDetails.class);
} catch (SQLException e) {
    e.printStackTrace();
}

dbHandler.saveClickPositions(expertsId, position);
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:23,代码来源:ExpertRecommenderService.java

示例4: getFile6

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("{p1}/{p2}/{p3}/{p4}/{p5}/{p6}")
public HttpResponse getFile6(@PathParam("p1") String p1, @PathParam("p2") String p2,
		@PathParam("p3") String p3, @PathParam("p4") String p4,
		@PathParam("p5") String p5, @PathParam("p6") String p6)
{
	StringBuilder sb = new StringBuilder();
	sb.append(p1).append("/");
	sb.append(p2).append("/");
	sb.append(p3).append("/");
	sb.append(p4).append("/");
	sb.append(p5).append("/");
	sb.append(p6);
	return getHttpResponse(sb.toString());

}
 
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:17,代码来源:DownloadService.java

示例5: getFile7

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("{p1}/{p2}/{p3}/{p4}/{p5}/{p6}/{p7}")
public HttpResponse getFile7(@PathParam("p1") String p1, @PathParam("p2") String p2,
		@PathParam("p3") String p3, @PathParam("p4") String p4,
		@PathParam("p5") String p5, @PathParam("p6") String p6,
		@PathParam("p7") String p7)
{
	StringBuilder sb = new StringBuilder();
	sb.append(p1).append("/");
	sb.append(p2).append("/");
	sb.append(p3).append("/");
	sb.append(p4).append("/");
	sb.append(p5).append("/");
	sb.append(p6).append("/");
	sb.append(p7);
	return getHttpResponse(sb.toString());

}
 
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:19,代码来源:DownloadService.java

示例6: getFile8

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("{p1}/{p2}/{p3}/{p4}/{p5}/{p6}/{p7}/{p8}")
public HttpResponse getFile8(@PathParam("p1") String p1, @PathParam("p2") String p2,
		@PathParam("p3") String p3, @PathParam("p4") String p4,
		@PathParam("p5") String p5, @PathParam("p6") String p6,
		@PathParam("p7") String p7, @PathParam("p8") String p8)
{
	StringBuilder sb = new StringBuilder();
	sb.append(p1).append("/");
	sb.append(p2).append("/");
	sb.append(p3).append("/");
	sb.append(p4).append("/");
	sb.append(p4).append("/");
	sb.append(p5).append("/");
	sb.append(p7).append("/");
	sb.append(p8);
	return getHttpResponse(sb.toString());

}
 
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:20,代码来源:DownloadService.java

示例7: getFile9

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("{p1}/{p2}/{p3}/{p4}/{p5}/{p6}/{p7}/{p8}/{p9}")
public HttpResponse getFile9(@PathParam("p1") String p1, @PathParam("p2") String p2,
		@PathParam("p3") String p3, @PathParam("p4") String p4,
		@PathParam("p5") String p5, @PathParam("p6") String p6,
		@PathParam("p7") String p7, @PathParam("p8") String p8,
		@PathParam("p9") String p9)
{
	StringBuilder sb = new StringBuilder();
	sb.append(p1).append("/");
	sb.append(p2).append("/");
	sb.append(p3).append("/");
	sb.append(p4).append("/");
	sb.append(p5).append("/");
	sb.append(p6).append("/");
	sb.append(p7).append("/");
	sb.append(p8).append("/");
	sb.append(p9);
	return getHttpResponse(sb.toString());

}
 
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:22,代码来源:DownloadService.java

示例8: getFile10

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("{p1}/{p2}/{p3}/{p4}/{p5}/{p6}/{p7}/{p8}/{p9}/{p10}")
public HttpResponse getFile10(@PathParam("p1") String p1, @PathParam("p2") String p2,
		@PathParam("p3") String p3, @PathParam("p4") String p4,
		@PathParam("p5") String p5, @PathParam("p6") String p6,
		@PathParam("p7") String p7, @PathParam("p8") String p8,
		@PathParam("p9") String p9, @PathParam("p10") String p10)
{
	StringBuilder sb = new StringBuilder();
	sb.append(p1).append("/");
	sb.append(p2).append("/");
	sb.append(p3).append("/");
	sb.append(p4).append("/");
	sb.append(p5).append("/");
	sb.append(p6).append("/");
	sb.append(p7).append("/");
	sb.append(p8).append("/");
	sb.append(p9).append("/");
	sb.append(p10);
	return getHttpResponse(sb.toString());

}
 
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:23,代码来源:DownloadService.java

示例9: addNewAnnotationContextNull

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@POST
@Path("annotationContexts")
@ResourceListApi(description = " stores the relation data between an object and an annotations.")
@ApiResponses(value = {
		@ApiResponse(code = 200, message = "AnnotationContext saved successfully."),
		@ApiResponse(code = 400, message = "JSON file is not correct."),
		@ApiResponse(code = 401, message = "User is not authenticated."),
		@ApiResponse(code = 409, message = "AnnotationContext already exists."),
		@ApiResponse(code = 500, message = "Internal error.") })
public HttpResponse addNewAnnotationContextNull(@ContentParam String annotationContextData) {

	return null;
}
 
开发者ID:rwth-acis,项目名称:LAS2peer-AnnotationService,代码行数:14,代码来源:AnnotationsService.java

示例10: getSwaggerResourceListing

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("api-docs")
@Summary("retrieve Swagger 1.2 resource listing.")
@ApiResponses(value = {
		@ApiResponse(code = 200, message = "Swagger 1.2 compliant resource listing"),
		@ApiResponse(code = 404, message = "Swagger resource listing not available due to missing annotations."), })
@Produces(MediaType.APPLICATION_JSON)
public HttpResponse getSwaggerResourceListing() {
	return RESTMapper.getSwaggerResourceListing(this.getClass());
}
 
开发者ID:rwth-acis,项目名称:LAS2peer-AnnotationService,代码行数:11,代码来源:AnnotationsService.java

示例11: getSwaggerApiDeclaration

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
@Path("api-docs/{tlr}")
@Produces(MediaType.APPLICATION_JSON)
@Summary("retrieve Swagger 1.2 API declaration for given top-level resource.")
@ApiResponses(value = {
		@ApiResponse(code = 200, message = "Swagger 1.2 compliant API declaration"),
		@ApiResponse(code = 404, message = "Swagger API declaration not available due to missing annotations."), })
public HttpResponse getSwaggerApiDeclaration(@PathParam("tlr") String tlr) {
	return RESTMapper.getSwaggerApiDeclaration(this.getClass(), tlr, epUrl);
}
 
开发者ID:rwth-acis,项目名称:LAS2peer-AnnotationService,代码行数:11,代码来源:AnnotationsService.java

示例12: getEvaluationResults

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
/**
    * 
    * @param datasetId
    * @param evaluationId
    * @return
    */
   @GET
   @Path("datasets/{datasetId}/evaluations/{evaluationId}")
   @ResourceListApi(description = "Get the evaluation results.")
   @Produces(MediaType.APPLICATION_JSON)
   @Consumes(MediaType.TEXT_PLAIN)
   @ApiResponses(value = { @ApiResponse(code = 200, message = "Success") })
   @Summary("Returns the evaluation metrics computed if requested when applying algorithms. Evaluation Id is retrieved after applying algorithm on the dataset.")
   public HttpResponse getEvaluationResults(@PathParam("datasetId") String datasetId, @PathParam("evaluationId") String evaluationId) {

String databaseName = getDatabaseName(datasetId);
if (databaseName == null) {
    try {
	throw new ERSException(ExceptionMessages.DATABASE_NOT_FOUND);
    } catch (ERSException e) {
	e.printStackTrace();
    }
}

log.info("evaluationId:: " + evaluationId);
DatabaseHandler dbHandler = null;
dbHandler = new DatabaseHandler(databaseName, "root", "");
String evaluationMeasures = dbHandler.getEvaluationMetrics(Long.parseLong(evaluationId));

HttpResponse res = new HttpResponse(evaluationMeasures);
res.setStatus(200);
return res;
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:34,代码来源:ExpertRecommenderService.java

示例13: getTags

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
/**
    * 
    * @param datasetId
    * @param expertCollectionId
    * @param expertId
    * @return
    */
   @GET
   @Path("datasets/{datasetId}/experts/{expertsCollectionId}/expert/{expertId}/tags")
   @ResourceListApi(description = "Retrieves the related tags for the user")
   @Produces(MediaType.TEXT_PLAIN)
   @Consumes(MediaType.TEXT_PLAIN)
   @ApiResponses(value = { @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 401, message = "Unauthorized") })
   @Summary("Returns tags associated with experts for the specific post.")
   public HttpResponse getTags(@PathParam("datasetId") String datasetId, @PathParam("expertsCollectionId") String expertCollectionId,
    @PathParam("expertId") String expertId) {

String databaseName = getDatabaseName(datasetId);
if (databaseName == null) {
    try {
	throw new ERSException(ExceptionMessages.DATABASE_NOT_FOUND);
    } catch (ERSException e) {
	e.printStackTrace();
    }
}

DatabaseHandler dbHandler = null;
dbHandler = new DatabaseHandler(databaseName, "root", "");

TagExtractor extractor = new TagExtractor(dbHandler, expertCollectionId, expertId);

HttpResponse res = new HttpResponse(extractor.getTags());
res.setStatus(200);
return res;
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:36,代码来源:ExpertRecommenderService.java

示例14: getPosts

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
/**
    * 
    * @param datasetId
    * @param expertCollectionId
    * @param expertId
    * @return
    */
   @GET
   @Path("datasets/{datasetId}/experts/{expertsCollectionId}/expert/{expertId}/posts")
   @ResourceListApi(description = "Returns the related post of the expert.")

   @ApiResponses(value = { @ApiResponse(code = 200, message = "Success") })
   @Summary("Returns the related posts of the expert user.")
   public HttpResponse getPosts(@PathParam("datasetId") String datasetId, @PathParam("expertsCollectionId") String expertCollectionId,
    @PathParam("expertId") String expertId) {

String databaseName = getDatabaseName(datasetId);
if (databaseName == null) {
    try {
	throw new ERSException(ExceptionMessages.DATABASE_NOT_FOUND);
    } catch (ERSException e) {
	e.printStackTrace();
    }
}

DatabaseHandler dbHandler = null;
dbHandler = new DatabaseHandler(databaseName, "root", "");
RelatedPostsExtractor extractor = new RelatedPostsExtractor(dbHandler, expertCollectionId, expertId);

HttpResponse res = new HttpResponse(extractor.getPosts());
res.setStatus(200);
return res;
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:34,代码来源:ExpertRecommenderService.java

示例15: getSwaggerApiDeclaration

import i5.las2peer.restMapper.annotations.Path; //导入依赖的package包/类
@GET
   @Path("api-docs/{tlr}")
   @Produces(MediaType.APPLICATION_JSON)
   public HttpResponse getSwaggerApiDeclaration(@PathParam("tlr") String tlr) {
// return RESTMapper.getSwaggerApiDeclaration(this.getClass(), tlr,
// "http://127.0.0.1:8080/ocd/");
return RESTMapper.getSwaggerApiDeclaration(this.getClass(), tlr, "https://api.learning-layers.eu/ers/");
   }
 
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:9,代码来源:ExpertRecommenderService.java


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