1 /*
2 * <cvs:source>$Source: /devel/astrogrid/mySpace/client/src/java/org/astrogrid/store/adapter/aladin/AladinAdapterFile.java,v $</cvs:source>
3 * <cvs:author>$Author: jdt $</cvs:author>
4 * <cvs:date>$Date: 2005/01/13 11:27:39 $</cvs:date>
5 * <cvs:version>$Revision: 1.5 $</cvs:version>
6 * <cvs:log>
7 * $Log: AladinAdapterFile.java,v $
8 * Revision 1.5 2005/01/13 11:27:39 jdt
9 * Merges from myspace-nww-890
10 *
11 * Revision 1.4.8.1 2005/01/12 17:07:44 nw
12 * added getURL to interface
13 *
14 * Revision 1.4 2004/11/17 16:22:53 clq2
15 * nww-itn07-704
16 *
17 * Revision 1.3.16.2 2004/11/16 17:27:59 nw
18 * tidied imports
19 *
20 * Revision 1.3.16.1 2004/11/16 16:47:28 nw
21 * copied aladinAdapter interfaces into a neutrally-named package.
22 * deprecated original interfaces.
23 * javadoc
24 *
25 * Revision 1.3 2004/10/05 15:39:29 dave
26 * Merged changes to AladinAdapter ...
27 *
28 * Revision 1.2.4.1 2004/10/05 15:30:44 dave
29 * Moved test base from test to src tree ....
30 * Added MimeTypeUtil
31 * Added getMimeType to the adapter API
32 * Added logout to the adapter API
33 *
34 * Revision 1.2 2004/09/28 10:24:19 dave
35 * Added AladinAdapter interfaces and mock implementation.
36 *
37 * Revision 1.1.2.4 2004/09/27 22:46:53 dave
38 * Added AdapterFile interface, with input and output stream API.
39 *
40 * Revision 1.1.2.1 2004/09/24 01:36:18 dave
41 * Refactored File as Node and Container ...
42 *
43 * Revision 1.1.2.2 2004/09/24 01:12:09 dave
44 * Added initial test for child nodes.
45 *
46 * Revision 1.1.2.1 2004/09/23 16:32:01 dave
47 * Added better Exception handling ....
48 * Added initial mock container ....
49 * Added initial root container tests ...
50 *
51 * </cvs:log>
52 *
53 */
54 package org.astrogrid.store.adapter.aladin ;
55
56 import java.io.InputStream;
57 import java.io.OutputStream;
58 import java.net.URL;
59
60 /***
61 * A wrapper for the AstroGrid StoreFile to make it easier to integrate into Aladin.
62 * * @deprecated use {@link org.astrogrid.store.tree} instead
63 */
64 public interface AladinAdapterFile
65 extends AladinAdapterNode
66 {
67
68 /***
69 * Get the mime type for the file.
70 * @return The mime type for the file contents, or null if is not set..
71 * @throws AladinAdapterServiceException If the service is unable to handle the request.
72 *
73 */
74 public String getMimeType() ;
75
76 /***
77 * Get an OutputStream to send data to the file.
78 * Openning a new stream to an existing file will over-write the file contents.
79 * The client MUST close the output stream to force the transfer to complete.
80 * @throws AladinAdapterServiceException If the service is unable to handle the request.
81 *
82 */
83 public OutputStream getOutputStream()
84 throws AladinAdapterServiceException ;
85
86 /***
87 * Get an InputStream to read data from the file.
88 * @throws AladinAdapterServiceException If the service is unable to handle the request.
89 *
90 */
91 public InputStream getInputStream()
92 throws AladinAdapterServiceException ;
93
94
95
96 /*** access a URL from which the contents of this file can be read.
97 * @deprecated doubly - only possible with legacy myspace implementation.
98 * @return http / ftp url to file contents.
99 * @throws AladinAdapterServiceExcepiton
100 */
101 public URL getURL() throws AladinAdapterServiceException;
102 }