public boolean isSuitable(Entry entry) { if(!(entry instanceof GroupEntry)) { return false; } GroupEntry ge = (GroupEntry) entry; File dir = getDirectory(ge); boolean enabled = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, false); boolean hasRightType = ge.getId() != null && ge.getId().startsWith(getIdPrefix()) && enabled && dir != null; if(hasRightType && (!dir.exists() || !dir.isDirectory())) { logger.warn("Folder repository probably came from another system"); logger.warn("Could not be updated because directory " + dir + " does not exist"); if(!warnedUserOfBadRepositoryDeclaration) { logger.error("Bad ontology library declaration - check logs. Warnings now disabled for this session."); warnedUserOfBadRepositoryDeclaration = true; } return false; } return hasRightType; }
public boolean isSuitable(Entry entry) { if (!(entry instanceof GroupEntry)) { return false; } GroupEntry ge = (GroupEntry) entry; File dir = getDirectory(ge); boolean enabled = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, false); boolean hasRightType = ge.getId() != null && ge.getId().startsWith(getIdPrefix()) && enabled && dir != null; if (hasRightType && (!dir.exists() || !dir.isDirectory())) { logger.warn("Folder repository probably came from another system"); logger.warn("Could not be updated because directory " + dir + " does not exist"); if (!warnedUserOfBadRepositoryDeclaration) { logger.error("Bad ontology library declaration - check logs. Warnings now disabled for this session.", new IOException()); warnedUserOfBadRepositoryDeclaration = true; } return false; } return hasRightType; }
public boolean isSuitable(Entry entry) { if (!(entry instanceof GroupEntry)) { return false; } GroupEntry ge = (GroupEntry) entry; File dir = getDirectory(ge); boolean enabled = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, false); boolean hasRightType = ge.getId() != null && ge.getId().startsWith(getIdPrefix()) && enabled && dir != null; if (hasRightType && (!dir.exists() || !dir.isDirectory())) { logger.warn("Folder repository probably came from another system"); logger.warn("Could not be updated because directory " + dir + " does not exist"); if (!warnedUserOfBadRepositoryDeclaration) { ProtegeApplication.getErrorLog().logError(new IOException("Bad ontology library declaration - check logs. Warnings now disabled for this session.")); warnedUserOfBadRepositoryDeclaration = true; } return false; } return hasRightType; }
private void ensureLatestVersion() { int version = LibraryUtilities.getVersion(ge); if(version < CURRENT_VERSION) { boolean autoUpdate = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, this.autoUpdate); ge.setId(getIdString(getIdPrefix(), folder.toURI(), recursive, autoUpdate)); clearEntries(); } }
private void ensureLatestVersion() { int version = LibraryUtilities.getVersion(ge); if (version < CURRENT_VERSION) { boolean autoUpdate = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, this.autoUpdate); ge.setId(getIdString(getIdPrefix(), folder.toURI(), recursive, autoUpdate)); clearEntries(); } }
private void ensureLatestVersion() { int version = LibraryUtilities.getVersion(ge); if (version < CURRENT_VERSION) { boolean autoUpdate = LibraryUtilities.getBooleanProperty(ge, LibraryUtilities.AUTO_UPDATE_PROP, this.autoUpdate); ge.setId(getIdString(getIdPrefix(), folder.toURI(), recursive, autoUpdate)); clearEntries(); } }