@Override public Set<String> getObjectIdList() { // TODO Filter list depending on access return storage.getObjectIdList(); }
@Override public Set<String> getObjectIdList() { return storagePlugin.getObjectIdList(); }
/** * Main logic loop of the process * */ private void logicLoop() { log.info("Rebuild commencing..."); Set<?> objectList = storage.getObjectIdList(); if (objectList == null) { log.error("Unable to access objects in storage!"); return; } log.info( "Performing first pass of object list to determine changes that need to be made."); firstPass(objectList); log.info("First pass complete"); log.info( "Performing second pass. Processing object list to make changes"); processObjects(objectList); log.info("Second pass complete"); log.info("Rebuild complete..."); }
/** * Start to run the indexing */ public void run() { DateFormat df = new SimpleDateFormat(DATETIME_FORMAT); String now = df.format(new Date()); long start = System.currentTimeMillis(); log.info("Started at " + now); rulesFile = new File(configFile.getParentFile(), config.getString( null, "indexer", "script", "rules")); log.debug("rulesFile=" + rulesFile); // Check storage for our rules file String rulesOid = rulesFile.getAbsolutePath(); updateRules(rulesOid); // List all the DigitalObjects in the storages Set<String> objectIdList = realStorage.getObjectIdList(); for (String objectId : objectIdList) { try { DigitalObject object = realStorage.getObject(objectId); processObject(object, rulesOid, config.getObject("indexer", "params"), false); } catch (StorageException ex) { log.error("Error getting rules file", ex); } catch (IOException ex) { log.error("Error Processing object", ex); } } log.info("Completed in " + ((System.currentTimeMillis() - start) / 1000.0) + " seconds"); }