public class Birthplace extends PlaceProperty
Defines the location of the person's birth.
Code sample (creating)
VCard vcard = new VCard(); //text Birthplace birthplace = new Birthplace("Maida Vale, London, United Kingdom"); vcard.setBirthplace(birthplace); //geo coordinates birthplace = new Birthplace(51.5274, -0.1899); vcard.setBirthplace(birthplace); //URI birthplace = new Birthplace(); birthplace.setUri("http://en.wikipedia.org/wiki/Maida_Vale"); vcard.setBirthplace(birthplace);
Code sample (retrieving)
VCard vcard = ... Birthplace birthplace = vcard.getBirthplace(); String text = birthplace.getText(); if (text != null){ //property value is plain text } Double latitude = birthplace.getLatitude(); Double longitude = birthplace.getLongitude(); if (latitude != null){ //property value is a set of geo coordinates } String uri = birthplace.getUri(); if (uri != null){ //property value is a URI }
Property name: BIRTHPLACE
Supported versions: 4.0
geoUri, text, uri
group, parameters
Constructor and Description |
---|
Birthplace()
Creates a new birthplace property.
|
Birthplace(double latitude,
double longitude)
Creates a new birthplace property.
|
Birthplace(String text)
Creates a new birthplace property.
|
_supportedVersions, _validate, getAltId, getGeoUri, getLanguage, getLatitude, getLongitude, getText, getUri, setAltId, setCoordinates, setGeoUri, setLanguage, setText, setUri
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
public Birthplace()
public Birthplace(double latitude, double longitude)
latitude
- the latitude coordinate of the placelongitude
- the longitude coordinate of the placepublic Birthplace(String text)
text
- a text value representing the placeThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.