private void deleteBlock(CachedUrl cu) throws IOException { log.info("deleting " + cu.getUrl()); CachedUrlSetSpec cuss = new SingleNodeCachedUrlSetSpec(cu.getUrl()); ArchivalUnit au = cu.getArchivalUnit(); CachedUrlSet cus = au.makeCachedUrlSet(cuss); NodeManager nm = au.getPlugin().getDaemon().getNodeManager(au); nm.deleteNode(cus); }
/** * Lookup the CU's archive file type in its AU's ArchiveFileTypes * * @return the file extension (including dot), or null if none found */ public static String getArchiveExtension(CachedUrl cu) { ArchiveFileTypes aft = cu.getArchivalUnit().getArchiveFileTypes(); if (aft == null) { return null; } try { return aft.getFromCu(cu); } catch (MalformedURLException e) { log.warning("isArchive(" + cu + ")", e); return null; } }