src/net/fortuna/ical4j/model/component/VJournal.java

branch
ICAL4J_EMBED_1
changeset 15
cc93757aeca3
parent 14
5ae3e5665a0b
child 18
6dcaece8ec41
     1.1 --- a/src/net/fortuna/ical4j/model/component/VJournal.java	Thu Feb 12 18:02:00 2015 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,540 +0,0 @@
     1.4 -/**
     1.5 - * Copyright (c) 2012, Ben Fortuna
     1.6 - * All rights reserved.
     1.7 - *
     1.8 - * Redistribution and use in source and binary forms, with or without
     1.9 - * modification, are permitted provided that the following conditions
    1.10 - * are met:
    1.11 - *
    1.12 - *  o Redistributions of source code must retain the above copyright
    1.13 - * notice, this list of conditions and the following disclaimer.
    1.14 - *
    1.15 - *  o Redistributions in binary form must reproduce the above copyright
    1.16 - * notice, this list of conditions and the following disclaimer in the
    1.17 - * documentation and/or other materials provided with the distribution.
    1.18 - *
    1.19 - *  o Neither the name of Ben Fortuna nor the names of any other contributors
    1.20 - * may be used to endorse or promote products derived from this software
    1.21 - * without specific prior written permission.
    1.22 - *
    1.23 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    1.24 - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    1.25 - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    1.26 - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    1.27 - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1.28 - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    1.29 - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    1.30 - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    1.31 - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    1.32 - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    1.33 - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.34 - */
    1.35 -package net.fortuna.ical4j.model.component;
    1.36 -
    1.37 -import java.util.HashMap;
    1.38 -import java.util.Map;
    1.39 -
    1.40 -import net.fortuna.ical4j.model.Date;
    1.41 -import net.fortuna.ical4j.model.Property;
    1.42 -import net.fortuna.ical4j.model.PropertyList;
    1.43 -import net.fortuna.ical4j.model.ValidationException;
    1.44 -import net.fortuna.ical4j.model.Validator;
    1.45 -import net.fortuna.ical4j.model.property.Clazz;
    1.46 -import net.fortuna.ical4j.model.property.Created;
    1.47 -import net.fortuna.ical4j.model.property.Description;
    1.48 -import net.fortuna.ical4j.model.property.DtStamp;
    1.49 -import net.fortuna.ical4j.model.property.DtStart;
    1.50 -import net.fortuna.ical4j.model.property.LastModified;
    1.51 -import net.fortuna.ical4j.model.property.Method;
    1.52 -import net.fortuna.ical4j.model.property.Organizer;
    1.53 -import net.fortuna.ical4j.model.property.RecurrenceId;
    1.54 -import net.fortuna.ical4j.model.property.Sequence;
    1.55 -import net.fortuna.ical4j.model.property.Status;
    1.56 -import net.fortuna.ical4j.model.property.Summary;
    1.57 -import net.fortuna.ical4j.model.property.Uid;
    1.58 -import net.fortuna.ical4j.model.property.Url;
    1.59 -import net.fortuna.ical4j.util.CompatibilityHints;
    1.60 -import net.fortuna.ical4j.util.PropertyValidator;
    1.61 -
    1.62 -/**
    1.63 - * $Id$ [Apr 5, 2004]
    1.64 - *
    1.65 - * Defines an iCalendar VJOURNAL component.
    1.66 - *
    1.67 - * <pre>
    1.68 - *    4.6.3 Journal Component
    1.69 - *
    1.70 - *       Component Name: VJOURNAL
    1.71 - *
    1.72 - *       Purpose: Provide a grouping of component properties that describe a
    1.73 - *       journal entry.
    1.74 - *
    1.75 - *       Formal Definition: A &quot;VJOURNAL&quot; calendar component is defined by the
    1.76 - *       following notation:
    1.77 - *
    1.78 - *         journalc   = &quot;BEGIN&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF
    1.79 - *                      jourprop
    1.80 - *                      &quot;END&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF
    1.81 - *
    1.82 - *         jourprop   = *(
    1.83 - *
    1.84 - *                    ; the following are optional,
    1.85 - *                    ; but MUST NOT occur more than once
    1.86 - *
    1.87 - *                    class / created / description / dtstart / dtstamp /
    1.88 - *                    last-mod / organizer / recurid / seq / status /
    1.89 - *                    summary / uid / url /
    1.90 - *
    1.91 - *                    ; the following are optional,
    1.92 - *                    ; and MAY occur more than once
    1.93 - *
    1.94 - *                    attach / attendee / categories / comment /
    1.95 - *                    contact / exdate / exrule / related / rdate /
    1.96 - *                    rrule / rstatus / x-prop
    1.97 - *
    1.98 - *                    )
    1.99 - * </pre>
   1.100 - *
   1.101 - * Example 1 - Creating a journal associated with an event:
   1.102 - *
   1.103 - * <pre><code>
   1.104 - * DtStart meetingDate = (DtStart) meeting.getProperties().getProperty(
   1.105 - *         Property.DTSTART);
   1.106 - *
   1.107 - * VJournal minutes = new VJournal(meetingDate.getTime(),
   1.108 - *         &quot;Progress Meeting - Minutes&quot;);
   1.109 - *
   1.110 - * // add timezone information..
   1.111 - * TzId tzParam = meetingDate.getParameters().getParmaeter(Parameter.TZID);
   1.112 - * minutes.getProperties().getProperty(Property.DTSTART).getParameters().add(
   1.113 - *         tzParam);
   1.114 - *
   1.115 - * // add description..
   1.116 - * minutes.getProperties().add(new Description(&quot;1. Agenda.., 2. Action Items..&quot;));
   1.117 - * </code></pre>
   1.118 - *
   1.119 - * @author Ben Fortuna
   1.120 - */
   1.121 -public class VJournal extends CalendarComponent {
   1.122 -
   1.123 -    private static final long serialVersionUID = -7635140949183238830L;
   1.124 -
   1.125 -    private final Map methodValidators = new HashMap();
   1.126 -    {
   1.127 -        methodValidators.put(Method.ADD, new AddValidator());
   1.128 -        methodValidators.put(Method.CANCEL, new CancelValidator());
   1.129 -        methodValidators.put(Method.PUBLISH, new PublishValidator());
   1.130 -    }
   1.131 -    
   1.132 -    /**
   1.133 -     * Default constructor.
   1.134 -     */
   1.135 -    public VJournal() {
   1.136 -        super(VJOURNAL);
   1.137 -        getProperties().add(new DtStamp());
   1.138 -    }
   1.139 -
   1.140 -    /**
   1.141 -     * Constructor.
   1.142 -     * @param properties a list of properties
   1.143 -     */
   1.144 -    public VJournal(final PropertyList properties) {
   1.145 -        super(VJOURNAL, properties);
   1.146 -    }
   1.147 -
   1.148 -    /**
   1.149 -     * Constructs a new VJOURNAL instance associated with the specified time with the specified summary.
   1.150 -     * @param start the date the journal entry is associated with
   1.151 -     * @param summary the journal summary
   1.152 -     */
   1.153 -    public VJournal(final Date start, final String summary) {
   1.154 -        this();
   1.155 -        getProperties().add(new DtStart(start));
   1.156 -        getProperties().add(new Summary(summary));
   1.157 -    }
   1.158 -
   1.159 -    /**
   1.160 -     * {@inheritDoc}
   1.161 -     */
   1.162 -    public final void validate(final boolean recurse)
   1.163 -            throws ValidationException {
   1.164 -
   1.165 -        if (!CompatibilityHints
   1.166 -                .isHintEnabled(CompatibilityHints.KEY_RELAXED_VALIDATION)) {
   1.167 -
   1.168 -            // From "4.8.4.7 Unique Identifier":
   1.169 -            // Conformance: The property MUST be specified in the "VEVENT", "VTODO",
   1.170 -            // "VJOURNAL" or "VFREEBUSY" calendar components.
   1.171 -            PropertyValidator.getInstance().assertOne(Property.UID,
   1.172 -                    getProperties());
   1.173 -
   1.174 -            // From "4.8.7.2 Date/Time Stamp":
   1.175 -            // Conformance: This property MUST be included in the "VEVENT", "VTODO",
   1.176 -            // "VJOURNAL" or "VFREEBUSY" calendar components.
   1.177 -            PropertyValidator.getInstance().assertOne(Property.DTSTAMP,
   1.178 -                    getProperties());
   1.179 -        }
   1.180 -
   1.181 -        /*
   1.182 -         * ; the following are optional, ; but MUST NOT occur more than once class / created / description / dtstart /
   1.183 -         * dtstamp / last-mod / organizer / recurid / seq / status / summary / uid / url /
   1.184 -         */
   1.185 -        PropertyValidator.getInstance().assertOneOrLess(Property.CLASS,
   1.186 -                getProperties());
   1.187 -        PropertyValidator.getInstance().assertOneOrLess(Property.CREATED,
   1.188 -                getProperties());
   1.189 -        PropertyValidator.getInstance().assertOneOrLess(Property.DESCRIPTION,
   1.190 -                getProperties());
   1.191 -        PropertyValidator.getInstance().assertOneOrLess(Property.DTSTART,
   1.192 -                getProperties());
   1.193 -        PropertyValidator.getInstance().assertOneOrLess(Property.DTSTAMP,
   1.194 -                getProperties());
   1.195 -        PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED,
   1.196 -                getProperties());
   1.197 -        PropertyValidator.getInstance().assertOneOrLess(Property.ORGANIZER,
   1.198 -                getProperties());
   1.199 -        PropertyValidator.getInstance().assertOneOrLess(Property.RECURRENCE_ID,
   1.200 -                getProperties());
   1.201 -        PropertyValidator.getInstance().assertOneOrLess(Property.SEQUENCE,
   1.202 -                getProperties());
   1.203 -        PropertyValidator.getInstance().assertOneOrLess(Property.STATUS,
   1.204 -                getProperties());
   1.205 -        PropertyValidator.getInstance().assertOneOrLess(Property.SUMMARY,
   1.206 -                getProperties());
   1.207 -        PropertyValidator.getInstance().assertOneOrLess(Property.UID,
   1.208 -                getProperties());
   1.209 -        PropertyValidator.getInstance().assertOneOrLess(Property.URL,
   1.210 -                getProperties());
   1.211 -
   1.212 -        final Status status = (Status) getProperty(Property.STATUS);
   1.213 -        if (status != null && !Status.VJOURNAL_DRAFT.getValue().equals(status.getValue())
   1.214 -                && !Status.VJOURNAL_FINAL.getValue().equals(status.getValue())
   1.215 -                && !Status.VJOURNAL_CANCELLED.getValue().equals(status.getValue())) {
   1.216 -            throw new ValidationException("Status property ["
   1.217 -                    + status.toString() + "] may not occur in VJOURNAL");
   1.218 -        }
   1.219 -
   1.220 -        /*
   1.221 -         * ; the following are optional, ; and MAY occur more than once attach / attendee / categories / comment /
   1.222 -         * contact / exdate / exrule / related / rdate / rrule / rstatus / x-prop
   1.223 -         */
   1.224 -
   1.225 -        if (recurse) {
   1.226 -            validateProperties();
   1.227 -        }
   1.228 -    }
   1.229 -
   1.230 -    /**
   1.231 -     * {@inheritDoc}
   1.232 -     */
   1.233 -    protected Validator getValidator(Method method) {
   1.234 -        return (Validator) methodValidators.get(method);
   1.235 -    }
   1.236 -
   1.237 -    /**
   1.238 -     * <pre>
   1.239 -     * Component/Property  Presence
   1.240 -     * ------------------- ----------------------------------------------
   1.241 -     * METHOD               1      MUST be "ADD"
   1.242 -     * VJOURNAL             1
   1.243 -     *     DESCRIPTION      1      Can be null.
   1.244 -     *     DTSTAMP          1
   1.245 -     *     DTSTART          1
   1.246 -     *     ORGANIZER        1
   1.247 -     *     SEQUENCE         1      MUST be greater than 0
   1.248 -     *     UID              1      MUST match that of the original journal
   1.249 -     * 
   1.250 -     *     ATTACH           0+
   1.251 -     *     CATEGORIES       0 or 1 This property MAY contain a list of values
   1.252 -     *     CLASS            0 or 1
   1.253 -     *     COMMENT          0 or 1
   1.254 -     *     CONTACT          0+
   1.255 -     *     CREATED          0 or 1
   1.256 -     *     EXDATE           0+
   1.257 -     *     EXRULE           0+
   1.258 -     *     LAST-MODIFIED    0 or 1
   1.259 -     *     RDATE            0+
   1.260 -     *     RELATED-TO       0+
   1.261 -     *     RRULE            0+
   1.262 -     *     STATUS           0 or 1  MAY be one of DRAFT/FINAL/CANCELLED
   1.263 -     *     SUMMARY          0 or 1  Can be null
   1.264 -     *     URL              0 or 1
   1.265 -     *     X-PROPERTY       0+
   1.266 -     * 
   1.267 -     *     ATTENDEE         0
   1.268 -     *     RECURRENCE-ID    0
   1.269 -     * 
   1.270 -     * VALARM               0+
   1.271 -     * VTIMEZONE            0 or 1 MUST be present if any date/time refers to
   1.272 -     *                             a timezone
   1.273 -     * X-COMPONENT          0+
   1.274 -     * 
   1.275 -     * VEVENT               0
   1.276 -     * VFREEBUSY            0
   1.277 -     * VTODO                0
   1.278 -     * </pre>
   1.279 -     * 
   1.280 -     */
   1.281 -    private class AddValidator implements Validator {
   1.282 -        
   1.283 -		private static final long serialVersionUID = 1L;
   1.284 -        
   1.285 -        public void validate() throws ValidationException {
   1.286 -            PropertyValidator.getInstance().assertOne(Property.DESCRIPTION, getProperties());
   1.287 -            PropertyValidator.getInstance().assertOne(Property.DTSTAMP, getProperties());
   1.288 -            PropertyValidator.getInstance().assertOne(Property.DTSTART, getProperties());
   1.289 -            PropertyValidator.getInstance().assertOne(Property.ORGANIZER, getProperties());
   1.290 -            PropertyValidator.getInstance().assertOne(Property.SEQUENCE, getProperties());
   1.291 -            PropertyValidator.getInstance().assertOne(Property.UID, getProperties());
   1.292 -            
   1.293 -            PropertyValidator.getInstance().assertOneOrLess(Property.CATEGORIES, getProperties());
   1.294 -            PropertyValidator.getInstance().assertOneOrLess(Property.CLASS, getProperties());
   1.295 -            PropertyValidator.getInstance().assertOneOrLess(Property.CREATED, getProperties());
   1.296 -            PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties());
   1.297 -            PropertyValidator.getInstance().assertOneOrLess(Property.STATUS, getProperties());
   1.298 -            PropertyValidator.getInstance().assertOneOrLess(Property.SUMMARY, getProperties());
   1.299 -            PropertyValidator.getInstance().assertOneOrLess(Property.URL, getProperties());
   1.300 -            
   1.301 -            PropertyValidator.getInstance().assertNone(Property.ATTENDEE, getProperties());
   1.302 -            PropertyValidator.getInstance().assertNone(Property.RECURRENCE_ID, getProperties());
   1.303 -        }
   1.304 -    }
   1.305 -    
   1.306 -    /**
   1.307 -     * <pre>
   1.308 -     * Component/Property   Presence
   1.309 -     * -------------------  ---------------------------------------------
   1.310 -     * METHOD               1       MUST be "CANCEL"
   1.311 -     * VJOURNAL             1+      All MUST have the same UID
   1.312 -     *     DTSTAMP          1
   1.313 -     *     ORGANIZER        1
   1.314 -     *     SEQUENCE         1
   1.315 -     *     UID              1       MUST be the UID of the original REQUEST
   1.316 -     * 
   1.317 -     *     ATTACH           0+
   1.318 -     *     ATTENDEE         0+
   1.319 -     *     CATEGORIES       0 or 1  This property MAY contain a list of values
   1.320 -     *     CLASS            0 or 1
   1.321 -     *     COMMENT          0 or 1
   1.322 -     *     CONTACT          0+
   1.323 -     *     CREATED          0 or 1
   1.324 -     *     DESCRIPTION      0 or 1
   1.325 -     *     DTSTART          0 or 1
   1.326 -     *     EXDATE           0+
   1.327 -     *     EXRULE           0+
   1.328 -     *     LAST-MODIFIED    0 or 1
   1.329 -     *     RDATE            0+
   1.330 -     *     RECURRENCE-ID    0 or 1  only if referring to an instance of a
   1.331 -     *                              recurring calendar component.  Otherwise
   1.332 -     *                              it MUST NOT be present.
   1.333 -     *     RELATED-TO       0+
   1.334 -     *     RRULE            0+
   1.335 -     *     STATUS           0 or 1  MAY be present, must be "CANCELLED" if
   1.336 -     *                              present
   1.337 -     *     SUMMARY          0 or 1
   1.338 -     *     URL              0 or 1
   1.339 -     *     X-PROPERTY       0+
   1.340 -     * 
   1.341 -     *     REQUEST-STATUS   0
   1.342 -     * 
   1.343 -     * VTIMEZONE            0+      MUST be present if any date/time refers to
   1.344 -     *                              a timezone
   1.345 -     * X-COMPONENT          0+
   1.346 -     * VALARM               0
   1.347 -     * VEVENT               0
   1.348 -     * VFREEBUSY            0
   1.349 -     * VTODO                0
   1.350 -     * </pre>
   1.351 -     * 
   1.352 -     */
   1.353 -    private class CancelValidator implements Validator {
   1.354 -        
   1.355 -		private static final long serialVersionUID = 1L;
   1.356 -
   1.357 -        public void validate() throws ValidationException {
   1.358 -            PropertyValidator.getInstance().assertOne(Property.DTSTAMP, getProperties());
   1.359 -            PropertyValidator.getInstance().assertOne(Property.ORGANIZER, getProperties());
   1.360 -            PropertyValidator.getInstance().assertOne(Property.SEQUENCE, getProperties());
   1.361 -            PropertyValidator.getInstance().assertOne(Property.UID, getProperties());
   1.362 -            
   1.363 -            PropertyValidator.getInstance().assertOneOrLess(Property.CATEGORIES, getProperties());
   1.364 -            PropertyValidator.getInstance().assertOneOrLess(Property.CLASS, getProperties());
   1.365 -            PropertyValidator.getInstance().assertOneOrLess(Property.CREATED, getProperties());
   1.366 -            PropertyValidator.getInstance().assertOneOrLess(Property.DESCRIPTION, getProperties());
   1.367 -            PropertyValidator.getInstance().assertOneOrLess(Property.DTSTART, getProperties());
   1.368 -            PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties());
   1.369 -            PropertyValidator.getInstance().assertOneOrLess(Property.RECURRENCE_ID, getProperties());
   1.370 -            PropertyValidator.getInstance().assertOneOrLess(Property.STATUS, getProperties());
   1.371 -            PropertyValidator.getInstance().assertOneOrLess(Property.SUMMARY, getProperties());
   1.372 -            PropertyValidator.getInstance().assertOneOrLess(Property.URL, getProperties());
   1.373 -            
   1.374 -            PropertyValidator.getInstance().assertNone(Property.REQUEST_STATUS, getProperties());
   1.375 -        }
   1.376 -    }
   1.377 -    
   1.378 -    /**
   1.379 -     * <pre>
   1.380 -     * Component/Property  Presence
   1.381 -     * ------------------- ----------------------------------------------
   1.382 -     * METHOD               1       MUST be "PUBLISH"
   1.383 -     * VJOURNAL             1+
   1.384 -     *     DESCRIPTION      1       Can be null.
   1.385 -     *     DTSTAMP          1
   1.386 -     *     DTSTART          1
   1.387 -     *     ORGANIZER        1
   1.388 -     *     UID              1
   1.389 -     * 
   1.390 -     *     ATTACH           0+
   1.391 -     *     CATEGORIES       0 or 1  This property MAY contain a list of values
   1.392 -     *     CLASS            0 or 1
   1.393 -     *     COMMENT          0 or 1
   1.394 -     *     CONTACT          0+
   1.395 -     *     CREATED          0 or 1
   1.396 -     *     EXDATE           0+
   1.397 -     *     EXRULE           0+
   1.398 -     *     LAST-MODIFIED    0 or 1
   1.399 -     *     RDATE            0+
   1.400 -     *     RECURRENCE-ID    0 or 1  MUST only if referring to an instance of a
   1.401 -     *                              recurring calendar component.  Otherwise
   1.402 -     *                              it MUST NOT be present.
   1.403 -     *     RELATED-TO       0+
   1.404 -     *     RRULE            0+
   1.405 -     *     SEQUENCE         0 or 1  MUST echo the original SEQUENCE number.
   1.406 -     *                              MUST be present if non-zero. MAY be
   1.407 -     *                              present if zero.
   1.408 -     *     STATUS           0 or 1  MAY be one of DRAFT/FINAL/CANCELLED
   1.409 -     *     SUMMARY          0 or 1  Can be null
   1.410 -     *     URL              0 or 1
   1.411 -     *     X-PROPERTY       0+
   1.412 -     * 
   1.413 -     *     ATTENDEE         0
   1.414 -     * 
   1.415 -     * VALARM               0+
   1.416 -     * VTIMEZONE            0+      MUST be present if any date/time refers to
   1.417 -     *                              a timezone
   1.418 -     * X-COMPONENT          0+
   1.419 -     * 
   1.420 -     * VEVENT               0
   1.421 -     * VFREEBUSY            0
   1.422 -     * VTODO                0
   1.423 -     * </pre>
   1.424 -     * 
   1.425 -     */
   1.426 -    private class PublishValidator implements Validator {
   1.427 -        
   1.428 -		private static final long serialVersionUID = 1L;
   1.429 -
   1.430 -        public void validate() throws ValidationException {
   1.431 -            PropertyValidator.getInstance().assertOne(Property.DESCRIPTION, getProperties());
   1.432 -            PropertyValidator.getInstance().assertOne(Property.DTSTAMP, getProperties());
   1.433 -            PropertyValidator.getInstance().assertOne(Property.DTSTART, getProperties());
   1.434 -            PropertyValidator.getInstance().assertOne(Property.ORGANIZER, getProperties());
   1.435 -            PropertyValidator.getInstance().assertOne(Property.UID, getProperties());
   1.436 -            
   1.437 -            PropertyValidator.getInstance().assertOneOrLess(Property.CATEGORIES, getProperties());
   1.438 -            PropertyValidator.getInstance().assertOneOrLess(Property.CLASS, getProperties());
   1.439 -            PropertyValidator.getInstance().assertOneOrLess(Property.CREATED, getProperties());
   1.440 -            PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties());
   1.441 -            PropertyValidator.getInstance().assertOneOrLess(Property.RECURRENCE_ID, getProperties());
   1.442 -            PropertyValidator.getInstance().assertOneOrLess(Property.SEQUENCE, getProperties());
   1.443 -            PropertyValidator.getInstance().assertOneOrLess(Property.STATUS, getProperties());
   1.444 -            PropertyValidator.getInstance().assertOneOrLess(Property.SUMMARY, getProperties());
   1.445 -            PropertyValidator.getInstance().assertOneOrLess(Property.URL, getProperties());
   1.446 -            
   1.447 -            PropertyValidator.getInstance().assertNone(Property.ATTENDEE, getProperties());
   1.448 -        }
   1.449 -    }
   1.450 -    
   1.451 -    /**
   1.452 -     * @return the optional access classification property for a journal entry
   1.453 -     */
   1.454 -    public final Clazz getClassification() {
   1.455 -        return (Clazz) getProperty(Property.CLASS);
   1.456 -    }
   1.457 -
   1.458 -    /**
   1.459 -     * @return the optional creation-time property for a journal entry
   1.460 -     */
   1.461 -    public final Created getCreated() {
   1.462 -        return (Created) getProperty(Property.CREATED);
   1.463 -    }
   1.464 -
   1.465 -    /**
   1.466 -     * @return the optional description property for a journal entry
   1.467 -     */
   1.468 -    public final Description getDescription() {
   1.469 -        return (Description) getProperty(Property.DESCRIPTION);
   1.470 -    }
   1.471 -
   1.472 -    /**
   1.473 -     * Convenience method to pull the DTSTART out of the property list.
   1.474 -     * @return The DtStart object representation of the start Date
   1.475 -     */
   1.476 -    public final DtStart getStartDate() {
   1.477 -        return (DtStart) getProperty(Property.DTSTART);
   1.478 -    }
   1.479 -
   1.480 -    /**
   1.481 -     * @return the optional last-modified property for a journal entry
   1.482 -     */
   1.483 -    public final LastModified getLastModified() {
   1.484 -        return (LastModified) getProperty(Property.LAST_MODIFIED);
   1.485 -    }
   1.486 -
   1.487 -    /**
   1.488 -     * @return the optional organizer property for a journal entry
   1.489 -     */
   1.490 -    public final Organizer getOrganizer() {
   1.491 -        return (Organizer) getProperty(Property.ORGANIZER);
   1.492 -    }
   1.493 -
   1.494 -    /**
   1.495 -     * @return the optional date-stamp property
   1.496 -     */
   1.497 -    public final DtStamp getDateStamp() {
   1.498 -        return (DtStamp) getProperty(Property.DTSTAMP);
   1.499 -    }
   1.500 -
   1.501 -    /**
   1.502 -     * @return the optional sequence number property for a journal entry
   1.503 -     */
   1.504 -    public final Sequence getSequence() {
   1.505 -        return (Sequence) getProperty(Property.SEQUENCE);
   1.506 -    }
   1.507 -
   1.508 -    /**
   1.509 -     * @return the optional status property for a journal entry
   1.510 -     */
   1.511 -    public final Status getStatus() {
   1.512 -        return (Status) getProperty(Property.STATUS);
   1.513 -    }
   1.514 -
   1.515 -    /**
   1.516 -     * @return the optional summary property for a journal entry
   1.517 -     */
   1.518 -    public final Summary getSummary() {
   1.519 -        return (Summary) getProperty(Property.SUMMARY);
   1.520 -    }
   1.521 -
   1.522 -    /**
   1.523 -     * @return the optional URL property for a journal entry
   1.524 -     */
   1.525 -    public final Url getUrl() {
   1.526 -        return (Url) getProperty(Property.URL);
   1.527 -    }
   1.528 -
   1.529 -    /**
   1.530 -     * @return the optional recurrence identifier property for a journal entry
   1.531 -     */
   1.532 -    public final RecurrenceId getRecurrenceId() {
   1.533 -        return (RecurrenceId) getProperty(Property.RECURRENCE_ID);
   1.534 -    }
   1.535 -
   1.536 -    /**
   1.537 -     * Returns the UID property of this component if available.
   1.538 -     * @return a Uid instance, or null if no UID property exists
   1.539 -     */
   1.540 -    public final Uid getUid() {
   1.541 -        return (Uid) getProperty(Property.UID);
   1.542 -    }
   1.543 -}

mercurial