Commit e9ffbfcd authored by Matija Obreza's avatar Matija Obreza

Include AccessionGeo#climate in ES

parent 776ade79
......@@ -37,8 +37,11 @@ import org.genesys.blocks.model.SelfCleaning;
import org.genesys.worldclim.WorldClimUtil;
import org.genesys2.server.model.impl.GeoReferencedEntity;
import org.genesys2.server.model.impl.TileClimate;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonView;
......@@ -74,6 +77,8 @@ public class AccessionGeo extends BasicModel implements GeoReferencedEntity, Acc
@JoinColumn(name = "tileIndex", nullable = true, insertable = false, updatable = false, foreignKey = @javax.persistence.ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
@JsonView({ JsonViews.Protected.class })
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties({ "tileIndex" })
@Field(type = FieldType.Object)
private TileClimate climate;
/**
......
......@@ -224,7 +224,7 @@ public class ElasticsearchConfig {
@Override
public String mapToString(final Object object) throws IOException {
String x = mapper.writeValueAsString(object);
// System.err.println(x);
// System.err.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(object));
return x;
}
......
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