Package org.apache.uima.resource.metadata

Examples of org.apache.uima.resource.metadata.TypeSystemDescription.toXML()


    try {
      typeSystemFile = new File(project.getBuild().getDirectory(), "jcasgen/typesystem.xml");
      getLog().debug("JCasGen: Writing master descriptor to in '" + typeSystemFile + "'");
      typeSystemFile.getParentFile().mkdirs();
      typeSystemOs = new FileOutputStream(typeSystemFile);
      typeSystem.toXML(typeSystemOs);
    } catch (IOException e) {
      throw new MojoExecutionException(e.getMessage(), e.getCause());
    } catch (SAXException e) {
      throw new MojoExecutionException(e.getMessage(), e.getCause());
    } finally {
View Full Code Here


      // create dir and serialize typesystem
      boolean status = new File((String)casLogDirMap.get(analysisEngineKey)).mkdir();
      TypeSystemDescription tsd = TypeSystemUtil.typeSystem2TypeSystemDescription(cas.getTypeSystem());
      File tsd2xml = new File(((String)casLogDirMap.get(analysisEngineKey))+"/typesystem.xml");
      FileOutputStream os = new FileOutputStream(tsd2xml);
      tsd.toXML(os);
      os.close();
      enableCasLogMap.put(analysisEngineKey, true);
    }
    // create XmiCas file name
    Long now = Long.valueOf((System.nanoTime()-initializationTime)/1000);
View Full Code Here

      // create dir and serialize typesystem
      boolean status = new File((String)casLogDirMap.get(analysisEngineKey)).mkdir();
      TypeSystemDescription tsd = TypeSystemUtil.typeSystem2TypeSystemDescription(cas.getTypeSystem());
      File tsd2xml = new File(((String)casLogDirMap.get(analysisEngineKey))+"/typesystem.xml");
      FileOutputStream os = new FileOutputStream(tsd2xml);
      tsd.toXML(os);
      os.close();
      enableCasLogMap.put(analysisEngineKey, true);
    }
    // create XmiCas file name
    Long now = Long.valueOf((System.nanoTime()-initializationTime)/1000);
View Full Code Here

    TypeDescription[] typeDescArr = new TypeDescription[typeDescs.size()];
    typeDescs.toArray(typeDescArr);
    tsDesc.setTypes(typeDescArr);

    aContentHandler.startDocument();
    tsDesc.toXML(aContentHandler);
    aContentHandler.endDocument();
  }
}
View Full Code Here

    // options.put(OPTION_GENERATE_UIMA_LIST_TYPES, Boolean.TRUE);
    TypeSystemDescription tsDesc = ecore2UimaTypeSystem(args[0], options);

    FileOutputStream os = new FileOutputStream(args[1]);
    try {
      tsDesc.toXML(os);
    } finally {
      os.close();
    }

    // test creating a CAS
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.