jpl.mipl.mdms.FileService.komodo.ui.savannah
Interface SavannahTableElement

All Known Implementing Classes:
SavannahFeiTableElement, SavannahFileTableElement

public interface SavannahTableElement

Purpose: Interface for elements of the SavannahTableModel.

   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: SavannahTableElement.java,v 1.2 2004/12/15 03:47:41 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Field Summary
static long DATE_UNKNOWN
           
static long SIZE_UNKNOWN
           
static int TYPE_FILE
           
static int TYPE_FOLDER
           
 
Method Summary
 boolean equals(Object obj)
          Returns true if this object is equal to the other object.
 long getModificationDate()
          Returns the last modificiation date of entry, or -1 if not defined.
 String getName()
          Returns the element file name.
 String getParent()
          Returns string representation of parent, either a directory, or filetype path.
 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.
 String toString()
          Returns the associated identification of element, depending on what the implementation selects as most meaningful.
 

Field Detail

TYPE_FILE

static final int TYPE_FILE
See Also:
Constant Field Values

TYPE_FOLDER

static final int TYPE_FOLDER
See Also:
Constant Field Values

SIZE_UNKNOWN

static final long SIZE_UNKNOWN
See Also:
Constant Field Values

DATE_UNKNOWN

static final long DATE_UNKNOWN
See Also:
Constant Field Values
Method Detail

toString

String toString()
Returns the associated identification of element, depending on what the implementation selects as most meaningful. For example, local file system entries might returns the fullpath while FEI entries may return merely the filename.

Overrides:
toString in class Object
Returns:
String representing element

equals

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

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

hashCode

int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
Hash value for this object

getType

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

Returns:
Type of file

getSize

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

Returns:
File size or SIZE_UNKNOWN.

getName

String getName()
Returns the element file name.

Returns:
name of element file.

getPath

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.

Returns:
Full path to entry

getModificationDate

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

Returns:
Modification date or -1 is not defined.

isParent

boolean isParent()
Returns true if element is considered a parent node in the file heirarchy, false otherwise.

Returns:
True if element is parent, false otherwise.

getParent

String getParent()
Returns string representation of parent, either a directory, or filetype path.

Returns:
Parent path