XMLImportBean.java
01 package com.bea.medrec.beans;
02 
03 import com.bea.medrec.utils.MedRecWebAppUtils;
04 import com.bea.medrec.value.XMLImportFile;
05 import java.io.Serializable;
06 
07 /**
08  <p>Bean to hold data about XML files</p>.
09  *
10  @author Copyright (c) 2006 by BEA Systems. All Rights Reserved.
11  */
12 public final class XMLImportBean implements Serializable {
13   // Instance Variables
14   private String filename = "";
15   private String path = "";
16   private String date = "";
17   private String size = "";
18 
19   // Constructors
20   public XMLImportBean() {
21   }
22 
23   public XMLImportBean(XMLImportFile xmlImport) {
24     this.filename = xmlImport.getFilename();
25     this.path = xmlImport.getPath();
26     this.date = MedRecWebAppUtils.getDisplayDate(xmlImport.getDate());
27     this.size = xmlImport.getSize();
28   }
29 
30   public XMLImportBean(String filename,
31                        String path,
32                        String date,
33                        String size) {
34     this.filename = filename;
35     this.path = path;
36     this.date = date;
37     if (size != nullthis.size = String.valueOf(size);
38   }
39 
40   // Getters
41   public String getFilename() {
42     return (this.filename);
43   }
44 
45   public String getPath() {
46     return (this.path);
47   }
48 
49   public String getDate() {
50     return (this.date);
51   }
52 
53   public String getSize() {
54     return (this.size);
55   }
56 
57   // Setters
58   public void setFilename(String filename) {
59     this.filename = filename;
60   }
61 
62   public void setPath(String path) {
63     this.path = path;
64   }
65 
66   public void setDate(String date) {
67     this.date = date;
68   }
69 
70   public void setSize(String size) {
71     this.size = size;
72   }
73 
74   public String toString() {
75     StringBuffer str = new StringBuffer();
76     str.append("XMLImportBean [");
77     str.append("Filename: "+this.filename);
78     str.append(" | Path: "+this.path);
79     str.append(" | Date: "+this.date);
80     str.append(" | Size: "+this.size);
81     str.append("]");
82 
83     return str.toString();
84   }
85 }