Package org.apache.uima.resource

Examples of org.apache.uima.resource.PearSpecifier.toXML()


    FileOutputStream fos = null;

    try
    {
        fos = new FileOutputStream(outputFile);
        pearSpec.toXML(fos);
    }
    finally
    {
        if (fos != null)
        {
View Full Code Here


      pearSpec.setPearPath("/home/user/uimaApp/installedPears/testpear");
      pearSpec.setParameters(new Parameter[] { new Parameter_impl("param1", "val1"),
          new Parameter_impl("param2", "val2") });

      StringWriter sw = new StringWriter();
      pearSpec.toXML(sw);
      PearSpecifier pearSpec2 = (PearSpecifier) UIMAFramework.getXMLParser().parse(
              new XMLInputSource(new ByteArrayInputStream(sw.getBuffer().toString().getBytes(encoding)),
                      null));
      assertEquals(pearSpec, pearSpec2);
    } catch (Exception e) {
View Full Code Here

      pearSpec.setPearPath("/home/user/uimaApp/installedPears/testpear");
      pearSpec.setParameters(new Parameter[] { new Parameter_impl("param1", "val1"),
          new Parameter_impl("param2", "val2") });

      StringWriter sw = new StringWriter();
      pearSpec.toXML(sw);
      PearSpecifier pearSpec2 = (PearSpecifier) UIMAFramework.getXMLParser().parse(
              new XMLInputSource(new ByteArrayInputStream(sw.getBuffer().toString().getBytes(encoding)),
                      null));
      assertEquals(pearSpec, pearSpec2);
    } catch (Exception e) {
View Full Code Here

    FileOutputStream fos = null;

    try
    {
        fos = new FileOutputStream(outputFile);
        pearSpec.toXML(fos);
    }
    finally
    {
        if (fos != null)
        {
View Full Code Here

    FileOutputStream fos = null;

    try
    {
        fos = new FileOutputStream(outputFile);
        pearSpec.toXML(fos);
    }
    finally
    {
        if (fos != null)
        {
View Full Code Here

    FileOutputStream fos = null;

    try
    {
        fos = new FileOutputStream(outputFile);
        pearSpec.toXML(fos);
    }
    finally
    {
        if (fos != null)
        {
View Full Code Here

    FileOutputStream fos = null;

    try
    {
        fos = new FileOutputStream(outputFile);
        pearSpec.toXML(fos);
    }
    finally
    {
        if (fos != null)
        {
View Full Code Here

      pearSpec.setPearPath("/home/user/uimaApp/installedPears/testpear");
      pearSpec.setParameters(new Parameter[] { new Parameter_impl("param1", "val1"),
          new Parameter_impl("param2", "val2") });

      StringWriter sw = new StringWriter();
      pearSpec.toXML(sw);
      PearSpecifier pearSpec2 = (PearSpecifier) UIMAFramework.getXMLParser().parse(
              new XMLInputSource(new ByteArrayInputStream(sw.getBuffer().toString().getBytes()),
                      null));
      assertEquals(pearSpec, pearSpec2);
    } catch (Exception e) {
View Full Code Here

  protected static synchronized void generatePearSpecifier(String mainComponentRootPath,
          String mainComponentId) throws IOException, SAXException {
    PearSpecifier pearSpec = UIMAFramework.getResourceSpecifierFactory().createPearSpecifier();
    pearSpec.setPearPath(mainComponentRootPath);
    File outputFile = new File(mainComponentRootPath, mainComponentId + PEAR_DESC_FILE_POSTFIX);
    pearSpec.toXML(new FileOutputStream(outputFile));
  }

  /**
   * Generates the file (batch file for Windows) containing specific environment variables that
   * should be used to run the component.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.