Top Description Fields Constructors Methods
net.fortuna.ical4j.model

public abstract Class Property

extends Content
implements Comparable<Property>, FluentProperty
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.FluentProperty, java.lang.Comparable
Known Direct Subclasses
net.fortuna.ical4j.model.property.Action, net.fortuna.ical4j.model.property.Attach, net.fortuna.ical4j.model.property.Attendee, net.fortuna.ical4j.model.property.BusyType, net.fortuna.ical4j.model.property.CalendarAddress, net.fortuna.ical4j.model.property.CalScale, net.fortuna.ical4j.model.property.Categories, net.fortuna.ical4j.model.property.Clazz, net.fortuna.ical4j.model.property.Color, net.fortuna.ical4j.model.property.Comment, net.fortuna.ical4j.model.property.Concept, net.fortuna.ical4j.model.property.Conference, net.fortuna.ical4j.model.property.Contact, net.fortuna.ical4j.model.property.Country, net.fortuna.ical4j.model.property.DateListProperty, net.fortuna.ical4j.model.property.DateProperty, net.fortuna.ical4j.model.property.Name, net.fortuna.ical4j.model.property.Organizer, net.fortuna.ical4j.model.property.ParticipantType, net.fortuna.ical4j.model.property.PercentComplete, net.fortuna.ical4j.model.property.Postalcode, net.fortuna.ical4j.model.property.Priority, net.fortuna.ical4j.model.property.ProdId, net.fortuna.ical4j.model.property.Proximity, net.fortuna.ical4j.model.property.RefId, net.fortuna.ical4j.model.property.RefreshInterval, net.fortuna.ical4j.model.property.Region, net.fortuna.ical4j.model.property.RelatedTo, net.fortuna.ical4j.model.property.Repeat, net.fortuna.ical4j.model.property.RequestStatus, net.fortuna.ical4j.model.property.Resources, net.fortuna.ical4j.model.property.ResourceType, net.fortuna.ical4j.model.property.Sequence, net.fortuna.ical4j.model.property.Source, net.fortuna.ical4j.model.property.Status, net.fortuna.ical4j.model.property.StreetAddress, net.fortuna.ical4j.model.property.StructuredData, net.fortuna.ical4j.model.property.StyledDescription, net.fortuna.ical4j.model.property.Summary, net.fortuna.ical4j.model.property.Tel, net.fortuna.ical4j.model.property.Transp, net.fortuna.ical4j.model.property.TzId, net.fortuna.ical4j.model.property.TzIdAliasOf, net.fortuna.ical4j.model.property.TzName, net.fortuna.ical4j.model.property.TzOffsetFrom, net.fortuna.ical4j.model.property.TzOffsetTo, net.fortuna.ical4j.model.property.TzUrl, net.fortuna.ical4j.model.property.Uid, net.fortuna.ical4j.model.property.Url, net.fortuna.ical4j.model.property.Version, net.fortuna.ical4j.model.property.Xml, net.fortuna.ical4j.model.property.XProperty, net.fortuna.ical4j.model.property.Duration, net.fortuna.ical4j.model.property.ExRule, net.fortuna.ical4j.model.property.ExtendedAddress, net.fortuna.ical4j.model.property.FreeBusy, net.fortuna.ical4j.model.property.Geo, net.fortuna.ical4j.model.property.Image, net.fortuna.ical4j.model.property.Link, net.fortuna.ical4j.model.property.Locality, net.fortuna.ical4j.model.property.Location, net.fortuna.ical4j.model.property.LocationType, net.fortuna.ical4j.model.property.Description, net.fortuna.ical4j.model.property.Method, net.fortuna.ical4j.model.property.RRule
Imports
net.fortuna.ical4j.model.parameter.Value, net.fortuna.ical4j.model.property.XProperty, net.fortuna.ical4j.util.Strings, net.fortuna.ical4j.validate.ValidationException, .ValidationResult, org.apache.commons.codec.EncoderException, org.apache.commons.lang3.builder.EqualsBuilder, .HashCodeBuilder, org.jetbrains.annotations.NotNull, java.util.Comparator, .List, .Optional

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]

Field Summary

Modifier and TypeField and Description
public static final String
ACKNOWLEDGED

Acknowledged Property taken from draft-daboo-valarm-extensions

public static final String
ACTION

Alarm action property name.

public static final String
ATTACH

Attachment property name.

public static final String
ATTENDEE

Attendee property name.

public static final String
BUSYTYPE

Busy type property name.

public static final String
CALENDAR_ADDRESS

Participant cua property name.

public static final String
CALSCALE

Calendar scale property name.

public static final String
CATEGORIES

Categories property name.

public static final String
CLASS

Classifier property name.

public static final String
COMMENT

Comment property name.

public static final String
COMPLETED

Completed date property name.

public static final String
CONTACT

Contact property name.

public static final String
COUNTRY

VVENUE country property name.

public static final String
CREATED

Creation date property name.

public static final String
DESCRIPTION

Description property name.

public static final String
DTEND

End date property name.

public static final String
DTSTAMP

Date-stamp property name.

public static final String
DTSTART

Start date property name.

public static final String
DUE

Due date property name.

public static final String
DURATION

Duration property name.

public static final String
EXDATE

Exclusion date property name.

public static final String
EXPERIMENTAL_PREFIX

Prefix for non-standard properties.

public static final String
EXRULE

Exclusion rule property name.

public static final String
EXTENDED_ADDRESS

VVENUE extended address property name.

public static final String
FREEBUSY

Free/busy property name.

public static final String
GEO

Geographic location property name.

public static final String
LAST_MODIFIED

Last modified date property name.

public static final String
LOCALITY

VVENUE locality property name.

public static final String
LOCATION

Location property name.

public static final String
LOCATION_TYPE

Location type property name.

public static final String
METHOD

iTIP method property name.

public static final String
NAME

VVENUE name property name.

private final String
public static final String
ORGANIZER

Organiser property name.

private ParameterList
public static final String
PARTICIPANT_TYPE

Participant type.

public static final String
PERCENT_COMPLETE

Percentage complete property name.

public static final String
POSTALCODE

VVENUE postal code property name.

private String
prefix

Support for a content line prefix used to group related properties.

public static final String
PRIORITY

Prority property name.

public static final String
PRODID

Product identifier property name.

public static final String
public static final String
RDATE

Recurrence date property name.

public static final String
RECURRENCE_ID

Recurrence identifier property name.

public static final String
REGION

VVENUE region property name.

public static final String
REPEAT

Repeat rule property name.

public static final String
REQUEST_STATUS

Request status property name.

public static final String
RESOURCE_TYPE

Resource type property name.

public static final String
RESOURCES

Resources property name.

public static final String
RRULE

Recurrence rule property name.

public static final String
SEQUENCE

Sequence property name.

private static final long
public static final String
STATUS

Status property name.

public static final String
STREET_ADDRESS

VVENUE street address property name.

public static final String
STRUCTURED_DATA

Structured data property name.

public static final String
STYLED_DESCRIPTION

Styled description property name.

public static final String
SUMMARY

Summary property name.

public static final String
TEL

VVENUE telephone property name.

public static final String
TRANSP

Transparency property name.

public static final String
TRIGGER

Alarm trigger property name.

public static final String
TZID

Timezone identifier property name.

public static final String
public static final String
TZNAME

Timezone name property name.

public static final String
TZOFFSETFROM

Prior timezone offset property name.

public static final String
TZOFFSETTO

New timezone offset property name.

public static final String
public static final String
TZURL

URL for timezone definition property name.

public static final String
UID

Unique identifier property name.

public static final String
URL

Uniform resource locator property name.

public static final String
VERSION

iCalendar version property name.

public static final String

Constructor Summary

AccessConstructor and Description
protected
Property(final String
property name
aName
)

Constructor.

protected
protected
Property(final String
a property identifier
aName
,
final ParameterList
a list of initial parameters
aList
)

protected
Property(@NotNull Enum<?> name, final ParameterList aList)

Method Summary

Modifier and TypeMethod and Description
public <T extends Property> T

Returns:

a reference to the property to support method chaining
add
(Parameter
the parameter to add
parameter
)

Add a parameter to the property's parameter list.

public int
compareTo(@NotNull Property
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public final Property

Returns:

the copy of the property
copy
()

Create a (deep) copy of this property.

public boolean
equals(final Object
the reference object with which to compare.
arg0
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Property
public final String

Returns:

Returns the name.
getName
()

Implements abstract net.fortuna.ical4j.model.Content.getName.

public final <P extends Parameter> Optional<P>

Returns:

the first parameter from the parameter list with the specified name
getParameter
(final String
name of the parameter to retrieve
name
)

Convenience method for retrieving a single parameter.

public final <P extends Parameter> Optional<P>
public final ParameterList

Returns:

Returns the underlying parameter list.
getParameterList
()

public final List<Parameter>

Returns:

a parameter list containing only parameters with the specified name
getParameters
(final String...
name of parameters to retrieve
name
)

Convenience method for retrieving a list of named parameters.

public String

Returns:

a string prefix, or null if not applicable
getPrefix
()

Returns the property prefix for applicable property types.

public final <
expected parameter type
P extends Parameter
>
P

Returns:

a parameter of the specified type
getRequiredParameter
(final String
parameter name
name
)

Retrieve a single required parameter.

public final <P extends Parameter> P
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

protected abstract PropertyFactory<?>

Returns:

a property factory instance
newFactory
()

Returns a new property factory used to create deep copies.

public <T extends Property> T

Returns:

a reference to the property to support method chaining
remove
(Parameter
the parameter to remove
parameter
)

Remove a parameter from the property's parameter list.

public <T extends Property> T

Returns:

a reference to the property to support method chaining
removeAll
(String...
the name of parameters to remove
parameterName
)

Remove all parameters with the specified name from the property's parameter list.

public <T extends Property> T

Returns:

a reference to the property to support method chaining
replace
(Parameter
the parameter to add
parameter
)

Add a parameter to the property's parameter list whilst removing all other parameters with the same name.

protected void
public void
setPrefix(String prefix)

public abstract void
setValue(String
a string representation of the property value
aValue
)

Sets the current value of the property.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public abstract ValidationResult
validate()

Perform validation on a property.

Inherited from net.fortuna.ical4j.model.Content:
getValue

Field Detail

ACKNOWLEDGEDback to summary
public static final String ACKNOWLEDGED

Acknowledged Property taken from draft-daboo-valarm-extensions

ACTIONback to summary
public static final String ACTION

Alarm action property name.

ATTACHback to summary
public static final String ATTACH

Attachment property name.

ATTENDEEback to summary
public static final String ATTENDEE

Attendee property name.

BUSYTYPEback to summary
public static final String BUSYTYPE

Busy type property name.

CALENDAR_ADDRESSback to summary
public static final String CALENDAR_ADDRESS

Participant cua property name.

CALSCALEback to summary
public static final String CALSCALE

Calendar scale property name.

CATEGORIESback to summary
public static final String CATEGORIES

Categories property name.

CLASSback to summary
public static final String CLASS

Classifier property name.

COMMENTback to summary
public static final String COMMENT

Comment property name.

COMPLETEDback to summary
public static final String COMPLETED

Completed date property name.

CONTACTback to summary
public static final String CONTACT

Contact property name.

COUNTRYback to summary
public static final String COUNTRY

VVENUE country property name.

CREATEDback to summary
public static final String CREATED

Creation date property name.

DESCRIPTIONback to summary
public static final String DESCRIPTION

Description property name.

DTENDback to summary
public static final String DTEND

End date property name.

DTSTAMPback to summary
public static final String DTSTAMP

Date-stamp property name.

DTSTARTback to summary
public static final String DTSTART

Start date property name.

DUEback to summary
public static final String DUE

Due date property name.

DURATIONback to summary
public static final String DURATION

Duration property name.

EXDATEback to summary
public static final String EXDATE

Exclusion date property name.

EXPERIMENTAL_PREFIXback to summary
public static final String EXPERIMENTAL_PREFIX

Prefix for non-standard properties.

EXRULEback to summary
public static final String EXRULE

Exclusion rule property name.

EXTENDED_ADDRESSback to summary
public static final String EXTENDED_ADDRESS

VVENUE extended address property name.

FREEBUSYback to summary
public static final String FREEBUSY

Free/busy property name.

GEOback to summary
public static final String GEO

Geographic location property name.

LAST_MODIFIEDback to summary
public static final String LAST_MODIFIED

Last modified date property name.

LOCALITYback to summary
public static final String LOCALITY

VVENUE locality property name.

LOCATIONback to summary
public static final String LOCATION

Location property name.

LOCATION_TYPEback to summary
public static final String LOCATION_TYPE

Location type property name.

METHODback to summary
public static final String METHOD

iTIP method property name.

NAMEback to summary
public static final String NAME

VVENUE name property name.

nameback to summary
private final String name
ORGANIZERback to summary
public static final String ORGANIZER

Organiser property name.

parametersback to summary
private ParameterList parameters
PARTICIPANT_TYPEback to summary
public static final String PARTICIPANT_TYPE

Participant type.

PERCENT_COMPLETEback to summary
public static final String PERCENT_COMPLETE

Percentage complete property name.

POSTALCODEback to summary
public static final String POSTALCODE

VVENUE postal code property name.

prefixback to summary
private String prefix

Support for a content line prefix used to group related properties. This is only used with vCard properties.

PRIORITYback to summary
public static final String PRIORITY

Prority property name.

PRODIDback to summary
public static final String PRODID

Product identifier property name.

PROXIMITYback to summary
public static final String PROXIMITY
RDATEback to summary
public static final String RDATE

Recurrence date property name.

RECURRENCE_IDback to summary
public static final String RECURRENCE_ID

Recurrence identifier property name.

REGIONback to summary
public static final String REGION

VVENUE region property name.

REPEATback to summary
public static final String REPEAT

Repeat rule property name.

REQUEST_STATUSback to summary
public static final String REQUEST_STATUS

Request status property name.

RESOURCE_TYPEback to summary
public static final String RESOURCE_TYPE

Resource type property name.

RESOURCESback to summary
public static final String RESOURCES

Resources property name.

RRULEback to summary
public static final String RRULE

Recurrence rule property name.

SEQUENCEback to summary
public static final String SEQUENCE

Sequence property name.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides net.fortuna.ical4j.model.Content.serialVersionUID.

STATUSback to summary
public static final String STATUS

Status property name.

STREET_ADDRESSback to summary
public static final String STREET_ADDRESS

VVENUE street address property name.

STRUCTURED_DATAback to summary
public static final String STRUCTURED_DATA

Structured data property name.

STYLED_DESCRIPTIONback to summary
public static final String STYLED_DESCRIPTION

Styled description property name.

SUMMARYback to summary
public static final String SUMMARY

Summary property name.

TELback to summary
public static final String TEL

VVENUE telephone property name.

TRANSPback to summary
public static final String TRANSP

Transparency property name.

TRIGGERback to summary
public static final String TRIGGER

Alarm trigger property name.

TZIDback to summary
public static final String TZID

Timezone identifier property name.

TZID_ALIAS_OFback to summary
public static final String TZID_ALIAS_OF
TZNAMEback to summary
public static final String TZNAME

Timezone name property name.

TZOFFSETFROMback to summary
public static final String TZOFFSETFROM

Prior timezone offset property name.

TZOFFSETTOback to summary
public static final String TZOFFSETTO

New timezone offset property name.

TZUNTILback to summary
public static final String TZUNTIL
TZURLback to summary
public static final String TZURL

URL for timezone definition property name.

UIDback to summary
public static final String UID

Unique identifier property name.

URLback to summary
public static final String URL

Uniform resource locator property name.

VERSIONback to summary
public static final String VERSION

iCalendar version property name.

XMLback to summary
public static final String XML

Constructor Detail

Propertyback to summary
protected Property(final String aName)

Constructor.

Parameters
aName:String

property name

Propertyback to summary
protected Property(@NotNull Enum<?> name)
Propertyback to summary
protected Property(final String aName, final ParameterList aList)
Parameters
aName:String

a property identifier

aList:ParameterList

a list of initial parameters

Propertyback to summary
protected Property(@NotNull Enum<?> name, final ParameterList aList)

Method Detail

addback to summary
public <T extends Property> T add(Parameter parameter)

Add a parameter to the property's parameter list.

Parameters
parameter:Parameter

the parameter to add

Returns:T

a reference to the property to support method chaining

Annotations
@SuppressWarnings:unchecked
compareToback to summary
public int compareTo(@NotNull Property o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:@NotNull Property

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
copyback to summary
public final Property copy()

Create a (deep) copy of this property.

Returns:Property

the copy of the property

equalsback to summary
public boolean equals(final Object arg0)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
arg0:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getFluentTargetback to summary
public Property getFluentTarget()

Implements net.fortuna.ical4j.model.FluentProperty.getFluentTarget.

Annotations
@Override
getNameback to summary
public final String getName()

Implements abstract net.fortuna.ical4j.model.Content.getName.

Returns:String

Returns the name.

Annotations
@Override
getParameterback to summary
public final <P extends Parameter> Optional<P> getParameter(final String name)

Convenience method for retrieving a single parameter.

Parameters
name:String

name of the parameter to retrieve

Returns:Optional<P>

the first parameter from the parameter list with the specified name

getParameterback to summary
public final <P extends Parameter> Optional<P> getParameter(@NotNull Enum<?> name)
getParameterListback to summary
public final ParameterList getParameterList()
Returns:ParameterList

Returns the underlying parameter list.

getParametersback to summary
public final List<Parameter> getParameters(final String... name)

Convenience method for retrieving a list of named parameters.

Parameters
name:String[]

name of parameters to retrieve

Returns:List<Parameter>

a parameter list containing only parameters with the specified name

getPrefixback to summary
public String getPrefix()

Returns the property prefix for applicable property types.

Returns:String

a string prefix, or null if not applicable

getRequiredParameterback to summary
public final <P extends Parameter> P getRequiredParameter(final String name)

Retrieve a single required parameter.

Parameters
<P>
expected parameter type
name:String

parameter name

Returns:P

a parameter of the specified type

getRequiredParameterback to summary
public final <P extends Parameter> P getRequiredParameter(@NotNull Enum<?> name)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
newFactoryback to summary
protected abstract PropertyFactory<?> newFactory()

Returns a new property factory used to create deep copies.

Returns:PropertyFactory<?>

a property factory instance

removeback to summary
public <T extends Property> T remove(Parameter parameter)

Remove a parameter from the property's parameter list.

Parameters
parameter:Parameter

the parameter to remove

Returns:T

a reference to the property to support method chaining

Annotations
@SuppressWarnings:unchecked
removeAllback to summary
public <T extends Property> T removeAll(String... parameterName)

Remove all parameters with the specified name from the property's parameter list.

Parameters
parameterName:String[]

the name of parameters to remove

Returns:T

a reference to the property to support method chaining

Annotations
@SuppressWarnings:unchecked
replaceback to summary
public <T extends Property> T replace(Parameter parameter)

Add a parameter to the property's parameter list whilst removing all other parameters with the same name.

Parameters
parameter:Parameter

the parameter to add

Returns:T

a reference to the property to support method chaining

Annotations
@SuppressWarnings:unchecked
setParametersback to summary
protected void setParameters(ParameterList parameters)
setPrefixback to summary
public void setPrefix(String prefix)
setValueback to summary
public abstract void setValue(String aValue)

Sets the current value of the property.

Parameters
aValue:String

a string representation of the property value

Exceptions
IllegalArgumentException:
possibly thrown by setting the value of certain properties
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
validateback to summary
public abstract ValidationResult validate() throws ValidationException

Perform validation on a property.

Exceptions
ValidationException:
where the property is not in a valid state