View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/mySpace/client/src/java/org/astrogrid/store/tree/File.java,v $</cvs:source>
3    * <cvs:author>$Author: clq2 $</cvs:author>
4    * <cvs:date>$Date: 2004/11/17 16:22:53 $</cvs:date>
5    * <cvs:version>$Revision: 1.2 $</cvs:version>
6    * <cvs:log>
7    *   $Log: File.java,v $
8    *   Revision 1.2  2004/11/17 16:22:53  clq2
9    *   nww-itn07-704
10   *
11   *   Revision 1.1.2.2  2004/11/16 17:27:58  nw
12   *   tidied imports
13   *
14   *   Revision 1.1.2.1  2004/11/16 16:47:28  nw
15   *   copied aladinAdapter interfaces into a neutrally-named package.
16   *   deprecated original interfaces.
17   *   javadoc
18   *
19   *   Revision 1.3  2004/10/05 15:39:29  dave
20   *   Merged changes to AladinAdapter ...
21   *
22   *   Revision 1.2.4.1  2004/10/05 15:30:44  dave
23   *   Moved test base from test to src tree ....
24   *   Added MimeTypeUtil
25   *   Added getMimeType to the adapter API
26   *   Added logout to the adapter API
27   *
28   *   Revision 1.2  2004/09/28 10:24:19  dave
29   *   Added AladinAdapter interfaces and mock implementation.
30   *
31   *   Revision 1.1.2.4  2004/09/27 22:46:53  dave
32   *   Added AdapterFile interface, with input and output stream API.
33   *
34   *   Revision 1.1.2.1  2004/09/24 01:36:18  dave
35   *   Refactored File as Node and Container ...
36   *
37   *   Revision 1.1.2.2  2004/09/24 01:12:09  dave
38   *   Added initial test for child nodes.
39   *
40   *   Revision 1.1.2.1  2004/09/23 16:32:01  dave
41   *   Added better Exception handling ....
42   *   Added initial mock container ....
43   *   Added initial root container tests ...
44   *
45   * </cvs:log>
46   *
47   */
48  package org.astrogrid.store.tree;
49  
50  import java.io.InputStream;
51  import java.io.OutputStream;
52  
53  /***
54   * Representation of a File in an Astrogrid Store
55   *
56   */
57  public interface File
58  	extends Node
59  	{
60  
61  		/***
62  		 * Get the mime type for the file.
63  		 * @return The mime type for the file contents, or null if is not set..
64  	     * @throws TreeClientServiceException If the service is unable to handle the request.
65  		 *
66  		 */
67  		public String getMimeType() ;
68  
69  	/***
70  	 * Get an OutputStream to send data to the file.
71  	 * Openning a new stream to an existing file will over-write the file contents.
72  	 * The client MUST close the output stream to force the transfer to complete.
73       * @throws TreeClientServiceException If the service is unable to handle the request.
74  	 *
75  	 */
76  	public OutputStream getOutputStream()
77  		throws TreeClientServiceException ;
78  
79  	/***
80  	 * Get an InputStream to read data from the file.
81       * @throws TreeClientServiceException If the service is unable to handle the request.
82  	 *
83  	 */
84  	public InputStream getInputStream()
85  		throws TreeClientServiceException ;
86  
87  	}