net.fortuna.ical4j.model

## Class Property

- java.lang.Object
- - net.fortuna.ical4j.model.Content
  - - net.fortuna.ical4j.model.Property

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  Action, Attach, Attendee, BusyType, CalScale, Categories, Clazz, Comment, Contact, Country, DateListProperty, DateProperty, Description, Duration, ExRule, ExtendedAddress, FreeBusy, Geo, Locality, Location, LocationType, Method, Name, Organizer, PercentComplete, Postalcode, Priority, ProdId, Region, RelatedTo, Repeat, RequestStatus, Resources, RRule, Sequence, Status, StreetAddress, Summary, Tel, Transp, TzId, TzName, TzOffsetFrom, TzOffsetTo, TzUrl, Uid, Url, Version, XProperty

    public abstract class Property
    extends Content

Defines an iCalendar property. Subclasses of this class provide additional validation and typed values for specific iCalendar properties. Note that subclasses must provide a reference to the factory used to create the property to support property cloning (copy). If no factory is specified an `UnsupportedOperationException` will be thrown by the `copy()` method.

Author:
  Ben Fortuna $Id$ [Apr 5, 2004]
See Also:
  Serialized Form

### Field Summary

Fields
`static String` `ACTION` Alarm action property name.
`static String` `ATTACH` Attachment property name.
`static String` `ATTENDEE` Attendee property name.
`static String` `BUSYTYPE` Busy type property name.
`static String` `CALSCALE` Calendar scale property name.
`static String` `CATEGORIES` Categories property name.
`static String` `CLASS` Classifier property name.
`static String` `COMMENT` Comment property name.
`static String` `COMPLETED` Completed date property name.
`static String` `CONTACT` Contact property name.
`static String` `COUNTRY` VVENUE country property name.
`static String` `CREATED` Creation date property name.
`static String` `DESCRIPTION` Description property name.
`static String` `DTEND` End date property name.
`static String` `DTSTAMP` Date-stamp property name.
`static String` `DTSTART` Start date property name.
`static String` `DUE` Due date property name.
`static String` `DURATION` Duration property name.
`static String` `EXDATE` Exclusion date property name.
`static String` `EXPERIMENTAL_PREFIX` Prefix for non-standard properties.
`static String` `EXRULE` Exclusion rule property name.
`static String` `EXTENDED_ADDRESS` VVENUE extended address property name.
`static String` `FREEBUSY` Free/busy property name.
`static String` `GEO` Geographic location property name.
`static String` `LAST_MODIFIED` Last modified date property name.
`static String` `LOCALITY` VVENUE locality property name.
`static String` `LOCATION` Location property name.
`static String` `LOCATION_TYPE` VVENUE location type property name.
`static String` `METHOD` iTIP method property name.
`static String` `NAME` VVENUE name property name.
`static String` `ORGANIZER` Organiser property name.
`static String` `PERCENT_COMPLETE` Percentage complete property name.
`static String` `POSTALCODE` VVENUE postal code property name.
`static String` `PRIORITY` Prority property name.
`static String` `PRODID` Product identifier property name.
`static String` `RDATE` Recurrence date property name.
`static String` `RECURRENCE_ID` Recurrence identifier property name.
`static String` `REGION` VVENUE region property name.
`static String` `RELATED_TO` Relationship property name.
`static String` `REPEAT` Repeat rule property name.
`static String` `REQUEST_STATUS` Request status property name.
`static String` `RESOURCES` Resources property name.
`static String` `RRULE` Recurrence rule property name.
`static String` `SEQUENCE` Sequence property name.
`static String` `STATUS` Status property name.
`static String` `STREET_ADDRESS` VVENUE street address property name.
`static String` `SUMMARY` Summary property name.
`static String` `TEL` VVENUE telephone property name.
`static String` `TRANSP` Transparency property name.
`static String` `TRIGGER` Alarm trigger property name.
`static String` `TZID` Timezone identifier property name.
`static String` `TZNAME` Timezone name property name.
`static String` `TZOFFSETFROM` Prior timezone offset property name.
`static String` `TZOFFSETTO` New timezone offset property name.
`static String` `TZURL` URL for timezone definition property name.
`static String` `UID` Unique identifier property name.
`static String` `URL` Uniform resource locator property name.
`static String` `VERSION` iCalendar version property name.

### Constructor Summary

Constructors
`protected` `Property(Property property)` Deprecated. Use `copy()` instead
`protected` `Property(String aName, ParameterList aList, PropertyFactory factory)`
`protected` `Property(String aName, PropertyFactory factory)` Constructor.

### Method Summary

Methods
`Property` `copy()` Create a (deep) copy of this property.
`boolean` `equals(Object arg0)`
`String` `getName()`
`Parameter` `getParameter(String name)` Convenience method for retrieving a single parameter.
`ParameterList` `getParameters()`
`ParameterList` `getParameters(String name)` Convenience method for retrieving a list of named parameters.
`int` `hashCode()`
`boolean` `isCalendarProperty()` Indicates whether this property is a calendar property.
`abstract void` `setValue(String aValue)` Sets the current value of the property.
`String` `toString()`
`abstract void` `validate()` Perform validation on a property.

### Methods inherited from class net.fortuna.ical4j.model.Content

`getValue`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### PRODID

    public static final String PRODID

Product identifier property name.

See Also:
  Constant Field Values

#### VERSION

    public static final String VERSION

iCalendar version property name.

See Also:
  Constant Field Values

#### CALSCALE

    public static final String CALSCALE

Calendar scale property name.

See Also:
  Constant Field Values

#### METHOD

    public static final String METHOD

iTIP method property name.

See Also:
  Constant Field Values

#### BUSYTYPE

    public static final String BUSYTYPE

Busy type property name.

See Also:
  Constant Field Values

#### CLASS

    public static final String CLASS

Classifier property name.

See Also:
  Constant Field Values

#### CREATED

    public static final String CREATED

Creation date property name.

See Also:
  Constant Field Values

#### DESCRIPTION

    public static final String DESCRIPTION

Description property name.

See Also:
  Constant Field Values

#### DTSTART

    public static final String DTSTART

Start date property name.

See Also:
  Constant Field Values

#### GEO

    public static final String GEO

Geographic location property name.

See Also:
  Constant Field Values

#### LAST_MODIFIED

    public static final String LAST_MODIFIED

Last modified date property name.

See Also:
  Constant Field Values

#### LOCATION

    public static final String LOCATION

Location property name.

See Also:
  Constant Field Values

#### ORGANIZER

    public static final String ORGANIZER

Organiser property name.

See Also:
  Constant Field Values

#### PERCENT_COMPLETE

    public static final String PERCENT_COMPLETE

Percentage complete property name.

See Also:
  Constant Field Values

#### PRIORITY

    public static final String PRIORITY

Prority property name.

See Also:
  Constant Field Values

#### DTSTAMP

    public static final String DTSTAMP

Date-stamp property name.

See Also:
  Constant Field Values

#### SEQUENCE

    public static final String SEQUENCE

Sequence property name.

See Also:
  Constant Field Values

#### STATUS

    public static final String STATUS

Status property name.

See Also:
  Constant Field Values

#### SUMMARY

    public static final String SUMMARY

Summary property name.

See Also:
  Constant Field Values

#### TRANSP

    public static final String TRANSP

Transparency property name.

See Also:
  Constant Field Values

#### UID

    public static final String UID

Unique identifier property name.

See Also:
  Constant Field Values

#### URL

    public static final String URL

Uniform resource locator property name.

See Also:
  Constant Field Values

#### RECURRENCE_ID

    public static final String RECURRENCE_ID

Recurrence identifier property name.

See Also:
  Constant Field Values

#### COMPLETED

    public static final String COMPLETED

Completed date property name.

See Also:
  Constant Field Values

#### DUE

    public static final String DUE

Due date property name.

See Also:
  Constant Field Values

#### FREEBUSY

    public static final String FREEBUSY

Free/busy property name.

See Also:
  Constant Field Values

#### TZID

    public static final String TZID

Timezone identifier property name.

See Also:
  Constant Field Values

#### TZNAME

    public static final String TZNAME

Timezone name property name.

See Also:
  Constant Field Values

#### TZOFFSETFROM

    public static final String TZOFFSETFROM

Prior timezone offset property name.

See Also:
  Constant Field Values

#### TZOFFSETTO

    public static final String TZOFFSETTO

New timezone offset property name.

See Also:
  Constant Field Values

#### TZURL

    public static final String TZURL

URL for timezone definition property name.

See Also:
  Constant Field Values

#### ACTION

    public static final String ACTION

Alarm action property name.

See Also:
  Constant Field Values

#### REPEAT

    public static final String REPEAT

Repeat rule property name.

See Also:
  Constant Field Values

#### TRIGGER

    public static final String TRIGGER

Alarm trigger property name.

See Also:
  Constant Field Values

#### REQUEST_STATUS

    public static final String REQUEST_STATUS

Request status property name.

See Also:
  Constant Field Values

#### DTEND

    public static final String DTEND

End date property name.

See Also:
  Constant Field Values

#### DURATION

    public static final String DURATION

Duration property name.

See Also:
  Constant Field Values

#### ATTACH

    public static final String ATTACH

Attachment property name.

See Also:
  Constant Field Values

#### ATTENDEE

    public static final String ATTENDEE

Attendee property name.

See Also:
  Constant Field Values

#### CATEGORIES

    public static final String CATEGORIES

Categories property name.

See Also:
  Constant Field Values

#### COMMENT

    public static final String COMMENT

Comment property name.

See Also:
  Constant Field Values

#### CONTACT

    public static final String CONTACT

Contact property name.

See Also:
  Constant Field Values

#### EXDATE

    public static final String EXDATE

Exclusion date property name.

See Also:
  Constant Field Values

#### EXRULE

    public static final String EXRULE

Exclusion rule property name.

See Also:
  Constant Field Values

#### RELATED_TO

    public static final String RELATED_TO

Relationship property name.

See Also:
  Constant Field Values

#### RESOURCES

    public static final String RESOURCES

Resources property name.

See Also:
  Constant Field Values

#### RDATE

    public static final String RDATE

Recurrence date property name.

See Also:
  Constant Field Values

#### RRULE

    public static final String RRULE

Recurrence rule property name.

See Also:
  Constant Field Values

#### EXPERIMENTAL_PREFIX

    public static final String EXPERIMENTAL_PREFIX

Prefix for non-standard properties.

See Also:
  Constant Field Values

#### COUNTRY

    public static final String COUNTRY

VVENUE country property name.

See Also:
  Constant Field Values

#### EXTENDED_ADDRESS

    public static final String EXTENDED_ADDRESS

VVENUE extended address property name.

See Also:
  Constant Field Values

#### LOCALITY

    public static final String LOCALITY

VVENUE locality property name.

See Also:
  Constant Field Values

#### LOCATION_TYPE

    public static final String LOCATION_TYPE

VVENUE location type property name.

See Also:
  Constant Field Values

#### NAME

    public static final String NAME

VVENUE name property name.

See Also:
  Constant Field Values

#### POSTALCODE

    public static final String POSTALCODE

VVENUE postal code property name.

See Also:
  Constant Field Values

#### REGION

    public static final String REGION

VVENUE region property name.

See Also:
  Constant Field Values

#### STREET_ADDRESS

    public static final String STREET_ADDRESS

VVENUE street address property name.

See Also:
  Constant Field Values

#### TEL

    public static final String TEL

VVENUE telephone property name.

See Also:
  Constant Field Values

### Constructor Detail

#### Property

    protected Property(String aName,
            PropertyFactory factory)

Constructor.

Parameters:
  `aName` - property name
  `factory` - the factory used to create the property instance

#### Property

    protected Property(String aName,
            ParameterList aList,
            PropertyFactory factory)

Parameters:
  `aName` - a property identifier
  `aList` - a list of initial parameters
  `factory` - the factory used to create the property instance

#### Property

    protected Property(Property property)
                throws IOException,
                       URISyntaxException,
                       ParseException

Deprecated. Use `copy()` instead
Creates a deep copy of the specified property. That is, the name, parameter list, and value are duplicated from the specified property. This constructor should only be called from sub-classes to ensure type integrity is maintained.

Parameters:
  `property` - a property to copy
Throws:
  `URISyntaxException` - where the specified property contains an invalid URI value
  `ParseException` - where the specified property has invalid data
  `IOException` - where an error occurs reading data from the specified property

### Method Detail

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`

#### isCalendarProperty

    public boolean isCalendarProperty()

Indicates whether this property is a calendar property.

Returns:
  boolean

#### getName

    public final String getName()

Specified by:
  `getName` in class `Content`
Returns:
  Returns the name.

#### getParameters

    public final ParameterList getParameters()

Returns:
  Returns the parameters.

#### getParameters

    public final ParameterList getParameters(String name)

Convenience method for retrieving a list of named parameters.

Parameters:
  `name` - name of parameters to retrieve
Returns:
  a parameter list containing only parameters with the specified name

#### getParameter

    public final Parameter getParameter(String name)

Convenience method for retrieving a single parameter.

Parameters:
  `name` - name of the parameter to retrieve
Returns:
  the first parameter from the parameter list with the specified name

#### setValue

    public abstract void setValue(String aValue)
                           throws IOException,
                                  URISyntaxException,
                                  ParseException

Sets the current value of the property.

Parameters:
  `aValue` - a string representation of the property value
Throws:
  `IOException` - possibly thrown by setting the value of certain properties
  `URISyntaxException` - possibly thrown by setting the value of certain properties
  `ParseException` - possibly thrown by setting the value of certain properties

#### validate

    public abstract void validate()
                           throws ValidationException

Perform validation on a property.

Throws:
  `ValidationException` - where the property is not in a valid state

#### equals

    public final boolean equals(Object arg0)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### copy

    public Property copy()
                  throws IOException,
                         URISyntaxException,
                         ParseException

Create a (deep) copy of this property.

Returns:
  the copy of the property
Throws:
  `IOException` - where an error occurs reading property data
  `URISyntaxException` - where the property contains an invalid URI value
  `ParseException` - where the property contains an invalid date value