
/**
 * DataSnoopSearchList.java
 * used to store datasnoop search objects
 *
 * Created: May 25, 2004
 *
 * @author Nathan Stevens
 * @version 0.1 1/16/05
 */
import java.util.*;
import java.io.File;

public class DataSnoopSearchList extends Vector {
  private File file;
  private String type;
  private String date;
  private String notes;
  private boolean shown = true; // see whether this should be displayed
  
  public DataSnoopSearchList(File file) {
    super(50, 10);
    
    this.file = file;
  }
  
  // Method to set the information
  public void setInformation(String type, String date, String notes) {
    this.type = type;
    this.date = date;
    this.notes = notes;
  }
  
  // Method to get the name of the sdl file
  public File getFile() {
    return file;
  }
  
  // Method to get type
  public String getType() {
    return type;
  }
  
  // Method to get date
  public String getDate() {
    return date;
  }
  
  // Method to get date
  public String getNotes() {
    return notes;
  }
  
  // Method to see whether to display this object or not
  public boolean isShown() {
    return shown;
  }
  
  // Method to set whether to display this object
  public void setShown(boolean b) {
    shown = b;
  }
  
  // The toString method
  public String toString() {
    String fn = file.getName();
    int end = fn.lastIndexOf('.');
    String name = fn.substring(0, end);
    
    return name;
  }
}//--DataSnoopSearchList
