public void addCollection(String spec, String olderThan) throws IOException { datasetManager = MFileCollectionManager.open(spec, olderThan, null); }
public void addCollection(String spec, String olderThan) throws IOException { datasetManager = MFileCollectionManager.open(spec, spec, olderThan, new Formatter()); }
public void addCollection(String spec, String olderThan) throws IOException { datasetManager = MFileCollectionManager.open(spec, spec, olderThan, new Formatter()); }
static public CollectionManager open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { if (collectionSpec.startsWith(CATALOG)) return new CollectionManagerCatalog(collectionName, collectionSpec, olderThan, errlog); else return MFileCollectionManager.open(collectionName, collectionSpec, olderThan, errlog); }
private Fmrc(String collectionSpec, Formatter errlog) throws IOException { this.manager = MFileCollectionManager.open(collectionSpec, collectionSpec, null, errlog); // LOOK no name this.config = new FeatureCollectionConfig(); this.config.spec = collectionSpec; }
private static void doit(String spec, Formatter errlog) throws IOException { MFileCollectionManager dcm = MFileCollectionManager.open("test", spec, null, errlog); TimedCollection specp = new TimedCollection(dcm, errlog); System.out.printf("spec= %s%n%s%n", spec, specp); String err = errlog.toString(); if (err.length() > 0) System.out.printf("%s%n", err); System.out.printf("-----------------------------------%n"); }
private Fmrc(String collectionSpec, Formatter errlog) throws IOException { this.manager = MFileCollectionManager.open(collectionSpec, null, errlog); this.config = new FeatureCollectionConfig(); this.config.spec = collectionSpec; }
private static void doit(String spec, Formatter errlog) throws IOException { CollectionManager dcm = MFileCollectionManager.open(spec, null, errlog); TimedCollection specp = new TimedCollection(dcm, errlog); System.out.printf("spec= %s%n%s%n", spec, specp); String err = errlog.toString(); if (err.length() > 0) System.out.printf("%s%n", err); System.out.printf("-----------------------------------%n"); }
private Fmrc(String collectionSpec, Formatter errlog) throws IOException { this.manager = MFileCollectionManager.open(collectionSpec, collectionSpec, null, errlog); // LOOK no name this.config = new FeatureCollectionConfig(); this.config.spec = collectionSpec; }
private static void doit(String spec, Formatter errlog) throws IOException { CollectionManager dcm = MFileCollectionManager.open("test", spec, null, errlog); TimedCollection specp = new TimedCollection(dcm, errlog); System.out.printf("spec= %s%n%s%n", spec, specp); String err = errlog.toString(); if (err.length() > 0) System.out.printf("%s%n", err); System.out.printf("-----------------------------------%n"); }
static public CollectionManager open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { if (collectionSpec.startsWith(CATALOG)) return new CollectionManagerCatalog(collectionName, collectionSpec, olderThan, errlog); else return MFileCollectionManager.open(collectionName, collectionSpec, olderThan, errlog); }
static public MCollection open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { if (collectionSpec.startsWith(CATALOG)) return new CollectionManagerCatalog(collectionName, collectionSpec.substring(CATALOG.length()), olderThan, errlog); else if (collectionSpec.startsWith(DIR)) return new DirectoryCollection(collectionName, collectionSpec.substring(DIR.length()), true, olderThan, null); else if (collectionSpec.startsWith(FILE)) { MFile file = MFileOS7.getExistingFile(collectionSpec.substring(FILE.length())); if (file == null) throw new FileNotFoundException(collectionSpec.substring(FILE.length())); return new CollectionSingleFile(file, null); }else if (collectionSpec.startsWith(LIST)) return new CollectionList(collectionName, collectionSpec.substring(LIST.length()), null); else if (collectionSpec.startsWith(GLOB)) return new CollectionGlob(collectionName, collectionSpec.substring(GLOB.length()), null); else return MFileCollectionManager.open(collectionName, collectionSpec, olderThan, errlog); }
static public MCollection open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException { if (collectionSpec.startsWith(CATALOG)) return new CollectionManagerCatalog(collectionName, collectionSpec.substring(CATALOG.length()), olderThan, errlog); else if (collectionSpec.startsWith(DIR)) return new DirectoryCollection(collectionName, collectionSpec.substring(DIR.length()), olderThan, null); else if (collectionSpec.startsWith(FILE)) return new CollectionSingleFile(MFileOS7.getExistingFile(collectionSpec.substring(FILE.length())), null); else if (collectionSpec.startsWith(LIST)) return new CollectionList(collectionName, collectionSpec.substring(LIST.length()), null); else if (collectionSpec.startsWith(GLOB)) return new CollectionGlob(collectionName, collectionSpec.substring(GLOB.length()), null); else return MFileCollectionManager.open(collectionName, collectionSpec, olderThan, errlog); }
CollectionManager dcm = MFileCollectionManager.open(spec, null, errlog); return CompositeDatasetFactory.factory(location, wantFeatureType, dcm, errlog);
CollectionManager dcm = MFileCollectionManager.open(spec, spec, null, errlog); // look we dont have a name return CompositeDatasetFactory.factory(location, wantFeatureType, dcm, errlog);
MFileCollectionManager dcm = MFileCollectionManager.open(spec, spec, null, errlog); // LOOK we dont have a name return CompositeDatasetFactory.factory(location, wantFeatureType, dcm, errlog);
@Test @Ignore("tests fail on jenkins due to file permisssions") public void testScanOlderThan() throws IOException, InterruptedException { Formatter f = new Formatter(System.out); CollectionManager dcm = MFileCollectionManager.open("testScanOlderThan", TestDir.cdmUnitTestDir + "agg/updating/.*nc$", null, f); dcm.scan(true); List<MFile> fileList = (List<MFile>) Misc.getList(dcm.getFilesSorted()); assert fileList.size() == 3 : dcm; assert touch(TestDir.cdmUnitTestDir + "agg/updating/extra.nc"); dcm = MFileCollectionManager.open("testScanOlderThan", TestDir.cdmUnitTestDir + "agg/updating/.*nc$", "10 sec", f); dcm.scan(true); fileList = (List<MFile>) Misc.getList(dcm.getFilesSorted()); assert fileList.size() == 2 : dcm; }
@Test public void testScan() throws IOException { // count scanned files Formatter f = new Formatter(System.out); CollectionManager dcm = MFileCollectionManager.open("testScan", TestDir.cdmUnitTestDir + "agg/narr/narr-a_221_#yyyyMMdd_HHmm#.*grb$", null, f); dcm.scan(true); List<MFile> fileList = (List<MFile>) Misc.getList(dcm.getFilesSorted()); assert fileList.size() == 3 : dcm; // check date extractor int count = 0; String[] result = new String[] {"2000-01-18T12:00:00", "2000-01-19T00:00:00", "2000-01-20T12:00:00"}; for (MFile mfile : dcm.getFilesSorted()) { CalendarDate de = dcm.extractDate(mfile); System.out.printf(" %s == %s%n", mfile.getPath(), de); assert de.toString().startsWith(result[count]); count++; } }