public final void validate(final boolean recurse)
            throws ValidationException {

        /*
         * ; 'tzid' is required, but MUST NOT occur more ; than once tzid /
         */
        PropertyValidator.getInstance().assertOne(Property.TZID,
                getProperties());

        /*
         * ; 'last-mod' and 'tzurl' are optional, but MUST NOT occur more than once last-mod / tzurl /
         */
        PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED,
                getProperties());
        PropertyValidator.getInstance().assertOneOrLess(Property.TZURL,
                getProperties());

        /*
         * ; one of 'standardc' or 'daylightc' MUST occur ..; and each MAY occur more than once. standardc / daylightc /
         */
        if (getObservances().getComponent(Observance.STANDARD) == null
                && getObservances().getComponent(Observance.DAYLIGHT) == null) {
            throw new ValidationException("Sub-components ["
                    + Observance.STANDARD + "," + Observance.DAYLIGHT
                    + "] must be specified at least once");
        }

        for (final Observance observance : getObservances()) {
            observance.validate(recurse);
        }
        
        /*
         * ; the following is optional, ; and MAY occur more than once x-prop
         */

        if (recurse) {
            validateProperties();
        }
    }
public final void validate ( final boolean recurse ) throws ValidationException { PropertyValidator . getInstance ( ) . assertOne ( Property . TZID , getProperties ( ) ) ; PropertyValidator . getInstance ( ) . assertOneOrLess ( Property . LAST_MODIFIED , getProperties ( ) ) ; PropertyValidator . getInstance ( ) . assertOneOrLess ( Property . TZURL , getProperties ( ) ) ; if ( getObservances ( ) . getComponent ( Observance . STANDARD ) == null && getObservances ( ) . getComponent ( Observance . DAYLIGHT ) == null ) { throw new ValidationException ( "Sub-components [" + Observance . STANDARD + "," + Observance . DAYLIGHT + "] must be specified at least once" ) ; } for ( final Observance observance : getObservances ( ) ) { observance . validate ( recurse ) ; } if ( recurse ) { validateProperties ( ) ; } }
{@inheritDoc}