@Test public void testSimpleXmiListener() throws Exception { SimpleXmiListener listener = new SimpleXmiListener(outDir) .setTypeSystemDescriptor(aggDesc.getTypeSystemDescription()) .setLaunchAnnotationViewer(false); assertNotNull(listener); FileCollectionReader reader = (FileCollectionReader) new FileCollectionReader(inDir, true).produceCollectionReader(); int counter = 0; while(reader.hasNext()) { CAS cas = ae.newCAS(); reader.getNext(cas); listener.onBeforeMessageSend(new UimaASProcessStatusImpl(new ProcessTrace_impl(), cas, "" + counter++)); ProcessTrace pTrace = ae.process(cas); listener.entityProcessComplete(cas, new EntityProcessStatusImpl(pTrace)); } listener.collectionProcessComplete(null); File[] files = outDir.listFiles(); assertNotNull(files); assertEquals(counter+1, files.length); if(files.length > 0) { if(!files[0].getName().contains("type_system_desc.xml")) { String xmiText = FileUtils.readFileToString(files[0]); assertTrue("Bad Header in " + files[0].getAbsolutePath(), xmiText.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?><xmi:XMI xmlns:tcas=\"http: } } }
public SimpleXmiListener(File outputDir) { mOutputDir = outputDir; }
SimpleXmiListener extends BaseListener { public SimpleXmiListener(File outputDir) { mOutputDir = outputDir; } }
SimpleXmiListener extends BaseListener { public SimpleXmiListener(File outputDir) { mOutputDir = outputDir; } SimpleXmiListener(File outputDir); }
SimpleXmiListener extends BaseListener { public SimpleXmiListener(File outputDir) { mOutputDir = outputDir; } SimpleXmiListener(File outputDir); LeoTypeSystemDescription getTypeSystemDescriptor(); SimpleXmiListener setTypeSystemDescriptor(File typeSystemDescriptor); SimpleXmiListener setTypeSystemDescriptor(LeoTypeSystemDescription typeSystemDescriptor); boolean isLaunchAnnotationViewer(); SimpleXmiListener setLaunchAnnotationViewer(boolean launchAnnotationViewer); @Override void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus); @Override void collectionProcessComplete(EntityProcessStatus aStatus); }
SimpleXmiListener extends BaseListener { public SimpleXmiListener(File outputDir) { mOutputDir = outputDir; } SimpleXmiListener(File outputDir); LeoTypeSystemDescription getTypeSystemDescriptor(); SimpleXmiListener setTypeSystemDescriptor(File typeSystemDescriptor); SimpleXmiListener setTypeSystemDescriptor(LeoTypeSystemDescription typeSystemDescriptor); boolean isLaunchAnnotationViewer(); SimpleXmiListener setLaunchAnnotationViewer(boolean launchAnnotationViewer); @Override void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus); @Override void collectionProcessComplete(EntityProcessStatus aStatus); static final String TYPE_DESCRIPTION_NAME; static final Logger log; }