thredds.catalog.crawl
Class CatalogExtractor

java.lang.Object
  extended by thredds.catalog.crawl.CatalogExtractor
All Implemented Interfaces:
CatalogCrawler.Listener

public class CatalogExtractor
extends Object
implements CatalogCrawler.Listener

Utilities for extracting info from a catalog.

Author:
John Caron

Constructor Summary
CatalogExtractor(boolean verbose)
          Constuctor
 
Method Summary
 void copy(String catUrl, String copyToDir, CancelTask task)
           
 void extract(PrintStream out, String catUrl, int type, boolean skipDatasetScan, CancelTask task)
           
 void extractLoop(PrintStream out, String catUrl, int type, boolean skipDatasetScan, CancelTask task)
           
 boolean extractTypedDatasetInfo(PrintStream out, InvDataset ds)
           
 boolean getCatalogRef(InvCatalogRef dd, Object context)
          Gets called for each catalogRef found
 void getDataset(InvDataset ds, Object context)
          Gets called for each dataset found.
 boolean openDataset(PrintStream out, InvDataset ds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogExtractor

public CatalogExtractor(boolean verbose)
Constuctor

Parameters:
verbose - output status messages
Method Detail

copy

public void copy(String catUrl,
                 String copyToDir,
                 CancelTask task)
          throws IOException
Throws:
IOException

extractLoop

public void extractLoop(PrintStream out,
                        String catUrl,
                        int type,
                        boolean skipDatasetScan,
                        CancelTask task)
                 throws IOException
Throws:
IOException

extract

public void extract(PrintStream out,
                    String catUrl,
                    int type,
                    boolean skipDatasetScan,
                    CancelTask task)
             throws IOException
Throws:
IOException

getDataset

public void getDataset(InvDataset ds,
                       Object context)
Description copied from interface: CatalogCrawler.Listener
Gets called for each dataset found.

Specified by:
getDataset in interface CatalogCrawler.Listener
Parameters:
ds - the dataset
context - caller can pass this object in (used for thread safety)

getCatalogRef

public boolean getCatalogRef(InvCatalogRef dd,
                             Object context)
Description copied from interface: CatalogCrawler.Listener
Gets called for each catalogRef found

Specified by:
getCatalogRef in interface CatalogCrawler.Listener
Parameters:
dd - the dataset
context - caller can pass this object in (used for thread safety)
Returns:
true to process, false to skip

openDataset

public boolean openDataset(PrintStream out,
                           InvDataset ds)

extractTypedDatasetInfo

public boolean extractTypedDatasetInfo(PrintStream out,
                                       InvDataset ds)


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.