本文整理汇总了Java中i5.las2peer.restMapper.RESTMapper类的典型用法代码示例。如果您正苦于以下问题:Java RESTMapper类的具体用法?Java RESTMapper怎么用?Java RESTMapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RESTMapper类属于i5.las2peer.restMapper包,在下文中一共展示了RESTMapper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: debugMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
/**
* Method for debugging purposes. Here the concept of restMapping validation
* is shown. It is important to check, if all annotations are correct and
* consistent. Otherwise the service will not be accessible by the
* WebConnector. Best to do it in the unit tests. To avoid being
* overlooked/ignored the method is implemented here and not in the test
* section.
*
* @return true, if mapping correct
*/
public boolean debugMapping() {
String XML_LOCATION = "./restMapping.xml";
String xml = getRESTMapping();
try {
RESTMapper.writeFile(XML_LOCATION, xml);
} catch (IOException e) {
e.printStackTrace();
}
XMLCheck validator = new XMLCheck();
ValidationResult result = validator.validate(xml);
if (result.isValid())
return true;
return false;
}
开发者ID:rwth-acis,项目名称:LAS2peer-AnnotationService,代码行数:28,代码来源:AnnotationsService.java
示例2: debugMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
/**
* Method for debugging purposes. Here the concept of restMapping validation
* is shown. It is important to check, if all annotations are correct and
* consistent. Otherwise the service will not be accessible by the
* WebConnector. Best to do it in the unit tests. To avoid being
* overlooked/ignored the method is implemented here and not in the test
* section.
*
* @return true, if mapping correct
*/
public boolean debugMapping() {
String XML_LOCATION = "./restMapping.xml";
String xml = getRESTMapping();
try {
RESTMapper.writeFile(XML_LOCATION, xml);
} catch (IOException e) {
e.printStackTrace();
}
XMLCheck validator = new XMLCheck();
ValidationResult result = validator.validate(xml);
if (result.isValid())
return true;
return false;
}
开发者ID:learning-layers,项目名称:Expert-Identification-Service,代码行数:28,代码来源:ExpertRecommenderService.java
示例3: getSwaggerResourceListing
import i5.las2peer.restMapper.RESTMapper; //导入依赖的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
示例4: getSwaggerApiDeclaration
import i5.las2peer.restMapper.RESTMapper; //导入依赖的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
示例5: getRESTMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
/**
* This method is needed for every RESTful application in LAS2peer. There is
* no need to change!
*
* @return the mapping
*/
public String getRESTMapping() {
String result = "";
try {
result = RESTMapper.getMethodsAsXML(this.getClass());
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
开发者ID:rwth-acis,项目名称:LAS2peer-AnnotationService,代码行数:17,代码来源:AnnotationsService.java
示例6: getRESTMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
/**
* This method is needed for every RESTful application in LAS2peer. There is
* no need to change!
*
* @return the mapping
*/
public String getRESTMapping() {
String result = "";
try {
result = RESTMapper.getMethodsAsXML(this.getClass());
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
开发者ID:learning-layers,项目名称:Expert-Identification-Service,代码行数:17,代码来源:ExpertRecommenderService.java
示例7: getRESTMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
public String getRESTMapping()
{
String result="";
try
{
result= RESTMapper.getMethodsAsXML(this.getClass());
}
catch (Exception e)
{
e.printStackTrace();
}
return result;
}
开发者ID:rwth-acis,项目名称:LAS2peer-iStarMLModel-Service,代码行数:14,代码来源:IStarMLModelService.java
示例8: getSwaggerApiDeclaration
import i5.las2peer.restMapper.RESTMapper; //导入依赖的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
示例9: getRESTMapping
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
/**
* This method is needed for every RESTful application in LAS2peer. There is no need to change!
*
* @return the mapping
*/
public String getRESTMapping() {
String result = "";
try {
result = RESTMapper.getMethodsAsXML(this.getClass());
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
开发者ID:rwth-acis,项目名称:las2peer-FileStorage-Service,代码行数:16,代码来源:DownloadService.java
示例10: getSwaggerResourceListing
import i5.las2peer.restMapper.RESTMapper; //导入依赖的package包/类
@GET
@Path("api-docs")
@Produces(MediaType.APPLICATION_JSON)
public HttpResponse getSwaggerResourceListing() {
return RESTMapper.getSwaggerResourceListing(this.getClass());
}
开发者ID:rwth-acis,项目名称:Expert-Recommender-Service,代码行数:7,代码来源:ExpertRecommenderService.java
注:本文中的i5.las2peer.restMapper.RESTMapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论