org.semwebcentral.sweetrules.sweetcr
Class SweetCR33ScriptHelper

java.lang.Object
  extended byorg.semwebcentral.sweetrules.sweetcr.SweetCR33ScriptHelper

public final class SweetCR33ScriptHelper
extends java.lang.Object

Created on Nov 17, 2004 Helper class performing script invocation for CR3.3

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy

Field Summary
private static SweetCR33ScriptHelper scriptHelper
          The singleton object
 
Constructor Summary
private SweetCR33ScriptHelper()
          Hidden constructor
 
Method Summary
(package private) static SweetCR33ScriptHelper getInstance()
          The Accessor method for the singleton
(package private)  int invokeCR33SCLPEngineScript(java.lang.String[] args)
          Invokes the CR3.3 SCLP engine
private  int invokeCR33Script(java.lang.String[] args, java.lang.String scriptName)
          Wrapper to invoke CR3.3 through a script
(package private)  int invokeCR33TransformerScript(java.lang.String[] args)
          Wrapper to invoke CR3.3 transformer i.e. courteous compiler through a script
(package private)  int invokeCR33TranslatorScript(java.lang.String[] args)
          Invokes the CR3.3 translator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptHelper

private static SweetCR33ScriptHelper scriptHelper
The singleton object

Constructor Detail

SweetCR33ScriptHelper

private SweetCR33ScriptHelper()
Hidden constructor

Method Detail

getInstance

static SweetCR33ScriptHelper getInstance()
The Accessor method for the singleton

Returns:
The singleton object

invokeCR33TransformerScript

int invokeCR33TransformerScript(java.lang.String[] args)
                          throws SweetTranslatorException
Wrapper to invoke CR3.3 transformer i.e. courteous compiler through a script

Parameters:
args - The arguments to the script
Returns:
The exit code of script
Throws:
SweetTranslatorException - if an error occurs

invokeCR33TranslatorScript

int invokeCR33TranslatorScript(java.lang.String[] args)
                         throws SweetTranslatorException
Invokes the CR3.3 translator

Parameters:
args - The arguments to the script
Returns:
The exit code of script
Throws:
SweetTranslatorException - if an error occurs

invokeCR33SCLPEngineScript

int invokeCR33SCLPEngineScript(java.lang.String[] args)
                         throws SweetInferenceEngineException
Invokes the CR3.3 SCLP engine

Parameters:
args - THe arguments to the engine
Returns:
The exit code of the script
Throws:
SweetInferenceEngineException - if an error occurs

invokeCR33Script

private int invokeCR33Script(java.lang.String[] args,
                             java.lang.String scriptName)
                      throws SweetException
Wrapper to invoke CR3.3 through a script

Parameters:
args - The arguments to the script
scriptName - The name of the script to execute
Returns:
The exit code of script
Throws:
SweetTranslatorException - if an error occurs
SweetException