private static void writeDesc(File descDir, String name, AnalysisEngineDescription desc) throws SAXException, IOException { // set the name (not done by uimaFIT) desc.getMetaData().setName(name); File descFile = new File(descDir, name + ".xml"); System.err.println("Writing description to " + descFile); FileOutputStream output = new FileOutputStream(descFile); desc.toXML(output); output.close(); } }
private static void writeDesc(File descDir, String name, AnalysisEngineDescription desc) throws SAXException, IOException { // set the name (not done by uimaFIT) desc.getMetaData().setName(name); File descFile = new File(descDir, name + ".xml"); System.err.println("Writing description to " + descFile); FileOutputStream output = new FileOutputStream(descFile); desc.toXML(output); output.close(); } }
private PipelineBuilder build(PipelineBuilder builder) throws InvalidXMLException, IOException, SAXException, CpeDescriptorException { Set<String> cpeNames = newHashSet(); for (AnalysisEngineDescription aed : this.aeds) { // workaround to use multiple cpe with the same name String name = aed.getMetaData().getName(); if (cpeNames.contains(name)) { ResourceMetaData metaData = aed.getMetaData(); String newName = name + System.currentTimeMillis(); metaData.setName(newName); aed.setMetaData(metaData); cpeNames.add(newName); } else { cpeNames.add(name); } builder.add(aed); } return builder; }
if (name == null) { ResourceMetaData metaData = descr.getMetaData(); metaData.setName(clasz); descr.setMetaData(metaData);
aMetaData.setName(getDefaultName(aComponentClass)); aMetaData.setVendor(getDefaultVendor(aComponentClass)); aMetaData.setVersion(getDefaultVersion(aComponentClass)); aMetaData.setName(emptyAsNull(componentAnno.name())); aMetaData.setVendor(emptyAsNull(componentAnno.vendor())); aMetaData.setVersion(emptyAsNull(componentAnno.version()));
analysisDesc.resolveImports(resMgr); if (analysisDesc.getMetaData().getName() == null) { analysisDesc.getMetaData().setName("Analysis for "+aConfiguration.getType()); .getCollectionReaderDescription(ctx); if (readerDesc.getMetaData().getName() == null) { readerDesc.getMetaData().setName("Reader for "+aConfiguration.getType());
/** * Sets the name. * * @param name the new name */ public void setName(String name) { if (editor.isLocalProcessingDescriptor()) editor.getAeDescription().getMetaData().setName(name); else if (editor.isTypeSystemDescriptor()) editor.getTypeSystemDescription().setName(name); else if (editor.isTypePriorityDescriptor()) editor.getTypePriorities().setName(name); else if (editor.isFsIndexCollection()) editor.getFsIndexCollection().setName(name); else if (editor.isExtResAndBindingsDescriptor()) editor.getExtResAndBindings().setName(name); else throw new InternalErrorCDE("invalid state"); }
analysisDesc.resolveImports(resMgr); if (analysisDesc.getMetaData().getName() == null) { analysisDesc.getMetaData().setName("Analysis for " + aConfiguration.getType()); .getCollectionReaderDescription(ctx); if (readerDesc.getMetaData().getName() == null) { readerDesc.getMetaData().setName("Reader for " + aConfiguration.getType());
analysisDesc.resolveImports(resMgr); if (analysisDesc.getMetaData().getName() == null) { analysisDesc.getMetaData().setName("Analysis for " + aConfiguration.getType()); .getCollectionReaderDescription(ctx); if (readerDesc.getMetaData().getName() == null) { readerDesc.getMetaData().setName("Reader for " + aConfiguration.getType());