@Override public CloseableIterator<MFile> getFileIterator() throws IOException { return new MFileIterator(org.getFileIterator(), filter); } }
public CollectionConfig subdir(MFile child) { return new CollectionConfig( name+"/"+child.getName(), dirName+"/"+child.getName(), wantSubdirs, ff, child.getAuxInfo()); }
public DateExtractor getDateExtractor() { if (dateFormatMark != null) return new DateExtractorFromName(dateFormatMark, false); else { CollectionSpecParser sp = getCollectionSpecParser(null); if (sp.getDateFormatMark() != null) return new DateExtractorFromName(sp.getDateFormatMark(), true); } return new DateExtractorNone(); }
public thredds.inventory.MCollection subdir(MFile child) { return new MCollection( name+"/"+child.getName(), dirName+"/"+child.getName(), wantSubdirs, ff, child.getAuxInfo()); }
Dataset(MFile f) { this.location = f.getPath(); this.start = manager.extractDate(f); }
Dataset(MFile f) { this.location = f.getPath(); this.start = manager.extractDate(f); }
Dataset(MFile f) { this.location = f.getPath(); this.start = manager.extractRunDate(f); }
@Override public void updateNocheck() throws IOException { sendEvent(new TriggerEvent(this, TriggerType.updateNocheck)); }
@Override public boolean scanIfNeeded() throws IOException { // if (map == null && !isStatic()) return true; return isScanNeeded() && scan(false); }
protected void finishConstruction() { dcm.addEventListener(this); // now wired for events CollectionUpdater.INSTANCE.scheduleTasks(config, dcm); // see if any background tasks are needed }
/** * For retrofitting to Aggregation * Must also call addDirectoryScan one or more times * * @param recheckS a undunit time unit, specifying how often to rscan */ private MFileCollectionManager(String collectionName, String recheckS) { super(collectionName, null); this.recheck = makeRecheck(recheckS); this.olderThanInMsecs = -1; this.protoChoice = FeatureCollectionConfig.ProtoChoice.Penultimate; }
static public void main(String args[]) { doit("/san4/work/jcaron/cfsrr/198507", "#cfsrr/#yyyyMM",false); doit("/data/ldm/pub/native/grid/NCEP/GFS/Alaska_191km/20111226/Run_1200.grib1", "#Alaska_191km/#yyyyMMdd'/Run_'HHmm",false); doit("pgb.ft06.198407", "pgb.ft06.#yyyyMM", true); // yyyyMM fails on pgb.ft06.198407 ParseException:Unparseable date: "pgb.ft06.198407" } }
@Override public MFile getLatestFile() throws IOException { MFile result = null; for (MFile f : getFilesSorted()) // only have an Iterable result = f; return result; }
@Override public void sendEvent(CollectionUpdateType type) { sendEvent(new TriggerEvent(this, type)); }
@Override public boolean scanIfNeeded() throws IOException { // if (map == null && !isStatic()) return true; return isScanNeeded() && scan(false); }