/webportal/src/main/java/au/org/emii/portal/menu/AnimationSelection.java
Java | 108 lines | 85 code | 15 blank | 8 comment | 4 complexity | a058cc6e48a6578f63db236ccc565fd3 MD5 | raw file
1package au.org.emii.portal.menu; 2 3import java.io.Serializable; 4import java.util.AbstractMap; 5import java.util.Date; 6 7public class AnimationSelection implements Serializable { 8 9 private static final long serialVersionUID = 1L; 10 private Date startDate = null; 11 private Date endDate = null; 12 private double z = 0; 13 14 /** 15 * startData adjusted for the earliest TIME with data on the given 16 * date (obtained by from ncwms) 17 */ 18 private String adjustedStartDate = null; 19 20 /** 21 * startData adjusted for the lastest TIME with data on the given 22 * date (obtained by from ncwms) 23 */ 24 private String adjustedEndDate = null; 25 26 private AbstractMap<String, String> timeStrings = null; 27 private String selectedTimeStringKey = null; 28 private long id; 29 private long maplayerid; 30 31 public long getMaplayerid() { 32 return maplayerid; 33 } 34 35 public void setMaplayerid(long mapLayerId) { 36 this.maplayerid = mapLayerId; 37 } 38 39 public long getId() { 40 return id; 41 } 42 public void setId(long id) { 43 this.id = id; 44 } 45 public Date getStartDate() { 46 return startDate; 47 } 48 public void setStartDate(Date startDate) { 49 this.startDate = startDate; 50 } 51 public Date getEndDate() { 52 return endDate; 53 } 54 public void setEndDate(Date endDate) { 55 this.endDate = endDate; 56 } 57 public double getZ() { 58 return z; 59 } 60 public void setZ(double z) { 61 this.z = z; 62 } 63 64 65 public AbstractMap<String, String> getTimeStrings() { 66 return timeStrings; 67 } 68 public void setTimeStrings(AbstractMap<String, String> timeStrings) { 69 this.timeStrings = timeStrings; 70 } 71 public String getSelectedTimeStringKey() { 72 return selectedTimeStringKey; 73 } 74 public void setSelectedTimeStringKey(String selectedTimeStringKey) { 75 this.selectedTimeStringKey = selectedTimeStringKey; 76 } 77 78 public String getSelectedTimeString() { 79 return timeStrings.get(selectedTimeStringKey); 80 } 81 82 public boolean validDateSelection() { 83 boolean valid; 84 if ( (startDate != null) && 85 (endDate != null) && 86 (startDate.before(endDate)) ) { 87 valid = true; 88 } 89 else { 90 valid = false; 91 } 92 return valid; 93 } 94 public String getAdjustedStartDate() { 95 return adjustedStartDate; 96 } 97 public void setAdjustedStartDate(String adjustedStartDate) { 98 this.adjustedStartDate = adjustedStartDate; 99 } 100 public String getAdjustedEndDate() { 101 return adjustedEndDate; 102 } 103 public void setAdjustedEndDate(String adjustedEndDate) { 104 this.adjustedEndDate = adjustedEndDate; 105 } 106 107 108}