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

public Class Geo

extends Property
Class Inheritance
Imports
net.fortuna.ical4j.model.Content, .ParameterList, .Property, .PropertyFactory, net.fortuna.ical4j.util.CompatibilityHints, net.fortuna.ical4j.validate.ValidationException, .ValidationResult, net.fortuna.ical4j.validate.property.DescriptivePropertyValidators, java.math.BigDecimal, java.util.regex.Matcher, .Pattern

$Id$

Created: [Apr 6, 2004]

Defines a GEO iCalendar component property.

     4.8.1.6 Geographic Position

        Property Name: GEO

        Purpose: This property specifies information related to the global
        position for the activity specified by a calendar component.

        Value Type: FLOAT. The value MUST be two SEMICOLON separated FLOAT
        values.

        Property Parameters: Non-standard property parameters can be
        specified on this property.

        Conformance: This property can be specified in  "VEVENT" or "VTODO"
        calendar components.

        Description: The property value specifies latitude and longitude, in
        that order (i.e., "LAT LON" ordering). The longitude represents the
        location east or west of the prime meridian as a positive or negative
        real number, respectively. The longitude and latitude values MAY be
        specified up to six decimal places, which will allow for accuracy to
        within one meter of geographical position. Receiving applications
        MUST accept values of this precision and MAY truncate values of
        greater precision.

        Values for latitude and longitude shall be expressed as decimal
        fractions of degrees. Whole degrees of latitude shall be represented
        by a two-digit decimal number ranging from 0 through 90. Whole
        degrees of longitude shall be represented by a decimal number ranging
        from 0 through 180. When a decimal fraction of a degree is specified,
        it shall be separated from the whole number of degrees by a decimal
        point.

        Latitudes north of the equator shall be specified by a plus sign (+),
        or by the absence of a minus sign (-), preceding the digits
        designating degrees. Latitudes south of the Equator shall be
        designated by a minus sign (-) preceding the digits designating
        degrees. A point on the Equator shall be assigned to the Northern
        Hemisphere.

        Longitudes east of the prime meridian shall be specified by a plus
        sign (+), or by the absence of a minus sign (-), preceding the digits
        designating degrees. Longitudes west of the meridian shall be
        designated by minus sign (-) preceding the digits designating
        degrees. A point on the prime meridian shall be assigned to the
        Eastern Hemisphere. A point on the 180th meridian shall be assigned
        to the Western Hemisphere. One exception to this last convention is
        permitted. For the special condition of describing a band of latitude
        around the earth, the East Bounding Coordinate data element shall be
        assigned the value +180 (180) degrees.

        Any spatial address with a latitude of +90 (90) or -90 degrees will
        specify the position at the North or South Pole, respectively. The
        component for longitude may have any legal value.

        With the exception of the special condition described above, this
        form is specified in Department of Commerce, 1986, Representation of
        geographic point locations for information interchange (Federal
        Information Processing Standard 70-1):  Washington,  Department of
        Commerce, National Institute of Standards and Technology.

        The simple formula for converting degrees-minutes-seconds into
        decimal degrees is:

          decimal = degrees + minutes/60 + seconds/3600.

        Format Definition: The property is defined by the following notation:

          geo        = "GEO" geoparam ":" geovalue CRLF

          geoparam   = *(";" xparam)

          geovalue   = float ";" float
          ;Latitude and Longitude components

        Example: The following is an example of this property:

          GEO:37.386013;-122.082932
Author
Ben Fortuna

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private BigDecimal
private BigDecimal
private static final Pattern
private static final long
private static final Pattern
Inherited from net.fortuna.ical4j.model.Property:
ACKNOWLEDGEDACTIONATTACHATTENDEEBUSYTYPECALENDAR_ADDRESSCALSCALECATEGORIESCLASSCOMMENTCOMPLETEDCONTACTCOUNTRYCREATEDDESCRIPTIONDTENDDTSTAMPDTSTARTDUEDURATIONEXDATEEXPERIMENTAL_PREFIXEXRULEEXTENDED_ADDRESSFREEBUSYGEOLAST_MODIFIEDLOCALITYLOCATIONLOCATION_TYPEMETHODNAMEORGANIZERPARTICIPANT_TYPEPERCENT_COMPLETEPOSTALCODEPRIORITYPRODIDPROXIMITYRDATERECURRENCE_IDREGIONRELATED_TOREPEATREQUEST_STATUSRESOURCE_TYPERESOURCESRRULESEQUENCESTATUSSTREET_ADDRESSSTRUCTURED_DATASTYLED_DESCRIPTIONSUMMARYTELTRANSPTRIGGERTZIDTZID_ALIAS_OFTZNAMETZOFFSETFROMTZOFFSETTOTZUNTILTZURLUIDURLVERSIONXML

Constructor Summary

AccessConstructor and Description
public
Geo()

Default constructor.

public
Geo(final String
a geo value
value
)

Creates a new instance by parsing the specified string representation.

public
Geo(final ParameterList
a list of parameters for this component
aList
,
final String
a value string for this component
aValue
)

public
Geo(final BigDecimal
a latitudinal value
latitude
,
final BigDecimal
a longitudinal value
longitude
)

public
Geo(final ParameterList
a list of parameters for this component
aList
,
final BigDecimal
a latitudinal value
latitude
,
final BigDecimal
a longitudinal value
longitude
)

Method Summary

Modifier and TypeMethod and Description
public final BigDecimal

Returns:

Returns the latitude.
getLatitude
()

public final BigDecimal

Returns:

Returns the longitude.
getLongitude
()

public final String
protected PropertyFactory<Geo>
newFactory()

Implements abstract net.fortuna.ical4j.model.Property.newFactory.

Returns a new property factory used to create deep copies.

public final void
setLatitude(final BigDecimal
The latitude to set.
latitude
)

public final void
setLongitude(final BigDecimal
The longitude to set.
longitude
)

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

Implements abstract net.fortuna.ical4j.model.Property.setValue.

Sets the current value of the property.

public ValidationResult
validate()

Implements abstract net.fortuna.ical4j.model.Property.validate.

Perform validation on a property.

Inherited from net.fortuna.ical4j.model.Property:
addcompareTocopyequalsgetFluentTargetgetNamegetParametergetParametergetParameterListgetParametersgetPrefixgetRequiredParametergetRequiredParameterhashCoderemoveremoveAllreplacesetParameterssetPrefixtoString

Field Detail

latitudeback to summary
private BigDecimal latitude
longitudeback to summary
private BigDecimal longitude
RELAXED_VALUE_PATTERNback to summary
private static final Pattern RELAXED_VALUE_PATTERN
serialVersionUIDback to summary
private static final long serialVersionUID

Hides net.fortuna.ical4j.model.Property.serialVersionUID.

VALUE_PATTERNback to summary
private static final Pattern VALUE_PATTERN

Constructor Detail

Geoback to summary
public Geo()

Default constructor.

Geoback to summary
public Geo(final String value)

Creates a new instance by parsing the specified string representation.

Parameters
value:String

a geo value

Geoback to summary
public Geo(final ParameterList aList, final String aValue)
Parameters
aList:ParameterList

a list of parameters for this component

aValue:String

a value string for this component

Geoback to summary
public Geo(final BigDecimal latitude, final BigDecimal longitude)
Parameters
latitude:BigDecimal

a latitudinal value

longitude:BigDecimal

a longitudinal value

Geoback to summary
public Geo(final ParameterList aList, final BigDecimal latitude, final BigDecimal longitude)
Parameters
aList:ParameterList

a list of parameters for this component

latitude:BigDecimal

a latitudinal value

longitude:BigDecimal

a longitudinal value

Method Detail

getLatitudeback to summary
public final BigDecimal getLatitude()
Returns:BigDecimal

Returns the latitude.

getLongitudeback to summary
public final BigDecimal getLongitude()
Returns:BigDecimal

Returns the longitude.

getValueback to summary
public final String getValue()

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

Returns:String

Doc from net.fortuna.ical4j.model.Content.getValue.

the content value

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

Implements abstract net.fortuna.ical4j.model.Property.newFactory.

Doc from net.fortuna.ical4j.model.Property.newFactory.

Returns a new property factory used to create deep copies.

Returns:PropertyFactory<Geo>

a property factory instance

Annotations
@Override
setLatitudeback to summary
public final void setLatitude(final BigDecimal latitude)
Parameters
latitude:BigDecimal

The latitude to set.

setLongitudeback to summary
public final void setLongitude(final BigDecimal longitude)
Parameters
longitude:BigDecimal

The longitude to set.

setValueback to summary
public final void setValue(final String aValue)

Implements abstract net.fortuna.ical4j.model.Property.setValue.

Doc from net.fortuna.ical4j.model.Property.setValue.

Sets the current value of the property.

Parameters
aValue:String

a string representation of the property value

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

Implements abstract net.fortuna.ical4j.model.Property.validate.

Doc from net.fortuna.ical4j.model.Property.validate.

Perform validation on a property.

Annotations
@Override
Exceptions
ValidationException:
where the property is not in a valid state
net.fortuna.ical4j.model.property back to summary

public Class Geo.Factory

extends Factory
implements PropertyFactory<Geo>
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.PropertyFactory, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Geo
createProperty(final ParameterList
a list of property parameters
parameters
,
final String
a property value
value
)

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

public Geo
Inherited from net.fortuna.ical4j.model.Content.Factory:
supports

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

createPropertyback to summary
public Geo createProperty(final ParameterList parameters, final String value)

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

Parameters
parameters:ParameterList

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a list of property parameters

value:String

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a property value

Returns:Geo

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a new instance of the specified property

Annotations
@Override
createPropertyback to summary
public Geo createProperty()

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

Returns:Geo

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a new instance of the specified property

Annotations
@Override