Class SimpleLatestProxyDsHandler

    • Constructor Detail

      • SimpleLatestProxyDsHandler

        public SimpleLatestProxyDsHandler​(String latestName,
                                          boolean locateAtTopOrBottom,
                                          InvService service,
                                          boolean isResolver)
        Constructor. The latestName is used as the name of latest dataset created. The location for the placement of the latest dataset is given by locateAtTopOrBottom (true - locate on top; false - locate on bottom).
        Parameters:
        latestName - the name to be used for all latest dataset, if null, the default is "latest.xml".
        locateAtTopOrBottom - indicates where to locate the latest dataset (true - locate on top; false - locate on bottom).
        service - the InvService used by the created dataset.
    • Method Detail

      • isLocateAtTopOrBottom

        public boolean isLocateAtTopOrBottom()
      • createProxyDataset

        public CrawlableDataset createProxyDataset​(CrawlableDataset parent)
        Description copied from interface: ProxyDatasetHandler
        Create a new dataset to add to the parent collection dataset.
        Specified by:
        createProxyDataset in interface ProxyDatasetHandler
        Parameters:
        parent - the collection dataset in which to add the dataset being created.
        Returns:
        A new CrawlableDataset to be added to the parent dataset (in the InvDataset arena).
      • getProxyDatasetService

        public InvService getProxyDatasetService​(CrawlableDataset parent)
        Description copied from interface: ProxyDatasetHandler
        Return the InvService to be used by the InvDataset that corresponds to the created dataset.
        Specified by:
        getProxyDatasetService in interface ProxyDatasetHandler
        Parameters:
        parent - the collection dataset in which to add the dataset being created.
        Returns:
        the InvService used by the InvDataset that corresponds to the created dataset.
      • getProxyDatasetLocation

        public int getProxyDatasetLocation​(CrawlableDataset parent,
                                           int collectionDatasetSize)
        Description copied from interface: ProxyDatasetHandler
        Return an integer which indicates the location/index at which the new dataset should be added to the parent collection dataset.
        Specified by:
        getProxyDatasetLocation in interface ProxyDatasetHandler
        Parameters:
        parent - the collection dataset in which to add the dataset being created.
        collectionDatasetSize - the number of datasets currentlyin the parent collection dataset.
        Returns:
        The location at which the new dataset is to be added to the parent collection dataset.
      • getActualDataset

        public InvCrawlablePair getActualDataset​(List atomicDsInfo)
        Description copied from interface: ProxyDatasetHandler
        Determine the InvCrawlablePair from the given dataset collection (java.util.List) being proxied by this ProxyDatasetHandler.
        Specified by:
        getActualDataset in interface ProxyDatasetHandler
        Parameters:
        atomicDsInfo - a list of InvCrawlablePair objects representing a dataset collection.
        Returns:
        the InvCrawlablePair being proxied by this proxy dataset