jpl.mipl.mdms.FileService.komodo.ui.savannah
Class SavannahFeiTableElement

java.lang.Object
  extended by jpl.mipl.mdms.FileService.komodo.ui.savannah.SavannahFeiTableElement
All Implemented Interfaces:
SavannahTableElement

public class SavannahFeiTableElement
extends java.lang.Object
implements SavannahTableElement

Purpose: Implementation of SavannahTableElement for FEI file system.

   Copyright 2004, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2004.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 09/08/2004        Nick             Initial Release
 ============================================================================
 

Version:
$Id: SavannahFeiTableElement.java,v 1.2 2004/12/15 03:47:38 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Field Summary
protected  java.lang.String _comment
           
protected  java.lang.String _feiType
           
protected  long _fileModified
           
protected  java.lang.String _filename
           
protected  java.lang.String _filepath
           
protected  long _filesize
           
protected  int _filetype
           
protected  boolean _isParent
           
protected  java.lang.String _parent
           
protected  java.lang.String _serverGroup
           
 
Fields inherited from interface jpl.mipl.mdms.FileService.komodo.ui.savannah.SavannahTableElement
DATE_UNKNOWN, SIZE_UNKNOWN, TYPE_FILE, TYPE_FOLDER
 
Constructor Summary
SavannahFeiTableElement(java.lang.String group, java.lang.String feiType, java.lang.String filename, long filesize, long modDate, java.lang.String comment, boolean isParent)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object is equal to the other object.
 java.lang.String getComment()
          Returns the comment string associated with this element.
 java.lang.String getFeiGroup()
          Returns the server group name
 java.lang.String getFeiType()
          Returns the Fei filetype name
 long getModificationDate()
          Returns the last modificiation date of entry, or -1 if not defined.
 java.lang.String getName()
          Returns the element file name.
 java.lang.String getParent()
          Returns string representation of filetype if file or server group if filetype folder.
 java.lang.String getPath()
          Returns the absolute path of the file.
 long getSize()
          Returns the filesize if known of SIZE_UNKNOWN if size is not assigned a known value.
 int getType()
          Returns the type of file to differentiate between a normal file and a folder, one of TYPE_FILE or TYPE_FOLDER.
 int hashCode()
          Returns a hash code value for the object.
 boolean isParent()
          Returns true if element is considered a parent node in the file heirarchy, false otherwise.
 java.lang.String toString()
          Returns the filename of the element which is either the FEI type or the filename itself depending on type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_serverGroup

protected java.lang.String _serverGroup

_feiType

protected java.lang.String _feiType

_filename

protected java.lang.String _filename

_parent

protected java.lang.String _parent

_filepath

protected java.lang.String _filepath

_filesize

protected long _filesize

_fileModified

protected long _fileModified

_filetype

protected int _filetype

_comment

protected java.lang.String _comment

_isParent

protected boolean _isParent
Constructor Detail

SavannahFeiTableElement

public SavannahFeiTableElement(java.lang.String group,
                               java.lang.String feiType,
                               java.lang.String filename,
                               long filesize,
                               long modDate,
                               java.lang.String comment,
                               boolean isParent)
Method Detail

toString

public java.lang.String toString()
Returns the filename of the element which is either the FEI type or the filename itself depending on type.

Specified by:
toString in interface SavannahTableElement
Overrides:
toString in class java.lang.Object
Returns:
String representing element

getType

public int getType()
Returns the type of file to differentiate between a normal file and a folder, one of TYPE_FILE or TYPE_FOLDER.

Specified by:
getType in interface SavannahTableElement
Returns:
Type of file

getSize

public long getSize()
Returns the filesize if known of SIZE_UNKNOWN if size is not assigned a known value.

Specified by:
getSize in interface SavannahTableElement
Returns:
File size or SIZE_UNKNOWN.

getName

public java.lang.String getName()
Returns the element file name.

Specified by:
getName in interface SavannahTableElement
Returns:
name of element file.

getPath

public java.lang.String getPath()
Returns the absolute path of the file. For local file system, this is the same as File.getAbsolutePath(), for FEI, this might be /filetype or /filetype/filename.

Specified by:
getPath in interface SavannahTableElement
Returns:
Full path to entry

getModificationDate

public long getModificationDate()
Returns the last modificiation date of entry, or -1 if not defined.

Specified by:
getModificationDate in interface SavannahTableElement
Returns:
Modification date or -1 is not defined.

getComment

public java.lang.String getComment()
Returns the comment string associated with this element.

Returns:
comment string or null if none

isParent

public boolean isParent()
Description copied from interface: SavannahTableElement
Returns true if element is considered a parent node in the file heirarchy, false otherwise.

Specified by:
isParent in interface SavannahTableElement
Returns:
True if element is parent, false otherwise.

equals

public boolean equals(java.lang.Object obj)
Returns true if this object is equal to the other object.

Specified by:
equals in interface SavannahTableElement
Overrides:
equals in class java.lang.Object
Parameters:
obj - The object with which this is compared.
Returns:
True if this is equal to obj, false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object. Currently filepath and filetype are used as part of the hash value calculation.

Specified by:
hashCode in interface SavannahTableElement
Overrides:
hashCode in class java.lang.Object
Returns:
Hash value for this object

getFeiType

public java.lang.String getFeiType()
Returns the Fei filetype name

Returns:
String of filetype

getFeiGroup

public java.lang.String getFeiGroup()
Returns the server group name

Returns:
String of server group

getParent

public java.lang.String getParent()
Returns string representation of filetype if file or server group if filetype folder.

Specified by:
getParent in interface SavannahTableElement
Returns:
Parent path