View Javadoc

1   package org.treetank.api;
2   
3   import java.io.File;
4   import java.io.IOException;
5   
6   import org.treetank.exception.TTIOException;
7   
8   /**
9    * 
10   * @author Andreas Rain
11   * 
12   */
13  public interface IFilelistenerReadTrx {
14  
15      /**
16       * The returned array consists of all the relative paths there are in the storage.
17       * 
18       * @return
19       */
20      public String[] getFilePaths();
21  
22      /**
23       * The returned array consists of all the relative paths there are in the storage.
24       * 
25       * @return
26       */
27      public boolean fileExists(String pRelativePath);
28      
29      /**
30       * 
31       * @return int - amount of buckets
32       */
33      public int getCount();
34  
35      /**
36       * This method allows you to get a full file using the node key of the
37       * header
38       * 
39       * @param pKey
40       * @return true if successful, false otherwise
41       */
42      public File getFullFile(String pRelativePath) throws TTIOException, IOException;
43  
44      /**
45       * Close this transaction
46       * 
47       * @throws TTIOException
48       */
49      public void close() throws TTIOException;
50  
51      /**
52       * Check whether or not this transaction has been closed
53       * 
54       * @return true if closed, false otherwise
55       */
56      public boolean isClosed();
57  }