AriadnePlus/dnet-ariadneplus-graphdb-pu.../src/main/java/eu/dnetlib/ariadneplus/elasticsearch/model/Spatial.java

115 lines
2.6 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;
private String boundingBoxMaxLat;
private String boundingBoxMaxLon;
private String boundingBoxMinLat;
private String boundingBoxMinLon;
private String coordinateSystem;
private String country;
private AriadneGeoPoint location;
private String placeName;
private String lat;
private String lon;
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());
}
this.getLocation().setLat(lat);
}
public void setLon(String lon) {
if (this.getLocation()==null) {
this.setLocation(new AriadneGeoPoint());
}
this.getLocation().setLon(lon);
}
public Spatial() {
}
public static Spatial fromJson(String json){
return new Gson().fromJson(json, Spatial.class);
}
}