source: MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/CollectionProxyAction.java @ 860

Last change on this file since 860 was 860, checked in by gaba, 14 years ago
File size: 1.2 KB
Line 
1package eu.clarin.cmdi.mdservice.action;
2
3import java.io.IOException;
4import java.net.MalformedURLException;
5import java.net.URL;
6
7import net.sf.json.JSONObject;
8import net.sf.json.xml.XMLSerializer;
9
10/**
11 *
12 *
13 */
14public class CollectionProxyAction extends GenericProxyAction {
15
16        private static final long serialVersionUID = 1L;
17       
18        private String proxy_key = "collections";
19
20        @Override 
21        public String getFullFormat() {
22                return "collection2" + getFormat();
23        }
24       
25        @Override
26        public String getProxyKey() {
27                return proxy_key;
28        }
29       
30       
31        public URL getTargetRequest() throws IOException {
32               
33                URL targetURL = null;
34                //targetURL =new URL( getBaseURL(), getActionkey());
35                targetURL = new URL(getBaseURL(), "?operation=getCollections&collection=");
36                //Admin.notifyUser("CollectionProxy.targetURL:" + targetURL);
37
38            return targetURL;
39        }
40       
41       
42        @Override
43        public URL getBaseURL() throws MalformedURLException {         
44                if (base_url == null) {
45                        //base_url = new URL(Admin.getConfig().getProperty(getProxyKey() + ".uri"));
46                        base_url = new URL(getRepositoryPath());
47                                                //Admin.notifyUser("TEST-URLnew:" + base_url.toString());
48                       
49                }
50                return base_url;
51        }
52
53
54}
Note: See TracBrowser for help on using the repository browser.