D:\CRM_Project\CRM_Metadata_Structure\NetBeamsICM_TestProject\ICM_DB_TestComponents\src\java\unstructured_data_parser\RowCellParserUsingBusinessRule_1.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_parser;
 7 
 8 import constants.MainConstants;
 9 import java.util.ArrayList;
10 import unstructured_data_idao.TokenValueDAO;
11 import java.util.StringTokenizer;
12 import unstructured_data_idao.ExcelCellMap2DAO;
13 import unstructured_data_idao.ExcelDAO_Constants;
14 import unstructured_data_idao.OneRow_ExcelCells;
15 
16 /**
17  *
18  * @author sameldin
19  */
20 public class RowCellParserUsingBusinessRule_1 {
21  
22     ArrayList <OneRow_ExcelCells>classAllExcelRowsDAO_ArrayList = null;
23 
24     
25     public RowCellParserUsingBusinessRule_1(OneRow_ExcelCells passedOneRow_ExcelCellsObject, ArrayList <TokenValueDAO> passedTokenValueDAOArrayList){
26             
27         int cellIndex = 0;
28         ArrayList <ExcelCellMap2DAO> oneArrayListCells = passedOneRow_ExcelCellsObject.getOneRowDAOArrayList();
29         
30         for(cellIndex = 0; cellIndex < oneArrayListCells.size(); cellIndex++){
31             ExcelCellMap2DAO tempCellDAO = oneArrayListCells.get(cellIndex);
32             if(null == tempCellDAO) {
33                 continue;
34             }
35             new Excel2DAO_CellParserBusinessRule_1(tempCellDAO, passedTokenValueDAOArrayList);            
36         }        
37     }    
38     /*
39        
40     */
41     public static void main(String[] args){
42 
43         Excel2DAO_Mapper localExcel2DAO_Mapper = new Excel2DAO_Mapper();
44         ArrayList <OneRow_ExcelCells> localAllRows = localExcel2DAO_Mapper.getAllSheetRows();
45         if(null == localAllRows){
46            System.out.print("rows arrayList  is null ");
47            return;
48         }
49         LoadTokenValueArrayList tempLoadTokenValueArrayList = new LoadTokenValueArrayList();
50         ArrayList <TokenValueDAO> localTokenValueDAOArrayList = tempLoadTokenValueArrayList.getTokenValueArrayList();
51         if(null == localTokenValueDAOArrayList){
52            System.out.print("localTokenValueDAOArrayList  is null ");
53            return;
54         }        
55         int rowNumber = 0;
56         for(rowNumber = 0; rowNumber < localAllRows.size(); rowNumber++){
57             // loop throw the rows and parse each row
58             OneRow_ExcelCells localOneRow_ExcelCells = localAllRows.get(rowNumber);
59             RowCellParserUsingBusinessRule_1 localRowCellParserUsingBusinessRule_1 = 
60                                 new RowCellParserUsingBusinessRule_1(localOneRow_ExcelCells, localTokenValueDAOArrayList);
61         }   
62         int stopDebugger = 0;
63         
64     }
65 }
66