dods.servers.agg
Class CatalogServlet

java.lang.Object
  extended by HttpServlet
      extended by dods.servlet.DODSServlet
          extended by dods.servers.agg.CatalogServlet

public class CatalogServlet
extends DODSServlet

This servlet uses an InventoryCatalog XML files to list what datasets it can serve. It can currently 1) serve netcdf files and 2) aggregate files into logical datasets using files from other DODS servers or from its own set of netcdf files. (It will be possible to serve other kinds of files later). The configuration file is kept in "$user_home/DODSagg.ini"; it should have one or both of the following sections:

 [Catalog]
 catalogURL        =  the xml catalog URL
 maxDatasetsCached =  number of datasets to cache; old ones are closed using an LRU algorithm.
 dataRoot          =  data root directory for netcdf files
 

Version:
$Id: CatalogServlet.java,v 1.3 2004/02/06 15:23:49 donm Exp $
Author:
John Caron

Constructor Summary
CatalogServlet()
           
 
Method Summary
 void doGetDIR(HttpServletRequest request, HttpServletResponse response, requestState rs)
          dataset directory
protected  GuardedDataset getDataset(requestState preq)
          dataset caching
 String getServerVersion()
          This function must be implemented locally for each DODS server.
 void init()
          Intitializes the servlet.
protected  void printCatalog(PrintWriter pw)
           
protected  void printStatus(PrintWriter os)
           
 
Methods inherited from class dods.servlet.DODSServlet
anyExceptionHandler, badURL, dodsExceptionHandler, doGet, doGetASC, doGetCatalog, doGetDAS, doGetDDS, doGetDODS, doGetHELP, doGetHTML, doGetINFO, doGetStatus, doGetVER, getDAS, getServerName, isTheClientCompressed, openCachedDAS, openCachedDDS, parseExceptionHandler, probeRequest, processDodsURL, sendDODSError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogServlet

public CatalogServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Description copied from class: DODSServlet
Intitializes the servlet. Init (at this time) basically sets up the object dods.util.Debug from the debuggery flags in the servlet InitParameters. The Debug object can be referenced (with impunity) from any of the dods code...

Overrides:
init in class DODSServlet
Throws:
javax.servlet.ServletException

getServerVersion

public String getServerVersion()
Description copied from class: DODSServlet
This function must be implemented locally for each DODS server. It should return a String containing the DODS Server Version...

Specified by:
getServerVersion in class DODSServlet

printCatalog

protected void printCatalog(PrintWriter pw)
                     throws IOException
Overrides:
printCatalog in class DODSServlet
Throws:
IOException

printStatus

protected void printStatus(PrintWriter os)
                    throws IOException
Overrides:
printStatus in class DODSServlet
Throws:
IOException

doGetDIR

public void doGetDIR(HttpServletRequest request,
                     HttpServletResponse response,
                     requestState rs)
              throws IOException,
                     ServletException
dataset directory

Overrides:
doGetDIR in class DODSServlet
Parameters:
request - The client's HttpServletRequest request object.
response - The server's HttpServletResponse response object.
Throws:
IOException
ServletException
See Also:
dodsDIR

getDataset

protected GuardedDataset getDataset(requestState preq)
                             throws DODSException,
                                    IOException,
                                    ParseException
dataset caching

Specified by:
getDataset in class DODSServlet
Returns:
The ServerDDS object all parsed and ready to roll.
Throws:
DODSException
IOException
ParseException
See Also:
ServerDDS, sqlServerFactory, test_ServerFactory