Class DodsDirDatasetSource


  • public class DodsDirDatasetSource
    extends DatasetSource

    Title: Catalog Generator

    Description: Tool for generating THREDDS catalogs.

    Copyright: Copyright (c) 2001

    Company: UCAR/Unidata

    • Constructor Detail

      • DodsDirDatasetSource

        public DodsDirDatasetSource()
    • Method Detail

      • createDataset

        protected InvDataset createDataset​(String datasetLocation,
                                           String prefixUrlPath)
                                    throws IOException
        Description copied from class: DatasetSource
        Creates an InvDataset to represent the dataset at the given location on this DatasetSource.
        Specified by:
        createDataset in class DatasetSource
        Parameters:
        datasetLocation - a String indicating the location of a dataset.
        prefixUrlPath - a path name to be prefixed on the urlPath
        Returns:
        an InvDataset for the given dataset location.
        Throws:
        IOException - if the dataset location does not correspond to an actual dataset or is not below the accessPointHeader directory.
      • createSkeletonCatalog

        protected InvCatalog createSkeletonCatalog​(String prefixUrlPath)
                                            throws IOException
        Build an unnamed InvCatalog for this DatasetSource and return the top-level InvDataset. The ResultService for this DatasetSource is used to create the InvService for the new InvCatalog. Each InvDataset in the catalog is named with the location of the object they represent on the dataset source.
        Specified by:
        createSkeletonCatalog in class DatasetSource
        Returns:
        the top-level dataset of the newly constructed InvCatalog.
        Throws:
        IOException - if top-level dataset does not exist or is not a collection dataset.
      • isCollection

        protected boolean isCollection​(InvDataset dataset)
        Return true if the given dataset is a collection dataset, false otherwise.
        Specified by:
        isCollection in class DatasetSource
        Parameters:
        dataset - - the InvDataset to test for being a collection dataset.
        Returns:
        true if the given dataset is a collection dataset, false otherwise.
        Throws:
        NullPointerException - if the given InvDataset is null.
        ClassCastException - if the given InvDataset is not a DodsDirInvDataset.
      • expandThisLevel

        protected List expandThisLevel​(InvDataset dataset,
                                       String prefixUrlPath)
        Return a list of the InvDatasets contained in the given collection dataset on this DatasetSource.
        Specified by:
        expandThisLevel in class DatasetSource
        Parameters:
        dataset - - the collection dataset to be expanded.
        Returns:
        A list of the InvDatasets contained in the given collection dataset.
        Throws:
        IllegalArgumentException - when given dataset is not a collection dataset.
        NullPointerException - if given dataset is null.
        ClassCastException - if the given InvDataset is not a DodsDirInvDataset.