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; }
/** * Gets the configuration parameter settings. * * @return the configuration parameter settings */ public ConfigurationParameterSettings getConfigurationParameterSettings() { return editor.getAeDescription().getMetaData().getConfigurationParameterSettings(); }
delegate.getMetaData().getConfigurationParameterSettings() .setParameterValue(paramName, paramValue); } else { delegate.getMetaData().getConfigurationParameterSettings() .setParameterValue(groupName, paramName, paramValue);
/** * Refresh from file. * * @throws InvalidXMLException the invalid XML exception * @throws IOException Signals that an I/O exception has occurred. */ public void refreshFromFile() throws InvalidXMLException, IOException { clearAll(); this.aeSpecifier = UIMAFramework.getXMLParser().parseResourceSpecifier( new XMLInputSource(this.specifierFile)); if (aeSpecifier instanceof AnalysisEngineDescription) { AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) aeSpecifier; populate(aeDescription.getMetaData(), null); } else { this.removeAll(); } this.lastFileSyncTimestamp = this.specifierFile.lastModified(); } }
if (aeSpecifier instanceof AnalysisEngineDescription) { AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) aeSpecifier; ResourceMetaData md = aeDescription.getMetaData(); tabName = md.getName(); } else {
delegate.getMetaData().getConfigurationParameterSettings() .setParameterValue(paramName, paramValue); } else { delegate.getMetaData().getConfigurationParameterSettings() .setParameterValue(groupName, paramName, paramValue);
if (aeSpecifier instanceof AnalysisEngineDescription) { AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) aeSpecifier; ResourceMetaData md = aeDescription.getMetaData(); tabName = md.getName(); } else {
/** * Link common collection descriptors from ae. * * @param r the r */ private void linkCommonCollectionDescriptorsFromAe(ResourceCreationSpecifier r) { r.setExternalResourceDependencies(aeDescription.getExternalResourceDependencies()); r.setMetaData(convertFromAeMetaData((AnalysisEngineMetaData) aeDescription.getMetaData())); r.setResourceManagerConfiguration(aeDescription.getResourceManagerConfiguration()); }
if (aeSpecifier instanceof AnalysisEngineDescription) { AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) aeSpecifier; ResourceMetaData md = aeDescription.getMetaData(); aePanel.populate(md, cpeCasProc.getConfigurationParameterSettings()); tabName = md.getName();
if (aeSpecifier instanceof AnalysisEngineDescription) { AnalysisEngineDescription aeDescription = (AnalysisEngineDescription) aeSpecifier; ResourceMetaData md = aeDescription.getMetaData(); aePanel.populate(md, cpeCasProc.getConfigurationParameterSettings()); tabName = md.getName();
/** * 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"); }
/** * Gets the version. * * @return the version */ public String getVersion() { if (editor.isLocalProcessingDescriptor()) return editor.getAeDescription().getMetaData().getVersion(); if (editor.isTypeSystemDescriptor()) return editor.getTypeSystemDescription().getVersion(); if (editor.isTypePriorityDescriptor()) return editor.getTypePriorities().getVersion(); if (editor.isFsIndexCollection()) return editor.getFsIndexCollection().getVersion(); if (editor.isExtResAndBindingsDescriptor()) return editor.getExtResAndBindings().getVersion(); throw new InternalErrorCDE("invalid state"); }
/** * Gets the description. * * @return the description */ public String getDescription() { if (editor.isLocalProcessingDescriptor()) return editor.getAeDescription().getMetaData().getDescription(); if (editor.isTypeSystemDescriptor()) return editor.getTypeSystemDescription().getDescription(); if (editor.isTypePriorityDescriptor()) return editor.getTypePriorities().getDescription(); if (editor.isFsIndexCollection()) return editor.getFsIndexCollection().getDescription(); if (editor.isExtResAndBindingsDescriptor()) return editor.getExtResAndBindings().getDescription(); throw new InternalErrorCDE("invalid state"); }
/** * Sets the version. * * @param name the new version */ public void setVersion(String name) { if (editor.isLocalProcessingDescriptor()) editor.getAeDescription().getMetaData().setVersion(name); else if (editor.isTypeSystemDescriptor()) editor.getTypeSystemDescription().setVersion(name); else if (editor.isTypePriorityDescriptor()) editor.getTypePriorities().setVersion(name); else if (editor.isFsIndexCollection()) editor.getFsIndexCollection().setVersion(name); else if (editor.isExtResAndBindingsDescriptor()) editor.getExtResAndBindings().setVersion(name); else throw new InternalErrorCDE("invalid state"); }
/** * 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"); }
/** * Gets the vendor. * * @return the vendor */ public String getVendor() { if (editor.isLocalProcessingDescriptor()) return editor.getAeDescription().getMetaData().getVendor(); if (editor.isTypeSystemDescriptor()) return editor.getTypeSystemDescription().getVendor(); if (editor.isTypePriorityDescriptor()) return editor.getTypePriorities().getVendor(); if (editor.isFsIndexCollection()) return editor.getFsIndexCollection().getVendor(); if (editor.isExtResAndBindingsDescriptor()) return editor.getExtResAndBindings().getVendor(); throw new InternalErrorCDE("invalid state"); }
/** * Sets the description. * * @param name the new description */ public void setDescription(String name) { if (editor.isAeDescriptor() || editor.isLocalProcessingDescriptor()) editor.getAeDescription().getMetaData().setDescription(name); else if (editor.isTypeSystemDescriptor()) editor.getTypeSystemDescription().setDescription(name); else if (editor.isTypePriorityDescriptor()) editor.getTypePriorities().setDescription(name); else if (editor.isFsIndexCollection()) editor.getFsIndexCollection().setDescription(name); else if (editor.isExtResAndBindingsDescriptor()) editor.getExtResAndBindings().setDescription(name); else throw new InternalErrorCDE("invalid state"); }
/** * Sets the vendor. * * @param name the new vendor */ public void setVendor(String name) { if (editor.isLocalProcessingDescriptor()) editor.getAeDescription().getMetaData().setVendor(name); else if (editor.isTypeSystemDescriptor()) editor.getTypeSystemDescription().setVendor(name); else if (editor.isTypePriorityDescriptor()) editor.getTypePriorities().setVendor(name); else if (editor.isFsIndexCollection()) editor.getFsIndexCollection().setVendor(name); else if (editor.isExtResAndBindingsDescriptor()) editor.getExtResAndBindings().setVendor(name); else throw new InternalErrorCDE("invalid state"); }