private void examineSingleFile(File physicalLocation, Set<URI> webLocationsFoundInParentDirectory, Set<URI> newWebLocations) { if (logger.isDebugEnabled()) { logger.debug("Applying algorithms to " + physicalLocation); } URI shortLocation = folder.toURI().relativize(physicalLocation.toURI()); Collection<URI> retainedSuggestions = null; try { retainedSuggestions = retainedFileToWebLocationMap.get(physicalLocation.getCanonicalFile()); } catch (IOException e) { logger.warn("IO Exception caught processing file " + physicalLocation + " for repository library update", e); } if (retainedSuggestions != null) { if (logger.isDebugEnabled()) { logger.debug("Adding mappings retained from previous version of the catalog"); } recordEntries(retainedSuggestions, shortLocation, webLocationsFoundInParentDirectory, newWebLocations); } else { if (logger.isDebugEnabled()) { logger.debug("Adding new mappings not found in the previous version of the catalog"); } for (Algorithm algorithm : algorithms) { Set<URI> webLocations = algorithm.getSuggestions(physicalLocation); modified = modified || !webLocations.isEmpty(); recordEntries(webLocations, shortLocation, webLocationsFoundInParentDirectory, newWebLocations); } } }
private void examineSingleFile(File physicalLocation, Set<URI> webLocationsFoundInParentDirectory, Set<URI> newWebLocations) { if(logger.isDebugEnabled()) { logger.debug("Applying algorithms to " + physicalLocation); } URI shortLocation = folder.toURI().relativize(physicalLocation.toURI()); Collection<URI> retainedSuggestions = null; try { retainedSuggestions = retainedFileToWebLocationMap.get(physicalLocation.getCanonicalFile()); } catch(IOException e) { logger.warn("IO Exception caught processing file " + physicalLocation + " for repository library update", e); } if(retainedSuggestions != null) { if(logger.isDebugEnabled()) { logger.debug("Adding mappings retained from previous version of the catalog"); } recordEntries(retainedSuggestions, shortLocation, webLocationsFoundInParentDirectory, newWebLocations); } else { if(logger.isDebugEnabled()) { logger.debug("Adding new mappings not found in the previous version of the catalog"); } for(Algorithm algorithm : algorithms) { Set<URI> webLocations = algorithm.getSuggestions(physicalLocation); modified = modified || !webLocations.isEmpty(); recordEntries(webLocations, shortLocation, webLocationsFoundInParentDirectory, newWebLocations); } } }
Set<URI> webLocations = algorithm.getSuggestions(physicalLocation); modified = modified || !webLocations.isEmpty(); recordEntries(webLocations, shortLocation, webLocationsFoundInParentDirectory, newWebLocations);
Set<URI> webLocations = algorithm.getSuggestions(physicalLocation); modified = modified || !webLocations.isEmpty(); recordEntries(webLocations, shortLocation, webLocationsFoundInParentDirectory, newWebLocations);