View Javadoc

1   /*$Id: SiapResources.java,v 1.4 2005/03/23 17:54:15 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.siap;
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 Simple Image Access Protocol
22   */
23  public class SiapResources extends VoResourceSupport implements VoResourcePlugin {
24     
25     /***
26      * Returns ServiceType for cone search
27      */
28     public String getVoResource() throws IOException {
29  
30        String siap =
31           makeVoResourceElement("ServiceType", "")+
32           makeCore("/siap")+
33        
34             //"<Subject>Stars</Subject>"+ //etc
35             //"<ContentLevel>Research</ContentLevel>"+ //etc
36           "<Capability xmlns:q1='http://www.ivoa.net/xml/SIA/v0.6' xsi:type='q1:SimpleImageAccessType'>"+
37              "<q1:ImageServiceType>Cutout</q1:ImageServiceType>"+
38              "<q1:MaxQueryRegionSize>"+
39                 "<q1:long>0</q1:long>"+
40                 "<q1:lat>0</q1:lat>"+
41              "</q1:MaxQueryRegionSize>"+
42              "<q1:MaxImageExtent>"+
43                 "<q1:long>0</q1:long>"+
44                 "<q1:lat>0</q1:lat>"+
45                 "</q1:MaxImageExtent>"+
46              "<q1:MaxImageSize>"+
47                 "<q1:long>0</q1:long>"+
48                 "<q1:lat>0</q1:lat>"+
49                 "</q1:MaxImageSize>"+
50              "<q1:MaxFileSize>0</q1:MaxFileSize>"+
51              "<q1:MaxRecords>"+ConfigFactory.getCommonConfig().getString(Query.MAX_RETURN_KEY,"0")+"</q1:MaxRecords>"+
52           "</Capability>"+
53           "<Interface>"+
54           "  <Invocation>Custom</Invocation>"+
55           "  <AccessURL>"+ServletHelper.getUrlStem()+"SimpleImageQuery</AccessURL>"+
56           "</Interface>"+
57           "</Resource>";
58  
59        return siap;
60     }
61     
62     
63  }
64  
65  
66  /*
67   $Log: SiapResources.java,v $
68   Revision 1.4  2005/03/23 17:54:15  mch
69   removed rbmsresours
70  
71   Revision 1.3  2005/03/21 18:45:55  mch
72   Naughty big lump of changes
73  
74   Revision 1.2  2005/03/10 15:13:49  mch
75   Seperating out fits, table and xdb servers
76  
77   Revision 1.1  2005/03/08 18:05:57  mch
78   updating resources to v0.10
79  
80   
81   */
82