uk.ac.kcl.cch.jb.pliny.views.utils
Class PlinyTxtImporter

java.lang.Object
  extended byuk.ac.kcl.cch.jb.pliny.views.utils.PlinyTxtImporter
All Implemented Interfaces:
IPlinyImporter

public class PlinyTxtImporter
extends Object
implements IPlinyImporter

the importer to take a plain text file delineated into notes and create a set of Pliny NoteLucened objects from them.

Author:
John Bradley

Constructor Summary
PlinyTxtImporter(String fileName)
           
 
Method Summary
 String getFileName()
           
 boolean getOptions(org.eclipse.swt.widgets.Shell parentShell)
          the importer will call this method when it is time to get options from the user that will control this importer.
 void run(org.eclipse.core.runtime.IProgressMonitor monitor)
          the exportAction will call this method when it is time to do the import.
 void setFileName(String fileName)
          the export Action will call this method to provide a String containing the fully qualified fileName that is to be used for the import.
 void setNoteStartID(String string)
           
 void setReceivingFavourite(Resource resource)
           
 void setReferentStartID(String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlinyTxtImporter

public PlinyTxtImporter(String fileName)
Method Detail

getFileName

public String getFileName()

setReceivingFavourite

public void setReceivingFavourite(Resource resource)

setNoteStartID

public void setNoteStartID(String string)

setReferentStartID

public void setReferentStartID(String string)

run

public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
         throws PlinyImportException
Description copied from interface: IPlinyImporter
the exportAction will call this method when it is time to do the import.

Specified by:
run in interface IPlinyImporter
Parameters:
monitor - monitor to be used during the import
Throws:
PlinyImportException - all internally arising exceptions should be converted to this exception

setFileName

public void setFileName(String fileName)
Description copied from interface: IPlinyImporter
the export Action will call this method to provide a String containing the fully qualified fileName that is to be used for the import.

Specified by:
setFileName in interface IPlinyImporter
Parameters:
fileName -

getOptions

public boolean getOptions(org.eclipse.swt.widgets.Shell parentShell)
Description copied from interface: IPlinyImporter
the importer will call this method when it is time to get options from the user that will control this importer. The return value is true if the user has confirmed that the import is to go ahead. Simply return true and do nothing else if there are no options to be provided. If there are options, this code should invoke a wizard to get them from the user.

Specified by:
getOptions in interface IPlinyImporter
Parameters:
parentShell - Shell to be used to support display of a wizard for options.
Returns:
true if user wants to proceed to actual import