uk.ac.ed.inf.ogsaconfig.garm
Interface FileCollection

All Known Implementing Classes:
ConcreteCollection, MetaCollection

public interface FileCollection

A file collection is a view of a set of files available in some form to GARM. FileCollections are the building blocks of GARMs power: each layer of required functionality is made into a file collection.


Method Summary
 boolean add(VFile vfile)
          Adds a new file to the collection, which may or may not replace the existing file.
 FileCollection[] bases()
          Returns the list of file collections which presently have files in this collection.
 VFile[] contents()
          Returns all the files present in this collection
 VFile[] contents(FileType type)
          Returns all the files of the given type in this collection
 void destroy()
          Informs the collection of an impending shutdown, and instructs it to save all necessary state.
 boolean remove(VFile vfile)
          Removes a file from the collection.
 VFile retrieve(VFile vfile)
          Returns the file in the collection corresponding to the given file.
 FileCollection root()
          Returns the base layer of the stack of file collections of which this is top.
 

Method Detail

contents

public VFile[] contents()
Returns all the files present in this collection


contents

public VFile[] contents(FileType type)
Returns all the files of the given type in this collection


retrieve

public VFile retrieve(VFile vfile)
Returns the file in the collection corresponding to the given file. Many file collections are layered on other collections, and this can be used to determine the file in this collection corresponding to one in another collection


add

public boolean add(VFile vfile)
Adds a new file to the collection, which may or may not replace the existing file. Returns true if the operation was successful, false otherwise.


remove

public boolean remove(VFile vfile)
Removes a file from the collection. Returns true if the particular (source specific) file is no longer present in the collection


destroy

public void destroy()
Informs the collection of an impending shutdown, and instructs it to save all necessary state. This is guaranteed to be called before the collection is destroyed.


root

public FileCollection root()
Returns the base layer of the stack of file collections of which this is top. This is commonly used to identify collections from different points in the stack.


bases

public FileCollection[] bases()
Returns the list of file collections which presently have files in this collection.