ch.claudio.contactdb
Class GaimImporter

java.lang.Object
  extended by ch.claudio.contactdb.GaimImporter
All Implemented Interfaces:
Importer

public class GaimImporter
extends java.lang.Object
implements Importer

Import log files as generated by gaim. As this is not implemented it always returns no when asked if it can handle a file or directory.

Version:
$Id: GaimImporter.java 32 2006-07-10 23:51:07Z $
Author:
Claudio Nieder

Nested Class Summary
 
Nested classes/interfaces inherited from interface ch.claudio.contactdb.Importer
Importer.HandleStatus
 
Constructor Summary
GaimImporter(Model m)
           
 
Method Summary
 Importer.HandleStatus canHandle(java.io.File file)
          Inspects the file or directory and judges to what extent it can handle it.
 java.lang.String getName()
          Return a localized display name for this importer.
 void read(java.io.File file)
          If the argument is a file, it reads the content of the file and stores the information it can retrieve.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaimImporter

public GaimImporter(Model m)
Parameters:
m - Model into which to import the data.
Method Detail

canHandle

public Importer.HandleStatus canHandle(java.io.File file)
Description copied from interface: Importer
Inspects the file or directory and judges to what extent it can handle it.

Specified by:
canHandle in interface Importer
Parameters:
file - File or Directory to inspect
Returns:
an indication to what extent the file or directory can be handled.
See Also:
Importer.canHandle(java.io.File)

read

public void read(java.io.File file)
Description copied from interface: Importer
If the argument is a file, it reads the content of the file and stores the information it can retrieve.

If the argument is a directory, recursively inspect all files and extract as much information as possible and store it in the database.

Specified by:
read in interface Importer
Parameters:
file - or directory to handle
See Also:
ch.claudio.contactdb.Importer#read(java.io.File,Model)

getName

public java.lang.String getName()
Description copied from interface: Importer
Return a localized display name for this importer.

Specified by:
getName in interface Importer
Returns:
importer name
See Also:
Importer.getName()