Commit dd68999f authored by Matija Obreza's avatar Matija Obreza
Browse files

Renamed Altitude to Elevation

parent 11620289
...@@ -42,8 +42,8 @@ public class AccessionGeo extends BusinessModel implements GeoReferencedEntity { ...@@ -42,8 +42,8 @@ public class AccessionGeo extends BusinessModel implements GeoReferencedEntity {
private Double longitude; private Double longitude;
@Column(name = "latitude") @Column(name = "latitude")
private Double latitude; private Double latitude;
@Column(name = "altitude") @Column(name = "elevation")
private Double altitude; private Double elevation;
public long getVersion() { public long getVersion() {
return version; return version;
...@@ -77,12 +77,12 @@ public class AccessionGeo extends BusinessModel implements GeoReferencedEntity { ...@@ -77,12 +77,12 @@ public class AccessionGeo extends BusinessModel implements GeoReferencedEntity {
this.latitude = latitudeD; this.latitude = latitudeD;
} }
public Double getAltitude() { public Double getElevation() {
return this.altitude; return elevation;
} }
public void setAltitude(final Double altitude) { public void setElevation(Double elevation) {
this.altitude = altitude; this.elevation = elevation;
} }
} }
...@@ -61,7 +61,7 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge ...@@ -61,7 +61,7 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge
private Double longitude; private Double longitude;
private Double latitude; private Double latitude;
private Double altitude; private Double elevation;
@Lob @Lob
@Field(store = Store.NO) @Field(store = Store.NO)
...@@ -140,12 +140,13 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge ...@@ -140,12 +140,13 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge
this.latitude = latitude; this.latitude = latitude;
} }
public Double getAltitude() { @Override
return this.altitude; public Double getElevation() {
return this.elevation;
} }
public void setAltitude(final Double alt) { public void setElevation(Double elevation) {
this.altitude = alt; this.elevation = elevation;
} }
public String getCitation() { public String getCitation() {
......
...@@ -85,7 +85,7 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity, ...@@ -85,7 +85,7 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity,
private boolean maintainsCollection; private boolean maintainsCollection;
private Double latitude; private Double latitude;
private Double longitude; private Double longitude;
private Double altitude; private Double elevation;
public FaoInstitute() { public FaoInstitute() {
} }
...@@ -194,12 +194,12 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity, ...@@ -194,12 +194,12 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity,
} }
@Override @Override
public Double getAltitude() { public Double getElevation() {
return this.altitude; return this.elevation;
} };
public void setAltitude(Double altitude) { public void setElevation(Double elevation) {
this.altitude = altitude; this.elevation = elevation;
} }
public Map<String, FaoInstituteSetting> getSettings() { public Map<String, FaoInstituteSetting> getSettings() {
......
...@@ -21,5 +21,5 @@ public interface GeoReferencedEntity { ...@@ -21,5 +21,5 @@ public interface GeoReferencedEntity {
Double getLatitude(); Double getLatitude();
Double getLongitude(); Double getLongitude();
Double getAltitude(); Double getElevation();
} }
...@@ -224,7 +224,7 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository ...@@ -224,7 +224,7 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
@Override @Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException { public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement stmt = con PreparedStatement stmt = con
.prepareStatement("select a.id, g.latitude, g.longitude, g.altitude, g.version from accessiongeo g inner join accession a on a.id=g.accessionId where a.instCode = ?"); .prepareStatement("select a.id, g.latitude, g.longitude, g.elevation, g.version from accessiongeo g inner join accession a on a.id=g.accessionId where a.instCode = ?");
stmt.setString(1, instCode); stmt.setString(1, instCode);
// Set mysql JConnector to stream results // Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE); stmt.setFetchSize(Integer.MIN_VALUE);
......
...@@ -218,17 +218,17 @@ public class BatchRESTServiceImpl implements BatchRESTService { ...@@ -218,17 +218,17 @@ public class BatchRESTServiceImpl implements BatchRESTService {
accnGeo = new AccessionGeo(); accnGeo = new AccessionGeo();
accnGeo.setAccession(accession); accnGeo.setAccession(accession);
} }
value = geo.get("lat"); value = geo.get("latitude");
if (value != null) { if (value != null) {
accnGeo.setLatitude(value.isNumber() ? value.asDouble() : null); accnGeo.setLatitude(value.isNumber() ? value.asDouble() : null);
} }
value = geo.get("lng"); value = geo.get("longitude");
if (value != null) { if (value != null) {
accnGeo.setLongitude(value.isNumber() ? value.asDouble() : null); accnGeo.setLongitude(value.isNumber() ? value.asDouble() : null);
} }
value = geo.get("alt"); value = geo.get("elevation");
if (value != null) { if (value != null) {
accnGeo.setAltitude(value.isNumber() ? value.asDouble() : null); accnGeo.setElevation(value.isNumber() ? value.asDouble() : null);
} }
toSaveGeo.add(accnGeo); toSaveGeo.add(accnGeo);
} }
......
...@@ -126,7 +126,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -126,7 +126,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
createQuery(sbf, "t.taxonName", jsonTree.get("taxon"), params); createQuery(sbf, "t.taxonName", jsonTree.get("taxon"), params);
createQuery(sbf, "geo.longitude", jsonTree.get("lon"), params); createQuery(sbf, "geo.longitude", jsonTree.get("lon"), params);
createQuery(sbf, "geo.latitude", jsonTree.get("lat"), params); createQuery(sbf, "geo.latitude", jsonTree.get("lat"), params);
createQuery(sbf, "geo.altitude", jsonTree.get("alt"), params); createQuery(sbf, "geo.elevation", jsonTree.get("elevation"), params);
createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params); createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params);
sb.append(sbf.toString()); sb.append(sbf.toString());
......
...@@ -709,7 +709,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset ...@@ -709,7 +709,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
osw.write("\t<coreid index=\"0\" />\n"); osw.write("\t<coreid index=\"0\" />\n");
osw.write("\t<field index=\"1\" term=\"latitude\"/>\n"); osw.write("\t<field index=\"1\" term=\"latitude\"/>\n");
osw.write("\t<field index=\"2\" term=\"longitude\"/>\n"); osw.write("\t<field index=\"2\" term=\"longitude\"/>\n");
osw.write("\t<field index=\"3\" term=\"altitude\"/>\n"); osw.write("\t<field index=\"3\" term=\"elevation\"/>\n");
osw.write("\t<field index=\"4\" term=\"version\"/>\n"); osw.write("\t<field index=\"4\" term=\"version\"/>\n");
osw.write("</extension>\n"); osw.write("</extension>\n");
...@@ -764,7 +764,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset ...@@ -764,7 +764,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
private void writeAccessionsGeo(final FaoInstitute faoInstitute, ZipOutputStream zos) throws IOException { private void writeAccessionsGeo(final FaoInstitute faoInstitute, ZipOutputStream zos) throws IOException {
@SuppressWarnings("resource") @SuppressWarnings("resource")
final CSVWriter csv = new CSVWriter(new BufferedWriter(new OutputStreamWriter(zos)), ',', '"', '\\', "\n"); final CSVWriter csv = new CSVWriter(new BufferedWriter(new OutputStreamWriter(zos)), ',', '"', '\\', "\n");
csv.writeNext(new String[] { "genesysId", "latitude", "longitude", "altitude", "version" }); csv.writeNext(new String[] { "genesysId", "latitude", "longitude", "elevation", "version" });
final ResultSetHelper csvResultsetHelper = new ResultSetHelperService(); final ResultSetHelper csvResultsetHelper = new ResultSetHelperService();
......
...@@ -360,7 +360,7 @@ public class GeoServiceImpl implements GeoService { ...@@ -360,7 +360,7 @@ public class GeoServiceImpl implements GeoService {
ObjectNode instNode = mapper.createObjectNode(); ObjectNode instNode = mapper.createObjectNode();
instNode.put("lat", inst.getLatitude()); instNode.put("lat", inst.getLatitude());
instNode.put("lng", inst.getLongitude()); instNode.put("lng", inst.getLongitude());
instNode.put("alt", inst.getAltitude()); instNode.put("elevation", inst.getElevation());
instNode.put("title", inst.getFullName()); instNode.put("title", inst.getFullName());
instNode.put("code", inst.getCode()); instNode.put("code", inst.getCode());
jsonArray.add(instNode); jsonArray.add(instNode);
......
...@@ -215,7 +215,7 @@ public class InstituteUpdater { ...@@ -215,7 +215,7 @@ public class InstituteUpdater {
final String url = line[13]; final String url = line[13];
final String latitude = line[14]; final String latitude = line[14];
final String longitude = line[15]; final String longitude = line[15];
final String altitude = line[16]; final String elevation = line[16];
// final String updatedOn = line[17]; // final String updatedOn = line[17];
// final String vInstCode = line[18]; // final String vInstCode = line[18];
...@@ -234,8 +234,8 @@ public class InstituteUpdater { ...@@ -234,8 +234,8 @@ public class InstituteUpdater {
faoInstitute.setLatitude(lat); faoInstitute.setLatitude(lat);
Double lon = parseDoubleIgnore0(longitude, 100); Double lon = parseDoubleIgnore0(longitude, 100);
faoInstitute.setLongitude(lon); faoInstitute.setLongitude(lon);
Double alt = parseDoubleIgnore0(altitude, 1); Double elev = parseDoubleIgnore0(elevation, 1);
faoInstitute.setAltitude(alt); faoInstitute.setElevation(elev);
// Update institute country if null or when not matching the // Update institute country if null or when not matching the
// code // code
......
...@@ -319,7 +319,7 @@ public class DatasetController extends RestController { ...@@ -319,7 +319,7 @@ public class DatasetController extends RestController {
public String location; public String location;
public Double longitude; public Double longitude;
public Double latitude; public Double latitude;
public Double altitude; public Double elevation;
public String citation; public String citation;
public String description; public String description;
} }
......
...@@ -173,7 +173,7 @@ accession.mlsStatus.true=This accession is in the Multilateral System of the ITP ...@@ -173,7 +173,7 @@ accession.mlsStatus.true=This accession is in the Multilateral System of the ITP
accession.inSvalbard.true=Super-safety duplicated in Svalbard Seed Vault. accession.inSvalbard.true=Super-safety duplicated in Svalbard Seed Vault.
accession.not-available-for-distribution=The accession is NOT available for distribution. accession.not-available-for-distribution=The accession is NOT available for distribution.
accession.available-for-distribution=The accession is available for distribution. accession.available-for-distribution=The accession is available for distribution.
accession.altitude=Altitude accession.elevation=Elevation
accession.geolocation=Geolocation (lat, long) accession.geolocation=Geolocation (lat, long)
accession.breederCode=Breeder Code accession.breederCode=Breeder Code
accession.pedigree=Pedigree accession.pedigree=Pedigree
...@@ -248,7 +248,7 @@ filter.origin=Country of Origin ...@@ -248,7 +248,7 @@ filter.origin=Country of Origin
filter.institute=Holding Institute filter.institute=Holding Institute
filter.lat=Latitude filter.lat=Latitude
filter.lon=Longitude filter.lon=Longitude
filter.alt=Altitude filter.elevation=Elevation
filter.genus=Genus filter.genus=Genus
filter.taxon=Taxonomy name filter.taxon=Taxonomy name
filter.inSvalbard=In Svalbard filter.inSvalbard=In Svalbard
......
...@@ -184,10 +184,10 @@ ...@@ -184,10 +184,10 @@
<td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td> <td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td>
</tr> </tr>
</c:if> </c:if>
<c:if test="${accessionGeo.altitude ne null}"> <c:if test="${accessionGeo.elevation ne null}">
<tr> <tr>
<td><spring:message code="accession.altitude" /></td> <td><spring:message code="accession.elevation" /></td>
<td>${accessionGeo.altitude}<span class="uom">m</span></td> <td>${accessionGeo.elevation}<span class="uom">m</span></td>
</tr> </tr>
</c:if> </c:if>
<c:if test="${accessionGeo.latitude ne null}"> <c:if test="${accessionGeo.latitude ne null}">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment