| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Mosaic |
|
| 1.0;1 |
| 1 | /****************************************************************************** | |
| 2 | * Mosaic.java - Describe a Mosaic | |
| 3 | * | |
| 4 | * PicMan - The BuckoSoft Picture Manager in Java | |
| 5 | * Copyright(c) 2008 - Dick Balaska | |
| 6 | * | |
| 7 | */ | |
| 8 | package com.buckosoft.PicMan.domain; | |
| 9 | ||
| 10 | import java.util.Date; | |
| 11 | import java.util.HashMap; | |
| 12 | ||
| 13 | /** Describe the parameters of a Mosaic that was made | |
| 14 | * @author Dick Balaska | |
| 15 | * @since 2008/02/04 | |
| 16 | * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/domain/Mosaic.java">Mosaic.java</a> | |
| 17 | */ | |
| 18 | 0 | public class Mosaic implements Comparable<Mosaic> { |
| 19 | private int mid; | |
| 20 | private boolean batch; | |
| 21 | 0 | private boolean makeBackup = true; |
| 22 | private String name; | |
| 23 | private String engine; | |
| 24 | private String masterPic; | |
| 25 | private String outPic; | |
| 26 | private int tileHeight; | |
| 27 | private int sid; | |
| 28 | private Date startTime; | |
| 29 | ||
| 30 | private int tilesComplete; | |
| 31 | ||
| 32 | 0 | private HashMap<String, String> engineConfig = new HashMap<String, String>(); |
| 33 | ||
| 34 | public int compareTo(Mosaic arg0) { | |
| 35 | 0 | return(this.name.compareToIgnoreCase(arg0.name)); |
| 36 | } | |
| 37 | ||
| 38 | /** Fetch the unique mosaicId | |
| 39 | * @return the mid | |
| 40 | */ | |
| 41 | public int getMid() { | |
| 42 | 0 | return mid; |
| 43 | } | |
| 44 | /** | |
| 45 | * @param mid the mid to set | |
| 46 | */ | |
| 47 | public void setMid(int mid) { | |
| 48 | 0 | this.mid = mid; |
| 49 | 0 | } |
| 50 | /** Is this part of the definition of a MosaicBatch? | |
| 51 | * @return the batch mode flag | |
| 52 | */ | |
| 53 | public boolean isBatch() { | |
| 54 | 0 | return batch; |
| 55 | } | |
| 56 | /** | |
| 57 | * @param batch the batch to set | |
| 58 | */ | |
| 59 | public void setBatch(boolean batch) { | |
| 60 | 0 | this.batch = batch; |
| 61 | 0 | } |
| 62 | /** Fetch the descriptive name of this mosaic run. | |
| 63 | * @return the name | |
| 64 | */ | |
| 65 | public String getName() { | |
| 66 | 0 | return name; |
| 67 | } | |
| 68 | /** | |
| 69 | * @param name the name to set | |
| 70 | */ | |
| 71 | public void setName(String name) { | |
| 72 | 0 | this.name = name; |
| 73 | 0 | } |
| 74 | /** | |
| 75 | * @return the engine | |
| 76 | */ | |
| 77 | public String getEngine() { | |
| 78 | 0 | return engine; |
| 79 | } | |
| 80 | /** | |
| 81 | * @param engine the engine to set | |
| 82 | */ | |
| 83 | public void setEngine(String engine) { | |
| 84 | 0 | this.engine = engine; |
| 85 | 0 | } |
| 86 | /** | |
| 87 | * @return the masterPic | |
| 88 | */ | |
| 89 | public String getMasterPic() { | |
| 90 | 0 | return masterPic; |
| 91 | } | |
| 92 | /** | |
| 93 | * @param masterPic the masterPic to set | |
| 94 | */ | |
| 95 | public void setMasterPic(String masterPic) { | |
| 96 | 0 | this.masterPic = masterPic; |
| 97 | 0 | } |
| 98 | /** The full path to the jpeg to write. | |
| 99 | * @return the outPic | |
| 100 | */ | |
| 101 | public String getOutPic() { | |
| 102 | 0 | return outPic; |
| 103 | } | |
| 104 | /** The full path to the jpeg to write | |
| 105 | * @param outPic the outPic to set | |
| 106 | */ | |
| 107 | public void setOutPic(String outPic) { | |
| 108 | 0 | this.outPic = outPic; |
| 109 | 0 | } |
| 110 | /** | |
| 111 | * @return the sid | |
| 112 | */ | |
| 113 | public int getSid() { | |
| 114 | 0 | return sid; |
| 115 | } | |
| 116 | /** | |
| 117 | * @param sid the sid to set | |
| 118 | */ | |
| 119 | public void setSid(int sid) { | |
| 120 | 0 | this.sid = sid; |
| 121 | 0 | } |
| 122 | ||
| 123 | /** | |
| 124 | * @return the tileHeight | |
| 125 | */ | |
| 126 | public int getTileHeight() { | |
| 127 | 0 | return tileHeight; |
| 128 | } | |
| 129 | /** | |
| 130 | * @param tileHeight the tileHeight to set | |
| 131 | */ | |
| 132 | public void setTileHeight(int tileHeight) { | |
| 133 | 0 | this.tileHeight = tileHeight; |
| 134 | 0 | } |
| 135 | /** | |
| 136 | * @return the startTime | |
| 137 | */ | |
| 138 | public Date getStartTime() { | |
| 139 | 0 | return startTime; |
| 140 | } | |
| 141 | /** | |
| 142 | * @param startTime the startTime to set | |
| 143 | */ | |
| 144 | public void setStartTime(Date startTime) { | |
| 145 | 0 | this.startTime = startTime; |
| 146 | 0 | } |
| 147 | /** | |
| 148 | * @return the tilesComplete | |
| 149 | */ | |
| 150 | public int getTilesComplete() { | |
| 151 | 0 | return tilesComplete; |
| 152 | } | |
| 153 | /** | |
| 154 | * @param tilesComplete the tilesComplete to set | |
| 155 | */ | |
| 156 | public void setTilesComplete(int tilesComplete) { | |
| 157 | 0 | this.tilesComplete = tilesComplete; |
| 158 | 0 | } |
| 159 | ||
| 160 | /** Should we save the mosaic output jpeg before overwriting it with a new file? | |
| 161 | * @return the makeBackup | |
| 162 | */ | |
| 163 | public boolean isMakeBackup() { | |
| 164 | 0 | return makeBackup; |
| 165 | } | |
| 166 | ||
| 167 | /** Should we save the mosaic output jpeg before overwriting it with a new file? | |
| 168 | * @param makeBackup the makeBackup to set | |
| 169 | */ | |
| 170 | public void setMakeBackup(boolean makeBackup) { | |
| 171 | 0 | this.makeBackup = makeBackup; |
| 172 | 0 | } |
| 173 | ||
| 174 | /** Return a reference to the engine config map. | |
| 175 | * These are stored key = param name, value = String value | |
| 176 | * @return the engineConfig | |
| 177 | */ | |
| 178 | public HashMap<String, String> getEngineConfig() { | |
| 179 | 0 | return engineConfig; |
| 180 | } | |
| 181 | ||
| 182 | /** Set the map of engine config parameters. | |
| 183 | * @param engineConfig the engineConfig to set | |
| 184 | */ | |
| 185 | public void setEngineConfig(HashMap<String, String> engineConfig) { | |
| 186 | 0 | this.engineConfig = engineConfig; |
| 187 | 0 | } |
| 188 | ||
| 189 | } |