Package org.apache.uima.analysis_engine

Examples of org.apache.uima.analysis_engine.AnalysisEngineDescription.toXML()


          FileNotFoundException, SAXException, IOException {
    AnalysisEngineDescription aed = AnalysisEngineFactory.createEngineDescription(
            DefaultValueAE1.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE1.xml"));
    aed = AnalysisEngineFactory.createEngineDescription(DefaultValueAE2.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE2.xml"));
  }

}
View Full Code Here


   

    System.out.println((new File("desc/analysis_engine")).getAbsolutePath());

    // Write standalone description files
    clearparserDepParserDesc.toXML(new FileOutputStream(new File(options.outputRoot, "ClearParserDependencyParserAE.xml")));
    clearparserSRLDesc.toXML(new FileOutputStream(new File(options.outputRoot, "ClearParserSemanticRoleLabelerAE.xml")));

    // Write aggregate plaintext description files
    AggregateBuilder aggregateBuilder = getPlaintextAggregateBuilder();
    writeAggregateDescriptions(aggregateBuilder, clearparserDepParserDesc, clearparserSRLDesc, options.outputRoot, "PlaintextAggregate.xml");
View Full Code Here

    // indent should not be used because we're using a parser mode which preserves
    // comments and ignorable white space.
    xmlSerializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    ContentHandler contentHandler = xmlSerializer.getContentHandler();
    contentHandler.startDocument();
    desc.toXML(contentHandler, true);
    contentHandler.endDocument();
    os.close();
   
    // When building from a source distribution the descriptor may not have
    // appropriate line-ends so compute the length as if always 1 byte.
View Full Code Here

      ContentHandler contentHandler = xmlSerializer.getContentHandler();
      contentHandler.startDocument();
      XMLizable trueDescriptor = getTrueDescriptor();
      if (trueDescriptor instanceof AnalysisEngineDescription) {
        AnalysisEngineDescription aed = (AnalysisEngineDescription) trueDescriptor;
        aed.toXML(contentHandler, true, true);
      } else
        trueDescriptor.toXML(contentHandler, true);
      contentHandler.endDocument();
      writer.close();
      parsedText = writer.toString();
View Full Code Here

        aeSpecifier.getDelegateAnalysisEngineSpecifiers();
        aeSpecifier.getAnalysisEngineMetaData().resolveImports(resMgr);

        StringWriter writer = new StringWriter();
        aeSpecifier.toXML(writer);

        return writer.toString();
      } else if (specifier instanceof CasConsumerDescription) {
        CasConsumerDescription ccSpecifier = (CasConsumerDescription) specifier;
        ccSpecifier.getCasConsumerMetaData().resolveImports(resMgr);
View Full Code Here

   */
  public static void main(String[] args) throws ResourceInitializationException,
          FileNotFoundException, SAXException, IOException {
    AnalysisEngineDescription aed = AnalysisEngineFactory.createEngineDescription(
            DefaultValueAE1.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE1.xml"));
    aed = AnalysisEngineFactory.createEngineDescription(DefaultValueAE2.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE2.xml"));
  }

}
View Full Code Here

          FileNotFoundException, SAXException, IOException {
    AnalysisEngineDescription aed = AnalysisEngineFactory.createEngineDescription(
            DefaultValueAE1.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE1.xml"));
    aed = AnalysisEngineFactory.createEngineDescription(DefaultValueAE2.class, (Object[]) null);
    aed.toXML(new FileOutputStream("src/test/resources/data/descriptor/DefaultValueAE2.xml"));
  }

}
View Full Code Here

      overrides.add(aeOverrides);
      overrides.add(ccOverrides);

      AnalysisEngineDescription aed = UimaUtils
          .createAggregateDescription(true, overrides, args);
      aed.toXML(System.out);
      /*
       * File tempAEDescriptorFile = null; File duccTempDir = new
       * File("c:/tmp"); if ( !duccTempDir.exists()) {
       * duccTempDir.mkdir(); } tempAEDescriptorFile =
       * File.createTempFile( "UimaAEDescriptor", ".xml",duccTempDir);
View Full Code Here

    }
    FileOutputStream fos = null;
    try {
      file = new File(dir, fname);//+"-uima-ae-descriptor-"+Utils.getPID()+".xml");
      fos = new FileOutputStream(file);
      aed.toXML(fos);
     
    } catch(Exception e) {
      throw e;
    } finally {
      if ( fos != null ) {
View Full Code Here

   
    FileOutputStream outputStream = new FileOutputStream("desc/aggregateAssertionZoner.xml");
   
    AnalysisEngineDescription description = builder.createAggregateDescription();
   
    description.toXML(outputStream);
  }

}
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.