public AnalysisEngineDescription createAnalysisEngineDescription(RutaDescriptorInformation desc, TypeSystemDescription typeSystemDescription, String typeSystemOutput, String engineOutput, RutaBuildOptions options, String[] scriptPaths, String[] enginePaths, String[] resourcePaths) throws InvalidXMLException, IOException { TypeSystemDescription aets = uimaFactory.createTypeSystemDescription(); Import_impl import_impl = null; boolean needToIncludeTypeSystemDescriptor = true; if (options.isImportByName()) { if (typeSystemDescription != null) { import_impl = new Import_impl(); import_impl.setName(typeSystemDescription.getName()); needToIncludeTypeSystemDescriptor = false; } } else { if (typeSystemOutput != null) { String relativeLocation = getRelativeLocation(new File(typeSystemOutput).toURI(), engineOutput); import_impl = new Import_impl(); import_impl.setLocation(relativeLocation); needToIncludeTypeSystemDescriptor = false; } } AnalysisEngineDescription analysisEngineDescription = configureEngine(desc, engineOutput, options, scriptPaths, enginePaths, resourcePaths, import_impl, aets); if(needToIncludeTypeSystemDescriptor) { analysisEngineDescription.getAnalysisEngineMetaData().setTypeSystem(typeSystemDescription); } return analysisEngineDescription; }
/** * Gets the name. * * @return the name */ public String getName() { if (editor.isLocalProcessingDescriptor()) return editor.getAeDescription().getMetaData().getName(); if (editor.isTypeSystemDescriptor()) return editor.getTypeSystemDescription().getName(); if (editor.isTypePriorityDescriptor()) return editor.getTypePriorities().getName(); if (editor.isFsIndexCollection()) return editor.getFsIndexCollection().getName(); if (editor.isExtResAndBindingsDescriptor()) return editor.getExtResAndBindings().getName(); throw new InternalErrorCDE("invalid state"); }