edu.sdsc.grid.io
Class GeneralFileSystem

java.lang.Object
  extended by edu.sdsc.grid.io.GeneralFileSystem
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LocalFileSystem, RemoteFileSystem

public abstract class GeneralFileSystem
extends java.lang.Object
implements java.lang.Cloneable

The GeneralFileSystem class is the common superclass for connection implementations to any file system. It provides the framework to support specific file system semantics. Specifically, the functions needed to interact with a file system are provided abstractly by GeneralFileSystem and concretely by its subclass(es).


Field Summary
protected  GeneralAccount account
          The account info for connecting to the server.
protected static int DEBUG
          A positive debug value turns on debugging.
static int DEFAULT_RECORDS_WANTED
          Default number of records returned by a query
static java.lang.String PATH_SEPARATOR
          Standard path separator character represented as a string for convenience.
protected static java.lang.String[] roots
          Store the abstract pathnames for the root directories of this file system.
 
Constructor Summary
GeneralFileSystem()
           
 
Method Summary
 java.lang.Object clone()
           
abstract  boolean equals(java.lang.Object obj)
          Tests this filesystem object for equality with the given object.
protected  void finalize()
          Finalizes the object by explicitly letting go of each of its internally held values.
 GeneralAccount getAccount()
          Returns a copy of the account object used by this GeneralFileSystem.
 java.lang.String getHomeDirectory()
          Returns the homeDirectory used by this account on GeneralFileSystem.
abstract  java.lang.String[] getRootDirectories()
          Returns the rootDirectory used by this file system.
abstract  MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects)
           
abstract  MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects, int numberOfRecordsWanted)
           
protected abstract  void setAccount(GeneralAccount account)
          Sets the account object, the info used to connect to the file system.
 java.lang.String toString()
          Returns a string representation of this file system object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PATH_SEPARATOR

public static java.lang.String PATH_SEPARATOR
Standard path separator character represented as a string for convenience. This string contains a single character, namely GeneralFile.PATH_SEPARATOR_CHAR.


roots

protected static java.lang.String[] roots
Store the abstract pathnames for the root directories of this file system.


DEFAULT_RECORDS_WANTED

public static final int DEFAULT_RECORDS_WANTED
Default number of records returned by a query

See Also:
Constant Field Values

DEBUG

protected static int DEBUG
A positive debug value turns on debugging. Higher values turn on more, maybe.


account

protected GeneralAccount account
The account info for connecting to the server.

Constructor Detail

GeneralFileSystem

public GeneralFileSystem()
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Finalizes the object by explicitly letting go of each of its internally held values.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

setAccount

protected abstract void setAccount(GeneralAccount account)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException
Sets the account object, the info used to connect to the file system.

Throws:
java.io.FileNotFoundException
java.io.IOException

getAccount

public GeneralAccount getAccount()
                          throws java.lang.NullPointerException
Returns a copy of the account object used by this GeneralFileSystem.

Throws:
java.lang.NullPointerException

getHomeDirectory

public java.lang.String getHomeDirectory()
Returns the homeDirectory used by this account on GeneralFileSystem.


getRootDirectories

public abstract java.lang.String[] getRootDirectories()
Returns the rootDirectory used by this file system.


query

public abstract MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                           MetaDataSelect[] selects)
                                    throws java.io.IOException
Throws:
java.io.IOException

query

public abstract MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                           MetaDataSelect[] selects,
                                           int numberOfRecordsWanted)
                                    throws java.io.IOException
Throws:
java.io.IOException

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object
Returns:
a copy of this account object.

equals

public abstract boolean equals(java.lang.Object obj)
Tests this filesystem object for equality with the given object. Returns true if and only if the argument is not null and both are filesystem objects connected to the same filesystem using the same account information.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to be compared with this abstract pathname
Returns:
true if and only if the objects are the same; false otherwise

toString

public java.lang.String toString()
Returns a string representation of this file system object.

Overrides:
toString in class java.lang.Object