View Javadoc

1   /*$Id: ConeResources.java,v 1.7 2005/03/24 17:50:48 mch 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("ServiceType", "")+
32           makeCore("cone")+
33        
34          //"<Subject>Stars</Subject>"+ //etc
35          //"<ContentLevel>Research</ContentLevel>"+ //etc
36           "<Capability xmlns:q1='http://www.ivoa.net/xml/ConeSearch/v0.2' xsi:type='q1:ConeSearchType'>"+
37           "  <q1:MaxSR>180</q1:MaxSR>"+ //to do
38           "  <q1:MaxRecords>"+ConfigFactory.getCommonConfig().getString(Query.MAX_RETURN_KEY,"0")+"</q1:MaxRecords>"+
39           "  <q1:Verbosity>false</q1:Verbosity>"+ //no idea
40           "</Capability>"+
41           "<Interface>"+
42           "  <Invocation>Custom</Invocation>"+
43           "  <AccessURL>"+ServletHelper.getUrlStem()+"cone/SubmitCone?</AccessURL>"+
44           "</Interface>"+
45           "</"+VORESOURCE_ELEMENT+">";
46        
47        return cone;
48     }
49     
50     
51  }
52  
53  
54  /*
55   $Log: ConeResources.java,v $
56   Revision 1.7  2005/03/24 17:50:48  mch
57   Fixed various resource bits
58  
59   Revision 1.6  2005/03/23 17:54:15  mch
60   removed rbmsresours
61  
62   Revision 1.5  2005/03/21 18:45:55  mch
63   Naughty big lump of changes
64  
65   Revision 1.4  2005/03/10 22:39:17  mch
66   Fixed tests more metadata fixes
67  
68   Revision 1.3  2005/03/10 15:13:49  mch
69   Seperating out fits, table and xdb servers
70  
71   Revision 1.2  2005/03/10 13:49:53  mch
72   Updating metadata
73  
74   Revision 1.1  2005/03/08 18:05:57  mch
75   updating resources to v0.10
76  
77  
78   
79   */