net.fortuna.ical4j.model
Class Property

java.lang.Object
  extended by net.fortuna.ical4j.model.Content
      extended by net.fortuna.ical4j.model.Property
All Implemented Interfaces:
java.io.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: Property.java,v 1.39 2011/02/20 03:12:32 fortuna Exp $ [Apr 5, 2004]
See Also:
Serialized Form

Field Summary
static java.lang.String ACTION
          Alarm action property name.
static java.lang.String ATTACH
          Attachment property name.
static java.lang.String ATTENDEE
          Attendee property name.
static java.lang.String BUSYTYPE
          Busy type property name.
static java.lang.String CALSCALE
          Calendar scale property name.
static java.lang.String CATEGORIES
          Categories property name.
static java.lang.String CLASS
          Classifier property name.
static java.lang.String COMMENT
          Comment property name.
static java.lang.String COMPLETED
          Completed date property name.
static java.lang.String CONTACT
          Contact property name.
static java.lang.String COUNTRY
          VVENUE country property name.
static java.lang.String CREATED
          Creation date property name.
static java.lang.String DESCRIPTION
          Description property name.
static java.lang.String DTEND
          End date property name.
static java.lang.String DTSTAMP
          Date-stamp property name.
static java.lang.String DTSTART
          Start date property name.
static java.lang.String DUE
          Due date property name.
static java.lang.String DURATION
          Duration property name.
static java.lang.String EXDATE
          Exclusion date property name.
static java.lang.String EXPERIMENTAL_PREFIX
          Prefix for non-standard properties.
static java.lang.String EXRULE
          Exclusion rule property name.
static java.lang.String EXTENDED_ADDRESS
          VVENUE extended address property name.
static java.lang.String FREEBUSY
          Free/busy property name.
static java.lang.String GEO
          Geographic location property name.
static java.lang.String LAST_MODIFIED
          Last modified date property name.
static java.lang.String LOCALITY
          VVENUE locality property name.
static java.lang.String LOCATION
          Location property name.
static java.lang.String LOCATION_TYPE
          VVENUE location type property name.
static java.lang.String METHOD
          iTIP method property name.
static java.lang.String NAME
          VVENUE name property name.
static java.lang.String ORGANIZER
          Organiser property name.
static java.lang.String PERCENT_COMPLETE
          Percentage complete property name.
static java.lang.String POSTALCODE
          VVENUE postal code property name.
static java.lang.String PRIORITY
          Prority property name.
static java.lang.String PRODID
          Product identifier property name.
static java.lang.String RDATE
          Recurrence date property name.
static java.lang.String RECURRENCE_ID
          Recurrence identifier property name.
static java.lang.String REGION
          VVENUE region property name.
static java.lang.String RELATED_TO
          Relationship property name.
static java.lang.String REPEAT
          Repeat rule property name.
static java.lang.String REQUEST_STATUS
          Request status property name.
static java.lang.String RESOURCES
          Resources property name.
static java.lang.String RRULE
          Recurrence rule property name.
static java.lang.String SEQUENCE
          Sequence property name.
static java.lang.String STATUS
          Status property name.
static java.lang.String STREET_ADDRESS
          VVENUE street address property name.
static java.lang.String SUMMARY
          Summary property name.
static java.lang.String TEL
          VVENUE telephone property name.
static java.lang.String TRANSP
          Transparency property name.
static java.lang.String TRIGGER
          Alarm trigger property name.
static java.lang.String TZID
          Timezone identifier property name.
static java.lang.String TZNAME
          Timezone name property name.
static java.lang.String TZOFFSETFROM
          Prior timezone offset property name.
static java.lang.String TZOFFSETTO
          New timezone offset property name.
static java.lang.String TZURL
          URL for timezone definition property name.
static java.lang.String UID
          Unique identifier property name.
static java.lang.String URL
          Uniform resource locator property name.
static java.lang.String VERSION
          iCalendar version property name.
 
Constructor Summary
protected Property(Property property)
          Deprecated. Use copy() instead
protected Property(java.lang.String aName, ParameterList aList, PropertyFactory factory)
           
protected Property(java.lang.String aName, PropertyFactory factory)
          Constructor.
 
Method Summary
 Property copy()
          Create a (deep) copy of this property.
 boolean equals(java.lang.Object arg0)
          
 java.lang.String getName()
           
 Parameter getParameter(java.lang.String name)
          Convenience method for retrieving a single parameter.
 ParameterList getParameters()
           
 ParameterList getParameters(java.lang.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(java.lang.String aValue)
          Sets the current value of the property.
 java.lang.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 java.lang.String PRODID
Product identifier property name.

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
iCalendar version property name.

See Also:
Constant Field Values

CALSCALE

public static final java.lang.String CALSCALE
Calendar scale property name.

See Also:
Constant Field Values

METHOD

public static final java.lang.String METHOD
iTIP method property name.

See Also:
Constant Field Values

BUSYTYPE

public static final java.lang.String BUSYTYPE
Busy type property name.

See Also:
Constant Field Values

CLASS

public static final java.lang.String CLASS
Classifier property name.

See Also:
Constant Field Values

CREATED

public static final java.lang.String CREATED
Creation date property name.

See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
Description property name.

See Also:
Constant Field Values

DTSTART

public static final java.lang.String DTSTART
Start date property name.

See Also:
Constant Field Values

GEO

public static final java.lang.String GEO
Geographic location property name.

See Also:
Constant Field Values

LAST_MODIFIED

public static final java.lang.String LAST_MODIFIED
Last modified date property name.

See Also:
Constant Field Values

LOCATION

public static final java.lang.String LOCATION
Location property name.

See Also:
Constant Field Values

ORGANIZER

public static final java.lang.String ORGANIZER
Organiser property name.

See Also:
Constant Field Values

PERCENT_COMPLETE

public static final java.lang.String PERCENT_COMPLETE
Percentage complete property name.

See Also:
Constant Field Values

PRIORITY

public static final java.lang.String PRIORITY
Prority property name.

See Also:
Constant Field Values

DTSTAMP

public static final java.lang.String DTSTAMP
Date-stamp property name.

See Also:
Constant Field Values

SEQUENCE

public static final java.lang.String SEQUENCE
Sequence property name.

See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
Status property name.

See Also:
Constant Field Values

SUMMARY

public static final java.lang.String SUMMARY
Summary property name.

See Also:
Constant Field Values

TRANSP

public static final java.lang.String TRANSP
Transparency property name.

See Also:
Constant Field Values

UID

public static final java.lang.String UID
Unique identifier property name.

See Also:
Constant Field Values

URL

public static final java.lang.String URL
Uniform resource locator property name.

See Also:
Constant Field Values

RECURRENCE_ID

public static final java.lang.String RECURRENCE_ID
Recurrence identifier property name.

See Also:
Constant Field Values

COMPLETED

public static final java.lang.String COMPLETED
Completed date property name.

See Also:
Constant Field Values

DUE

public static final java.lang.String DUE
Due date property name.

See Also:
Constant Field Values

FREEBUSY

public static final java.lang.String FREEBUSY
Free/busy property name.

See Also:
Constant Field Values

TZID

public static final java.lang.String TZID
Timezone identifier property name.

See Also:
Constant Field Values

TZNAME

public static final java.lang.String TZNAME
Timezone name property name.

See Also:
Constant Field Values

TZOFFSETFROM

public static final java.lang.String TZOFFSETFROM
Prior timezone offset property name.

See Also:
Constant Field Values

TZOFFSETTO

public static final java.lang.String TZOFFSETTO
New timezone offset property name.

See Also:
Constant Field Values

TZURL

public static final java.lang.String TZURL
URL for timezone definition property name.

See Also:
Constant Field Values

ACTION

public static final java.lang.String ACTION
Alarm action property name.

See Also:
Constant Field Values

REPEAT

public static final java.lang.String REPEAT
Repeat rule property name.

See Also:
Constant Field Values

TRIGGER

public static final java.lang.String TRIGGER
Alarm trigger property name.

See Also:
Constant Field Values

REQUEST_STATUS

public static final java.lang.String REQUEST_STATUS
Request status property name.

See Also:
Constant Field Values

DTEND

public static final java.lang.String DTEND
End date property name.

See Also:
Constant Field Values

DURATION

public static final java.lang.String DURATION
Duration property name.

See Also:
Constant Field Values

ATTACH

public static final java.lang.String ATTACH
Attachment property name.

See Also:
Constant Field Values

ATTENDEE

public static final java.lang.String ATTENDEE
Attendee property name.

See Also:
Constant Field Values

CATEGORIES

public static final java.lang.String CATEGORIES
Categories property name.

See Also:
Constant Field Values

COMMENT

public static final java.lang.String COMMENT
Comment property name.

See Also:
Constant Field Values

CONTACT

public static final java.lang.String CONTACT
Contact property name.

See Also:
Constant Field Values

EXDATE

public static final java.lang.String EXDATE
Exclusion date property name.

See Also:
Constant Field Values

EXRULE

public static final java.lang.String EXRULE
Exclusion rule property name.

See Also:
Constant Field Values

RELATED_TO

public static final java.lang.String RELATED_TO
Relationship property name.

See Also:
Constant Field Values

RESOURCES

public static final java.lang.String RESOURCES
Resources property name.

See Also:
Constant Field Values

RDATE

public static final java.lang.String RDATE
Recurrence date property name.

See Also:
Constant Field Values

RRULE

public static final java.lang.String RRULE
Recurrence rule property name.

See Also:
Constant Field Values

EXPERIMENTAL_PREFIX

public static final java.lang.String EXPERIMENTAL_PREFIX
Prefix for non-standard properties.

See Also:
Constant Field Values

COUNTRY

public static final java.lang.String COUNTRY
VVENUE country property name.

See Also:
Constant Field Values

EXTENDED_ADDRESS

public static final java.lang.String EXTENDED_ADDRESS
VVENUE extended address property name.

See Also:
Constant Field Values

LOCALITY

public static final java.lang.String LOCALITY
VVENUE locality property name.

See Also:
Constant Field Values

LOCATION_TYPE

public static final java.lang.String LOCATION_TYPE
VVENUE location type property name.

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
VVENUE name property name.

See Also:
Constant Field Values

POSTALCODE

public static final java.lang.String POSTALCODE
VVENUE postal code property name.

See Also:
Constant Field Values

REGION

public static final java.lang.String REGION
VVENUE region property name.

See Also:
Constant Field Values

STREET_ADDRESS

public static final java.lang.String STREET_ADDRESS
VVENUE street address property name.

See Also:
Constant Field Values

TEL

public static final java.lang.String TEL
VVENUE telephone property name.

See Also:
Constant Field Values
Constructor Detail

Property

protected Property(java.lang.String aName,
                   PropertyFactory factory)
Constructor.

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

Property

protected Property(java.lang.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 java.io.IOException,
                   java.net.URISyntaxException,
                   java.text.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:
java.net.URISyntaxException - where the specified property contains an invalid URI value
java.text.ParseException - where the specified property has invalid data
java.io.IOException - where an error occurs reading data from the specified property
Method Detail

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object

isCalendarProperty

public boolean isCalendarProperty()
Indicates whether this property is a calendar property.

Returns:
boolean

getName

public final java.lang.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(java.lang.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(java.lang.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(java.lang.String aValue)
                       throws java.io.IOException,
                              java.net.URISyntaxException,
                              java.text.ParseException
Sets the current value of the property.

Parameters:
aValue - a string representation of the property value
Throws:
java.io.IOException - possibly thrown by setting the value of certain properties
java.net.URISyntaxException - possibly thrown by setting the value of certain properties
java.text.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(java.lang.Object arg0)

Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()

Overrides:
hashCode in class java.lang.Object

copy

public Property copy()
              throws java.io.IOException,
                     java.net.URISyntaxException,
                     java.text.ParseException
Create a (deep) copy of this property.

Returns:
the copy of the property
Throws:
java.io.IOException - where an error occurs reading property data
java.net.URISyntaxException - where the property contains an invalid URI value
java.text.ParseException - where the property contains an invalid date value


Copyright © 2004-2011 Modularity. All Rights Reserved.