D:\CRM_Project\CRM_Metadata_Structure\NetBeamsICM_TestProject\ICM_DB_TestComponents\src\java\unstructured_data_idao\ExcelCellMap2DAO.java
  1 /*
  2  * To change this license header, choose License Headers in Project Properties.
  3  * To change this template file, choose Tools | Templates
  4  * and open the template in the editor.
  5  */
  6 package unstructured_data_idao;
  7 
  8 import constants.MainConstants;
  9 
 10 /**
 11  * @author sameldin
 12  * 
 13  * The main objective of this DAO is parse each excel cell where we can parse and convert 
 14  * unstructured data such as excel sheets into DAO, IDAO and XML (SAOP) file.
 15  * DAO is a dummy storage
 16  * IDAO is an intelligent DAO which as DAO as stored data within it.
 17  * We are planning to eliminate database tables and replace them with XML files for data storage
 18  * This DAO will help other DAO in parsing excel sheets vertically and horizontally 
 19  *
 20  */
 21 public class ExcelCellMap2DAO {
 22 
 23 
 24     
 25         private int     columnIndex         = 0;
 26         private int     rowIndex            = 0;
 27         private int     cellType            = 0;
 28         private int     intCellValue        = 0;
 29         private double  doubleCellValue     = 0.0;
 30         private String  formulaCellvalue    = MainConstants.NO_VALUE_IN_STRING;
 31         private String  stringCellvalue     = MainConstants.NO_VALUE_IN_STRING;
 32         private String  comment             = MainConstants.NO_VALUE_IN_STRING;
 33         private int     cellFormat          = 0;
 34         private String  date                = MainConstants.NO_VALUE_IN_STRING;
 35         //===========================================================================
 36         private String  cellEvaluationString        = MainConstants.NO_VALUE_IN_STRING;
 37         private String  xmlTagContentString         = MainConstants.NO_VALUE_IN_STRING;
 38         // parse each cell in one row and set the evaluation index
 39         private int     cellRowEvaluationIndex      = 0;
 40         // set the index of the know header other wise it is zero
 41         private int     knownStringTokenIndex       = 0;
 42         // column pasring we are still working on it???
 43         private int     cellColumnEvaluationIndex   = 0;
 44         //===========================================================================
 45         private String  possibleVariableName        = MainConstants.NO_VALUE_IN_STRING;
 46                 
 47         public ExcelCellMap2DAO () {
 48         }
 49 
 50     /**
 51      * @return the columnIndex
 52      */
 53     public int getColumnIndex() {
 54         return columnIndex;
 55     }
 56 
 57     /**
 58      * @param columnIndex the columnIndex to set
 59      */
 60     public void setColumnIndex(int columnIndex) {
 61         this.columnIndex = columnIndex;
 62     }
 63 
 64     /**
 65      * @return the rowIndex
 66      */
 67     public int getRowIndex() {
 68         return rowIndex;
 69     }
 70 
 71     /**
 72      * @param rowIndex the rowIndex to set
 73      */
 74     public void setRowIndex(int rowIndex) {
 75         this.rowIndex = rowIndex;
 76     }
 77 
 78     /**
 79      * @return the cellType
 80      */
 81     public int getCellType() {
 82         return cellType;
 83     }
 84 
 85     /**
 86      * @param cellType the cellType to set
 87      */
 88     public void setCellType(int cellType) {
 89         this.cellType = cellType;
 90     }
 91 
 92     /**
 93      * @return the intCellValue
 94      */
 95     public int getIntCellValue() {
 96         return intCellValue;
 97     }
 98 
 99     /**
100      * @param intCellValue the intCellValue to set
101      */
102     public void setIntCellValue(int intCellValue) {
103         this.intCellValue = intCellValue;
104     }
105 
106     /**
107      * @return the doubleCellValue
108      */
109     public double getDoubleCellValue() {
110         return doubleCellValue;
111     }
112 
113     /**
114      * @param doubleCellValue the doubleCellValue to set
115      */
116     public void setDoubleCellValue(double doubleCellValue) {
117         this.doubleCellValue = doubleCellValue;
118     }
119 
120     /**
121      * @return the formulaCellvalue
122      */
123     public String getFormulaCellvalue() {
124         return formulaCellvalue;
125     }
126 
127     /**
128      * @param formulaCellvalue the formulaCellvalue to set
129      */
130     public void setFormulaCellvalue(String formulaCellvalue) {
131         this.formulaCellvalue = formulaCellvalue;
132     }
133 
134     /**
135      * @return the stringCellvalue
136      */
137     public String getStringCellvalue() {
138         return stringCellvalue;
139     }
140 
141     /**
142      * @param stringCellvalue the stringCellvalue to set
143      */
144     public void setStringCellvalue(String stringCellvalue) {
145         this.stringCellvalue = stringCellvalue;
146     }
147 
148     /**
149      * @return the comment
150      */
151     public String getComment() {
152         return comment;
153     }
154 
155     /**
156      * @param comment the comment to set
157      */
158     public void setComment(String comment) {
159         this.comment = comment;
160     }
161     /**
162      * @return the cellFormat
163      */
164     public int getCellFormat() {
165         return cellFormat;
166     }
167 
168     /**
169      * @param cellFormat the cellFormat to set
170      */
171     public void setCellFormat(int cellFormat) {
172         this.cellFormat = cellFormat;
173     }
174 
175     /**
176      * @return the date
177      */
178     public String getDate() {
179         return date;
180     }
181 
182     /**
183      * @param date the date to set
184      */
185     public void setDate(String date) {
186         this.date = date;
187     }
188 
189     /**
190      * @return the cellEvaluation
191      */
192     public String getCellEvaluationString() {
193         return cellEvaluationString;
194     }
195 
196     /**
197      * @param cellEvaluation the cellEvaluation to set
198      */
199     public void setCellEvaluationString(String cellEvaluation) {
200         this.cellEvaluationString = cellEvaluation;
201     }
202 
203     /**
204      * @return the cellRowEvaluationIndex
205      */
206     public int getCellRowEvaluationIndex() {
207         return cellRowEvaluationIndex;
208     }
209 
210     /**
211      * @param cellRowEvaluationIndex the cellRowEvaluationIndex to set
212      */
213     public void setCellRowEvaluationIndex(int cellRowEvaluationIndex) {
214         this.cellRowEvaluationIndex = cellRowEvaluationIndex;
215     }
216     /**
217      * @return the cellColumnEvaluationIndex
218      */
219     public int getCellColumnEvaluationIndex() {
220         return cellColumnEvaluationIndex;
221     }
222     /**
223      * @param cellColumnEvaluationIndex the cellColumnEvaluationIndex to set
224      */
225     public void setCellColumnEvaluationIndex(int cellColumnEvaluationIndex) {
226         this.cellColumnEvaluationIndex = cellColumnEvaluationIndex;
227     }   
228     /**
229      * @return the strinTokenIndex
230      */
231     public int getKnownStringTokenIndex() {
232         return knownStringTokenIndex;
233     }
234 
235     /**
236      * @param strinTokenIndex the strinTokenIndex to set
237      */
238     public void setKnownStringTokenIndex(int strinTokenIndex) {
239         this.knownStringTokenIndex = strinTokenIndex;
240     }
241     /**
242      * @return the possibleVariableName
243      */
244     public String getPossibleVariableName() {
245         return possibleVariableName;
246     }
247 
248     /**
249      * @param possibleVariableName the possibleVariableName to set
250      */
251     public void setPossibleVariableName(String possibleVariableName) {
252         this.possibleVariableName = possibleVariableName;
253     }
254     /**
255      * @return the xmlTagContentString
256      */
257     public String getXmlTagContentString() {
258         return xmlTagContentString;
259     }
260 
261     /**
262      * @param xmlTagContentString the xmlTagContentString to set
263      */
264     public void setXmlTagContentString(String xmlTagContentString) {
265         this.xmlTagContentString = xmlTagContentString;
266     }
267     
268     /**
269      * toString
270      */
271     public String toString()    {
272                    return("ColumnIndex             " + getColumnIndex()
273                         + "RowIndex                " + getRowIndex()
274                         + "CellType                " + getCellType()
275                         + "IntCellValue            " + getIntCellValue()
276                         + "DoubleCellValue         " + getDoubleCellValue() 
277                         + "FormulaCellvalue        " + getFormulaCellvalue()
278                         + "StringCellvalue         " + getStringCellvalue()
279                         + "Comment                 " + getComment()
280                         + "Cell Frormat            " + getCellFormat()   
281                         + "Date                    " + getDate()
282                         + "CellEvaluation          " + getCellEvaluationString()
283                         + "CellEvaluationIndex     " + getCellRowEvaluationIndex()
284                         + "knownStringTokenIndex   " + getKnownStringTokenIndex()
285                         + "possibleVariableName    " + getPossibleVariableName()
286                         + "xmlTagContentString    " + getXmlTagContentString()
287                         );
288     }
289 
290         
291 }
292