Coverage Report - com.buckosoft.PicMan.domain.Poster
 
Classes in this File Line Coverage Branch Coverage Complexity
Poster
0%
0/94
0%
0/28
1.872
 
 1  
 /******************************************************************************
 2  
  * Poster.java - Define A poster and how to build it.
 3  
  * 
 4  
  * PicMan - The BuckoSoft Picture Manager in Java
 5  
  * Copyright(c) 2012 - Dick Balaska
 6  
  * 
 7  
  */
 8  
 package com.buckosoft.PicMan.domain;
 9  
 
 10  
 import java.util.HashMap;
 11  
 
 12  
 /** Define A poster and how to build it.
 13  
  * @author Dick Balaska
 14  
  * @since 2012/07/21
 15  
  * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/domain/Poster.java">Poster.java</a>
 16  
  */
 17  0
 public class Poster  implements Comparable<Poster> {
 18  
         private        int                pid;
 19  
         private        String        name;
 20  
         private        int                masterMid;
 21  
         private        String        outputPath;
 22  
 
 23  0
         private        HashMap<String, String>        config = new HashMap<String, String>();
 24  
 
 25  
         /** Return a reference to the poster config map.
 26  
          * These are stored key = param name, value = String value
 27  
          * Known keys are: dpi, paperWidth, paperHeight, multiplier, projectWidth, projectHeight
 28  
          * @return the engineConfig
 29  
          */
 30  
         public HashMap<String, String> getConfig() {
 31  0
                 return config;
 32  
         }
 33  
 
 34  
         /** Set the map of config parameters.
 35  
          * @param config the config to set
 36  
          */
 37  
         public void setConfig(HashMap<String, String> config) {
 38  0
                 this.config = config;
 39  0
         }
 40  
 
 41  
         /**
 42  
          * @return the dpi
 43  
          */
 44  
         public int getDpi() {
 45  
                 try {
 46  0
                 if (this.config.containsKey("dpi"))
 47  0
                         return(Integer.parseInt(this.config.get("dpi")));
 48  0
                 } catch(Exception e) {}
 49  0
                 return 0;
 50  
         }
 51  
 
 52  
         /**
 53  
          * @param dpi the dpi to set
 54  
          */
 55  
         public void setDpi(int dpi) {
 56  0
                 this.config.put("dpi", "" + dpi);
 57  0
         }
 58  
 
 59  
         /**
 60  
          * @return the paperWidth
 61  
          */
 62  
         public double getPaperWidth() {
 63  
                 try {
 64  0
                 if (this.config.containsKey("paperWidth"))
 65  0
                         return(Double.parseDouble(this.config.get("paperWidth")));
 66  0
                 } catch(Exception e) {}
 67  0
                 return 0.0;
 68  
         }
 69  
 
 70  
         /**
 71  
          * @param paperWidth the paperWidth to set
 72  
          */
 73  
         public void setPaperWidth(double paperWidth) {
 74  0
                 this.config.put("paperWidth", "" + paperWidth);
 75  0
         }
 76  
 
 77  
         /**
 78  
          * @return the paperHeight
 79  
          */
 80  
         public double getPaperHeight() {
 81  
                 try {
 82  0
                 if (this.config.containsKey("paperHeight"))
 83  0
                         return(Double.parseDouble(this.config.get("paperHeight")));
 84  0
                 } catch(Exception e) {}
 85  0
                 return 0.0;
 86  
         }
 87  
 
 88  
         /**
 89  
          * @param paperHeight the paperHeight to set
 90  
          */
 91  
         public void setPaperHeight(double paperHeight) {
 92  0
                 this.config.put("paperHeight", "" + paperHeight);
 93  0
         }
 94  
 
 95  
         /**
 96  
          * @return the multiplier
 97  
          */
 98  
         public double getMultiplier() {
 99  
                 try {
 100  0
                 if (this.config.containsKey("multiplier"))
 101  0
                         return(Double.parseDouble(this.config.get("multiplier")));
 102  0
                 } catch(Exception e) {}
 103  0
                 return 0.0;
 104  
         }
 105  
 
 106  
         /**
 107  
          * @param multiplier the multiplier to set
 108  
          */
 109  
         public void setMultiplier(double multiplier) {
 110  0
                 this.config.put("multiplier", "" + multiplier);
 111  0
         }
 112  
 
 113  
         /**
 114  
          * @return the projectWidth
 115  
          */
 116  
         public double getProjectWidth() {
 117  
                 try {
 118  0
                 if (this.config.containsKey("projectWidth"))
 119  0
                         return(Double.parseDouble(this.config.get("projectWidth")));
 120  0
                 } catch(Exception e) {}
 121  0
                 return 0.0;
 122  
         }
 123  
 
 124  
         /**
 125  
          * @param projectWidth the projectWidth to set
 126  
          */
 127  
         public void setProjectWidth(double projectWidth) {
 128  0
                 this.config.put("projectWidth", "" + projectWidth);
 129  0
         }
 130  
 
 131  
         /**
 132  
          * @return the projectHeight
 133  
          */
 134  
         public double getProjectHeight() {
 135  
                 try {
 136  0
                 if (this.config.containsKey("projectHeight"))
 137  0
                         return(Double.parseDouble(this.config.get("projectHeight")));
 138  0
                 } catch(Exception e) {}
 139  0
                 return 0.0;
 140  
         }
 141  
 
 142  
         /**
 143  
          * @param projectHeight the projectHeight to set
 144  
          */
 145  
         public void setProjectHeight(double projectHeight) {
 146  0
                 this.config.put("projectHeight", "" + projectHeight);
 147  0
         }
 148  
 
 149  
         public int compareTo(Poster arg0) {
 150  0
                 return(this.name.compareToIgnoreCase(arg0.name));
 151  
         }
 152  
         
 153  
         
 154  
         /**
 155  
          * @return the left overSpray
 156  
          */
 157  
         public int getOverSprayL() {
 158  0
                 if (this.config.containsKey("overSprayL"))
 159  0
                         return(Integer.parseInt(this.config.get("overSprayL")));
 160  0
                 return(0);
 161  
         }
 162  
 
 163  
         /**
 164  
          * @param overSprayL the amount of left overSpray to set
 165  
          */
 166  
         public void setOverSprayL(int overSprayL) {
 167  0
                 this.config.put("overSprayL", "" + overSprayL);
 168  0
         }
 169  
 
 170  
         /**
 171  
          * @return the overSprayT
 172  
          */
 173  
         public int getOverSprayT() {
 174  0
                 if (this.config.containsKey("overSprayT"))
 175  0
                         return(Integer.parseInt(this.config.get("overSprayT")));
 176  0
                 return(0);
 177  
         }
 178  
 
 179  
         /**
 180  
          * @param overSprayT the amount of top overSpray to set
 181  
          */
 182  
         public void setOverSprayT(int overSprayT) {
 183  0
                 this.config.put("overSprayT", "" + overSprayT);
 184  0
         }
 185  
 
 186  
         /**
 187  
          * @return the right overSpray
 188  
          */
 189  
         public int getOverSprayR() {
 190  0
                 if (this.config.containsKey("overSprayR"))
 191  0
                         return(Integer.parseInt(this.config.get("overSprayR")));
 192  0
                 return(0);
 193  
         }
 194  
 
 195  
         /**
 196  
          * @param overSprayR the amount of right overSpray to set
 197  
          */
 198  
         public void setOverSprayR(int overSprayR) {
 199  0
                 this.config.put("overSprayR", "" + overSprayR);
 200  0
         }
 201  
 
 202  
         /**
 203  
          * @return the overSprayB
 204  
          */
 205  
         public int getOverSprayB() {
 206  0
                 if (this.config.containsKey("overSprayB"))
 207  0
                         return(Integer.parseInt(this.config.get("overSprayB")));
 208  0
                 return(0);
 209  
         }
 210  
 
 211  
         /**
 212  
          * @param overSprayB the amount of bottom overSpray to set
 213  
          */
 214  
         public void setOverSprayB(int overSprayB) {
 215  0
                 this.config.put("overSprayB", "" + overSprayB);
 216  0
         }
 217  
 
 218  
         /**
 219  
          * @return the marginL
 220  
          */
 221  
         public int getMarginL() {
 222  0
                 if (this.config.containsKey("marginL"))
 223  0
                         return(Integer.parseInt(this.config.get("marginL")));
 224  0
                 return(0);
 225  
         }
 226  
 
 227  
         /**
 228  
          * @param marginL the marginL to set
 229  
          */
 230  
         public void setMarginL(int marginL) {
 231  0
                 this.config.put("marginL", "" + marginL);
 232  0
         }
 233  
 
 234  
         /**
 235  
          * @return the marginR
 236  
          */
 237  
         public int getMarginR() {
 238  0
                 if (this.config.containsKey("marginR"))
 239  0
                         return(Integer.parseInt(this.config.get("marginR")));
 240  0
                 return(0);
 241  
         }
 242  
 
 243  
         /**
 244  
          * @param marginR the marginR to set
 245  
          */
 246  
         public void setMarginR(int marginR) {
 247  0
                 this.config.put("marginR", "" + marginR);
 248  0
         }
 249  
 
 250  
         /**
 251  
          * @return the marginT
 252  
          */
 253  
         public int getMarginT() {
 254  0
                 if (this.config.containsKey("marginT"))
 255  0
                         return(Integer.parseInt(this.config.get("marginT")));
 256  0
                 return(0);
 257  
         }
 258  
 
 259  
         /**
 260  
          * @param marginT the marginT to set
 261  
          */
 262  
         public void setMarginT(int marginT) {
 263  0
                 this.config.put("marginT", "" + marginT);
 264  0
         }
 265  
 
 266  
         /**
 267  
          * @return the marginB
 268  
          */
 269  
         public int getMarginB() {
 270  0
                 if (this.config.containsKey("marginB"))
 271  0
                         return(Integer.parseInt(this.config.get("marginB")));
 272  0
                 return(0);
 273  
         }
 274  
 
 275  
         /**
 276  
          * @param marginB the marginB to set
 277  
          */
 278  
         public void setMarginB(int marginB) {
 279  0
                 this.config.put("marginB", "" + marginB);
 280  0
         }
 281  
 
 282  
         /**
 283  
          * @return the pid
 284  
          */
 285  
         public int getPid() {
 286  0
                 return pid;
 287  
         }
 288  
         /**
 289  
          * @param pid the pid to set
 290  
          */
 291  
         public void setPid(int pid) {
 292  0
                 this.pid = pid;
 293  0
         }
 294  
 
 295  
         /**
 296  
          * @return the name
 297  
          */
 298  
         public String getName() {
 299  0
                 return name;
 300  
         }
 301  
         /**
 302  
          * @param name the name to set
 303  
          */
 304  
         public void setName(String name) {
 305  0
                 this.name = name;
 306  0
         }
 307  
 
 308  
         /**
 309  
          * @return the masterMid
 310  
          */
 311  
         public int getMasterMid() {
 312  0
                 return masterMid;
 313  
         }
 314  
         /**
 315  
          * @param masterMid the masterMid to set
 316  
          */
 317  
         public void setMasterMid(int masterMid) {
 318  0
                 this.masterMid = masterMid;
 319  0
         }
 320  
 
 321  
         /**
 322  
          * @return the outputPath
 323  
          */
 324  
         public String getOutputPath() {
 325  0
                 return outputPath;
 326  
         }
 327  
         /**
 328  
          * @param outputPath the outputPath to set
 329  
          */
 330  
         public void setOutputPath(String outputPath) {
 331  0
                 this.outputPath = outputPath;
 332  0
         }
 333  
 
 334  
         
 335  
 }