/** * Overrides default copy method to add support for copying alarm sub-components. * @return a copy of the instance * @throws java.text.ParseException where an error occurs parsing data * @throws java.io.IOException where an error occurs reading data * @throws java.net.URISyntaxException where an invalid URI is encountered * @see net.fortuna.ical4j.model.Component#copy() */ public Component copy() throws ParseException, IOException, URISyntaxException { final Vote copy = (Vote) super.copy(); return copy; }
/** * Apply validation for METHOD=ADD. * @throws ValidationException where the component does not comply with RFC2446 * @deprecated */ public final void validateAdd() throws ValidationException { validate(Method.ADD); }
@SuppressWarnings("unchecked") private void parseCalendarComponent(CalendarComponent component, Resource resource) throws RDFHandlerException, RDFParseException, UnsupportedEncodingException { if(component.getProperty(Property.ATTACH) != null) { Attach attach = (Attach)component.getProperty(Property.ATTACH); if(attach.getUri() != null) { URI r_attach = createURI(URLDecoder.decode(attach.getUri().toString(),"UTF-8")); if(component.getProperty(Property.CATEGORIES) != null) { Categories categories = (Categories)component.getProperty(Property.CATEGORIES); URI p_categories = createURI(NS_ICAL + "categories"); for(Iterator<String> it = categories.getCategories().iterator(); it.hasNext(); ) { if(component.getProperty(Property.GEO) != null) { Geo geo = (Geo)component.getProperty(Property.GEO); URI p_geo = createURI(NS_ICAL + "geo"); createLocation(resource, p_geo, geo); if(component.getProperty(Property.RESOURCES) != null) { Resources resources = (Resources)component.getProperty(Property.RESOURCES); URI p_resources = createURI(NS_ICAL + "resources"); for(Iterator<String> it = resources.getResources().iterator(); it.hasNext(); ) { createDateProperty((DateProperty)component.getProperty(Property.COMPLETED), resource, NS_ICAL + "completed"); createDateProperty((DateProperty)component.getProperty(Property.DUE), resource, NS_ICAL + "due"); createDateProperty((DateProperty)component.getProperty(Property.DTEND), resource, NS_ICAL + "dtend"); createDateProperty((DateProperty)component.getProperty(Property.DTSTART), resource, NS_ICAL + "dtstart"); if(component.getProperty(Property.DURATION) != null) { Duration duration = (Duration)component.getProperty(Property.DURATION);
/** * Create a base Calendar containing a single component. * @param comp Component to add to the base Calendar * @param icalUid uid of component, if null no UID * property will be added to the component * @return base Calendar */ public static Calendar createBaseCalendar(CalendarComponent comp, String icalUid) { Uid uid = new Uid(icalUid); comp.getProperties().add(uid); return createBaseCalendar(comp); }
private void createStringProperty(CalendarComponent event, Resource r_event, String icalProperty, String rdfProperty) throws RDFParseException, RDFHandlerException { if(event.getProperty(icalProperty) != null) { Property description = event.getProperty(icalProperty); URI p_description = createURI(rdfProperty); Literal v_description = createLiteral(description.getValue(), null, null); rdfHandler.handleStatement(createStatement(r_event,p_description,v_description)); } }
(comp instanceof VToDo)) { if (((CalendarComponent)comp).getProperties(). getProperty(Property.RECURRENCE_ID) == null) { master = (CalendarComponent)comp; CalendarComponent newcomp = (CalendarComponent)comp.copy(); componentToUTC((CalendarComponent)newcomp); newCal.getComponents().add(newcomp);
/** * Performs method-specific ITIP validation. * @param method the applicable method * @throws ValidationException where the component does not comply with RFC2446 */ public final void validate(Method method) throws ValidationException { final Validator validator = getValidator(method); if (validator != null) { validator.validate(this); } else { throw new ValidationException("Unsupported method: " + method); } }
if (! (obj instanceof VTimeZone)) { CalendarComponent event = (CalendarComponent) obj; Organizer organizer = (Organizer) event.getProperty(Property.ORGANIZER); for (Object oAttendee: event.getProperties(Property.ATTENDEE)) { Attendee a = (Attendee) oAttendee; if (a.getValue().startsWith("mailto:")) {
/** * Create a base Calendar containing a single component. * @param comp Component to add to the base Calendar * @param icalUid uid of component, if null no UID * property will be added to the component * @return base Calendar */ public static Calendar createBaseCalendar(CalendarComponent comp, String icalUid) { Uid uid = new Uid(icalUid); comp.getProperties().add(uid); return createBaseCalendar(comp); }
private void createUrlProperty(CalendarComponent event, Resource r_event, String icalProperty, String rdfProperty) throws RDFParseException, RDFHandlerException { if(event.getProperty(icalProperty) != null) { Property description = event.getProperty(icalProperty); URI p_description = createURI(rdfProperty); URI v_description = createURI(description.getValue()); rdfHandler.handleStatement(createStatement(r_event,p_description,v_description)); } }
/** * Performs method-specific ITIP validation. * @param method the applicable method * @throws ValidationException where the component does not comply with RFC2446 */ public final void validate(Method method) throws ValidationException { final Validator<CalendarComponent> validator = getValidator(method); if (validator != null) { validator.validate(this); } else { throw new ValidationException("Unsupported method: " + method); } }
if (! (obj instanceof VTimeZone)) { CalendarComponent event = (CalendarComponent) obj; Organizer organizer = (Organizer) event.getProperty(Property.ORGANIZER); for (Object oAttendee: event.getProperties(Property.ATTENDEE)) { Attendee a = (Attendee) oAttendee; if (a.getValue().startsWith("mailto:")) {
public String getTimezoneName() { Calendar timezone = getTimezoneCalendar(); if (timezone == null) { return null; } return timezone.getComponents().getComponent(Component.VTIMEZONE). getProperties().getProperty(Property.TZID).getValue(); }
private void createIntProperty(CalendarComponent event, Resource r_event, String icalProperty, String rdfProperty) throws RDFParseException, RDFHandlerException { if(event.getProperty(icalProperty) != null) { Property description = event.getProperty(icalProperty); URI p_description = createURI(rdfProperty); Literal v_description = createLiteral(description.getValue(), null, createURI("http://www.w3.org/2001/XMLSchema#int")); rdfHandler.handleStatement(createStatement(r_event,p_description,v_description)); } }
/** * Apply validation for METHOD=CANCEL. * @throws ValidationException where the component does not comply with RFC2446 * @deprecated */ public final void validateCancel() throws ValidationException { validate(Method.CANCEL); }
/** * Overrides default copy method to add support for copying alarm sub-components. * @return a copy of the instance * @throws java.text.ParseException where an error occurs parsing data * @throws java.io.IOException where an error occurs reading data * @throws java.net.URISyntaxException where an invalid URI is encountered * @see net.fortuna.ical4j.model.Component#copy() */ public Component copy() throws ParseException, IOException, URISyntaxException { final Vote copy = (Vote) super.copy(); return copy; } }
/** * Performs method-specific ITIP validation. * @param method the applicable method * @throws ValidationException where the component does not comply with RFC2446 */ public final void validate(Method method) throws ValidationException { final Validator<CalendarComponent> validator = getValidator(method); if (validator != null) { validator.validate(this); } else { throw new ValidationException("Unsupported method: " + method); } }
final Uid uid = (Uid) c.getProperty(Property.UID); for (final Property p : c.getProperties()) { final TzId tzid = (TzId) p.getParameter(Parameter.TZID); if (tzid != null) {