public MFileCollectionManager(String name, CollectionConfig mc, CalendarDate startPartition, org.slf4j.Logger logger) { super(name, logger); this.startCollection = startPartition; this.scanList.add(mc); this.root = mc.getDirectoryName(); this.recheck = null; this.protoChoice = FeatureCollectionConfig.ProtoChoice.Penultimate; // default this.olderThanInMsecs = -1; }
public MFileCollectionManager(String name, CollectionConfig mc, CalendarDate startPartition, org.slf4j.Logger logger) { super(name, logger); this.startCollection = startPartition; this.scanList.add(mc); this.root = mc.getDirectoryName(); this.recheck = null; this.protoChoice = FeatureCollectionConfig.ProtoChoice.Penultimate; // default this.olderThanInMsecs = -1; }
@Override public String toString() { Formatter f = new Formatter(); f.format("DatasetCollectionManager{ collectionName='%s' recheck=%s ", collectionName, recheck); for (CollectionConfig mc : scanList) { f.format("%n dir=%s filter=%s", mc.getDirectoryName(), mc.getFileFilter()); } return f.toString(); }
@Override public String toString() { Formatter f = new Formatter(); f.format("DatasetCollectionManager{ collectionName='%s' recheck=%s ", collectionName, recheck); for (CollectionConfig mc : scanList) { f.format("%n dir=%s filter=%s", mc.getDirectoryName(), mc.getFileFilter()); } return f.toString(); }
@Override public Iterator<MFile> getInventoryTop(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIterator(cd), false); // removes subdirs }
@Override public Iterator<MFile> getInventoryAll(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIteratorAll(cd), false); }
@Override public Iterator<MFile> getInventoryAll(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIteratorAll(cd), false); }
public Iterator<MFile> getSubdirs(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIterator(cd), true); // return only subdirs }
@Override public Iterator<MFile> getInventoryTop(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIterator(cd), false); // removes subdirs }
public Iterator<MFile> getSubdirs(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } File cd = new File(path); if (!cd.exists()) return null; if (!cd.isDirectory()) return null; return new FilteredIterator(mc, new MFileIterator(cd), true); // return only subdirs }
@Override public Iterator<MFile> getInventoryTop(CollectionConfig mc, boolean recheck) throws IOException { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } Path cd = Paths.get(path); if (!Files.exists(cd)) return null; return new MFileIterator(cd, new CollectionFilter(mc)); // removes subdirs }
@Override public Iterator<MFile> getInventoryTop(CollectionConfig mc, boolean recheck) throws IOException { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { path = path.substring(5); } Path cd = Paths.get(path); if (!Files.exists(cd)) return null; return new MFileIterator(cd, new CollectionFilter(mc)); // removes subdirs }