public class LocalInstallationAgent extends Object
LocalInstallationAgent allows localizing files of UIMA compliant components
 within the single PEAR structure, and verifying localized component's files using UIMA framework
 API.
 
 
 java -Xmx512M -DUIMA_HOME=%UIMA_HOME% 
 org.apache.uima.pear.tools.LocalInstallationAgent  
 main_component_root_directory
 main_component_root_directory is the path to the root directory of the
 main component (root directory of the single PEAR structure);UIMA_HOME variable, using the
 setUimaHomePath() method, immediately after creating a new instance of the
 LocalInstallationAgent class. localizeComponent()
 method. verifyLocalizedComponent()
 method. metadata/PEAR.properties file for the
 component localization information. conf and desc directories, adding the extension ".$" to each
 backup file. If the application fails, please make sure all original files in both the
 directories are restored from appropriate "*.$" backup copies.| Modifier and Type | Field and Description | 
|---|---|
| protected static String | BACKUP_FILE_SUFFIX | 
| protected static String | COMP_ROOT_PREFIX | 
| protected static String | COMP_ROOT_SUFFIX | 
| protected static String | MAIN_ROOT | 
| Constructor and Description | 
|---|
| LocalInstallationAgent(String mainComponentRootPath)Constructs new instance of the  LocalInstallationAgentclass, using a given main
 component root directory. | 
| Modifier and Type | Method and Description | 
|---|---|
| static boolean | checkPackageConfig(Properties packageConfig,
                  InstallationDescriptor insdObject)Checks that a specified PEAR configuration corresponds to a given installation descriptor. | 
| boolean | localizeComponent()Performs localization of the component files in the 'conf' and 'desc' subdirectories of the
 specified main root directory, as well as localization of the installation descriptor. | 
| static void | localizeComponentFile(File file,
                     InstallationDescriptor insdObject,
                     Properties packageConfig)Performs localization of a given component file using information from a given installation
 descriptor and a specified PEAR configuration. | 
| protected File[] | localizeComponentFiles()Performs localization of the component files in the 'conf' and 'desc' directories by replacing
 $main_root and $component_id$root macros with the actual path values from the PEAR
 configuration file. | 
| static void | localizeInstallationDescriptor(InstallationDescriptor insdObject,
                              Properties packageConfig)Performs localization of a given installation descriptor object using information from a
 specified PEAR configuration. | 
| static void | main(String[] args)Starts the application. | 
| void | setUimaHomePath(String uimaHomePath)Sets a given UIMA local home directory path. | 
| boolean | undoComponentLocalization()Restores original files in the 'conf' and 'desc' directories from the back-up copies (with
 extension '.$'). | 
| boolean | verifyLocalizedComponent()Performs verification of the localized component by running the  InstallationTesterapplication. | 
protected static final String BACKUP_FILE_SUFFIX
protected static final String MAIN_ROOT
protected static final String COMP_ROOT_PREFIX
protected static final String COMP_ROOT_SUFFIX
public LocalInstallationAgent(String mainComponentRootPath)
LocalInstallationAgent class, using a given main
 component root directory.mainComponentRootPath - The given main component root directory path.public static boolean checkPackageConfig(Properties packageConfig, InstallationDescriptor insdObject)
packageConfig - The specified PEAR configuration (Properties object).insdObject - The given installation descriptor object.true if the specified PEAR configuration corresponds to the given
         installation descriptor, false otherwise.public static void localizeComponentFile(File file, InstallationDescriptor insdObject, Properties packageConfig) throws IOException
file - The given component file to be localized.insdObject - The given installation descriptor object.packageConfig - The specified PEAR configuration.IOException - if any I/O exception occurred.public static void localizeInstallationDescriptor(InstallationDescriptor insdObject, Properties packageConfig)
insdObject - installation descriptor objectpackageConfig - pear configuration propertiespublic static void main(String[] args)
args - main_component_root_dirpublic boolean localizeComponent()
                          throws IOException
true if the localization process completed successfully,
         false otherwise.IOException - if any I/O exception occurred.protected File[] localizeComponentFiles() throws IOException
IOException - if any I/O exception occurred.public boolean undoComponentLocalization()
                                  throws IOException
true if the operation completed successfully, false
         otherwise.IOException - if any I/O exception occurred.public boolean verifyLocalizedComponent()
                                 throws IOException,
                                        ResourceInitializationException,
                                        UIMAException
InstallationTester
 application.true if the verification completed successfully, false
         otherwise.IOException - if any I/O exception occurred.ResourceInitializationException - if the specified component cannot be instantiated.UIMAException - if this exception occurred while identifying UIMA component category.InstallationTesterpublic void setUimaHomePath(String uimaHomePath)
uimaHomePath - The given UIMA local home directory path.Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.