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, 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.

Author:
Ben Fortuna
See Also:
Serialized Form

Field Summary
static java.lang.String ACTION
           
static java.lang.String ATTACH
          the following are optional, and MAY occur more than once.
static java.lang.String ATTENDEE
           
static java.lang.String CALSCALE
          'calscale' and 'method' are optional, but MUST NOT occur more than once.
static java.lang.String CATEGORIES
           
static java.lang.String CLASS
          the following are optional, but MUST NOT occur more than once.
static java.lang.String COMMENT
           
static java.lang.String COMPLETED
           
static java.lang.String CONTACT
           
static java.lang.String COUNTRY
          the following are vvenue only properties.
static java.lang.String CREATED
           
static java.lang.String DESCRIPTION
           
static java.lang.String DTEND
          either 'dtend' or 'duration' may appear in a 'eventprop', but 'dtend' and 'duration' MUST NOT occur in the same 'eventprop'.
static java.lang.String DTSTAMP
           
static java.lang.String DTSTART
           
static java.lang.String DUE
           
static java.lang.String DURATION
           
static java.lang.String EXDATE
           
static java.lang.String EXPERIMENTAL_PREFIX
           
static java.lang.String EXRULE
           
static java.lang.String EXTENDED_ADDRESS
           
static java.lang.String FREEBUSY
           
static java.lang.String GEO
           
static java.lang.String LAST_MODIFIED
           
static java.lang.String LOCALITY
           
static java.lang.String LOCATION
           
static java.lang.String LOCATION_TYPE
           
static java.lang.String METHOD
           
static java.lang.String NAME
           
static java.lang.String ORGANIZER
           
static java.lang.String PERCENT_COMPLETE
           
static java.lang.String POSTALCODE
           
static java.lang.String PRIORITY
           
static java.lang.String PRODID
          'prodid' and 'version' are both REQUIRED, but MUST NOT occur more than once.
static java.lang.String RDATE
           
static java.lang.String RECURRENCE_ID
           
static java.lang.String REGION
           
static java.lang.String RELATED_TO
           
static java.lang.String REPEAT
           
static java.lang.String REQUEST_STATUS
           
static java.lang.String RESOURCES
           
static java.lang.String RRULE
           
static java.lang.String SEQUENCE
           
static java.lang.String STATUS
           
static java.lang.String STREET_ADDRESS
           
static java.lang.String SUMMARY
           
static java.lang.String TEL
           
static java.lang.String TRANSP
           
static java.lang.String TRIGGER
           
static java.lang.String TZID
           
static java.lang.String TZNAME
           
static java.lang.String TZOFFSETFROM
           
static java.lang.String TZOFFSETTO
           
static java.lang.String TZURL
           
static java.lang.String UID
           
static java.lang.String URL
           
static java.lang.String VERSION
           
 
Constructor Summary
protected Property(Property property)
          Creates a deep copy of the specified property.
protected Property(java.lang.String aName)
          Constructor.
protected Property(java.lang.String aName, ParameterList aList)
          Constructor made protected to enforce the use of PropertyFactory for property instantiation.
 
Method Summary
 Property copy()
          Create a (deep) copy of this property.
 boolean equals(java.lang.Object arg0)
          Uses ObjectUtils to test equality.
 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.
abstract  java.lang.String getValue()
           
 int hashCode()
          Uses HashCodeBuilder to build hashcode.
 boolean isCalendarProperty()
          Indicates whether this property is a calendar property.
 boolean isComponentProperty()
          Indicates whether this property is a component 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PRODID

public static final java.lang.String PRODID
'prodid' and 'version' are both REQUIRED, but MUST NOT occur more than once.

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

CALSCALE

public static final java.lang.String CALSCALE
'calscale' and 'method' are optional, but MUST NOT occur more than once.

See Also:
Constant Field Values

METHOD

public static final java.lang.String METHOD
See Also:
Constant Field Values

CLASS

public static final java.lang.String CLASS
the following are optional, but MUST NOT occur more than once.

See Also:
Constant Field Values

CREATED

public static final java.lang.String CREATED
See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
See Also:
Constant Field Values

DTSTART

public static final java.lang.String DTSTART
See Also:
Constant Field Values

GEO

public static final java.lang.String GEO
See Also:
Constant Field Values

LAST_MODIFIED

public static final java.lang.String LAST_MODIFIED
See Also:
Constant Field Values

LOCATION

public static final java.lang.String LOCATION
See Also:
Constant Field Values

ORGANIZER

public static final java.lang.String ORGANIZER
See Also:
Constant Field Values

PERCENT_COMPLETE

public static final java.lang.String PERCENT_COMPLETE
See Also:
Constant Field Values

PRIORITY

public static final java.lang.String PRIORITY
See Also:
Constant Field Values

DTSTAMP

public static final java.lang.String DTSTAMP
See Also:
Constant Field Values

SEQUENCE

public static final java.lang.String SEQUENCE
See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
See Also:
Constant Field Values

SUMMARY

public static final java.lang.String SUMMARY
See Also:
Constant Field Values

TRANSP

public static final java.lang.String TRANSP
See Also:
Constant Field Values

UID

public static final java.lang.String UID
See Also:
Constant Field Values

URL

public static final java.lang.String URL
See Also:
Constant Field Values

RECURRENCE_ID

public static final java.lang.String RECURRENCE_ID
See Also:
Constant Field Values

COMPLETED

public static final java.lang.String COMPLETED
See Also:
Constant Field Values

DUE

public static final java.lang.String DUE
See Also:
Constant Field Values

FREEBUSY

public static final java.lang.String FREEBUSY
See Also:
Constant Field Values

TZID

public static final java.lang.String TZID
See Also:
Constant Field Values

TZNAME

public static final java.lang.String TZNAME
See Also:
Constant Field Values

TZOFFSETFROM

public static final java.lang.String TZOFFSETFROM
See Also:
Constant Field Values

TZOFFSETTO

public static final java.lang.String TZOFFSETTO
See Also:
Constant Field Values

TZURL

public static final java.lang.String TZURL
See Also:
Constant Field Values

ACTION

public static final java.lang.String ACTION
See Also:
Constant Field Values

REPEAT

public static final java.lang.String REPEAT
See Also:
Constant Field Values

TRIGGER

public static final java.lang.String TRIGGER
See Also:
Constant Field Values

REQUEST_STATUS

public static final java.lang.String REQUEST_STATUS
See Also:
Constant Field Values

DTEND

public static final java.lang.String DTEND
either 'dtend' or 'duration' may appear in a 'eventprop', but 'dtend' and 'duration' MUST NOT occur in the same 'eventprop'.

See Also:
Constant Field Values

DURATION

public static final java.lang.String DURATION
See Also:
Constant Field Values

ATTACH

public static final java.lang.String ATTACH
the following are optional, and MAY occur more than once.

See Also:
Constant Field Values

ATTENDEE

public static final java.lang.String ATTENDEE
See Also:
Constant Field Values

CATEGORIES

public static final java.lang.String CATEGORIES
See Also:
Constant Field Values

COMMENT

public static final java.lang.String COMMENT
See Also:
Constant Field Values

CONTACT

public static final java.lang.String CONTACT
See Also:
Constant Field Values

EXDATE

public static final java.lang.String EXDATE
See Also:
Constant Field Values

EXRULE

public static final java.lang.String EXRULE
See Also:
Constant Field Values

RELATED_TO

public static final java.lang.String RELATED_TO
See Also:
Constant Field Values

RESOURCES

public static final java.lang.String RESOURCES
See Also:
Constant Field Values

RDATE

public static final java.lang.String RDATE
See Also:
Constant Field Values

RRULE

public static final java.lang.String RRULE
See Also:
Constant Field Values

EXPERIMENTAL_PREFIX

public static final java.lang.String EXPERIMENTAL_PREFIX
See Also:
Constant Field Values

COUNTRY

public static final java.lang.String COUNTRY
the following are vvenue only properties.

See Also:
Constant Field Values

EXTENDED_ADDRESS

public static final java.lang.String EXTENDED_ADDRESS
See Also:
Constant Field Values

LOCALITY

public static final java.lang.String LOCALITY
See Also:
Constant Field Values

LOCATION_TYPE

public static final java.lang.String LOCATION_TYPE
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

POSTALCODE

public static final java.lang.String POSTALCODE
See Also:
Constant Field Values

REGION

public static final java.lang.String REGION
See Also:
Constant Field Values

STREET_ADDRESS

public static final java.lang.String STREET_ADDRESS
See Also:
Constant Field Values

TEL

public static final java.lang.String TEL
See Also:
Constant Field Values
Constructor Detail

Property

protected Property(java.lang.String aName)
Constructor.

Parameters:
aName - property name

Property

protected Property(java.lang.String aName,
                   ParameterList aList)
Constructor made protected to enforce the use of PropertyFactory for property instantiation.

Parameters:
aName - property name
aList - a list of parameters

Property

protected Property(Property property)
            throws java.io.IOException,
                   java.net.URISyntaxException,
                   java.text.ParseException
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
java.io.IOException
java.text.ParseException
Method Detail

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

isCalendarProperty

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

Returns:
boolean

isComponentProperty

public final boolean isComponentProperty()
Indicates whether this property is a component property.

Returns:
boolean

getName

public final java.lang.String getName()
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

getValue

public abstract java.lang.String getValue()
Returns:
Returns the value.

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)
Uses ObjectUtils to test equality. Two properties are equal if and only if their name, value and parameter list are equal.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public final int hashCode()
Uses HashCodeBuilder to build 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
java.net.URISyntaxException
java.text.ParseException


Copyright © 2004-2007 Modularity. All Rights Reserved.