View Javadoc

1   /*
2    * $Id: VoTableFitsWriter.java,v 1.2 2005/03/30 21:51:25 mch Exp $
3    *
4    * (C) Copyright Astrogrid...
5    */
6   
7   package org.astrogrid.tableserver.out;
8   
9   import java.io.IOException;
10  import java.security.Principal;
11  import org.astrogrid.slinger.targets.TargetIdentifier;
12  import org.astrogrid.tableserver.metadata.ColumnInfo;
13  
14  /***
15   * For writing out fits wrapped in votable
16   *
17   * @author M Hill
18   */
19  
20  public class VoTableFitsWriter extends VoTableWriter {
21     
22     
23     /***
24      * Construct this wrapping the given stream.  Writes out the first few tags
25      */
26     public VoTableFitsWriter(TargetIdentifier target, String title, Principal user) throws IOException {
27        super(target, title, user);
28        
29     }
30     
31     /*** Start body - writes out header and preps col array */
32     public void startTable(ColumnInfo[] cols) throws IOException {
33     }
34     
35     /*** Actually writes out a table.  Assumes only 1 element in given colValues,
36      * that element being the fits url */
37     public void writeRow(Object[] colValues) throws IOException {
38        
39        printOut.println("<TABLE>");
40        printOut.println("<DATA><FITS>");
41        
42        printOut.println("   <STREAM>"+colValues[0]+"</STREAM>");
43        
44        printOut.println("</FITS></DATA>");
45        printOut.println("</TABLE>");
46        
47     }
48     
49     public void endTable() {
50        
51     }
52     
53     
54  }
55  
56  /*
57   $Log: VoTableFitsWriter.java,v $
58   Revision 1.2  2005/03/30 21:51:25  mch
59   Fix to return Votable fits list for url list
60  
61   Revision 1.1  2005/03/21 18:45:55  mch
62   Naughty big lump of changes
63  
64   Revision 1.3  2005/03/10 15:13:48  mch
65   Seperating out fits, table and xdb servers
66  
67   Revision 1.2  2005/03/10 13:49:52  mch
68   Updating metadata
69  
70   Revision 1.1.1.1  2005/02/17 18:37:34  mch
71   Initial checkin
72  
73   Revision 1.1.1.1  2005/02/16 17:11:24  mch
74   Initial checkin
75  
76   Revision 1.1.2.3  2005/01/13 18:57:31  mch
77   Fixes to metadata mostly
78  
79   Revision 1.1.2.2  2004/12/08 18:36:40  mch
80   Added Vizier, rationalised SqlWriters etc, separated out TableResults from QueryResults
81  
82   Revision 1.1.2.1  2004/11/30 01:26:42  mch
83   added tablewriters
84  
85  
86  
87   */
88  
89  
90