net.aerith.misao.io
Interface FileSystem

All Known Implementing Classes:
DiskFileSystem, MemoryFileSystem

public interface FileSystem

The FileSystem is an interface of a file system. It is a directory on the real file system on the disk drive, or a virtual file system on memory.


Method Summary
 Folder createHierarchicalFolder(java.util.Vector folder_list)
          Creates the folder hierarchy and returns the folder.
 void discard()
          Discards the file system.
 Folder getFolder(java.lang.String name)
          Gets the top folder.
 Folder getHierarchicalFolder(java.util.Vector folder_list)
          Gets the folder represented by the specified hierarchy.
 PrimitiveManager getPrimitiveManager(Folder folder, XmlDBHolder holder_class, XmlDBRecord record_class)
          Gets the new PrimitiveManager of the specified folder.
 

Method Detail

getFolder

public Folder getFolder(java.lang.String name)
Gets the top folder.
Parameters:
name - the folder name.
Returns:
the folder.

getHierarchicalFolder

public Folder getHierarchicalFolder(java.util.Vector folder_list)
Gets the folder represented by the specified hierarchy.
Parameters:
folder_list - the list of hierarchical folders.
Returns:
the terminal folder.

createHierarchicalFolder

public Folder createHierarchicalFolder(java.util.Vector folder_list)
                                throws java.io.IOException
Creates the folder hierarchy and returns the folder.
Parameters:
folder_list - the list of hierarchical folders.
Returns:
the terminal folder.
Throws:
java.io.IOException - if I/O error occurs.

getPrimitiveManager

public PrimitiveManager getPrimitiveManager(Folder folder,
                                            XmlDBHolder holder_class,
                                            XmlDBRecord record_class)
                                     throws java.io.IOException
Gets the new PrimitiveManager of the specified folder.
Parameters:
folder - the folder.
holder_class - the holder class object of the XML records.
record_class - the class object of the XML records.
Throws:
java.io.IOException - if I/O error occurs.

discard

public void discard()
             throws java.io.IOException
Discards the file system. All files and directories in the file system removed.
Throws:
java.io.IOException - if I/O error occurs.