Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Component.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/Component.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Component.java (revision 1364) @@ -66,4 +66,6 @@ public static final String VALARM = "VALARM"; + public static final String VVENUE = "VVENUE"; + public static final String EXPERIMENTAL_PREFIX = "X-"; @@ -122,5 +124,5 @@ return properties; } - + /** * Convenience method for retrieving a list of named properties. @@ -132,5 +134,5 @@ return getProperties().getProperties(name); } - + /** * Convenience method for retrieving a named property. Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/ComponentFactory.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/ComponentFactory.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/ComponentFactory.java (revision 1364) @@ -43,4 +43,5 @@ import net.fortuna.ical4j.model.component.VTimeZone; import net.fortuna.ical4j.model.component.VToDo; +import net.fortuna.ical4j.model.component.VVenue; import net.fortuna.ical4j.model.component.XComponent; import net.fortuna.ical4j.util.CompatibilityHints; @@ -56,5 +57,5 @@ private boolean allowIllegalNames; - + /** * Constructor made private to prevent instantiation. @@ -70,5 +71,5 @@ return instance; } - + public Component createComponent(final String name) { return createComponent(name, new PropertyList()); @@ -108,4 +109,7 @@ else if (Component.VTIMEZONE.equals(name)) { return new VTimeZone(properties); + } + else if (Component.VVENUE.equals(name)) { + return new VVenue(properties); } else if (isExperimentalName(name)) { @@ -147,5 +151,5 @@ return createComponent(name, properties); } - + /** * @param name Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/LocationTypeList.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/LocationTypeList.java (revision 1364) @@ -1,0 +1,137 @@ +/* + * $Id: CategoryList.java,v 1.7 2005/07/20 13:08:20 fortuna Exp $ [23-Apr-2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.StringTokenizer; + +/** + * Defines a list of iCalendar location types. + * + * @author Ben Fortuna + */ +public class LocationTypeList implements Serializable { + + //private static final long serialVersionUID = 4387692697196974638L; + + private List locationTypes; + + /** + * Default constructor. + */ + public LocationTypeList() { + locationTypes = new ArrayList(); + } + + /** + * Parses the specified string representation to create + * a list of categories. + * @param aValue a string representation of a list of + * categories + */ + public LocationTypeList(final String aValue) { + locationTypes = new ArrayList(); + + for (StringTokenizer t = new StringTokenizer(aValue, ","); t + .hasMoreTokens();) { + locationTypes.add(t.nextToken()); + } + } + + /** + * @see java.util.AbstractCollection#toString() + */ + public final String toString() { + + StringBuffer b = new StringBuffer(); + + for (Iterator i = locationTypes.iterator(); i.hasNext();) { + + b.append(i.next()); + + if (i.hasNext()) { + b.append(','); + } + } + + return b.toString(); + } + + /** + * Add a location type to the list. + * @param category the category to add + * @return true + * @see List#add(java.lang.Object) + */ + public final boolean add(final String locationType) { + return locationTypes.add(locationType); + } + + /** + * @return boolean indicates if the list is empty + * @see List#isEmpty() + */ + public final boolean isEmpty() { + return locationTypes.isEmpty(); + } + + /** + * @return an iterator + * @see List#iterator() + */ + public final Iterator iterator() { + return locationTypes.iterator(); + } + + /** + * Remove a locationType from the list. + * @param category the category to remove + * @return true if the list contained the specified category + * @see List#remove(java.lang.Object) + */ + public final boolean remove(final String locationType) { + return locationTypes.remove(locationType); + } + + /** + * @return the number of categories in the list + * @see List#size() + */ + public final int size() { + return locationTypes.size(); + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Parameter.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/Parameter.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Parameter.java (revision 1364) @@ -48,4 +48,9 @@ /** + * Region abbreviation. + */ + public static final String ABBREV = "ABBREV"; + + /** * Alternate text representation. */ @@ -138,4 +143,9 @@ /** + * Type. + */ + public static final String TYPE = "TYPE"; + + /** * Reference to time zone object. */ @@ -146,4 +156,9 @@ */ public static final String VALUE = "VALUE"; + + /** + * Reference to vvenue component + */ + public static final String VVENUE = "VVENUE"; /** Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/ParameterFactoryImpl.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/ParameterFactoryImpl.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/ParameterFactoryImpl.java (revision 1364) @@ -1,5 +1,5 @@ /* * $Id $ - * + * * [05-Apr-2004] * @@ -40,4 +40,5 @@ import java.util.Map; +import net.fortuna.ical4j.model.parameter.Abbrev; import net.fortuna.ical4j.model.parameter.AltRep; import net.fortuna.ical4j.model.parameter.Cn; @@ -60,4 +61,5 @@ import net.fortuna.ical4j.model.parameter.TzId; import net.fortuna.ical4j.model.parameter.Value; +import net.fortuna.ical4j.model.parameter.Vvenue; import net.fortuna.ical4j.model.parameter.XParameter; @@ -70,5 +72,5 @@ private static ParameterFactoryImpl instance = new ParameterFactoryImpl(); - + private Map factories; @@ -78,4 +80,5 @@ private ParameterFactoryImpl() { factories = new HashMap(); + factories.put(Parameter.ABBREV, createAbbrevFactory()); factories.put(Parameter.ALTREP, createAltRepFactory()); factories.put(Parameter.CN, createCnFactory()); @@ -96,8 +99,24 @@ factories.put(Parameter.RSVP, createRsvpFactory()); factories.put(Parameter.SENT_BY, createSentByFactory()); + factories.put(Parameter.TYPE, createTzIdFactory()); factories.put(Parameter.TZID, createTzIdFactory()); factories.put(Parameter.VALUE, createValueFactory()); - } - + factories.put(Parameter.VVENUE, createVvenueFactory()); + } + + /** + * @return + */ + private ParameterFactory createAbbrevFactory() { + return new ParameterFactory() { + /* (non-Javadoc) + * @see net.fortuna.ical4j.model.ParameterFactory#createParameter(java.lang.String, java.lang.String) + */ + public Parameter createParameter(final String name, final String value) throws URISyntaxException { + return new Abbrev(value); + } + }; + } + /** * @return @@ -113,5 +132,5 @@ }; } - + /** * @return @@ -128,5 +147,5 @@ }; } - + /** * @return @@ -159,5 +178,5 @@ }; } - + /** * @return @@ -174,5 +193,5 @@ }; } - + /** * @return @@ -189,5 +208,5 @@ }; } - + /** * @return @@ -204,5 +223,5 @@ }; } - + /** * @return @@ -226,5 +245,5 @@ }; } - + /** * @return @@ -241,5 +260,5 @@ }; } - + /** * @return @@ -269,5 +288,5 @@ }; } - + /** * @return @@ -284,5 +303,5 @@ }; } - + /** * @return @@ -299,5 +318,5 @@ }; } - + /** * @return @@ -336,5 +355,5 @@ }; } - + /** * @return @@ -358,5 +377,5 @@ }; } - + /** * @return @@ -380,5 +399,5 @@ }; } - + /** * @return @@ -405,5 +424,5 @@ }; } - + /** * @return @@ -433,5 +452,5 @@ }; } - + /** * @return @@ -470,5 +489,20 @@ }; } - + + /** + * @return + */ + private ParameterFactory createVvenueFactory() { + return new ParameterFactory() { + /* (non-Javadoc) + * @see net.fortuna.ical4j.model.ParameterFactory#createParameter(java.lang.String, java.lang.String) + */ + public Parameter createParameter(final String name, final String value) + throws URISyntaxException { + return new Vvenue(value); + } + }; + } + /** * @return @@ -485,5 +519,5 @@ }; } - + /** * @return @@ -543,5 +577,5 @@ }; } - + /** * @return Returns the instance. @@ -575,5 +609,5 @@ } } - + /** * @param name Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Property.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/Property.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Property.java (revision 1364) @@ -168,4 +168,25 @@ public static final String EXPERIMENTAL_PREFIX = "X-"; + /** + * the following are vvenue only properties. + */ + public static final String COUNTRY = "COUNTRY"; + + public static final String EXTENDED_ADDRESS = "EXTENDED-ADDRESS"; + + public static final String LOCALITY = "LOCALITY"; + + public static final String LOCATION_TYPE = "LOCATION-TYPE"; + + public static final String NAME = "NAME"; + + public static final String POSTALCODE = "POSTALCODE"; + + public static final String REGION = "REGION"; + + public static final String STREET_ADDRESS = "STREET-ADDRESS"; + + public static final String TEL = "TEL"; + private String name; @@ -193,5 +214,5 @@ this.parameters = aList; } - + /** * Creates a deep copy of the specified property. That is, the name, @@ -261,5 +282,5 @@ return parameters; } - + /** * Convenience method for retrieving a list of named parameters. @@ -271,5 +292,5 @@ return getParameters().getParameters(name); } - + /** * Convenience method for retrieving a single parameter. @@ -281,5 +302,5 @@ return getParameters().getParameter(name); } - + /** * Sets the current value of the property. Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/PropertyFactoryImpl.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/PropertyFactoryImpl.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/PropertyFactoryImpl.java (revision 1364) @@ -49,4 +49,5 @@ import net.fortuna.ical4j.model.property.Completed; import net.fortuna.ical4j.model.property.Contact; +import net.fortuna.ical4j.model.property.Country; import net.fortuna.ical4j.model.property.Created; import net.fortuna.ical4j.model.property.Description; @@ -58,11 +59,15 @@ import net.fortuna.ical4j.model.property.ExDate; import net.fortuna.ical4j.model.property.ExRule; +import net.fortuna.ical4j.model.property.ExtendedAddress; import net.fortuna.ical4j.model.property.FreeBusy; import net.fortuna.ical4j.model.property.Geo; import net.fortuna.ical4j.model.property.LastModified; +import net.fortuna.ical4j.model.property.Locality; import net.fortuna.ical4j.model.property.Location; import net.fortuna.ical4j.model.property.Method; +import net.fortuna.ical4j.model.property.Name; import net.fortuna.ical4j.model.property.Organizer; import net.fortuna.ical4j.model.property.PercentComplete; +import net.fortuna.ical4j.model.property.Postalcode; import net.fortuna.ical4j.model.property.Priority; import net.fortuna.ical4j.model.property.ProdId; @@ -70,4 +75,5 @@ import net.fortuna.ical4j.model.property.RRule; import net.fortuna.ical4j.model.property.RecurrenceId; +import net.fortuna.ical4j.model.property.Region; import net.fortuna.ical4j.model.property.RelatedTo; import net.fortuna.ical4j.model.property.Repeat; @@ -76,5 +82,7 @@ import net.fortuna.ical4j.model.property.Sequence; import net.fortuna.ical4j.model.property.Status; +import net.fortuna.ical4j.model.property.StreetAddress; import net.fortuna.ical4j.model.property.Summary; +import net.fortuna.ical4j.model.property.Tel; import net.fortuna.ical4j.model.property.Transp; import net.fortuna.ical4j.model.property.Trigger; @@ -119,4 +127,5 @@ factories.put(Property.COMPLETED, createCompletedFactory()); factories.put(Property.CONTACT, createContactFactory()); + factories.put(Property.COUNTRY, createCountryFactory()); factories.put(Property.CREATED, createCreatedFactory()); factories.put(Property.DESCRIPTION, createDescriptionFactory()); @@ -128,16 +137,21 @@ factories.put(Property.EXDATE, createExDateFactory()); factories.put(Property.EXRULE, createExRuleFactory()); + factories.put(Property.EXTENDED_ADDRESS, createExtendedAddressFactory()); factories.put(Property.FREEBUSY, createFreeBusyFactory()); factories.put(Property.GEO, createGeoFactory()); factories.put(Property.LAST_MODIFIED, createLastModifiedFactory()); + factories.put(Property.LOCALITY, createLocalityFactory()); factories.put(Property.LOCATION, createLocationFactory()); factories.put(Property.METHOD, createMethodFactory()); + factories.put(Property.NAME, createNameFactory()); factories.put(Property.ORGANIZER, createOrganizerFactory()); factories .put(Property.PERCENT_COMPLETE, createPercentCompleteFactory()); + factories.put(Property.POSTALCODE, createPostalcodeFactory()); factories.put(Property.PRIORITY, createPriorityFactory()); factories.put(Property.PRODID, createProdIdFactory()); factories.put(Property.RDATE, createRDateFactory()); factories.put(Property.RECURRENCE_ID, createRecurrenceIdFactory()); + factories.put(Property.REGION, createRegionFactory()); factories.put(Property.RELATED_TO, createRelatedToFactory()); factories.put(Property.REPEAT, createRepeatFactory()); @@ -147,5 +161,7 @@ factories.put(Property.SEQUENCE, createSequenceFactory()); factories.put(Property.STATUS, createStatusFactory()); + factories.put(Property.STREET_ADDRESS, createStreetAddressFactory()); factories.put(Property.SUMMARY, createSummaryFactory()); + factories.put(Property.TEL, createTelFactory()); factories.put(Property.TRANSP, createTranspFactory()); factories.put(Property.TRIGGER, createTriggerFactory()); @@ -397,4 +413,30 @@ * @return */ + private PropertyFactory createCountryFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Country(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Country(); + } + }; + } + + /** + * @return + */ private PropertyFactory createCreatedFactory() { return new PropertyFactory() { @@ -631,4 +673,30 @@ * @return */ + private PropertyFactory createExtendedAddressFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new ExtendedAddress(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new ExtendedAddress(); + } + }; + } + + /** + * @return + */ private PropertyFactory createFreeBusyFactory() { return new PropertyFactory() { @@ -709,4 +777,30 @@ * @return */ + private PropertyFactory createLocalityFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Locality(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Locality(); + } + }; + } + + /** + * @return + */ private PropertyFactory createLocationFactory() { return new PropertyFactory() { @@ -761,4 +855,30 @@ * @return */ + private PropertyFactory createNameFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Name(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Name(); + } + }; + } + + /** + * @return + */ private PropertyFactory createOrganizerFactory() { return new PropertyFactory() { @@ -813,4 +933,30 @@ * @return */ + private PropertyFactory createPostalcodeFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Postalcode(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Postalcode(); + } + }; + } + + /** + * @return + */ private PropertyFactory createPriorityFactory() { return new PropertyFactory() { @@ -917,4 +1063,30 @@ * @return */ + private PropertyFactory createRegionFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Region(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Region(); + } + }; + } + + /** + * @return + */ private PropertyFactory createRelatedToFactory() { return new PropertyFactory() { @@ -1099,4 +1271,30 @@ * @return */ + private PropertyFactory createStreetAddressFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new StreetAddress(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new StreetAddress(); + } + }; + } + + /** + * @return + */ private PropertyFactory createSummaryFactory() { return new PropertyFactory() { @@ -1118,4 +1316,30 @@ public Property createProperty(final String name) { return new Summary(); + } + }; + } + + /** + * @return + */ + private PropertyFactory createTelFactory() { + return new PropertyFactory() { + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String, + * net.fortuna.ical4j.model.ParameterList, java.lang.String) + */ + public Property createProperty(final String name, + final ParameterList parameters, final String value) + throws IOException, URISyntaxException, ParseException { + return new Tel(parameters, value); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.PropertyFactory#createProperty(java.lang.String) + */ + public Property createProperty(final String name) { + return new Tel(); } }; Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Recur.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/Recur.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/Recur.java (revision 1364) @@ -134,4 +134,7 @@ private Map experimentalValues = new HashMap(); + // Calendar field we increment based on frequency. + private int calIncField; + /** * Constructs a new instance from the specified string value. @@ -464,5 +467,5 @@ public final DateList getDates(final Date periodStart, final Date periodEnd, final Value value) { - return getDates(periodStart, periodStart, periodEnd, value); + return getDates(periodStart, periodStart, periodEnd, value, -1); } @@ -475,5 +478,5 @@ public final DateList getDates(final Date seed, final Period period, final Value value) { - return getDates(seed, period.getStart(), period.getEnd(), value); + return getDates(seed, period.getStart(), period.getEnd(), value, -1); } @@ -492,4 +495,24 @@ public final DateList getDates(final Date seed, final Date periodStart, final Date periodEnd, final Value value) { + return getDates(seed, periodStart, periodEnd, value, -1); + } + + /** + * Returns a list of start dates in the specified period represented by this recur. This method includes a base date + * argument, which indicates the start of the fist occurrence of this recurrence. The base date is used to inject + * default values to return a set of dates in the correct format. For example, if the search start date (start) is + * Wed, Mar 23, 12:19PM, but the recurrence is Mon - Fri, 9:00AM - 5:00PM, the start dates returned should all be at + * 9:00AM, and not 12:19PM. + * @return a list of dates represented by this recur instance + * @param seed the start date of this Recurrence's first instance + * @param periodStart the start of the period + * @param periodEnd the end of the period + * @param value the type of dates to generate (i.e. date/date-time) + * @param maxCount limits the number of instances returned. Up to one years + * worth extra may be returned. Less than 0 means no limit + */ + public final DateList getDates(final Date seed, final Date periodStart, + final Date periodEnd, final Value value, + final int maxCount) { DateList dates = new DateList(value); @@ -517,5 +540,5 @@ int invalidCandidateCount = 0; Date candidate = null; - while (true) { + while ((maxCount < 0) || (dates.size() < maxCount)) { Date candidateSeed = Dates.getInstance(cal.getTime(), value); @@ -581,25 +604,5 @@ // initialise interval.. int calInterval = (getInterval() >= 1) ? getInterval() : 1; - if (SECONDLY.equals(getFrequency())) { - cal.add(Calendar.SECOND, calInterval); - } - else if (MINUTELY.equals(getFrequency())) { - cal.add(Calendar.MINUTE, calInterval); - } - else if (HOURLY.equals(getFrequency())) { - cal.add(Calendar.HOUR_OF_DAY, calInterval); - } - else if (DAILY.equals(getFrequency())) { - cal.add(Calendar.DAY_OF_YEAR, calInterval); - } - else if (WEEKLY.equals(getFrequency())) { - cal.add(Calendar.WEEK_OF_YEAR, calInterval); - } - else if (MONTHLY.equals(getFrequency())) { - cal.add(Calendar.MONTH, calInterval); - } - else if (YEARLY.equals(getFrequency())) { - cal.add(Calendar.YEAR, calInterval); - } + cal.add(calIncField, calInterval); } @@ -1017,8 +1020,26 @@ "A recurrence rule MUST contain a FREQ rule part."); } - else if (!frequency.equals(SECONDLY) && !frequency.equals(MINUTELY) - && !frequency.equals(HOURLY) && !frequency.equals(DAILY) - && !frequency.equals(WEEKLY) && !frequency.equals(MONTHLY) - && !frequency.equals(YEARLY)) { + if (SECONDLY.equals(getFrequency())) { + calIncField = Calendar.SECOND; + } + else if (MINUTELY.equals(getFrequency())) { + calIncField = Calendar.MINUTE; + } + else if (HOURLY.equals(getFrequency())) { + calIncField = Calendar.HOUR_OF_DAY; + } + else if (DAILY.equals(getFrequency())) { + calIncField = Calendar.DAY_OF_YEAR; + } + else if (WEEKLY.equals(getFrequency())) { + calIncField = Calendar.WEEK_OF_YEAR; + } + else if (MONTHLY.equals(getFrequency())) { + calIncField = Calendar.MONTH; + } + else if (YEARLY.equals(getFrequency())) { + calIncField = Calendar.YEAR; + } + else { throw new IllegalArgumentException("Invalid FREQ rule part '" + frequency + "' in recurrence rule"); Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/component/Observance.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/component/Observance.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/component/Observance.java (revision 1364) @@ -79,4 +79,7 @@ private Map onsets = new TreeMap(); + /* If this is set we have rrules. If we get a date after this rebuild onsets */ + private Date onsetLimit; + private boolean rdatesCached = false; @@ -146,4 +149,9 @@ long start = System.currentTimeMillis(); + + if ((onsetLimit != null) && (date.after(onsetLimit))) { + onsets.clear(); + rdatesCached = false; + } Date onset = getCachedOnset(date); @@ -195,8 +203,8 @@ Calendar cal = Dates.getCalendarInstance(date); cal.setTime(date); - cal.add(Calendar.YEAR, 1); - Date endRecur = Dates.getInstance(cal.getTime(), dateType); + cal.add(Calendar.YEAR, 10); + onsetLimit = Dates.getInstance(cal.getTime(), dateType); DateList recurrenceDates = rrule.getRecur().getDates(onset, - endRecur, dateType); + onsetLimit, dateType); for (Iterator j = recurrenceDates.iterator(); j.hasNext();) { Date rruleOnset = (Date) j.next(); Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/component/VVenue.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/component/VVenue.java (revision 1364) @@ -1,0 +1,187 @@ +/* + * $Id: VTimeZone.java,v 1.20 2006/11/05 05:07:57 fortuna Exp $ [Apr 5, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.component; + +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyList; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.PropertyValidator; +import net.fortuna.ical4j.util.Strings; + +/** + * Defines an iCalendar VVENUE component. + * + *
+ * 4.  Venue Component
+ *
+ *    Component Name: "VVENUE"
+ *
+ *    Purpose: Provide a grouping of component properties that describe an
+ *    event venue.
+ *
+ *    Format Definition: A "VVENUE" calendar component is defined by the
+ *    following notation:
+ *      venuec  = "BEGIN" ":" "VVENUE" CRLF
+ *              venueprop
+ *              "END" ":" "VVENUE" CRLF
+ *
+ *      venueprop  = *(
+ *
+ *                ; the following are all REQUIRED,
+ *                ; but MUST NOT occur more than once
+ *
+ *                uid
+ *
+ *                ; the following are optional,
+ *                ; but MUST NOT occur more than once
+ *
+ *                name / description / street-address / extended-address /
+ *                locality / region / country / postal-code / tzid / geo /
+ *                location-type / categories
+ *
+ *                ; the following are optional,
+ *                ; and MAY occur more than once
+ *
+ *                tel / url
+ *              )
+ *
+ *    Description: A "VVENUE" calendar component is a grouping of component
+ *    properties that represent a venue where an event occurs.  This
+ *    extends the "LOCATION" property of "VEVENT" and "TODO" components,
+ *    providing the ability to specify detailed information about the event
+ *    venue.
+ *
+ * 
+ * + * @author Ben Fortuna + * @author Mike Douglass + */ +public class VVenue extends CalendarComponent { + + //private static final long serialVersionUID = 5629679741050917815L; + + /** + * Default constructor. + */ + public VVenue() { + super(VVENUE); + } + + /** + * Constructs a new instance containing the specified properties. + * @param properties a list of properties + */ + public VVenue(final PropertyList properties) { + super(VVENUE, properties); + } + + /** + * @see java.lang.Object#toString() + */ + public final String toString() { + StringBuffer b = new StringBuffer(); + b.append(BEGIN); + b.append(':'); + b.append(getName()); + b.append(Strings.LINE_SEPARATOR); + b.append(getProperties()); + b.append(END); + b.append(':'); + b.append(getName()); + b.append(Strings.LINE_SEPARATOR); + return b.toString(); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Component#validate(boolean) + */ + public final void validate(final boolean recurse) + throws ValidationException { + + /* + * ; 'uiid' is required, but MUST NOT occur more ; than once uiid / + */ + PropertyValidator.getInstance().assertOne(Property.UID, + getProperties()); + + /* + * ; the following are optional, + * ; but MUST NOT occur more than once + * + * name / description / street-address / extended-address / + * locality / region / country / postal-code / tzid / geo / + * location-type / categories / + * dtstamp / created / last-modified + */ + PropertyValidator.getInstance().assertOneOrLess(Property.NAME, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.DESCRIPTION, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.STREET_ADDRESS, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.EXTENDED_ADDRESS, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.LOCALITY, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.REGION, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.COUNTRY, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.POSTALCODE, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.TZID, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.GEO, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.LOCATION_TYPE, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.CATEGORIES, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.DTSTAMP, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.CREATED, + getProperties()); + PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, + getProperties()); + + /* + * ; the following is optional, ; and MAY occur more than once tel / url / x-prop + */ + + if (recurse) { + validateProperties(); + } + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Abbrev.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Abbrev.java (revision 1364) @@ -1,0 +1,66 @@ +/* + * $Id: AltRep.java,v 1.10 2006/11/05 08:08:45 fortuna Exp $ [18-Apr-2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.parameter; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.util.Strings; + +/** + * Defines an Abbreviation parameter. + * @author benfortuna + * @author Mike Douglass + */ +public class Abbrev extends Parameter { + + //private static final long serialVersionUID = -2445932592596993470L; + + private String value; + + /** + * @param aValue a string abbreviation + */ + public Abbrev(final String aValue) { + super(ABBREV); + + this.value = Strings.unquote(aValue); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Parameter#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Type.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Type.java (revision 1364) @@ -1,0 +1,66 @@ +/* + * $Id: AltRep.java,v 1.10 2006/11/05 08:08:45 fortuna Exp $ [18-Apr-2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.parameter; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.util.Strings; + +/** + * Defines a Type parameter. + * @author benfortuna + * @author Mike Douglass + */ +public class Type extends Parameter { + + //private static final long serialVersionUID = -2445932592596993470L; + + private String value; + + /** + * @param aValue a string abbreviation + */ + public Type(final String aValue) { + super(TYPE); + + this.value = Strings.unquote(aValue); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Parameter#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Vvenue.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/parameter/Vvenue.java (revision 1364) @@ -1,0 +1,66 @@ +/* + * $Id: AltRep.java,v 1.10 2006/11/05 08:08:45 fortuna Exp $ [18-Apr-2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.parameter; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.util.Strings; + +/** + * Defines a Vvenue parameter. + * @author benfortuna + * @author Mike Douglass + */ +public class Vvenue extends Parameter { + + //private static final long serialVersionUID = -2445932592596993470L; + + private String value; + + /** + * @param aValue a string abbreviation + */ + public Vvenue(final String aValue) { + super(VVENUE); + + this.value = Strings.unquote(aValue); + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Parameter#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Attach.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/property/Attach.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Attach.java (revision 1364) @@ -62,50 +62,50 @@ /** * Defines an ATTACH iCalendar component property. - * + * *
  *       4.8.1.1 Attachment
- *       
+ *
  *          Property Name: ATTACH
- *       
+ *
  *          Purpose: The property provides the capability to associate a document
  *          object with a calendar component.
- *       
+ *
  *          Value Type: The default value type for this property is URI. The
  *          value type can also be set to BINARY to indicate inline binary
  *          encoded content information.
- *       
+ *
  *          Property Parameters: Non-standard, inline encoding, format type and
  *          value data type property parameters can be specified on this
  *          property.
- *        
+ *
  *          Conformance: The property can be specified in a "VEVENT", "VTODO",
  *          "VJOURNAL" or "VALARM" calendar components.
- *       
+ *
  *          Description: The property can be specified within "VEVENT", "VTODO",
  *          "VJOURNAL", or "VALARM" calendar components. This property can be
  *          specified multiple times within an iCalendar object.
- *       
+ *
  *          Format Definition: The property is defined by the following notation:
- *       
+ *
  *            attach     = "ATTACH" attparam ":" uri  CRLF
- *       
+ *
  *            attach     =/ "ATTACH" attparam ";" "ENCODING" "=" "BASE64"
  *                          ";" "VALUE" "=" "BINARY" ":" binary
- *       
+ *
  *            attparam   = *(
- *       
+ *
  *                       ; the following is optional,
  *                       ; but MUST NOT occur more than once
- *       
+ *
  *                       (";" fmttypeparam) /
- *       
+ *
  *                       ; the following is optional,
  *                       ; and MAY occur more than once
- *       
+ *
  *                       (";" xparam)
- *       
+ *
  *                       )
  * 
- * + * * @author benf */ @@ -234,5 +234,5 @@ .createBinaryDecoder( (Encoding) getParameter(Parameter.ENCODING)); - binary = decoder.decode(getBinary()); + binary = decoder.decode(aValue.getBytes()); } catch (UnsupportedEncodingException uee) { Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Country.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Country.java (revision 1364) @@ -1,0 +1,111 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * Defines a REGION iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Country extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Country() { + super(COUNTRY); + } + + /** + * @param aValue a value string for this component + */ + public Country(final String aValue) { + super(COUNTRY); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Country(final ParameterList aList, final String aValue) { + super(COUNTRY, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following are optional, ; but MUST NOT occur more than once (";" abbrev + */ + ParameterValidator.getInstance().assertOneOrLess(Parameter.ABBREV, + getParameters()); + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/ExtendedAddress.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/ExtendedAddress.java (revision 1364) @@ -1,0 +1,103 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; + +/** + * Defines a EXTENDED_ADDRESS iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class ExtendedAddress extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public ExtendedAddress() { + super(EXTENDED_ADDRESS); + } + + /** + * @param aValue a value string for this component + */ + public ExtendedAddress(final String aValue) { + super(EXTENDED_ADDRESS); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public ExtendedAddress(final ParameterList aList, final String aValue) { + super(EXTENDED_ADDRESS, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Locality.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Locality.java (revision 1364) @@ -1,0 +1,103 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; + +/** + * Defines a LOCALITY iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Locality extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Locality() { + super(LOCALITY); + } + + /** + * @param aValue a value string for this component + */ + public Locality(final String aValue) { + super(LOCALITY); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Locality(final ParameterList aList, final String aValue) { + super(LOCALITY, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Location.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/property/Location.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Location.java (revision 1364) @@ -1,5 +1,5 @@ /* * $Id: Location.java,v 1.9 2006/11/05 06:04:42 fortuna Exp $ - * + * * Created: [Apr 6, 2004] * @@ -45,21 +45,21 @@ /** * Defines a LOCATION iCalendar component property. - * + * *
  *     4.8.1.7 Location
- *     
+ *
  *        Property Name: LOCATION
- *     
+ *
  *        Purpose: The property defines the intended venue for the activity
  *        defined by a calendar component.
- *     
+ *
  *        Value Type: TEXT
- *     
+ *
  *        Property Parameters: Non-standard, alternate text representation and
  *        language property parameters can be specified on this property.
- *     
+ *
  *        Conformance: This property can be specified in "VEVENT" or "VTODO"
  *        calendar component.
- *     
+ *
  *        Description: Specific venues such as conference or meeting rooms may
  *        be explicitly specified using this property. An alternate
@@ -70,31 +70,31 @@
  *        pointing to a MIME body part containing a vCard [RFC 2426] for the
  *        location.
- *     
+ *
  *        Format Definition: The property is defined by the following notation:
- *     
+ *
  *          location   = "LOCATION locparam ":" text CRLF
- *     
+ *
  *          locparam   = *(
- *     
+ *
  *                     ; the following are optional,
  *                     ; but MUST NOT occur more than once
- *     
+ *
  *                     (";" altrepparam) / (";" languageparam) /
- *     
+ *
  *                     ; the following is optional,
  *                     ; and MAY occur more than once
- *     
+ *
  *                     (";" xparam)
- *     
+ *
  *                     )
- *     
+ *
  *        Example: The following are some examples of this property:
- *     
+ *
  *          LOCATION:Conference Room - F123, Bldg. 002
- *     
+ *
  *          LOCATION;ALTREP="http://xyzcorp.com/conf-rooms/f123.vcf":
  *           Conference Room - F123, Bldg. 002
  * 
- * + * * @author Ben Fortuna */ @@ -141,4 +141,6 @@ ParameterValidator.getInstance().assertOneOrLess(Parameter.LANGUAGE, getParameters()); + ParameterValidator.getInstance().assertOneOrLess(Parameter.VVENUE, + getParameters()); /* Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/LocationTypes.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/LocationTypes.java (revision 1364) @@ -1,0 +1,135 @@ +/* + * $Id: Categories.java,v 1.8 2006/11/05 06:04:43 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.LocationTypeList; +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * Defines a LOCATION_TYPE iCalendar component property. + * @author benf + */ +public class LocationTypes extends Property { + + //private static final long serialVersionUID = -7769987073466681634L; + + private LocationTypeList locationTypes; + + /** + * Default constructor. + */ + public LocationTypes() { + super(LOCATION_TYPE); + locationTypes = new LocationTypeList(); + } + + /** + * @param aValue a value string for this component + */ + public LocationTypes(final String aValue) { + super(LOCATION_TYPE); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public LocationTypes(final ParameterList aList, final String aValue) { + super(LOCATION_TYPE, aList); + setValue(aValue); + } + + /** + * @param cList a list of locationTypes + */ + public LocationTypes(final LocationTypeList cList) { + super(LOCATION_TYPE); + locationTypes = cList; + } + + /** + * @param aList a list of parameters for this component + * @param cList a list of locationTypes + */ + public LocationTypes(final ParameterList aList, final LocationTypeList cList) { + super(LOCATION_TYPE, aList); + locationTypes = cList; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + locationTypes = new LocationTypeList(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; but MUST NOT occur more than once (";" languageparam ) / + */ + ParameterValidator.getInstance().assertOneOrLess(Parameter.LANGUAGE, + getParameters()); + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /** + * @return Returns the locationTypes. + */ + public final LocationTypeList getLocationTypes() { + return locationTypes; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return getLocationTypes().toString(); + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Name.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Name.java (revision 1364) @@ -1,0 +1,103 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; + +/** + * Defines a NAME iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Name extends Property implements Escapable { + + private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Name() { + super(NAME); + } + + /** + * @param aValue a value string for this component + */ + public Name(final String aValue) { + super(NAME); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Name(final ParameterList aList, final String aValue) { + super(NAME, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Postalcode.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Postalcode.java (revision 1364) @@ -1,0 +1,103 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; + +/** + * Defines a POSTALCODE iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Postalcode extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Postalcode() { + super(POSTALCODE); + } + + /** + * @param aValue a value string for this component + */ + public Postalcode(final String aValue) { + super(POSTALCODE); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Postalcode(final ParameterList aList, final String aValue) { + super(POSTALCODE, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Region.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Region.java (revision 1364) @@ -1,0 +1,111 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * Defines a REGION iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Region extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Region() { + super(REGION); + } + + /** + * @param aValue a value string for this component + */ + public Region(final String aValue) { + super(REGION); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Region(final ParameterList aList, final String aValue) { + super(REGION, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following are optional, ; but MUST NOT occur more than once (";" abbrev + */ + ParameterValidator.getInstance().assertOneOrLess(Parameter.ABBREV, + getParameters()); + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/StreetAddress.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/StreetAddress.java (revision 1364) @@ -1,0 +1,103 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; + +/** + * Defines a STREET_ADDRESS iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class StreetAddress extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public StreetAddress() { + super(STREET_ADDRESS); + } + + /** + * @param aValue a value string for this component + */ + public StreetAddress(final String aValue) { + super(STREET_ADDRESS); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public StreetAddress(final ParameterList aList, final String aValue) { + super(STREET_ADDRESS, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Tel.java =================================================================== --- (revision ) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Tel.java (revision 1364) @@ -1,0 +1,111 @@ +/* + * $Id: TzName.java,v 1.8 2006/11/05 06:04:42 fortuna Exp $ + * + * Created: [Apr 6, 2004] + * + * Copyright (c) 2004, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.model.property; + +import net.fortuna.ical4j.model.Escapable; +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * Defines a TEL iCalendar component property. + * @author benf + * @author Mike Douglass + */ +public class Tel extends Property implements Escapable { + + //private static final long serialVersionUID = -6930099834219160086L; + + private String value; + + /** + * Default constructor. + */ + public Tel() { + super(TEL); + } + + /** + * @param aValue a value string for this component + */ + public Tel(final String aValue) { + super(TEL); + setValue(aValue); + } + + /** + * @param aList a list of parameters for this component + * @param aValue a value string for this component + */ + public Tel(final ParameterList aList, final String aValue) { + super(TEL, aList); + setValue(aValue); + } + + /** + * @see net.fortuna.ical4j.model.Property#validate() + */ + public final void validate() throws ValidationException { + + /* + * ; the following are optional, ; but MUST NOT occur more than once (";" abbrev + */ + ParameterValidator.getInstance().assertOneOrLess(Parameter.TYPE, + getParameters()); + + /* + * ; the following is optional, ; and MAY occur more than once (";" xparam) + */ + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#setValue(java.lang.String) + */ + public final void setValue(final String aValue) { + this.value = aValue; + } + + /* + * (non-Javadoc) + * @see net.fortuna.ical4j.model.Property#getValue() + */ + public final String getValue() { + return value; + } +} Index: external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Url.java =================================================================== --- external/ical4j/ical4j-beta1/net/fortuna/ical4j/model/property/Url.java (revision 1267) +++ external/ical4j/ical4j-1.0-beta1/net/fortuna/ical4j/model/property/Url.java (revision 1364) @@ -1,5 +1,5 @@ /* * $Id: Url.java,v 1.11 2006/11/05 06:04:42 fortuna Exp $ - * + * * Created: [Apr 6, 2004] * @@ -39,7 +39,9 @@ import java.net.URISyntaxException; +import net.fortuna.ical4j.model.Parameter; import net.fortuna.ical4j.model.ParameterList; import net.fortuna.ical4j.model.Property; import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; import net.fortuna.ical4j.util.Strings; import net.fortuna.ical4j.util.Uris; @@ -47,21 +49,21 @@ /** * Defines a URL iCalendar component property. - * + * *
  *     4.8.4.6 Uniform Resource Locator
- *     
+ *
  *        Property Name: URL
- *     
+ *
  *        Purpose: This property defines a Uniform Resource Locator (URL)
  *        associated with the iCalendar object.
- *     
+ *
  *        Value Type: URI
- *     
+ *
  *        Property Parameters: Non-standard property parameters can be
  *        specified on this property.
- *     
+ *
  *        Conformance: This property can be specified once in the "VEVENT",
  *        "VTODO", "VJOURNAL" or "VFREEBUSY" calendar components.
- *     
+ *
  *        Description: This property may be used in a calendar component to
  *        convey a location where a more dynamic rendition of the calendar
@@ -71,16 +73,16 @@
  *        property and Content-Location MIME header are both specified, they
  *        MUST point to the same resource.
- *     
+ *
  *        Format Definition: The property is defined by the following notation:
- *     
+ *
  *          url        = "URL" urlparam ":" uri CRLF
- *     
+ *
  *          urlparam   = *(";" xparam)
- *     
+ *
  *        Example: The following is an example of this property:
- *     
+ *
  *          URL:http://abc.com/pub/calendars/jsmith/mytime.ics
  * 
- * + * * @author Ben Fortuna */ @@ -162,4 +164,6 @@ public final void validate() throws ValidationException { // TODO: Auto-generated method stub + ParameterValidator.getInstance().assertOneOrLess(Parameter.TYPE, + getParameters()); } }