D:\CRM_Project\CRM_Metadata_Structure\NetBeamsICM_TestProject\ICM_DB_TestComponents\src\java\unstructured_data_idao\ExcelDAO_Constants.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 /**
  9  *This class contains the constants used (integer values) to parse and 
 10  * process Data Access Object (DAO) and Intelligent Data Access Object (IDAO). 
 11  * Such constants would be in parsing switch statements passing parameters.
 12  * @author sameldin
 13  */
 14 //==================================================================
 15 // Our attempt here is horizontally parse each excel cell and give it an index number 
 16 // for future evaluation using indexes as ID for each type of cell and its value.
 17 // String Parse Indexes
 18 //      •       String index        - any
 19 //      •       Comment Index       - comments which has length of 50 chars or more
 20 //      •       Label Index         - example (Million of Dollars) as unit
 21 //      •       Known Header index  - known header which we assigned a index value to it
 22 //      •       Unknown Header Index + Known header index value
 23 //
 24 // Numeric Parse Indexes
 25 //      •       Double Index
 26 //      •       Integer Index
 27 //
 28 // Formula Parse indexes
 29 //      •       Sum row of cells index      - summing up row of cells
 30 //      •       sum column cells index      - summing up columns of cells
 31 //      •       multiplication cells index  - complex formula
 32 //      •       Comparison cells index      - cell comparison
 33 //
 34 // Boolean Parse indexes
 35 // 
 36 //
 37 //==================================================================
 38 public class ExcelDAO_Constants {
 39 
 40     public static final int         NO_EVALUATION                       = -1;
 41     
 42     //---------------------------- Cell Type Index ---------------------------       
 43     public static final int         EXCEL_CELL_TYPE_NUMERIC             = 100;
 44     public static final int         EXCEL_CELL_TYPE_STRING              = 101;
 45     public static final int         EXCEL_CELL_TYPE_BLANK               = 102;
 46     public static final int         EXCEL_CELL_TYPE_BOOLEAN             = 103;
 47     public static final int         EXCEL_CELL_TYPE_FORMULA             = 104;
 48     public static final int         EXCEL_CELL_TYPE_ERROR               = 105;
 49     public static final int         EXCEL_CELL_TYPE_DEFAULT             = 106;
 50     //----------------------------- Dinemtions  --------------------------------       
 51     public static final int         EXCEL_MAX_ROWS                      = 100;
 52     public static final int         EXCEL_MAX_COLUMNS                   = 256;
 53     //------------------------------- String Parse Indexes Buiness Rule # 1 ----       
 54     public static final int         STRING_STRING_INDEX                 = 200;
 55     public static final String      STRING_STRING_EVALUATION            = "Known String";
 56     public static final String      UNKNOWN_STRING_STRING_EVALUATION    = "UN_Known String";
 57     public static final int         STRING_COMMENT_INDEX                = 201;
 58     public static final int         STRING_COMMENT_SIZE                 = 50; // 50 or mor char
 59     public static final String      STRING_COMMENT_EVALUATION           = "STRING_COMMENT";
 60     public static final int         STRING_LABEL_INDEX                  = 202;
 61     public static final int         STRING_LABEL_SIZE                   = 50;
 62     public static final String      STRING_LABEL_EVALUATION             = "STRING_LABEL";
 63     public static final int         STRING_KNOWN_HEADER_INDEX           = 203;
 64     public static final int         STRING_UNKNOWN_HEADER_INDEX         = 213; // add 10 the unknow as distinguish value 
 65     //------------------------------- Numeric Parse Indexes Buiness Rule # 1 ----       
 66     public static final int         NUMERIC_INTEGER_INDEX               = 300;
 67     public static final String      NUMERIC_INTEGER_EVALUATION_STRING   = "Integer process";
 68     public static final int         NUMERIC_DOUBLE_INDEX                = 301;
 69     public static final String      NUMERIC_DOUBLE_EVALUATION_STRING    = "Double process";
 70     //------------------------------- Formula Parse indexes Buiness Rule # 1 ---- 
 71     public static final int         FORMULA_SUM_ROW_CELLS_INDEX         = 400;
 72     public static final int         FORMULA_SUM_COLUMN_CELLS_INDEX      = 401;
 73     public static final int         FORMULA_MULTIPLICATION_CELLS_INDEX  = 402;
 74     public static final int         FORMULA_Comparison_CELLS_INDEX      = 403;
 75     public static final int         FORMULA_COMPLEX_CELLS_INDEX         = 404;
 76     public static final int         FORMULA_MAX_CELLS_INDEX             = 405;
 77     public static final int         FORMULA_MIN_CELLS_INDEX             = 406;
 78     public static final int         FORMULA_AVERAGE_CELLS_INDEX         = 407;
 79     public static final String      FORMULA_EVALUATION_STRING           = "Formula";
 80     //------------------------------- Boolean Parse indexes-------------------------       
 81     public static final String      BOOLEAN_EVALUATION_STRING           = "Boolean Value";
 82     public static final int         BOOLEAN_EVALUATION_INDEX            = -1; // we may in it the future 
 83     //------------------------------- BLANK Parse indexes-------------------------       
 84     public static final String      BLANK_EVALUATION_STRING             = "Blank Cell";
 85     public static final int         BLANK_EVALUATION_INDEX              = -1; // we may in it the future 
 86     //------------------------------- ERROR Parse indexes-------------------------       
 87     public static final String      ERROR_EVALUATION_STRING             = "Error";
 88     public static final int         ERROR_EVALUATION_INDEX              = -1; // we may in it the future 
 89     //------------------------------- Cxcel Function Names and Index ------------ 
 90     public static final char        CELL_FUNCTION_STARTING_EQUAL_STRING = '=';
 91     public static final String      CELL_FUNCTION_SUM_STRING            = "SUM";
 92     public static final String      CELL_FUNCTION_MAX_STRING            = "MAX";
 93     public static final String      CELL_FUNCTION_MIN_STRING            = "MIN";
 94     public static final String      CELL_FUNCTION_AVERAGE_STRING        = "AVERAGE";
 95     //------------------------------- DAO ID Number -------------------------       
 96     public static final int         DAO_ROW_COLUMN_ID_CONVERTER          = 1000; // This number is multiplied by row number
 97     //------------------------------- Row and Column ID calcuation ----------       
 98 }
 99