Changeset 1613 for MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/CompRegistryProxyAction.java
- Timestamp:
- 11/05/11 17:38:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/CompRegistryProxyAction.java
r1540 r1613 1 1 package eu.clarin.cmdi.mdservice.action; 2 2 3 3 import java.io.InputStream; … … 48 48 } 49 49 50 public void setTargetProxy(){ 51 52 setTargetProxy(new BasicProxy()); 53 50 public void setTargetProxy(){ 51 setTargetProxy(new BasicProxy()); 54 52 } 55 53 56 @Override57 /*58 54 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() {71 55 String key=""; 72 56 if (getActionkey()!=null) { … … 107 91 key +="//-" ; 108 92 } 109 110 111 93 return key; 112 94 } … … 117 99 public void prepare() { 118 100 119 try { 120 101 try { 121 102 //log.debug("CRPA.prepare"); 122 103 if (!getActionkey().equals("elements")) { … … 159 140 // log.debug("CRPA-putting in cache: " + getRequestKey()); 160 141 _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 } 174 143 175 144 if (getFormat().equals("xml")) { … … 188 157 setSourceStream(_sourceStream); 189 158 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 */203 159 } 204 160 } catch(Exception e){ 205 161 206 162 } 207 208 163 } 209 210 164 211 165 /** … … 226 180 return paramstr; 227 181 } 182 228 183 /* 229 184 public URL getTargetRequest() throws IOException { … … 240 195 return targetURL; 241 196 } 242 */ 243 244 197 */ 245 198 }
Note: See TracChangeset
for help on using the changeset viewer.