Class CrawlableDatasetAlias

  • All Implemented Interfaces:
    CrawlableDataset

    public class CrawlableDatasetAlias
    extends Object
    implements CrawlableDataset
    An alias for a collection of datasets (i.e., the dataset path contains one or more wildcard characters ("*")).
    Since:
    Jun 21, 2005T4:53:43 PM
    • Constructor Detail

      • CrawlableDatasetAlias

        public CrawlableDatasetAlias​(String path,
                                     String className,
                                     Object configObj)
    • Method Detail

      • isAlias

        public static boolean isAlias​(String path)
      • getName

        public String getName()
        Returns the name (unlike a CrawlableDataset, the name may not be related to the path).
        Specified by:
        getName in interface CrawlableDataset
        Returns:
        the dataset name, i.e., the last part of the dataset path.
      • exists

        public boolean exists()
        Description copied from interface: CrawlableDataset
        Return true if the dataset represented by this CrawlableDataset actually exists, null if it does not or an I/O error occurs.
        Specified by:
        exists in interface CrawlableDataset
        Returns:
        true if the dataset represented by this CrawlableDataset actually exists.
      • isCollection

        public boolean isCollection()
        Description copied from interface: CrawlableDataset
        Return true if the dataset is a collection dataset.
        Specified by:
        isCollection in interface CrawlableDataset
        Returns:
        true if the dataset is a collection dataset.
      • getDescendant

        public CrawlableDataset getDescendant​(String childPath)
        Description copied from interface: CrawlableDataset
        Return the requested descendant of this dataset.
        Specified by:
        getDescendant in interface CrawlableDataset
        Parameters:
        childPath - the path, relative to this dataset, of the requested dataset.
        Returns:
        the requested descendant of this dataset.
      • getParentDataset

        public CrawlableDataset getParentDataset()
        Description copied from interface: CrawlableDataset
        Returns the parent CrawlableDataset or null if this dataset has no parent.
        Specified by:
        getParentDataset in interface CrawlableDataset
        Returns:
        the parent CrawlableDataset or null if this dataset has no parent.
      • listDatasets

        public List<CrawlableDataset> listDatasets()
                                            throws IOException
        Description copied from interface: CrawlableDataset
        Returns the list of CrawlableDatasets contained in this collection dataset. The returned list will be empty if this collection dataset does not contain any children datasets. If this dataset is not a collection dataset, this method returns null.
        Specified by:
        listDatasets in interface CrawlableDataset
        Returns:
        Returns a list of the CrawlableDatasets contained in this collection dataset. The llist will be empty if no datasets are contained in this collection dataset.
        Throws:
        IOException - if an I/O error occurs while accessing the children datasets.
      • listDatasets

        public List<CrawlableDataset> listDatasets​(CrawlableDatasetFilter filter)
                                            throws IOException
        Description copied from interface: CrawlableDataset
        Returns the list of CrawlableDatasets contained in this collection dataset that satisfy the given filter. The returned list will be empty if this collection dataset does not contain any children datasets that satisfy the given filter.
        Specified by:
        listDatasets in interface CrawlableDataset
        Parameters:
        filter - a CrawlableDataset filter (if null, accept all datasets).
        Returns:
        Returns a list of the CrawlableDatasets contained in this collection dataset that satisfy the given filter. The list will be empty if no datasets are contained in this collection dataset.
        Throws:
        IOException - if an I/O error occurs while accessing the children datasets.
      • length

        public long length()
        Description copied from interface: CrawlableDataset
        Returns the size in bytes of the dataset, -1 if unknown.
        Specified by:
        length in interface CrawlableDataset
        Returns:
        the size in bytes of the dataset, -1 if unknown.
      • lastModified

        public Date lastModified()
        Description copied from interface: CrawlableDataset
        Returns the date the dataset was last modified, null if unknown.
        Specified by:
        lastModified in interface CrawlableDataset
        Returns:
        the date the dataset was last modified, null if unknown.