setupTestCollection( rootPath);
CrawlableDataset top = getInstance( rootPath);
showCrDsAndDescendants( top );
System.out.println( "Generate top catalog" );
SimpleCatalogBuilder builder = new SimpleCatalogBuilder( "", top, "myservice", "OPENDAP", "/thredds/dodsC/");
String catAsString;
try
{
catAsString = builder.generateCatalogAsString( top);
}
catch ( IOException e )
{
System.out.println( "ERROR generating catalog: " + e.getMessage() );
return;
}
System.out.println( catAsString );
CrawlableDataset nc = getInstance( rootPath + "nc" );
System.out.println( "Generate nc catalog" );
builder = new SimpleCatalogBuilder( "", top, "myservice", "OPENDAP", "/thredds/dodsC/" );
try
{
catAsString = builder.generateCatalogAsString( nc );
}
catch ( IOException e )
{
System.out.println( "ERROR generating catalog: " + e.getMessage() );
return;
}
System.out.println( catAsString );
CrawlableDataset ncTest = getInstance( rootPath + "nc/Test" );
System.out.println( "Generate nc/Test catalog" );
builder = new SimpleCatalogBuilder( "", top, "myservice", "OPENDAP", "/thredds/dodsC/" );
try
{
catAsString = builder.generateCatalogAsString( ncTest );
}
catch ( IOException e )
{
System.out.println( "ERROR generating catalog: " + e.getMessage() );
return;