public GroupEntry getEntry() { String text = physicalLocationField.getText(); if (text == null || text.length() == 0) { return null; } File dir = new File(text); if (!dir.exists() || !dir.isDirectory()) { return null; } try { // There seems to be a bug in relativize and resolve so don't relativize here URI folderUri = new File(physicalLocationField.getText()).toURI(); if (importByName.isSelected()) { return ImportByNameManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } else { return FolderGroupManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } } catch (IOException ioe) { LoggerFactory.getLogger(FolderGroupPanel.class) .error("An error occurred whilst creating a group entry: {}", ioe); return null; } } }
public GroupEntry getEntry() { String text = physicalLocationField.getText(); if (text == null || text.length() == 0) { return null; } File dir = new File(text); if (!dir.exists() || !dir.isDirectory()) { return null; } try { URI folderUri = CatalogUtilities.relativize(new File(physicalLocationField.getText()).toURI(), catalog); if (importByName.isSelected()) { return ImportByNameManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } else { return FolderGroupManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } } catch (IOException ioe) { LoggerFactory.getLogger(FolderGroupPanel.class) .error("An error occurred whilst creating a group entry: {}", ioe); return null; } } }
public GroupEntry getEntry() { String text = physicalLocationField.getText(); if (text == null || text.length() == 0) { return null; } File dir = new File(text); if (!dir.exists() || !dir.isDirectory()) { return null; } try { URI folderUri = CatalogUtilities.relativize(new File(physicalLocationField.getText()).toURI(), catalog); return FolderGroupManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } catch (IOException ioe) { ProtegeApplication.getErrorLog().logError(ioe); return null; } } }
public boolean initializeCatalog(File folder, XMLCatalog catalog) throws IOException { URI relativeFolderUri = CatalogUtilities.relativize(folder.toURI(), catalog); ge = FolderGroupManager.createGroupEntry(relativeFolderUri, true, autoUpdate, catalog); catalog.addEntry(ge); update(ge); return true; }
public GroupEntry getEntry() { String text = physicalLocationField.getText(); if (text == null || text.length() == 0) { return null; } File dir = new File(text); if (!dir.exists() || !dir.isDirectory()) { return null; } try { URI folderUri = CatalogUtilities.relativize(new File(physicalLocationField.getText()).toURI(), catalog); if (importByName.isSelected()) { return ImportByNameManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } else { return FolderGroupManager.createGroupEntry(folderUri, recursive.isSelected(), true, catalog); } } catch (IOException ioe) { ProtegeApplication.getErrorLog().logError(ioe); return null; } } }
public boolean initializeCatalog(File folder, XMLCatalog catalog) throws IOException { URI relativeFolderUri = CatalogUtilities.relativize(folder.toURI(), catalog); ge = FolderGroupManager.createGroupEntry(relativeFolderUri, true, autoUpdate, catalog); catalog.addEntry(ge); update(ge); return true; }
public boolean initializeCatalog(File folder, XMLCatalog catalog) throws IOException { URI relativeFolderUri = CatalogUtilities.relativize(folder.toURI(), catalog); ge = FolderGroupManager.createGroupEntry(relativeFolderUri, true, autoUpdate, catalog); catalog.addEntry(ge); update(ge); return true; }
public boolean initializeCatalog(File folder, XMLCatalog catalog) throws IOException { URI relativeFolderUri = CatalogUtilities.relativize(folder.toURI(), catalog); ge = FolderGroupManager.createGroupEntry(relativeFolderUri, true, autoUpdate, catalog); catalog.addEntry(ge); update(ge); return true; }