tds/src/main/java/thredds/featurecollection/InvDatasetFcFmrc.java
@Override
  protected DatasetBuilder makeDatasetTop(URI catURI, State localState) {
    DatasetBuilder top = new DatasetBuilder(null);
    top.transferInheritedMetadata(parent); // make all inherited metadata local
    top.setName(name);
    top.addServiceToCatalog(virtualService);

    ThreddsMetadata tmi = top.getInheritableMetadata();  // LOOK allow to change ??
    tmi.set(Dataset.FeatureType, FeatureType.GRID.toString()); // override GRIB
    tmi.set(Dataset.ServiceName, virtualService.getName());
    if (localState.coverage != null) tmi.set(Dataset.GeospatialCoverage, localState.coverage);
    if (localState.dateRange != null) tmi.set(Dataset.TimeCoverage, localState.dateRange);
    if (localState.vars != null) tmi.set(Dataset.VariableGroups, localState.vars);

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.TwoD)) {
      DatasetBuilder twoD = new DatasetBuilder(top);
      twoD.setName("Forecast Model Run Collection (2D time coordinates)");
      String myname = name + "_" + FMRC;
      myname = StringUtil2.replace(myname, ' ', "_");
      twoD.put(Dataset.UrlPath, this.configPath + "/" + myname);
      twoD.put(Dataset.Id, this.configPath + "/" + myname);
      twoD.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Forecast Model Run Collection (2D time coordinates)."));
      top.addDataset(twoD);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Best)) {
      DatasetBuilder best = new DatasetBuilder(top);
      best.setName("Best Time Series");
      String myname = name + "_" + BEST;
      myname = StringUtil2.replace(myname, ' ', "_");
      best.put(Dataset.UrlPath, this.configPath + "/" + myname);
      best.put(Dataset.Id, this.configPath + "/" + myname);
      best.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Best time series, taking the data from the most recent run available."));
      top.addDataset(best);
    }

    if (config.fmrcConfig.getBestDatasets() != null) {
      for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) {
        DatasetBuilder ds = new DatasetBuilder(top);
        ds.setName(bd.name);
        String myname = name + "_" + bd.name;
        myname = StringUtil2.replace(myname, ' ', "_");
        ds.put(Dataset.UrlPath, this.configPath + "/" + myname);
        ds.put(Dataset.Id, this.configPath + "/" + myname);
        ds.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Best time series, excluding offset hours less than " + bd.greaterThan));
        top.addDataset(ds);
      }
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Runs)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(RUN_TITLE);
      ds.setHref(getCatalogHref(RUNS));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantForecasts)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(FORECAST_TITLE);
      ds.setHref(getCatalogHref(FORECAST));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantOffsets)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(OFFSET_TITLE);
      ds.setHref(getCatalogHref(OFFSET));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Files) && (topDirectory != null)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(FILES);
      ds.setHref(getCatalogHref(FILES));
      top.addDataset(ds);
    }

    return top;
  }
@Override
  protected DatasetBuilder makeDatasetTop(URI catURI, State localState) {
    DatasetBuilder top = new DatasetBuilder(null);
    top.transferInheritedMetadata(parent); // make all inherited metadata local
    top.setName(name);
    top.addServiceToCatalog(virtualService);

    ThreddsMetadata tmi = top.getInheritableMetadata();  // LOOK allow to change ??
    tmi.set(Dataset.FeatureType, FeatureType.GRID.toString()); // override GRIB
    tmi.set(Dataset.ServiceName, virtualService.getName());
    if (localState.coverage != null) tmi.set(Dataset.GeospatialCoverage, localState.coverage);
    if (localState.dateRange != null) tmi.set(Dataset.TimeCoverage, localState.dateRange);
    if (localState.vars != null) tmi.set(Dataset.VariableGroups, localState.vars);

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.TwoD)) {
      DatasetBuilder twoD = new DatasetBuilder(top);
      twoD.setName("Forecast Model Run Collection (2D time coordinates)");
      String myname = name + "_" + FMRC;
      myname = StringUtil2.replace(myname, ' ', "_");
      twoD.put(Dataset.UrlPath, this.configPath + "/" + myname);
      twoD.put(Dataset.Id, this.configPath + "/" + myname);
      twoD.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Forecast Model Run Collection (2D time coordinates)."));
      top.addDataset(twoD);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Best)) {
      DatasetBuilder best = new DatasetBuilder(top);
      best.setName("Best Time Series");
      String myname = name + "_" + BEST;
      myname = StringUtil2.replace(myname, ' ', "_");
      best.put(Dataset.UrlPath, this.configPath + "/" + myname);
      best.put(Dataset.Id, this.configPath + "/" + myname);
      best.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Best time series, taking the data from the most recent run available."));
      top.addDataset(best);
    }

    if (config.fmrcConfig.getBestDatasets() != null) {
      for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) {
        DatasetBuilder ds = new DatasetBuilder(top);
        ds.setName(bd.name);
        String myname = name + "_" + bd.name;
        myname = StringUtil2.replace(myname, ' ', "_");
        ds.put(Dataset.UrlPath, this.configPath + "/" + myname);
        ds.put(Dataset.Id, this.configPath + "/" + myname);
        ds.addToList(Dataset.Documentation, new Documentation(null, null, null, "summary", "Best time series, excluding offset hours less than " + bd.greaterThan));
        top.addDataset(ds);
      }
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Runs)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(RUN_TITLE);
      ds.setHref(getCatalogHref(RUNS));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantForecasts)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(FORECAST_TITLE);
      ds.setHref(getCatalogHref(FORECAST));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantOffsets)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(OFFSET_TITLE);
      ds.setHref(getCatalogHref(OFFSET));
      top.addDataset(ds);
    }

    if (wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Files) && (topDirectory != null)) {
      CatalogRefBuilder ds = new CatalogRefBuilder(top);
      ds.setTitle(FILES);
      ds.setHref(getCatalogHref(FILES));
      top.addDataset(ds);
    }

    return top;
  }
@ Override protected DatasetBuilder makeDatasetTop ( URI catURI , State localState ) { DatasetBuilder top = new DatasetBuilder ( null ) ; top . transferInheritedMetadata ( parent ) ; // make all inherited metadata local top . setName ( name ) ; top . addServiceToCatalog ( virtualService ) ; ThreddsMetadata tmi = top . getInheritableMetadata ( ) ; // LOOK allow to change ?? tmi . set ( Dataset . FeatureType , FeatureType . GRID . toString ( ) ) ; // override GRIB tmi . set ( Dataset . ServiceName , virtualService . getName ( ) ) ; if ( localState . coverage != null ) tmi . set ( Dataset . GeospatialCoverage , localState . coverage ) ; if ( localState . dateRange != null ) tmi . set ( Dataset . TimeCoverage , localState . dateRange ) ; if ( localState . vars != null ) tmi . set ( Dataset . VariableGroups , localState . vars ) ; if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . TwoD ) ) { DatasetBuilder twoD = new DatasetBuilder ( top ) ; twoD . setName ( "Forecast Model Run Collection (2D time coordinates)" ) ; String myname = name + "_" + FMRC ; myname = StringUtil2 . replace ( myname , ' ' , "_" ) ; twoD . put ( Dataset . UrlPath , this . configPath + "/" + myname ) ; twoD . put ( Dataset . Id , this . configPath + "/" + myname ) ; twoD . addToList ( Dataset . Documentation , new Documentation ( null , null , null , "summary" , "Forecast Model Run Collection (2D time coordinates)." ) ) ; top . addDataset ( twoD ) ; } if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . Best ) ) { DatasetBuilder best = new DatasetBuilder ( top ) ; best . setName ( "Best Time Series" ) ; String myname = name + "_" + BEST ; myname = StringUtil2 . replace ( myname , ' ' , "_" ) ; best . put ( Dataset . UrlPath , this . configPath + "/" + myname ) ; best . put ( Dataset . Id , this . configPath + "/" + myname ) ; best . addToList ( Dataset . Documentation , new Documentation ( null , null , null , "summary" , "Best time series, taking the data from the most recent run available." ) ) ; top . addDataset ( best ) ; } if ( config . fmrcConfig . getBestDatasets ( ) != null ) { for ( FeatureCollectionConfig . BestDataset bd : config . fmrcConfig . getBestDatasets ( ) ) { DatasetBuilder ds = new DatasetBuilder ( top ) ; ds . setName ( bd . name ) ; String myname = name + "_" + bd . name ; myname = StringUtil2 . replace ( myname , ' ' , "_" ) ; ds . put ( Dataset . UrlPath , this . configPath + "/" + myname ) ; ds . put ( Dataset . Id , this . configPath + "/" + myname ) ; ds . addToList ( Dataset . Documentation , new Documentation ( null , null , null , "summary" , "Best time series, excluding offset hours less than " + bd . greaterThan ) ) ; top . addDataset ( ds ) ; } } if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . Runs ) ) { CatalogRefBuilder ds = new CatalogRefBuilder ( top ) ; ds . setTitle ( RUN_TITLE ) ; ds . setHref ( getCatalogHref ( RUNS ) ) ; top . addDataset ( ds ) ; } if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . ConstantForecasts ) ) { CatalogRefBuilder ds = new CatalogRefBuilder ( top ) ; ds . setTitle ( FORECAST_TITLE ) ; ds . setHref ( getCatalogHref ( FORECAST ) ) ; top . addDataset ( ds ) ; } if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . ConstantOffsets ) ) { CatalogRefBuilder ds = new CatalogRefBuilder ( top ) ; ds . setTitle ( OFFSET_TITLE ) ; ds . setHref ( getCatalogHref ( OFFSET ) ) ; top . addDataset ( ds ) ; } if ( wantDatasets . contains ( FeatureCollectionConfig . FmrcDatasetType . Files ) && ( topDirectory != null ) ) { CatalogRefBuilder ds = new CatalogRefBuilder ( top ) ; ds . setTitle ( FILES ) ; ds . setHref ( getCatalogHref ( FILES ) ) ; top . addDataset ( ds ) ; } return top ; }
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////