org.terrier.applications.desktop.filehandling
Class AssociationFileOpener

java.lang.Object
  extended by org.terrier.applications.desktop.filehandling.AssociationFileOpener
All Implemented Interfaces:
FileOpener

public class AssociationFileOpener
extends java.lang.Object
implements FileOpener

This class implements the interface FileOpener, using a properties file for storing the file associations.

Author:
Vassilis Plachouras

Field Summary
protected  ApplicationSelector appSelector
          The application selector dialog.
protected  java.lang.String description
          The header information describing the properties file.
protected  java.util.Properties fileAssoc
          The properties which correspond to the file associations.
protected static org.apache.log4j.Logger logger
           
protected  java.lang.String propFilename
          The name of the properties file in which the assocciations are stored.
 
Constructor Summary
AssociationFileOpener()
           
 
Method Summary
 void load()
          Loaads the file assocciations to use from a properties file.
 void open(java.lang.String filename)
          Opens the file with the given name, using either a pre-defined, or a user-defined application.
 void save()
          Saves the used file assocciations to a properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

appSelector

protected ApplicationSelector appSelector
The application selector dialog.


fileAssoc

protected java.util.Properties fileAssoc
The properties which correspond to the file associations.


description

protected final java.lang.String description
The header information describing the properties file.

See Also:
Constant Field Values

propFilename

protected final java.lang.String propFilename
The name of the properties file in which the assocciations are stored.

Constructor Detail

AssociationFileOpener

public AssociationFileOpener()
Method Detail

open

public void open(java.lang.String filename)
Opens the file with the given name, using either a pre-defined, or a user-defined application. It assumes that

Specified by:
open in interface FileOpener
Parameters:
filename - the name of the file to open.

save

public void save()
Saves the used file assocciations to a properties file.

Specified by:
save in interface FileOpener

load

public void load()
Loaads the file assocciations to use from a properties file.

Specified by:
load in interface FileOpener


Terrier 3.5. Copyright © 2004-2011 University of Glasgow