thredds.cataloggen
Class DirectoryScanner

java.lang.Object
  extended by thredds.cataloggen.DirectoryScanner

public class DirectoryScanner
extends Object

Allow generation of THREDDS InvCatalog documents from the contents of a local directory.

Since:
2004-12-10T15:33:32-0700
Author:
edavis

Constructor Summary
DirectoryScanner(InvService service, String serviceTitle, File serviceBaseUrlDir, String prefixPath, boolean createCatalogRefs)
          Construct a DirectoryScanner given information about the data server to be cataloged.
 
Method Summary
 InvCatalog getDirCatalog(CrawlableDataset catalogCrDs, String filterPattern, boolean sortInIncreasingOrder, String addIdBase, boolean addDatasetSize, String dsNameMatchPattern, String startTimeSubstitutionPattern, String duration)
           
 InvCatalog getDirCatalog(File directory, String filterPattern, boolean sortInIncreasingOrder, boolean addDatasetSize)
          Return a catalog for the given directory.
 InvCatalog getDirCatalog(File directory, String filterPattern, boolean sortInIncreasingOrder, String addIdBase, boolean addDatasetSize, String dsNameMatchPattern, String startTimeSubstitutionPattern, String duration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryScanner

public DirectoryScanner(InvService service,
                        String serviceTitle,
                        File serviceBaseUrlDir,
                        String prefixPath,
                        boolean createCatalogRefs)
Construct a DirectoryScanner given information about the data server to be cataloged.

Parameters:
service - - the service for the datasets found in the directory scanned.
serviceTitle - - a title for the service (used as the title of the top-level dataset).
serviceBaseUrlDir - - the local directory to which the service's base URL references.
prefixPath - - path name to append to the urlPath of resulting datasets, can be null.
createCatalogRefs - - if true, generate a catalogRef for each directory, otherwise, recurse into directories.
Throws:
IllegalArgumentException - if invalid service type is given or root directory is not a directory.
Method Detail

getDirCatalog

public InvCatalog getDirCatalog(File directory,
                                String filterPattern,
                                boolean sortInIncreasingOrder,
                                boolean addDatasetSize)
Return a catalog for the given directory.

Parameters:
directory - - the directory to represent as a catalog.
filterPattern -
sortInIncreasingOrder -
Returns:
An InvCatalog that represents the given directory of datasets.
Throws:
NullPointerException - if the given directory is null.
IllegalArgumentException - if the given directory is not actually a directory or if it is not under the service base URL directory.

getDirCatalog

public InvCatalog getDirCatalog(File directory,
                                String filterPattern,
                                boolean sortInIncreasingOrder,
                                String addIdBase,
                                boolean addDatasetSize,
                                String dsNameMatchPattern,
                                String startTimeSubstitutionPattern,
                                String duration)

getDirCatalog

public InvCatalog getDirCatalog(CrawlableDataset catalogCrDs,
                                String filterPattern,
                                boolean sortInIncreasingOrder,
                                String addIdBase,
                                boolean addDatasetSize,
                                String dsNameMatchPattern,
                                String startTimeSubstitutionPattern,
                                String duration)


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