net.fortuna.ical4j.model

Class Property


public abstract class Property
extends Content

$Id: Property.java,v 1.32 2008/12/16 12:34:52 fortuna Exp $ [Apr 5, 2004] Defines an iCalendar property. Subclasses of this class provide additional validation and typed values for specific iCalendar properties.

Field Summary

static String
ACTION
static String
ATTACH
the following are optional, and MAY occur more than once.
static String
ATTENDEE
static String
BUSYTYPE
the following are optional, but MUST NOT occur more than once.
static String
CALSCALE
'calscale' and 'method' are optional, but MUST NOT occur more than once.
static String
CATEGORIES
static String
CLASS
static String
COMMENT
static String
COMPLETED
static String
CONTACT
static String
COUNTRY
the following are vvenue only properties.
static String
CREATED
static String
DESCRIPTION
static String
DTEND
either 'dtend' or 'duration' may appear in a 'eventprop', but 'dtend' and 'duration' MUST NOT occur in the same 'eventprop'.
static String
DTSTAMP
static String
DTSTART
static String
DUE
static String
DURATION
static String
EXDATE
static String
EXPERIMENTAL_PREFIX
static String
EXRULE
static String
EXTENDED_ADDRESS
static String
FREEBUSY
static String
GEO
static String
LAST_MODIFIED
static String
LOCALITY
static String
LOCATION
static String
LOCATION_TYPE
static String
METHOD
static String
NAME
static String
ORGANIZER
static String
PERCENT_COMPLETE
static String
POSTALCODE
static String
PRIORITY
static String
PRODID
'prodid' and 'version' are both REQUIRED, but MUST NOT occur more than once.
static String
RDATE
static String
RECURRENCE_ID
static String
REGION
static String
RELATED_TO
static String
REPEAT
static String
REQUEST_STATUS
static String
RESOURCES
static String
RRULE
static String
SEQUENCE
static String
STATUS
static String
STREET_ADDRESS
static String
SUMMARY
static String
TEL
static String
TRANSP
static String
TRIGGER
static String
TZID
static String
TZNAME
static String
TZOFFSETFROM
static String
TZOFFSETTO
static String
TZURL
static String
UID
static String
URL
static String
VERSION

Constructor Summary

Property(Property property)
Creates a deep copy of the specified property.
Property(String aName)
Constructor.
Property(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(Object arg0)
Uses EqualsBuilder to test equality.
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.
abstract 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(String aValue)
Sets the current value of the property.
String
toString()
abstract void
validate()
Perform validation on a property.

Field Details

ACTION

public static final String ACTION

ATTACH

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

ATTENDEE

public static final String ATTENDEE

BUSYTYPE

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

CALSCALE

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

CATEGORIES

public static final String CATEGORIES

CLASS

public static final String CLASS

COMMENT

public static final String COMMENT

COMPLETED

public static final String COMPLETED

CONTACT

public static final String CONTACT

COUNTRY

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

CREATED

public static final String CREATED

DESCRIPTION

public static final String DESCRIPTION

DTEND

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

DTSTAMP

public static final String DTSTAMP

DTSTART

public static final String DTSTART

DUE

public static final String DUE

DURATION

public static final String DURATION

EXDATE

public static final String EXDATE

EXPERIMENTAL_PREFIX

public static final String EXPERIMENTAL_PREFIX

EXRULE

public static final String EXRULE

EXTENDED_ADDRESS

public static final String EXTENDED_ADDRESS

FREEBUSY

public static final String FREEBUSY

GEO

public static final String GEO

LAST_MODIFIED

public static final String LAST_MODIFIED

LOCALITY

public static final String LOCALITY

LOCATION

public static final String LOCATION

LOCATION_TYPE

public static final String LOCATION_TYPE

METHOD

public static final String METHOD

NAME

public static final String NAME

ORGANIZER

public static final String ORGANIZER

PERCENT_COMPLETE

public static final String PERCENT_COMPLETE

POSTALCODE

public static final String POSTALCODE

PRIORITY

public static final String PRIORITY

PRODID

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

RDATE

public static final String RDATE

RECURRENCE_ID

public static final String RECURRENCE_ID

REGION

public static final String REGION

RELATED_TO

public static final String RELATED_TO

REPEAT

public static final String REPEAT

REQUEST_STATUS

public static final String REQUEST_STATUS

RESOURCES

public static final String RESOURCES

RRULE

public static final String RRULE

SEQUENCE

public static final String SEQUENCE

STATUS

public static final String STATUS

STREET_ADDRESS

public static final String STREET_ADDRESS

SUMMARY

public static final String SUMMARY

TEL

public static final String TEL

TRANSP

public static final String TRANSP

TRIGGER

public static final String TRIGGER

TZID

public static final String TZID

TZNAME

public static final String TZNAME

TZOFFSETFROM

public static final String TZOFFSETFROM

TZOFFSETTO

public static final String TZOFFSETTO

TZURL

public static final String TZURL

UID

public static final String UID

URL

public static final String URL

VERSION

public static final String VERSION

Constructor Details

Property

protected Property(Property property)
            throws IOException,
                   URISyntaxException,
                   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

Property

protected Property(String aName)
Constructor.
Parameters:
aName - property name

Property

protected Property(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

Method Details

copy

public Property copy()
            throws IOException,
                   URISyntaxException,
                   ParseException
Create a (deep) copy of this property.
Returns:
the copy of the property

equals

public final boolean equals(Object arg0)
Uses EqualsBuilder to test equality. Two properties are equal if and only if their name, value and parameter list are equal.
See Also:
java.lang.Object.equals(java.lang.Object)

getName

public final String getName()
Returns:
Returns the 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

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

getValue

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

hashCode

public final int hashCode()
Uses HashCodeBuilder to build hashcode.

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

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

toString

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

validate

public abstract void validate()
            throws ValidationException
Perform validation on a property.