public class PlaceProperty extends VCardProperty implements HasAltId
Modifier and Type | Field and Description |
---|---|
protected GeoUri |
geoUri |
protected String |
text |
protected String |
uri |
group, parameters
Constructor and Description |
---|
PlaceProperty()
Creates a new place property.
|
PlaceProperty(double latitude,
double longitude)
Creates a new place property.
|
PlaceProperty(String text)
Creates a new place property.
|
Modifier and Type | Method and Description |
---|---|
Set<VCardVersion> |
_supportedVersions()
Gets the vCard versions that support this property.
|
protected void |
_validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the
spec.
|
String |
getAltId()
Gets the property's ALTID parameter.
|
GeoUri |
getGeoUri()
Gets the location's geo position.
|
String |
getLanguage()
Gets the language that the property value is written in.
|
Double |
getLatitude()
Gets the latitude of the location.
|
Double |
getLongitude()
Gets the longitude of the location.
|
String |
getText()
Gets the text value representing the location.
|
String |
getUri()
Gets the URI representing the location.
|
void |
setAltId(String altId)
Sets the property's ALTID parameter.
|
void |
setCoordinates(double latitude,
double longitude)
Sets the property's value to a set of geo coordinates.
|
void |
setGeoUri(GeoUri geoUri)
Sets the property's value to a set of geo coordinates.
|
void |
setLanguage(String language)
Sets the language that the property value is written in.
|
void |
setText(String text)
Sets the property's value to a text value.
|
void |
setUri(String uri)
Sets the property's value to a URI.
|
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
public PlaceProperty()
public PlaceProperty(double latitude, double longitude)
latitude
- the latitude coordinate of the placelongitude
- the longitude coordinate of the placepublic PlaceProperty(String text)
text
- a text value representing the placepublic Set<VCardVersion> _supportedVersions()
VCardProperty
Gets the vCard versions that support this property.
This method should be overridden by child classes if the property does not support all vCard versions. The default implementation of this method returns all vCard versions.
_supportedVersions
in class VCardProperty
public Double getLatitude()
public Double getLongitude()
public GeoUri getGeoUri()
public void setCoordinates(double latitude, double longitude)
latitude
- the latitudelongitude
- the longitudepublic void setGeoUri(GeoUri geoUri)
geoUri
- the geo URIpublic String getUri()
public void setUri(String uri)
uri
- the URIpublic String getText()
public void setText(String text)
text
- the textpublic String getAltId()
HasAltId
Supported versions: 4.0
getAltId
in interface HasAltId
VCardParameters.getAltId()
public void setAltId(String altId)
HasAltId
Supported versions: 4.0
setAltId
in interface HasAltId
altId
- the ALTID or null to removeVCardParameters.setAltId(java.lang.String)
public String getLanguage()
VCardProperty
VCardParameters.getLanguage()
public void setLanguage(String language)
VCardProperty
language
- the language or null to removeVCardParameters.setLanguage(java.lang.String)
protected void _validate(List<Warning> warnings, VCardVersion version, VCard vcard)
VCardProperty
_validate
in class VCardProperty
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs toThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.