org.apache.uima.pear.tools
Class InstallationTester

java.lang.Object
  extended by org.apache.uima.pear.tools.InstallationTester

public class InstallationTester
extends Object

The InstallationTester application allows performing simple verification of the installed UIMA compliant component by using standard UIMA framework interface.

See Also:
InstallationController, UIMAUtil

Constructor Summary
InstallationTester(String compDescFilePath)
          Creates new instance of the InstallationTester class, identifies a specified component using UIMA API, and invokes appropriate method to test the specified component.
 
Method Summary
static void main(String[] args)
          Starts the application.
static boolean testAnalysisEngine(File aeSpecifierFile)
          Checks if a given AE specifier file can be used to produce an istance of AE.
static boolean testCasConsumer(File ccSpecifierFile)
          Checks if a given CC specifier file can be used to produce an instance of CC.
static boolean testCasInitializer(File ciSpecifierFile)
          Checks if a given CI specifier file can be used to produce an instance of CI.
static boolean testCollectionReader(File crSpecifierFile)
          Checks if a given CR specifier file can be used to produce an instance of CR.
static boolean testCpeCongifuration(File cpeSpecifierFile)
          Checks if a given CPE specifier file can be used to produce an instance of CPE.
static boolean testTypeSystem(File tsSpecifierFile)
          Checks if a given TS specifier file can be used to create an instance of CAS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallationTester

public InstallationTester(String compDescFilePath)
                   throws IOException,
                          InvalidXMLException,
                          ResourceInitializationException,
                          UIMAException,
                          UIMARuntimeException
Creates new instance of the InstallationTester class, identifies a specified component using UIMA API, and invokes appropriate method to test the specified component.

Parameters:
compDescFilePath - The given component descriptor file path.
Throws:
IOException - if any I/O exception occurred.
InvalidXMLException - if component descriptor is invalid.
ResourceInitializationException - if the specified component cannot be instantiated.
UIMAException - if this exception occurred while identifying UIMA component category.
UIMARuntimeException - if this exception occurred while identifying UIMA component category.
Method Detail

main

public static void main(String[] args)
                 throws Exception
Starts the application. The application requires standard UIMA classpath settings as well as component specific environment settings.

Parameters:
args - component_descriptor_file
Throws:
Exception - if any exception occurred.

testAnalysisEngine

public static boolean testAnalysisEngine(File aeSpecifierFile)
                                  throws IOException,
                                         InvalidXMLException,
                                         ResourceInitializationException
Checks if a given AE specifier file can be used to produce an istance of AE. Returns true, if an AE can be instantiated and a CAS object can be created, false otherwise.

Parameters:
aeSpecifierFile - The given AE specifier file.
Returns:
true, if an AE can be instantiated and a CAS object can be created, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified AE cannot be instantiated.

testCasConsumer

public static boolean testCasConsumer(File ccSpecifierFile)
                               throws IOException,
                                      InvalidXMLException,
                                      ResourceInitializationException
Checks if a given CC specifier file can be used to produce an instance of CC. Returns true, if a CC can be instantiated, false otherwise.

Parameters:
ccSpecifierFile - The given CC specifier file.
Returns:
true, if a CC can be instantiated, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified CC cannot be instantiated.

testCasInitializer

public static boolean testCasInitializer(File ciSpecifierFile)
                                  throws IOException,
                                         InvalidXMLException,
                                         ResourceInitializationException
Checks if a given CI specifier file can be used to produce an instance of CI. Returns true, if a CI can be instantiated, false otherwise.

Parameters:
ciSpecifierFile - The given CI specifier file.
Returns:
true, if a CI can be instantiated, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified CI cannot be instantiated.

testCollectionReader

public static boolean testCollectionReader(File crSpecifierFile)
                                    throws IOException,
                                           InvalidXMLException,
                                           ResourceInitializationException
Checks if a given CR specifier file can be used to produce an instance of CR. Returns true, if a CR can be instantiated, false otherwise.

Parameters:
crSpecifierFile - The given CR specifier file.
Returns:
true, if a CR can be instantiated, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified CR cannot be instantiated.

testCpeCongifuration

public static boolean testCpeCongifuration(File cpeSpecifierFile)
                                    throws IOException,
                                           InvalidXMLException,
                                           ResourceInitializationException
Checks if a given CPE specifier file can be used to produce an instance of CPE. Returns true, if a CPE can be instantiated, false otherwise.

Parameters:
cpeSpecifierFile - The given CPE specifier file.
Returns:
true, if a CPE can be instantiated, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified CPE cannot be instantiated.

testTypeSystem

public static boolean testTypeSystem(File tsSpecifierFile)
                              throws IOException,
                                     InvalidXMLException,
                                     ResourceInitializationException
Checks if a given TS specifier file can be used to create an instance of CAS. Returns true, if a CAS can be created for a given TS, false otherwise.

Parameters:
tsSpecifierFile - The given TS specifier file.
Returns:
true, if a CAS can be created for the given TS, false otherwise.
Throws:
IOException - If an I/O exception occurred while creating XMLInputSource.
InvalidXMLException - If the XML parser failed to parse the given input file.
ResourceInitializationException - If the specified TS cannot be used to create a CAS.


Copyright © 2007 The Apache Software Foundation. All Rights Reserved.