Changeset 2236 for SMC


Ignore:
Timestamp:
09/19/12 10:37:21 (12 years ago)
Author:
vronk
Message:

added a sequence of all initialization steps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SMC/trunk/SMC/src/eu/clarin/cmdi/smc/SMC.java

    r1671 r2236  
    5151                SMC smc = new SMC();
    5252
    53                 //smc.init();           
     53               
     54                smc.init();             
    5455               
    5556                //InputStream is = smc.listTerms("isocat");
    56                 InputStream is = smc.map("nome do projecto");
    57                 String output_path = Utils.getConfig("cache.dir") +  "test_res_map.xml" ;               
    58                 File f = Utils.write2File(output_path, is);
    59                 log.debug("result stored in: " + f.getAbsolutePath());
     57                //InputStream is = smc.map("nome do projecto");
     58                //String output_path = Utils.getConfig("cache.dir") +  "test_res_map.xml" ;             
     59                //File f = Utils.write2File(output_path, is);
     60                //log.debug("result stored in: " + f.getAbsolutePath());
    6061
    6162        }
     
    7980 */
    8081        public void init () {
    81                  
     82               
     83               
     84//              init_step ("cmd-profiles-raw");
     85//              don't do this! it is too big
     86                //init_step ("cmd-resolved");
     87                //init_step ("cmd-terms");
     88                init_step ("cmd-terms-nested");
     89                //init_step ("dcr-terms");
     90                //init_step ("isocat-languages");
     91                //init_step ("termsets");
     92                // init_step ("dcr-cmd-map");
     93                //init_step ("rr-relations");
     94                //init_step ("rr-terms");
     95
     96        }
     97                 
     98        public void init_step (String data_key) {       
    8299                InputStream is =null;
    83100                is = Utils.load2Stream(Utils.getConfig("termsets.config.file"),this.getClass().getClassLoader());
     
    91108                // TODO: WHY??
    92109                //transformer.setSrcFile(Utils.getConfig("termsets.config.file"));
    93         //      addParam("data_key", "dcr-cmd-map");
    94                 addParam("data_key", "cmd-terms");
     110                addParam("data_key", data_key);
     111                //we want to refill the cache:
     112                //addParam("cache", "skip");
     113                //addParam("data_key", "cmd-terms");
    95114
    96115                // this is necessary for the transformer (in MDUTILS-library) to search for the resources (config and xsls) in the correct context)
     
    108127                        //String output_path = config.getString("cache.dir") +  getParam("data_key") + ".xml" ;
    109128                        File f = Utils.write2File(output_path, resultStream);
    110                         log.debug("SMC.init(): result stored in: " + f.getAbsolutePath());
     129                        log.debug("SMC.init(" + getParam("data_key") + "): result stored in: " + f.getAbsolutePath());
    111130
    112131                } catch (IOException e1) {
Note: See TracChangeset for help on using the changeset viewer.