public class PlaceProperty extends VCardProperty implements HasAltId
Modifier and Type | Field and Description |
---|---|
protected GeoUri |
geoUri |
protected java.lang.String |
text |
protected java.lang.String |
uri |
group, parameters
Constructor and Description |
---|
PlaceProperty()
Creates a new place property.
|
PlaceProperty(double latitude,
double longitude)
Creates a new place property.
|
PlaceProperty(java.lang.String text)
Creates a new place property.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<VCardVersion> |
_supportedVersions()
Gets the vCard versions that support this property.
|
protected void |
_validate(java.util.List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the
spec.
|
java.lang.String |
getAltId()
Gets the property's ALTID parameter.
|
GeoUri |
getGeoUri()
Gets the location's geo position.
|
java.lang.String |
getLanguage()
Gets the language that the property value is written in.
|
java.lang.Double |
getLatitude()
Gets the latitude of the location.
|
java.lang.Double |
getLongitude()
Gets the longitude of the location.
|
java.lang.String |
getText()
Gets the text value representing the location.
|
java.lang.String |
getUri()
Gets the URI representing the location.
|
void |
setAltId(java.lang.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(java.lang.String language)
Sets the language that the property value is written in.
|
void |
setText(java.lang.String text)
Sets the property's value to a text value.
|
void |
setUri(java.lang.String uri)
Sets the property's value to a URI.
|
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
protected GeoUri geoUri
protected java.lang.String uri
protected java.lang.String text
public PlaceProperty()
public PlaceProperty(double latitude, double longitude)
latitude
- the latitude coordinate of the placelongitude
- the longitude coordinate of the placepublic PlaceProperty(java.lang.String text)
text
- a text value representing the placepublic java.util.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 java.lang.Double getLatitude()
public java.lang.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 java.lang.String getUri()
public void setUri(java.lang.String uri)
uri
- the URIpublic java.lang.String getText()
public void setText(java.lang.String text)
text
- the textpublic java.lang.String getAltId()
HasAltId
Supported versions: 4.0
getAltId
in interface HasAltId
VCardParameters.getAltId()
public void setAltId(java.lang.String altId)
HasAltId
Supported versions: 4.0
setAltId
in interface HasAltId
altId
- the ALTID or null to removeVCardParameters.setAltId(java.lang.String)
public java.lang.String getLanguage()
VCardProperty
VCardParameters.getLanguage()
public void setLanguage(java.lang.String language)
VCardProperty
language
- the language or null to removeVCardParameters.setLanguage(java.lang.String)
protected void _validate(java.util.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.