Skip to content
Snippets Groups Projects

Added description with image

Merged Tor-Einar Skog requested to merge master into develop
4 files
+ 14
4
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -22,6 +22,7 @@ package no.nibio.vips.model.oatfloweringmodel;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
@@ -37,6 +38,7 @@ import no.nibio.vips.model.ConfigValidationException;
import no.nibio.vips.model.Model;
import no.nibio.vips.model.ModelExcecutionException;
import no.nibio.vips.model.ModelId;
import no.nibio.vips.util.ModelUtil;
import no.nibio.vips.util.WeatherElements;
import no.nibio.vips.util.WeatherUtil;
@@ -46,7 +48,7 @@ import no.nibio.vips.util.WeatherUtil;
* @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/
public class OatFloweringModel extends I18nImpl implements Model{
private ModelUtil modelUtil;
private List<WeatherObservation> TM;
private Date dateOfSowing;
private final static TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone("Europe/Oslo");
@@ -56,6 +58,7 @@ public class OatFloweringModel extends I18nImpl implements Model{
public OatFloweringModel() {
// Setting the file name of the resource bundle
super("no.nibio.vips.model.oatfloweringmodel.texts");
this.modelUtil = new ModelUtil();
}
@Override
@@ -160,7 +163,14 @@ public class OatFloweringModel extends I18nImpl implements Model{
@Override
public String getModelDescription(String language) {
return this.getText("description", language);
try
{
return this.modelUtil.getTextWithBase64EncodedImages(this.getText("description", language), this.getClass());
}
catch(IOException ex)
{
return this.getText("description", language);
}
}
@Override
Loading