Package io.goobi.viewer.model.misc
Class GeoLocation
java.lang.Object
io.goobi.viewer.model.misc.GeoLocation
GeoLocation class.
- Author:
- Florian Alpers
-
Constructor Summary
ConstructorDescriptionConstructor for GeoLocation.GeoLocation
(Double latitude, Double longitude) Constructor for GeoLocation.GeoLocation
(org.json.JSONObject json) Constructor for GeoLocation. -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObject
getAsJson.getInfo()
Getter for the fieldinfo
.Getter for the fieldlatitude
.getLink()
Getter for the fieldlink
.Getter for the fieldlongitude
.boolean
isEmpty()
isEmpty.void
Setter for the fieldinfo
.void
setLatitude
(Double latitude) Setter for the fieldlatitude
.void
Setter for the fieldlink
.void
setLongitude
(Double longitude) Setter for the fieldlongitude
.
-
Constructor Details
-
GeoLocation
public GeoLocation()Constructor for GeoLocation.
-
GeoLocation
Constructor for GeoLocation.
-
GeoLocation
public GeoLocation(org.json.JSONObject json) throws org.json.JSONException Constructor for GeoLocation.
- Parameters:
json
- aJSONObject
object.- Throws:
org.json.JSONException
- if any.
-
-
Method Details
-
getLatitude
Getter for the field
latitude
.- Returns:
- the langitude
-
setLatitude
Setter for the field
latitude
.- Parameters:
latitude
- aDouble
object.
-
getLongitude
Getter for the field
longitude
.- Returns:
- the longitude
-
setLongitude
Setter for the field
longitude
.- Parameters:
longitude
- the longitude to set
-
getAsJson
public org.json.JSONObject getAsJson()getAsJson.
- Returns:
- a
JSONObject
object.
-
isEmpty
public boolean isEmpty()isEmpty.
- Returns:
- true if either latitude or longitude is not set or set to NULL
-
getInfo
Getter for the field
info
.- Returns:
- the info
-
setInfo
Setter for the field
info
.- Parameters:
info
- the info to set
-
getLink
Getter for the field
link
.- Returns:
- the link
-
setLink
Setter for the field
link
.- Parameters:
link
- the link to set
-