CollectionSpecParser.getFilterOnName
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using thredds.inventory.CollectionSpecParser.getFilterOnName (Showing top 3 results out of 315)

  • Common ways to obtain CollectionSpecParser
private void myMethod () {
CollectionSpecParser c =
  • String collectionSpec;Formatter errlog;new CollectionSpecParser(collectionSpec, errlog)
  • Smart code suggestions by Codota
}
origin: Unidata/thredds

partition.putAuxInfo(FeatureCollectionConfig.AUX_CONFIG, config);
if (specp.getFilter() != null)
 partition.setStreamFilter(new StreamFilter(specp.getFilter(), specp.getFilterOnName()));
origin: Unidata/thredds

/**
 * Update all the gbx indices in one directory, and the ncx index for that directory
 *
 * @param config  FeatureCollectionConfig
 * @param dirPath directory path
 * @return true if collection was rewritten, exception on failure
 * @throws IOException
 */
static private boolean updateLeafCollection(boolean isGrib1, FeatureCollectionConfig config,
                      CollectionUpdateType updateType, boolean isTop,
                      Logger logger, Path dirPath) throws IOException {
 if (config.ptype == FeatureCollectionConfig.PartitionType.file) {
  return updateFilePartition(isGrib1, config, updateType, isTop, logger, dirPath);
 } else {
  Formatter errlog = new Formatter();
  CollectionSpecParser specp = config.getCollectionSpecParser(errlog);
  try (DirectoryCollection dcm = new DirectoryCollection(config.collectionName, dirPath, isTop, config.olderThan, logger)) {
   dcm.putAuxInfo(FeatureCollectionConfig.AUX_CONFIG, config);
   if (specp.getFilter() != null)
    dcm.setStreamFilter(new StreamFilter(specp.getFilter(), specp.getFilterOnName()));
   boolean changed = updateGribCollection(isGrib1, dcm, updateType, FeatureCollectionConfig.PartitionType.directory, logger, errlog);
   if (debug) System.out.printf("  GribCdmIndex.updateDirectoryPartition was updated=%s on %s%n", changed, dirPath);
   return changed;
  }
 }
}
origin: Unidata/thredds

@Test
public void testStreamFilterInDirPartition() throws IOException {
 // this dataset 0-6 hour forecasts  x 124 runtimes (4x31)
 // there are  2 groups, likely miscoded, the smaller group are 0 hour,  duplicates, possibly miscoded
 FeatureCollectionConfig config = new FeatureCollectionConfig("cfrsAnalysis_46", "test/testCfrsAnalysisOnly", FeatureCollectionType.GRIB2,
     TestDir.cdmUnitTestDir + "gribCollections/cfsr/.*grb2", null, null, null, "directory", null);
 Formatter errlog = new Formatter();
 CollectionSpecParser specp = new CollectionSpecParser(config.spec, errlog);
 Path rootPath = Paths.get(specp.getRootDir());
 try (DirectoryCollection dcm = new DirectoryCollection(config.collectionName, rootPath, true, config.olderThan, logger)) {
  dcm.putAuxInfo(FeatureCollectionConfig.AUX_CONFIG, config);
  if (specp.getFilter() != null)
   dcm.setStreamFilter(new StreamFilter(specp.getFilter(), specp.getFilterOnName()));
  int count = 0;
  for (MFile mfile : dcm.getFilesSorted()) {
   System.out.printf("%s%n", mfile);
   assert mfile.getName().equals("pwat.gdas.199612.grb2");
   count++;
  }
  assert count == 1;
 }
}
thredds.inventoryCollectionSpecParsergetFilterOnName

Popular methods of CollectionSpecParser

  • getRootDir
  • <init>
    Single spec : "/topdir/** /#dateFormatMark#regExp" This only allows the dateFormatMark to be in the
  • getFilter
  • wantSubdirs
  • getDateFormatMark
  • doit
  • getPathMatcher

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)