Ignore:
Timestamp:
11/05/11 17:38:57 (13 years ago)
Author:
vronk
Message:

various small changes, clean up code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/CompRegistryProxyAction.java

    r1540 r1613  
    1  package eu.clarin.cmdi.mdservice.action;
     1package eu.clarin.cmdi.mdservice.action;
    22
    33import java.io.InputStream;
     
    4848        }
    4949       
    50         public void setTargetProxy(){
    51                
    52                 setTargetProxy(new BasicProxy());
    53                
     50        public void setTargetProxy(){           
     51                setTargetProxy(new BasicProxy());               
    5452        }
    5553       
    56         @Override
    57         /*
    5854        public String getRequestKey() {
    59                 String key="";
    60                 if (getActionkey()!=null) {
    61                         key += getActionkey() + "//-" ;
    62                 }
    63                 if (getCompid()!=null) {
    64                         key += getCompid() + "//-" ;
    65                 }
    66                  
    67                 return key;
    68         }
    69 */
    70          public String getRequestKey() {
    7155                String key="";
    7256                if (getActionkey()!=null) {
     
    10791                        key +="//-" ;
    10892                }
    109                
    110                  
    11193                return key;
    11294        }
     
    11799        public void prepare()  {               
    118100               
    119                 try {
    120                
     101                try {           
    121102                        //log.debug("CRPA.prepare");
    122103                        if (!getActionkey().equals("elements")) {
     
    159140                                //              log.debug("CRPA-putting in cache: " + getRequestKey());
    160141                                                _sourceStream = Cache.getCache().getFromCache(getRequestKey());
    161                                 } /*else {
    162                                                 log.debug("CRPA-reading from cache: " + getRequestKey());
    163                                 }*/
    164                                         /*
    165                                 File file=new File(Cache.getCache().formPath(getRequestKey()));
    166                                 log.debug("File-absolutePath " + file.getAbsolutePath());
    167                                 URL url = null;
    168                                    try{
    169                                            url = file.toURL();
    170                                            log.debug("URL-tostring " + url.toString());
    171                                            }  catch (MalformedURLException me){
    172                                   }
    173                                  */
     142                                }
    174143                               
    175144                                if (getFormat().equals("xml")) {                       
     
    188157                                setSourceStream(_sourceStream);
    189158                                setResultStream(_resultStream);
    190 
    191                                 /*
    192                                 if (getFormat().equals("txt")) {
    193                                         File f=new File(Cache.getCache().formPath("terms_autocomplete.txt"));
    194                                     OutputStream out=new FileOutputStream(f);
    195                                     byte buf[]=new byte[1024];
    196                                     int len;
    197                                     while((len=getResultStream().read(buf))>0)
    198                                         out.write(buf,0,len);
    199                                     out.close();
    200         log.debug("terms_autocomplete.txt");
    201                                 }
    202                                 */
    203159                        }
    204160                } catch(Exception e){
    205161                       
    206162                }                       
    207 
    208163        }
    209 
    210164
    211165        /**
     
    226180                return paramstr;
    227181        }
     182
    228183        /*
    229184        public URL getTargetRequest() throws IOException {
     
    240195        return targetURL;
    241196        }
    242         */
    243 
    244        
     197        */     
    245198}
Note: See TracChangeset for help on using the changeset viewer.