本文整理汇总了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;
}
示例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;
}