com.bbn.swede.tools.translator
Class SemanticWebTranslatorWizardHelper

java.lang.Object
  extended bycom.bbn.swede.tools.translator.SemanticWebTranslatorWizardHelper

final class SemanticWebTranslatorWizardHelper
extends Object

A utility class to assist the Export and Translation wizards in selecting files and resources and translating between them.

This class is not intended to to be subclassed or used by any code except those two wizards.

Author:
aperezlo

Field Summary
(package private) static int EXPORT
           
(package private) static int TRANSLATE
           
 
Constructor Summary
(package private) SemanticWebTranslatorWizardHelper(int mode, IWorkbench wb, IStructuredSelection iss)
          Creates a new 'Helper.
 
Method Summary
(package private)  List getInputFiles()
          Retrieves the list of files to be exported/translated.
(package private)  IPath getOutputPath()
          Retrieves the path to which the files should be exported/translated.
(package private)  List getPages()
          Retrieves the pages suitable for a wizard of the appropriate type.
(package private)  IProgressMonitor getProgressMonitor()
          Retrieves the progress monitor associated with this 'Helper.
(package private)  List getTranslatorDescriptors()
          Retrieves the selected translators.
(package private)  TranslationRunner performTranslation(File inputFile, IPath outputPath, TranslatorDescriptor translatorDescriptor)
          Performs a translation for a single file.
(package private)  void setProgressMonitor(ProgressMonitorPart pmp)
          Sets the progress monitor for this 'Helper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT

static final int EXPORT
See Also:
Constant Field Values

TRANSLATE

static final int TRANSLATE
See Also:
Constant Field Values
Constructor Detail

SemanticWebTranslatorWizardHelper

SemanticWebTranslatorWizardHelper(int mode,
                                  IWorkbench wb,
                                  IStructuredSelection iss)
Creates a new 'Helper.

Parameters:
mode - EXPORT or TRANSLATE
wb - reference to the active workbench
iss - initial selection
Method Detail

getProgressMonitor

IProgressMonitor getProgressMonitor()
Retrieves the progress monitor associated with this 'Helper.

Returns:
The progress monitor

getOutputPath

IPath getOutputPath()
Retrieves the path to which the files should be exported/translated.

Returns:
The path

getInputFiles

List getInputFiles()
Retrieves the list of files to be exported/translated.

Returns:
The list of files

getTranslatorDescriptors

List getTranslatorDescriptors()
Retrieves the selected translators.

Returns:
the selected translators

getPages

List getPages()
Retrieves the pages suitable for a wizard of the appropriate type.

Returns:
the appropriate pages

setProgressMonitor

void setProgressMonitor(ProgressMonitorPart pmp)
Sets the progress monitor for this 'Helper.

Parameters:
pmp - The new progress monitor

performTranslation

TranslationRunner performTranslation(File inputFile,
                                     IPath outputPath,
                                     TranslatorDescriptor translatorDescriptor)
                               throws Exception
Performs a translation for a single file.

Parameters:
inputFile - the file to be translated
outputPath - the directory to save the translated file/resource
translatorDescriptor - the translator to perform the translation
Returns:
the object which ran the translation, so as to check for errors, etc.
Throws:
Exception - if any error is encountered


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.