Package org.apache.uima.pear.tools

Examples of org.apache.uima.pear.tools.InstallationDescriptor


   *           if there is problem with PEAR related operations
   *
   */
  public static InstallationDescriptor getInstallationDescriptor(IContainer currentContainer)
          throws IOException, SAXException, CoreException, PearException {
    InstallationDescriptor insd = new InstallationDescriptor();
    InstallationDescriptorHandler insdh = new InstallationDescriptorHandler();
    IFile installFile = currentContainer.getFile(new Path(INSTALLATION_DESCRIPTOR_PATH));
    if (installFile.exists()) {
      insdh.parse(installFile.getContents());
      insd = insdh.getInstallationDescriptor();
View Full Code Here


    Assert.assertTrue(done);
    Assert.assertTrue(outPearFile.isFile());
    // install the output PEAR file and check the results
    InstallationController insController = new InstallationController(OUT_PEAR_ID, outPearFile,
            _tempWorkingDir);
    InstallationDescriptor insDesc = insController.installComponent();
    Assert.assertTrue(insDesc != null);
    Assert.assertTrue(OUT_PEAR_ID.equals(insDesc.getMainComponentId()));
    // verify the installed component
    // customize ResourceManager by adding component CLASSPATH
    ResourceManager resMngr = UIMAFramework.newDefaultResourceManager();
    String compClassPath = InstallationController.buildComponentClassPath(insDesc
            .getMainComponentRoot(), insDesc);
    // instantiate the aggregate AE
    resMngr.setExtensionClassPath(compClassPath, true);
    String compDescFilePath = insDesc.getMainComponentDesc();
    XMLParser xmlPaser = UIMAFramework.getXMLParser();
    XMLInputSource xmlInput = new XMLInputSource(compDescFilePath);
    AnalysisEngineDescription aeSpec = xmlPaser.parseAnalysisEngineDescription(xmlInput);
    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aeSpec, resMngr, null);
    Assert.assertTrue(ae != null);
View Full Code Here

    Assert.assertTrue(done);
    Assert.assertTrue(outPearFile.isFile());
    // install the output PEAR file and check the results
    InstallationController insController = new InstallationController(OUT_PEAR_ID, outPearFile,
            _tempWorkingDir);
    InstallationDescriptor insDesc = insController.installComponent();
    Assert.assertTrue(insDesc != null);
    Assert.assertTrue(OUT_PEAR_ID.equals(insDesc.getMainComponentId()));
    // verify the installed component
    // customize ResourceManager by adding component CLASSPATH
    ResourceManager resMngr = UIMAFramework.newDefaultResourceManager();
    String compClassPath = InstallationController.buildComponentClassPath(insDesc
            .getMainComponentRoot(), insDesc);
    // instantiate the aggregate AE
    resMngr.setExtensionClassPath(compClassPath, true);
    String compDescFilePath = insDesc.getMainComponentDesc();
    XMLParser xmlPaser = UIMAFramework.getXMLParser();
    XMLInputSource xmlInput = new XMLInputSource(compDescFilePath);
    AnalysisEngineDescription aeSpec = xmlPaser.parseAnalysisEngineDescription(xmlInput);
    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aeSpec, resMngr, null);
    Assert.assertTrue(ae != null);
View Full Code Here

TOP

Related Classes of org.apache.uima.pear.tools.InstallationDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.