View Javadoc

1   /*$Id: ConeResources.java,v 1.11 2006/10/17 10:11:41 clq2 Exp $
2    * Created on 13-Nov-2003
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid
7    * Software License version 1.2, a copy of which has been included
8    * with this distribution in the LICENSE.txt file.
9    *
10   **/
11  package org.astrogrid.dataservice.service.cone;
12  
13  import java.io.IOException;
14  import org.astrogrid.cfg.ConfigFactory;
15  import org.astrogrid.dataservice.metadata.VoResourcePlugin;
16  import org.astrogrid.dataservice.metadata.v0_10.VoResourceSupport;
17  import org.astrogrid.dataservice.service.ServletHelper;
18  import org.astrogrid.query.Query;
19  
20  /*** Returns Registry resources for a service type that indicates that this
21   * service can provide cone searches
22   */
23  public class ConeResources extends VoResourceSupport implements VoResourcePlugin {
24     
25     /***
26      * Returns ServiceType for cone search
27      */
28     public String getVoResource() throws IOException {
29  
30        String cone =
31           makeVoResourceElement(
32               //"ServiceType",
33               "cs:ConeSearch",
34               // Namespaces
35               "xmlns:cs='http://www.ivoa.net/xml/ConeSearch/v0.3'",
36               // Schema locations
37              "http://www.ivoa.net/xml/ConeSearch/v0.3 http://www.ivoa.net/xml/ConeSearch/v0.3" 
38          )+
39           makeCore("cone")+
40        
41          //"<Subject>Stars</Subject>"+ //etc
42          //"<ContentLevel>Research</ContentLevel>"+ //etc
43           "<vr:interface qtype=\"GET\" xmlns:vs=\"http://www.ivoa.net/xml/VODataService/v0.5\" xsi:schemaLocation=\"http://www.ivoa.net/xml/VODataService/v0.5 http://software.astrogrid.org/schema/vo-resource-types/VODataService/v0.5/VODataService.xsd\" xsi:type=\"vs:ParamHTTP\">\n"+
44           "  <vr:accessURL use=\"base\">"+ServletHelper.getUrlStem()+"SubmitCone?</vr:accessURL>\n"+
45           "  <vs:resultType/>\n"+
46           "</vr:interface>\n"+
47           "<cs:capability>\n" +
48           "  <cs:maxSR>180</cs:maxSR>\n"+ //to do
49           "  <cs:maxRecords>"+ConfigFactory.getCommonConfig().getString(Query.MAX_RETURN_KEY,"0")+"</cs:maxRecords>\n"+
50           "  <cs:verbosity>false</cs:verbosity>\n"+ //no idea
51           "</cs:capability>\n"+
52  
53           "</"+VORESOURCE_ELEMENT+">\n";
54        
55        return cone;
56     }
57     
58     
59  }
60  
61  
62  /*
63   $Log: ConeResources.java,v $
64   Revision 1.11  2006/10/17 10:11:41  clq2
65   PAL_KEA_1869
66  
67   Revision 1.10.8.1  2006/10/12 16:40:15  kea
68   Tweaks while fixing registration issues (see bugzilla ticket 1920)
69  
70   Revision 1.10  2006/06/30 06:33:42  clq2
71   dave's fix for cone search
72  
73   Revision 1.9.18.1  2006/06/29 22:35:22  dave
74   Fixed missing element in registration document, and typo in install instructions
75  
76   Revision 1.9  2006/02/09 09:54:09  clq2
77   KEA_1521_pal
78  
79   Revision 1.8.50.1  2006/02/06 11:02:47  kea
80   Reinstated conesearch registration, added schemaLocations to
81   registrations and generally tidied.
82  
83   Revision 1.8  2005/06/09 08:53:58  clq2
84   200506081212
85  
86   Revision 1.7.22.1  2005/06/09 01:31:57  dave
87   Fixed bugs in the metedata generator(s).
88   Note - updated Date patch may not work in other timezones.
89   Note - <resource> element may not be the right one.
90  
91   Revision 1.7  2005/03/24 17:50:48  mch
92   Fixed various resource bits
93  
94   Revision 1.6  2005/03/23 17:54:15  mch
95   removed rbmsresours
96  
97   Revision 1.5  2005/03/21 18:45:55  mch
98   Naughty big lump of changes
99  
100  Revision 1.4  2005/03/10 22:39:17  mch
101  Fixed tests more metadata fixes
102 
103  Revision 1.3  2005/03/10 15:13:49  mch
104  Seperating out fits, table and xdb servers
105 
106  Revision 1.2  2005/03/10 13:49:53  mch
107  Updating metadata
108 
109  Revision 1.1  2005/03/08 18:05:57  mch
110  updating resources to v0.10
111 
112 
113  
114  */