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


Java ValidationResult类代码示例

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


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

示例1: debugMapping

import i5.las2peer.restMapper.tools.ValidationResult; //导入依赖的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.tools.ValidationResult; //导入依赖的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


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