legacy/src/main/java/thredds/cataloggen/CollectionLevelScanner.java
private String getID( CrawlableDataset dataset )
  {
    if ( dataset == null )
      return null;
    if ( collectionId == null )
      return null;

    int i = collectionLevel.getPath().length();
    String id = dataset.getPath().substring( i );
    if ( id.startsWith( "/" ))
      id = id.substring( 1 );
    if ( collectionId.equals( "" ) )
    {
      if ( id.equals( ""))
        return null;
      return id;
    }
    if ( id.equals( "") )
      return collectionId;

    return( collectionId + "/" + id );
  }
private String getID( CrawlableDataset dataset )
  {
    if ( dataset == null )
      return null;
    if ( collectionId == null )
      return null;

    int i = collectionLevel.getPath().length();
    String id = dataset.getPath().substring( i );
    if ( id.startsWith( "/" ))
      id = id.substring( 1 );
    if ( collectionId.equals( "" ) )
    {
      if ( id.equals( ""))
        return null;
      return id;
    }
    if ( id.equals( "") )
      return collectionId;

    return( collectionId + "/" + id );
  }
- baseID + "/" + node.getPath().substring( collectionLevel.length) [when ID added at catalog construction using node info]