Skip to content
Snippets Groups Projects
Commit abd7fa40 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfixes!

parent 8a8af9dd
Branches
Tags
No related merge requests found
......@@ -690,7 +690,7 @@ public class UserBean {
}
// TODO: Put in config file?
private final static String[] USER_COUNTRY_CODES = {"NO","SE","BA"};
private final static String[] USER_COUNTRY_CODES = {"NO","SE","BA","LV"};
public List<Country> getUserCountries()
{
......
......@@ -126,6 +126,7 @@ public class CydiaPomonellaModelPreprocessor extends ModelRunPreprocessor{
} catch (WeatherDataSourceException ex) {
throw new PreprocessorException(ex.getMessage());
}
// Create the complete model configuration object
ModelConfiguration retVal = new ModelConfiguration();
retVal.setModelId(this.getModelId());
......
......@@ -58,6 +58,7 @@ public class FruitWebDavisDataParser {
* Using output designed for RIMPro, parsing into WeatherObservations
* @param stationID the METOS station ID
* @param timeZone
* @param startDate
* @return
*/
public List<WeatherObservation> getWeatherObservations(String stationID, TimeZone timeZone, Date startDate) throws ParseWeatherDataException
......@@ -65,6 +66,7 @@ public class FruitWebDavisDataParser {
List<WeatherObservation> retVal = new ArrayList<>();
SimpleDateFormat urlDFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat dFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm");
urlDFormat.setTimeZone(timeZone);
dFormat.setTimeZone(timeZone);
// Assuming 1 hour resolution until we find a timestamp that says :30
Integer logIntervalId = WeatherObservation.LOG_INTERVAL_ID_1H;
......
......@@ -136,7 +136,6 @@ public class WeatherDataSourceUtil {
for (String type : elementMeasurementTypes) {
URL.append("&elementMeasurementTypes[]=").append(type);
}
//System.out.println("URL: " + URL.toString());
URLConnection URLConn = null;
InputStream URLStream = null;
InputStream error = null;
......
......@@ -129,11 +129,13 @@
<select class="form-control" name="vipsLogicRoles" multiple="multiple" size="5" <#if ! user.isSuperUser() && ! user.isOrganizationAdmin()> readonly="readonly" <#else>onblur="validateField(this);"</#if>>
<#if user.isSuperUser() || user.isOrganizationAdmin()>
<#list vipsLogicRoles as vipsLogicRole>
<#if vipsLogicRole.vipsLogicRoleId != 1 || user.isSuperUser()>
<option value="${vipsLogicRole.vipsLogicRoleId}"
<#if viewUser.hasRole(vipsLogicRole)>
selected="selected"
</#if>
>${i18nBundle["vipsLogicRole_" + vipsLogicRole.vipsLogicRoleId]}</option>
</#if>
</#list>
<#else>
<#list vipsLogicRoles as vipsLogicRole>
......
......@@ -69,10 +69,10 @@ public class FruitWebDavisDataParserTest {
FruitWebDavisDataParser instance = new FruitWebDavisDataParser();
List<WeatherObservation> result = instance.getWeatherObservations(stationID, timeZone, startDate);
/*for(WeatherObservation obs:result)
for(WeatherObservation obs:result)
{
System.out.println(obs);
}*/
}
assertNotNull( result);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment