热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

net.fortuna.ical4j.validate.ValidationException类的使用及代码示例

本文整理了Java中net.fortuna.ical4j.validate.ValidationException类的一些代码示例,展示了Validatio

本文整理了Java中net.fortuna.ical4j.validate.ValidationException类的一些代码示例,展示了ValidationException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ValidationException类的具体详情如下:
包路径:net.fortuna.ical4j.validate.ValidationException
类名称:ValidationException

ValidationException介绍

[英]$Id$ [23-Apr-2004] An exception thrown during validation.
[中]$Id$[23-Apr-2004]验证期间引发异常。

代码示例

代码示例来源:origin: ical4j/ical4j

/**
* Ensure a property doesn't occur in the specified list.
* @param propertyName the name of a property
* @param properties a list of properties
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException {
if (properties.getProperty(propertyName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName});
}
}

代码示例来源:origin: stackoverflow.com

@Stateless
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class ExampleRepositoryDelegate {
@EJB
private ExampleRepository repository;
public void add(MyEntity me) {
try {
repository.add(me);
} catch (ValidationException e) {
e.printStackTrace();
}
}
}

代码示例来源:origin: ical4j/ical4j

/**
* @param componentName a component name used in the assertion
* @param components a list of components
* @throws ValidationException where the assertion fails
*/
public static void assertNone(String componentName, ComponentList components) throws ValidationException {
if (components.getComponent(componentName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName});
}
}

代码示例来源:origin: stackoverflow.com

private void saveAddressBook(String fullName) {
try {
PrintWriter out = new PrintWriter("filename.txt");
out.println(fullName);
out.close();
} catch(ValidationException e) {
e.printStackTrace();
}
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
* Ensure a property doesn't occur in the specified list.
* @param propertyName the name of a property
* @param properties a list of properties
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException {
if (properties.getProperty(propertyName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName});
}
}

代码示例来源:origin: ical4j/ical4j

/**
*
*/
public final void testValidationException() {
try {
property.validate();
fail("Should throw ValidationException");
}
catch (ValidationException e) {
e.printStackTrace();
}
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
* Ensure a parameter doesn't occur in the specified list.
* @param paramName the name of a parameter
* @param parameters a list of parameters
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException {
if (parameters.getParameter(paramName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName});
}
}

代码示例来源:origin: ical4j/ical4j

@Test
public void shouldCorrectCalendarBody() throws IOException, ParserException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException {
String[] calendarNames = { "yahoo1.txt", "yahoo2.txt", "outlook1.txt", "outlook2.txt", "apple.txt" };
for (String calendarName : calendarNames) {
Calendar calendar = buildCalendar(calendarName);
calendar = transformer.transform(calendar);
try {
calendar.validate();
} catch (ValidationException e) {
e.printStackTrace();
fail("Validation failed for " + calendarName);
}
}
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
* Ensure a property doesn't occur in the specified list.
* @param propertyName the name of a property
* @param properties a list of properties
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException {
if (properties.getProperty(propertyName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName});
}
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
* @param componentName a component name used in the assertion
* @param components a list of components
* @throws ValidationException where the assertion fails
*/
public static void assertNone(String componentName, ComponentList components) throws ValidationException {
if (components.getComponent(componentName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName});
}
}

代码示例来源:origin: ical4j/ical4j

/**
* Ensure a parameter doesn't occur in the specified list.
* @param paramName the name of a parameter
* @param parameters a list of parameters
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException {
if (parameters.getParameter(paramName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName});
}
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
* Ensure a parameter doesn't occur in the specified list.
* @param paramName the name of a parameter
* @param parameters a list of parameters
* @throws ValidationException thrown when the specified property
* is found in the list of properties
*/
public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException {
if (parameters.getParameter(paramName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName});
}
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
* @param componentName a component name used in the assertion
* @param components a list of components
* @throws ValidationException where the assertion fails
*/
public static void assertNone(String componentName, ComponentList components) throws ValidationException {
if (components.getComponent(componentName) != null) {
throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {componentName});
}
}

代码示例来源:origin: ical4j/ical4j

/**
* {@inheritDoc}
*/
public final void validate() throws ValidationException {
if (percentage <0 || percentage > 100) {
throw new ValidationException(getName() + " with invalid value: " + percentage);
}
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
* {@inheritDoc}
*/
public final void validate() throws ValidationException {
if (percentage <0 || percentage > 100) {
throw new ValidationException(getName() + " with invalid value: " + percentage);
}
}

代码示例来源:origin: ical4j/ical4j

public void validate() throws ValidationException {
throw new ValidationException();
}
};

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
* {@inheritDoc}
*/
public final void validate() throws ValidationException {
if (percentage <0 || percentage > 100) {
throw new ValidationException(getName() + " with invalid value: " + percentage);
}
}

代码示例来源:origin: org.bedework/bw-ical4j-vcard

/**
* @throws ValidationException where the parameter list is not empty
*/
protected final void assertParametersEmpty() throws ValidationException {
if (!getParameters().isEmpty()) {
throw new ValidationException("No parameters allowed for property: " + id);
}
}

代码示例来源:origin: org.mnode.ical4j/ical4j-vcard

/**
* @param propertyId
* @throws ValidationException
*/
private void assertOne(final Property.Id propertyId) throws ValidationException {
final List properties = getProperties(propertyId);
if (properties.size() != 1) {
throw new ValidationException("Property [" + propertyId + "] must be specified once");
}
}

代码示例来源:origin: org.mnode.ical4j/ical4j-vcard

/**
* @throws ValidationException where the parameter list is not empty
*/
protected final void assertParametersEmpty() throws ValidationException {
if (!getParameters().isEmpty()) {
throw new ValidationException("No parameters allowed for property: " + id);
}
}

推荐阅读
  • JDK源码学习之HashTable(附带面试题)的学习笔记
    本文介绍了JDK源码学习之HashTable(附带面试题)的学习笔记,包括HashTable的定义、数据类型、与HashMap的关系和区别。文章提供了干货,并附带了其他相关主题的学习笔记。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Java太阳系小游戏分析和源码详解
    本文介绍了一个基于Java的太阳系小游戏的分析和源码详解。通过对面向对象的知识的学习和实践,作者实现了太阳系各行星绕太阳转的效果。文章详细介绍了游戏的设计思路和源码结构,包括工具类、常量、图片加载、面板等。通过这个小游戏的制作,读者可以巩固和应用所学的知识,如类的继承、方法的重载与重写、多态和封装等。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • JavaSE笔试题-接口、抽象类、多态等问题解答
    本文解答了JavaSE笔试题中关于接口、抽象类、多态等问题。包括Math类的取整数方法、接口是否可继承、抽象类是否可实现接口、抽象类是否可继承具体类、抽象类中是否可以有静态main方法等问题。同时介绍了面向对象的特征,以及Java中实现多态的机制。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • Python中的PyInputPlus模块原文:https ... [详细]
  • 从壹开始前后端分离【 .NET Core2.0 +Vue2.0 】框架之六 || API项目整体搭建 6.1 仓储模式
    代码已上传Github+Gitee,文末有地址  书接上文:前几回文章中,我们花了三天的时间简单了解了下接口文档Swagger框架,已经完全解放了我们的以前的Word说明文档,并且可以在线进行调 ... [详细]
  • 五、RabbitMQ Java Client基本使用详解
    JavaClient的5.x版本系列需要JDK8,用于编译和运行。在Android上,仅支持Android7.0或更高版本。4.x版本系列支持7.0之前 ... [详细]
  • VScode格式化文档换行或不换行的设置方法
    本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
  • 移动传感器扫描覆盖摘要:关于传感器网络中的地址覆盖问题,已经做过很多尝试。他们通常归为两类,全覆盖和栅栏覆盖,统称为静态覆盖 ... [详细]
author-avatar
bai小白
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有