net.fortuna.ical4j.model.property
Class Geo

java.lang.Object
  extended by net.fortuna.ical4j.model.Content
      extended by net.fortuna.ical4j.model.Property
          extended by net.fortuna.ical4j.model.property.Geo
All Implemented Interfaces:
Serializable

public class Geo
extends Property

$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
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.fortuna.ical4j.model.Property
ACTION, ATTACH, ATTENDEE, BUSYTYPE, CALSCALE, CATEGORIES, CLASS, COMMENT, COMPLETED, CONTACT, COUNTRY, CREATED, DESCRIPTION, DTEND, DTSTAMP, DTSTART, DUE, DURATION, EXDATE, EXPERIMENTAL_PREFIX, EXRULE, EXTENDED_ADDRESS, FREEBUSY, GEO, LAST_MODIFIED, LOCALITY, LOCATION, LOCATION_TYPE, METHOD, NAME, ORGANIZER, PERCENT_COMPLETE, POSTALCODE, PRIORITY, PRODID, RDATE, RECURRENCE_ID, REGION, RELATED_TO, REPEAT, REQUEST_STATUS, RESOURCES, RRULE, SEQUENCE, STATUS, STREET_ADDRESS, SUMMARY, TEL, TRANSP, TRIGGER, TZID, TZNAME, TZOFFSETFROM, TZOFFSETTO, TZURL, UID, URL, VERSION
 
Constructor Summary
Geo()
          Default constructor.
Geo(BigDecimal latitude, BigDecimal longitude)
           
Geo(ParameterList aList, BigDecimal latitude, BigDecimal longitude)
           
Geo(ParameterList aList, String aValue)
           
Geo(String value)
          Creates a new instance by parsing the specified string representation.
 
Method Summary
 BigDecimal getLatitude()
           
 BigDecimal getLongitude()
           
 String getValue()
          
 void setLatitude(BigDecimal latitude)
           
 void setLongitude(BigDecimal longitude)
           
 void setValue(String aValue)
          Sets the current value of the property.
 void validate()
          Perform validation on a property.
 
Methods inherited from class net.fortuna.ical4j.model.Property
copy, equals, getName, getParameter, getParameters, getParameters, hashCode, isCalendarProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Geo

public Geo()
Default constructor.


Geo

public Geo(String value)
Creates a new instance by parsing the specified string representation.

Parameters:
value - a geo value

Geo

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

Geo

public Geo(BigDecimal latitude,
           BigDecimal longitude)
Parameters:
latitude - a latitudinal value
longitude - a longitudinal value

Geo

public Geo(ParameterList aList,
           BigDecimal latitude,
           BigDecimal longitude)
Parameters:
aList - a list of parameters for this component
latitude - a latitudinal value
longitude - a longitudinal value
Method Detail

getLatitude

public final BigDecimal getLatitude()
Returns:
Returns the latitude.

getLongitude

public final BigDecimal getLongitude()
Returns:
Returns the longitude.

setValue

public final void setValue(String aValue)
Sets the current value of the property.

Specified by:
setValue in class Property
Parameters:
aValue - a string representation of the property value

getValue

public final String getValue()

Specified by:
getValue in class Content
Returns:
the content value

setLatitude

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

setLongitude

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

validate

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

Specified by:
validate in class Property
Throws:
ValidationException - where the property is not in a valid state


Copyright © 2004-2012 Micronode. All Rights Reserved.