legacy/src/main/java/thredds/cataloggen/config/DatasetSource.java
private void nameDatasetTree( InvDatasetImpl dataset)
  {
    // If dataset does not have a name, try naming it with dsNamers.
    // @todo Rethink naming of directories (look at how DatasetFilter deals with collection vs atomic datasets).
    if ( dataset.getName().equals("") || ! dataset.hasAccess())
    {
      logger.debug( "nameDatasetTree(): naming dataset ({})...", dataset.getUrlPath());
      DatasetNamer dsN = null;
      for ( int i = 0; i < this.datasetNamerList.size(); i++)
      {
        dsN = (DatasetNamer) this.datasetNamerList.get( i);
        if ( dsN.nameDataset( dataset))
        {
          logger.debug( "nameDatasetTree(): ... used namer ({})", dsN.getName());
          break;
        }
      }
    }

    // Try to name any child datasets.
    InvDatasetImpl curDs = null;
    for ( int j = 0; j < dataset.getDatasets().size(); j++)
    {
      curDs = (InvDatasetImpl) dataset.getDatasets().get( j);
      logger.debug( "nameDatasetTree(): recurse to name child dataset ({})", curDs.getUrlPath());
      this.nameDatasetTree( curDs);
    }

    return;
  }
private void nameDatasetTree( InvDatasetImpl dataset)
  {
    // If dataset does not have a name, try naming it with dsNamers.
    // @todo Rethink naming of directories (look at how DatasetFilter deals with collection vs atomic datasets).
    if ( dataset.getName().equals("") || ! dataset.hasAccess())
    {
      logger.debug( "nameDatasetTree(): naming dataset ({})...", dataset.getUrlPath());
      DatasetNamer dsN = null;
      for ( int i = 0; i < this.datasetNamerList.size(); i++)
      {
        dsN = (DatasetNamer) this.datasetNamerList.get( i);
        if ( dsN.nameDataset( dataset))
        {
          logger.debug( "nameDatasetTree(): ... used namer ({})", dsN.getName());
          break;
        }
      }
    }

    // Try to name any child datasets.
    InvDatasetImpl curDs = null;
    for ( int j = 0; j < dataset.getDatasets().size(); j++)
    {
      curDs = (InvDatasetImpl) dataset.getDatasets().get( j);
      logger.debug( "nameDatasetTree(): recurse to name child dataset ({})", curDs.getUrlPath());
      this.nameDatasetTree( curDs);
    }

    return;
  }
private void nameDatasetTree ( InvDatasetImpl dataset ) { // If dataset does not have a name, try naming it with dsNamers. // @todo Rethink naming of directories (look at how DatasetFilter deals with collection vs atomic datasets). if ( dataset . getName ( ) . equals ( "" ) || ! dataset . hasAccess ( ) ) { logger . debug ( "nameDatasetTree(): naming dataset ({})..." , dataset . getUrlPath ( ) ) ; DatasetNamer dsN = null ; for ( int i = 0 ; i < this . datasetNamerList . size ( ) ; i ++ ) { dsN = ( DatasetNamer ) this . datasetNamerList . get ( i ) ; if ( dsN . nameDataset ( dataset ) ) { logger . debug ( "nameDatasetTree(): ... used namer ({})" , dsN . getName ( ) ) ; break ; } } } // Try to name any child datasets. InvDatasetImpl curDs = null ; for ( int j = 0 ; j < dataset . getDatasets ( ) . size ( ) ; j ++ ) { curDs = ( InvDatasetImpl ) dataset . getDatasets ( ) . get ( j ) ; logger . debug ( "nameDatasetTree(): recurse to name child dataset ({})" , curDs . getUrlPath ( ) ) ; this . nameDatasetTree ( curDs ) ; } return ; }
Name the datasets in the given dataset hierarchy using this
DatasetSource's list of datasetNamers.
Name the datasets in the given dataset hierarchy using this DatasetSource s list of datasetNamers .