/webportal/src/main/java/au/org/emii/portal/menu/AnimationSelection.java

http://alageospatialportal.googlecode.com/ · Java · 108 lines · 85 code · 15 blank · 8 comment · 4 complexity · a058cc6e48a6578f63db236ccc565fd3 MD5 · raw file

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