|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.GeneralFileSystem
edu.sdsc.grid.io.local.LocalFileSystem
public class LocalFileSystem
The LocalFileSystem class is the class for connection implementations to the local file systems. It was added to the GeneralFileSystem tree to provide compatibility and support for remote metadata queries. Unfortuanely, local filesystems cannot actually be queried.
| Field Summary |
|---|
| Fields inherited from class edu.sdsc.grid.io.GeneralFileSystem |
|---|
account, DEBUG, PATH_SEPARATOR, roots |
| Constructor Summary | |
|---|---|
LocalFileSystem()
Opens a socket connection to read from and write to. |
|
LocalFileSystem(LocalAccount localAccount)
Opens a socket connection to read from and write to. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this filesystem object for equality with the given object. |
java.lang.String[] |
getRootDirectories()
Returns the root directories of the local file system. |
MetaDataRecordList[] |
query(MetaDataCondition[] conditions,
MetaDataSelect[] selects)
Queries the file system to find all files that match a set of conditions. |
MetaDataRecordList[] |
query(MetaDataCondition[] conditions,
MetaDataSelect[] selects,
int recordsWanted)
Queries the file system to find all files that match a set of conditions. |
protected void |
setAccount(GeneralAccount account)
Sets the account object. |
| Methods inherited from class edu.sdsc.grid.io.GeneralFileSystem |
|---|
clone, finalize, getAccount, getHomeDirectory, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocalFileSystem()
This constructor is provided for convenience however, it is recommended that all necessary data be sent to the constructor and not left to the defaults.
java.io.FileNotFoundException - if the user data file cannot be found.
java.io.IOException - if an IOException occurs.public LocalFileSystem(LocalAccount localAccount)
This constructor is provided for convenience however, it is recommended that all necessary data be sent to the constructor and not left to the defaults.
localAccount - the Local account information object.
java.io.FileNotFoundException - if the user data file cannot be found.
java.io.IOException - if an IOException occurs.| Method Detail |
|---|
protected void setAccount(GeneralAccount account)
account object.
setAccount in class GeneralFileSystempublic java.lang.String[] getRootDirectories()
getRootDirectories in class GeneralFileSystem
public MetaDataRecordList[] query(MetaDataCondition[] conditions,
MetaDataSelect[] selects)
throws java.io.IOException
query in class GeneralFileSystemjava.io.IOException
public MetaDataRecordList[] query(MetaDataCondition[] conditions,
MetaDataSelect[] selects,
int recordsWanted)
throws java.io.IOException
While condition and select array objects have all been checked for self-consistency during their construction, there are additional problems that must be detected at query time:
For instance, it is possible to build a condition object appropriate for the Local system, then pass that object in a local file system query. That will find that the condition is incompatible and generate a mismatch exception.
Query is implemented by the file-system-specific classes, like that for the SRB, FTP, etc. Those classes must re-map condition and select field names and operator codes to those required by a particular file system and protocol version. Once re-mapped, they issue the query and get results. The results are then mapped back to the standard public field names of the MetaDataGroups. So, if a MetaDataGroup uses a name like "file path", but the SRB calls it "data name", then query maps first from "file path" to "data name" before issuing the query, and then from "data name" back to "file path" within the results. The programmer using this API should never see the internal field names.
query in class GeneralFileSystemconditionArray - The conditional statements that describe
the values to query the system, like WHERE in SQL.selectArray - The attributes to be returned from those values that
met the conditions, like SELECT in SQL.
java.io.IOExceptionpublic boolean equals(java.lang.Object obj)
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.
equals in class GeneralFileSystemobj - The object to be compared with this abstract pathname
true if and only if the objects are the same;
false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||