diff --git a/model/src/main/java/lcsb/mapviewer/model/Project.java b/model/src/main/java/lcsb/mapviewer/model/Project.java index 5589b8b1a935833c777e230542b10ad9a6bf4b93..48073f59880224924e322ae72aeb62691aafe00d 100644 --- a/model/src/main/java/lcsb/mapviewer/model/Project.java +++ b/model/src/main/java/lcsb/mapviewer/model/Project.java @@ -2,6 +2,7 @@ package lcsb.mapviewer.model; import java.io.Serializable; import java.util.ArrayList; +import java.util.Calendar; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -31,6 +32,7 @@ import org.hibernate.annotations.LazyCollectionOption; import lcsb.mapviewer.common.EventStorageLoggerAppender; import lcsb.mapviewer.common.exception.InvalidArgumentException; import lcsb.mapviewer.model.cache.UploadedFileEntry; +import lcsb.mapviewer.model.graphics.MapCanvasType; import lcsb.mapviewer.model.map.MiriamData; import lcsb.mapviewer.model.map.OverviewImage; import lcsb.mapviewer.model.map.OverviewImageLink; @@ -123,6 +125,16 @@ public class Project implements Serializable { @Column(columnDefinition = "TEXT") private String warnings; + /** + * Which "maps" implementation should be used for frontend visualization. + */ + @Enumerated(EnumType.STRING) + @Column(name="map_canvas_type") + private MapCanvasType mapCanvasType = MapCanvasType.OPEN_LAYERS; + + @Column(name="google_map_license_accept_date") + private Calendar googleMapLicenseAcceptDate; + /** * Map models in the project. */ @@ -586,4 +598,20 @@ public class Project implements Serializable { this.notifyEmail = notifyEmail; } + public MapCanvasType getMapCanvasType() { + return mapCanvasType; + } + + public void setMapCanvasType(MapCanvasType mapCanvasType) { + this.mapCanvasType = mapCanvasType; + } + + public Calendar getGoogleMapLicenseAcceptDate() { + return googleMapLicenseAcceptDate; + } + + public void setGoogleMapLicenseAcceptDate(Calendar googleMapLicenseAcceptDate) { + this.googleMapLicenseAcceptDate = googleMapLicenseAcceptDate; + } + } diff --git a/model/src/main/java/lcsb/mapviewer/model/graphics/MapCanvasType.java b/model/src/main/java/lcsb/mapviewer/model/graphics/MapCanvasType.java new file mode 100644 index 0000000000000000000000000000000000000000..f8e774ff8e1d437a5b30301b5759de5aa11aec68 --- /dev/null +++ b/model/src/main/java/lcsb/mapviewer/model/graphics/MapCanvasType.java @@ -0,0 +1,5 @@ +package lcsb.mapviewer.model.graphics; + +public enum MapCanvasType { + GOOGLE_MAPS_API, OPEN_LAYERS +} diff --git a/persist/src/db/12.1.0~alpha.0/fix_db_20180427.sql b/persist/src/db/12.1.0~alpha.0/fix_db_20180427.sql new file mode 100644 index 0000000000000000000000000000000000000000..011dc4e9df30d77f9f92b0020852803fbb0c6533 --- /dev/null +++ b/persist/src/db/12.1.0~alpha.0/fix_db_20180427.sql @@ -0,0 +1,4 @@ +-- alternative implementation of map canvas + +alter table project_table add column google_map_license_accept_date timestamp without time zone; +alter table project_table add column map_canvas_type character varying default 'OPEN_LAYERS';