thredds.cataloggen.inserter
Class SimpleLatestProxyDsHandler

java.lang.Object
  extended by thredds.cataloggen.inserter.SimpleLatestProxyDsHandler
All Implemented Interfaces:
ProxyDatasetHandler

public class SimpleLatestProxyDsHandler
extends Object
implements ProxyDatasetHandler

_more_

Since:
Nov 29, 2005 12:12:53 PM
Author:
edavis

Constructor Summary
SimpleLatestProxyDsHandler(String latestName, boolean locateAtTopOrBottom, InvService service, boolean isResolver)
          Constructor.
 
Method Summary
 CrawlableDataset createProxyDataset(CrawlableDataset parent)
          Create a new dataset to add to the parent collection dataset.
 InvCrawlablePair getActualDataset(List atomicDsInfo)
          Determine the InvCrawlablePair from the given dataset collection (java.util.List) being proxied by this ProxyDatasetHandler.
 String getActualDatasetName(InvCrawlablePair actualDataset, String baseName)
           
 Object getConfigObject()
          Return the configuration object.
 int getProxyDatasetLocation(CrawlableDataset parent, int collectionDatasetSize)
          Return an integer which indicates the location/index at which the new dataset should be added to the parent collection dataset.
 String getProxyDatasetName()
          Return the name of the proxy dataset.
 InvService getProxyDatasetService(CrawlableDataset parent)
          Return the InvService to be used by the InvDataset that corresponds to the created dataset.
 boolean isLocateAtTopOrBottom()
           
 boolean isProxyDatasetResolver()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()

getConfigObject

public Object getConfigObject()
Description copied from interface: ProxyDatasetHandler
Return the configuration object.

Specified by:
getConfigObject in interface ProxyDatasetHandler
Returns:
the configuration Object (may be null).

getProxyDatasetName

public String getProxyDatasetName()
Description copied from interface: ProxyDatasetHandler
Return the name of the proxy dataset.

Specified by:
getProxyDatasetName in interface ProxyDatasetHandler
Returns:
the name of the proxy dataset.

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.

isProxyDatasetResolver

public boolean isProxyDatasetResolver()
Specified by:
isProxyDatasetResolver in interface ProxyDatasetHandler

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

getActualDatasetName

public String getActualDatasetName(InvCrawlablePair actualDataset,
                                   String baseName)
Specified by:
getActualDatasetName in interface ProxyDatasetHandler


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