Class FileCollection

java.lang.Object
  |
  +--FileCollection
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AgentFiles, DomainFiles

public abstract class FileCollection
extends Object
implements Cloneable

This class implements the basic functionality for the collections of A-Prolog files.

The only method of interest to the programmer is getFiles, which is used to retrieve a set of files from the collection.


Constructor Summary
FileCollection(int[] num, String[] nam)
          Used by the APLAgent Manager
 
Method Summary
 void add(int module, String path)
          Used by the APLAgent Manager
 void clear(int module)
          Used by the APLAgent Manager
 Object clone()
          Used by the APLAgent Manager
 boolean getAcceptAllFilterUsed(int m)
          Used by the APLAgent Manager
 String getCollectionName()
          Used by the APLAgent Manager
 FileFilter[] getFileFilters(int m)
          Used by the APLAgent Manager
 Vector getFiles(int module)
          Returns a Vector containing the list of files denoted by the specified index.
 String getFirstFile(int module)
          Used by the APLAgent Manager
 String getModuleName(int m)
          Used by the APLAgent Manager
 int getModuleNumber(int i)
          Used by the APLAgent Manager
 int getNModules()
          Used by the APLAgent Manager
 boolean getSingleFileAllowed(int m)
          Used by the APLAgent Manager
 void load(String file)
          Used by the APLAgent Manager
 void remove(int module, int index)
          Used by the APLAgent Manager
 void save(String file)
          Used by the APLAgent Manager
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCollection

public FileCollection(int[] num,
                      String[] nam)
Used by the APLAgent Manager
Method Detail

clone

public Object clone()
Used by the APLAgent Manager
Overrides:
clone in class Object

getCollectionName

public String getCollectionName()
Used by the APLAgent Manager

getNModules

public int getNModules()
Used by the APLAgent Manager

getModuleName

public String getModuleName(int m)
Used by the APLAgent Manager

getFileFilters

public FileFilter[] getFileFilters(int m)
Used by the APLAgent Manager

getAcceptAllFilterUsed

public boolean getAcceptAllFilterUsed(int m)
Used by the APLAgent Manager

getSingleFileAllowed

public boolean getSingleFileAllowed(int m)
Used by the APLAgent Manager

getModuleNumber

public int getModuleNumber(int i)
Used by the APLAgent Manager

clear

public void clear(int module)
Used by the APLAgent Manager

add

public void add(int module,
                String path)
Used by the APLAgent Manager

remove

public void remove(int module,
                   int index)
Used by the APLAgent Manager

getFiles

public Vector getFiles(int module)
Returns a Vector containing the list of files denoted by the specified index. Constants for the indexes are defined in the subclasses of this class.
Parameters:
module - the index specifying which files should be returned
Returns:
a Vector containing the files corresponding to the given index

getFirstFile

public String getFirstFile(int module)
Used by the APLAgent Manager

load

public void load(String file)
          throws IOException
Used by the APLAgent Manager

save

public void save(String file)
          throws IOException
Used by the APLAgent Manager