View Javadoc

1   /*
2    * $Id: ILibraryEntryDescriptor.java,v 1.7 2005/05/31 16:04:12 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8    
9   package com.bbn.swede.core.libraries;
10  
11  import java.io.InputStream;
12  
13  import com.bbn.swede.core.dom.IOWLAbstractSyntaxTree;
14  
15  /***
16   * Classes which implement this interface represent the main way used
17   * to interface with ILibraryEntry objects.
18   * 
19   * @author aperezlo
20   */
21  public interface ILibraryEntryDescriptor
22  {
23     /***
24      * Attempts to release all system resources associated with the 
25      * ILibraryEntry.
26      * 
27      * @return true if the operation was successful, false otherwise
28      */
29     boolean close();
30  
31     /***
32      * Retrieves the <code>IConfiguration</code> of this library entry.
33      * @return the configuration object associated with this entry descriptor
34      */
35     IConfiguration getConfiguration();
36     /***
37      * Retrieves the <code>ILibraryEntry</code> associated with this descriptor.
38      * @return the library entry
39      */
40     ILibraryEntry getEntry();
41     /***
42      * Indicates whether the library entry represented by this object has an
43      * OWL abstract syntax tree associated with it.
44      * @return <code>true</code> if this object's <code>ILibraryEntry</code> has 
45      *         an OAST associated with it, <code>false</code> otherwise
46      */
47     boolean hasOAST();
48     
49     /***
50      * Returns an {@link InputStream} to the file associated with this Entry.
51      * <br />
52      * <br />
53      * Note: it can not be assumed that the input stream returned will 
54      * be a {@link java.io.FileInputStream}, in spite of the name of this method 
55      * 
56      * @return a {@link InputStream} to the file associated with this Entry
57      */
58     InputStream getFileInputStream();
59  
60     /***
61      * Retrieves the OWL abstract syntax tree associated with this entry.
62      * @return the {@link IOWLAbstractSyntaxTree} associated with this Entry, 
63      *         or <code>null</code> if one does not exist
64      */
65     IOWLAbstractSyntaxTree getOAST();
66  }