120 lines
2.9 KiB
Java
120 lines
2.9 KiB
Java
package eu.dnetlib.ariadneplus.elasticsearch.model;
|
|
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.JsonElement;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
public class Spatial {
|
|
private String address;// = new String("");
|
|
private String boundingBoxMaxLat;
|
|
private String boundingBoxMaxLon;
|
|
private String boundingBoxMinLat;
|
|
private String boundingBoxMinLon;
|
|
private String coordinateSystem = new String("");
|
|
private String country;// = new String("");
|
|
private AriadneGeoPoint location;
|
|
private String placeName;
|
|
private String lat;
|
|
private String lon;
|
|
private String postcode = new String("");
|
|
|
|
public String getAddress() {
|
|
return address;
|
|
}
|
|
|
|
public void setAddress(String address) {
|
|
this.address = address;
|
|
}
|
|
|
|
public String getBoundingBoxMaxLat() {
|
|
return boundingBoxMaxLat;
|
|
}
|
|
|
|
public void setBoundingBoxMaxLat(String boundingBoxMaxLat) {
|
|
this.boundingBoxMaxLat = boundingBoxMaxLat;
|
|
}
|
|
|
|
public String getBoundingBoxMaxLon() {
|
|
return boundingBoxMaxLon;
|
|
}
|
|
|
|
public void setBoundingBoxMaxLon(String boundingBoxMaxLon) {
|
|
this.boundingBoxMaxLon = boundingBoxMaxLon;
|
|
}
|
|
|
|
public String getBoundingBoxMinLat() {
|
|
return boundingBoxMinLat;
|
|
}
|
|
|
|
public void setBoundingBoxMinLat(String boundingBoxMinLat) {
|
|
this.boundingBoxMinLat = boundingBoxMinLat;
|
|
}
|
|
|
|
public String getBoundingBoxMinLon() {
|
|
return boundingBoxMinLon;
|
|
}
|
|
|
|
public void setBoundingBoxMinLon(String boundingBoxMinLon) {
|
|
this.boundingBoxMinLon = boundingBoxMinLon;
|
|
}
|
|
|
|
public String getCoordinateSystem() {
|
|
return coordinateSystem;
|
|
}
|
|
|
|
public void setCoordinateSystem(String coordinateSystem) {
|
|
this.coordinateSystem = coordinateSystem;
|
|
}
|
|
|
|
public String getCountry() {
|
|
return country;
|
|
}
|
|
|
|
public void setCountry(String country) {
|
|
this.country = country;
|
|
}
|
|
|
|
public AriadneGeoPoint getLocation() {
|
|
return location;
|
|
}
|
|
|
|
public void setLocation(AriadneGeoPoint location) {
|
|
this.location = location;
|
|
}
|
|
|
|
public String getPlaceName() {
|
|
return placeName;
|
|
}
|
|
|
|
public void setPlaceName(String placeName) {
|
|
this.placeName = placeName;
|
|
}
|
|
|
|
public void setLat(String lat) {
|
|
if (this.getLocation()==null) {
|
|
this.setLocation(new AriadneGeoPoint());
|
|
}
|
|
if (lat!=null) {
|
|
this.getLocation().setLat(Float.parseFloat(lat));
|
|
}
|
|
}
|
|
|
|
public void setLon(String lon) {
|
|
if (this.getLocation()==null) {
|
|
this.setLocation(new AriadneGeoPoint());
|
|
}
|
|
if (lon!=null) {
|
|
this.getLocation().setLon(Float.parseFloat(lon));
|
|
}
|
|
}
|
|
|
|
public Spatial() {
|
|
}
|
|
|
|
public static Spatial fromJson(String json){
|
|
return new Gson().fromJson(json, Spatial.class);
|
|
}
|
|
}
|