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 {
private Double longitude;
@Column(name = "latitude")
private Double latitude;
@Column(name = "altitude")
private Double altitude;
@Column(name = "elevation")
private Double elevation;
public long getVersion() {
return version;
......@@ -77,12 +77,12 @@ public class AccessionGeo extends BusinessModel implements GeoReferencedEntity {
this.latitude = latitudeD;
}
public Double getAltitude() {
return this.altitude;
public Double getElevation() {
return elevation;
}
public void setAltitude(final Double altitude) {
this.altitude = altitude;
public void setElevation(Double elevation) {
this.elevation = elevation;
}
}
......@@ -61,7 +61,7 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge
private Double longitude;
private Double latitude;
private Double altitude;
private Double elevation;
@Lob
@Field(store = Store.NO)
......@@ -140,12 +140,13 @@ public class Metadata extends VersionedAuditedModel implements AclAwareModel, Ge
this.latitude = latitude;
}
public Double getAltitude() {
return this.altitude;
@Override
public Double getElevation() {
return this.elevation;
}
public void setAltitude(final Double alt) {
this.altitude = alt;
public void setElevation(Double elevation) {
this.elevation = elevation;
}
public String getCitation() {
......
......@@ -85,7 +85,7 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity,
private boolean maintainsCollection;
private Double latitude;
private Double longitude;
private Double altitude;
private Double elevation;
public FaoInstitute() {
}
......@@ -194,12 +194,12 @@ public class FaoInstitute extends BusinessModel implements GeoReferencedEntity,
}
@Override
public Double getAltitude() {
return this.altitude;
}
public Double getElevation() {
return this.elevation;
};
public void setAltitude(Double altitude) {
this.altitude = altitude;
public void setElevation(Double elevation) {
this.elevation = elevation;
}
public Map<String, FaoInstituteSetting> getSettings() {
......
......@@ -21,5 +21,5 @@ public interface GeoReferencedEntity {
Double getLatitude();
Double getLongitude();
Double getAltitude();
Double getElevation();
}
......@@ -224,7 +224,7 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
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);
// Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE);
......
......@@ -218,17 +218,17 @@ public class BatchRESTServiceImpl implements BatchRESTService {
accnGeo = new AccessionGeo();
accnGeo.setAccession(accession);
}
value = geo.get("lat");
value = geo.get("latitude");
if (value != null) {
accnGeo.setLatitude(value.isNumber() ? value.asDouble() : null);
}
value = geo.get("lng");
value = geo.get("longitude");
if (value != null) {
accnGeo.setLongitude(value.isNumber() ? value.asDouble() : null);
}
value = geo.get("alt");
value = geo.get("elevation");
if (value != null) {
accnGeo.setAltitude(value.isNumber() ? value.asDouble() : null);
accnGeo.setElevation(value.isNumber() ? value.asDouble() : null);
}
toSaveGeo.add(accnGeo);
}
......
......@@ -126,7 +126,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
createQuery(sbf, "t.taxonName", jsonTree.get("taxon"), params);
createQuery(sbf, "geo.longitude", jsonTree.get("lon"), 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);
sb.append(sbf.toString());
......
......@@ -709,7 +709,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
osw.write("\t<coreid index=\"0\" />\n");
osw.write("\t<field index=\"1\" term=\"latitude\"/>\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("</extension>\n");
......@@ -764,7 +764,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
private void writeAccessionsGeo(final FaoInstitute faoInstitute, ZipOutputStream zos) throws IOException {
@SuppressWarnings("resource")
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();
......
......@@ -360,7 +360,7 @@ public class GeoServiceImpl implements GeoService {
ObjectNode instNode = mapper.createObjectNode();
instNode.put("lat", inst.getLatitude());
instNode.put("lng", inst.getLongitude());
instNode.put("alt", inst.getAltitude());
instNode.put("elevation", inst.getElevation());
instNode.put("title", inst.getFullName());
instNode.put("code", inst.getCode());
jsonArray.add(instNode);
......
......@@ -215,7 +215,7 @@ public class InstituteUpdater {
final String url = line[13];
final String latitude = line[14];
final String longitude = line[15];
final String altitude = line[16];
final String elevation = line[16];
// final String updatedOn = line[17];
// final String vInstCode = line[18];
......@@ -234,8 +234,8 @@ public class InstituteUpdater {
faoInstitute.setLatitude(lat);
Double lon = parseDoubleIgnore0(longitude, 100);
faoInstitute.setLongitude(lon);
Double alt = parseDoubleIgnore0(altitude, 1);
faoInstitute.setAltitude(alt);
Double elev = parseDoubleIgnore0(elevation, 1);
faoInstitute.setElevation(elev);
// Update institute country if null or when not matching the
// code
......
......@@ -319,7 +319,7 @@ public class DatasetController extends RestController {
public String location;
public Double longitude;
public Double latitude;
public Double altitude;
public Double elevation;
public String citation;
public String description;
}
......
......@@ -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.not-available-for-distribution=The accession is NOT 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.breederCode=Breeder Code
accession.pedigree=Pedigree
......@@ -248,7 +248,7 @@ filter.origin=Country of Origin
filter.institute=Holding Institute
filter.lat=Latitude
filter.lon=Longitude
filter.alt=Altitude
filter.elevation=Elevation
filter.genus=Genus
filter.taxon=Taxonomy name
filter.inSvalbard=In Svalbard
......
......@@ -184,10 +184,10 @@
<td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td>
</tr>
</c:if>
<c:if test="${accessionGeo.altitude ne null}">
<c:if test="${accessionGeo.elevation ne null}">
<tr>
<td><spring:message code="accession.altitude" /></td>
<td>${accessionGeo.altitude}<span class="uom">m</span></td>
<td><spring:message code="accession.elevation" /></td>
<td>${accessionGeo.elevation}<span class="uom">m</span></td>
</tr>
</c:if>
<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