public void printLibrary(HttpServletRequest request,HttpServletResponse response,String pathPrefix,CoverageAttributeTable cat) throws ServletException, IOException {
  PrintWriter out=response.getWriter();
  if (cat == null) {
    out.println("<H2>Catalog doesn't exist</H2>");
    return;
  }
  String libName=cat.getLibraryName();
  String libpath=pathPrefix + "/" + libName;
  out.println("<H2>Library <A NAME=\"" + libName + "\"></A>"+ buildURL(request,response,pathPrefix,libName,libName)+ "</H2>");
  String[] coverages=cat.getCoverageNames();
  Arrays.sort(coverages);
  HtmlListElement list=new HtmlListElement();
  list.addElement("Library uses " + (cat.isTiledData() ? "tiled" : "untiled") + " data");
  HtmlListElement clist=new HtmlListElement("Coverage names (from " + buildURL(request,response,libpath,"cat") + ")");
  list.addElement(clist);
  for (int i=0; i < coverages.length; i++) {
    clist.addElement("<A HREF=\"#" + libName + "_"+ coverages[i]+ "\">"+ coverages[i]+ "</A>");
  }
  list.addElement("Library Header Table: " + buildURL(request,response,libpath,"lht"));
  list.addElement("Geographic Reference Table: " + buildURL(request,response,libpath,"grt"));
  list.generate(out);
  for (int i=0; i < coverages.length; i++) {
    printCoverage(request,response,libpath + "/" + coverages[i],libName,cat,coverages[i]);
  }
}

public void printLibrary ( HttpServletRequest request , HttpServletResponse response , String pathPrefix , CoverageAttributeTable cat ) throws ServletException , IOException { PrintWriter out = response . getWriter ( ) ; if ( cat == null ) { out . println ( "<H2>Catalog doesn't exist</H2>" ) ; return ; } String libName = cat . getLibraryName ( ) ; String libpath = pathPrefix + "/" + libName ; out . println ( "<H2>Library <A NAME=\"" + libName + "\"></A>" + buildURL ( request , response , pathPrefix , libName , libName ) + "</H2>" ) ; String [ ] coverages = cat . getCoverageNames ( ) ; Arrays . sort ( coverages ) ; HtmlListElement list = new HtmlListElement ( ) ; list . addElement ( "Library uses " + ( cat . isTiledData ( ) ? "tiled" : "untiled" ) + " data" ) ; HtmlListElement clist = new HtmlListElement ( "Coverage names (from " + buildURL ( request , response , libpath , "cat" ) + ")" ) ; list . addElement ( clist ) ; for ( int i = 0 ; i < coverages . length ; i ++ ) { clist . addElement ( "<A HREF=\"#" + libName + "_" + coverages [ i ] + "\">" + coverages [ i ] + "</A>" ) ; } list . addElement ( "Library Header Table: " + buildURL ( request , response , libpath , "lht" ) ) ; list . addElement ( "Geographic Reference Table: " + buildURL ( request , response , libpath , "grt" ) ) ; list . generate ( out ) ; for ( int i = 0 ; i < coverages . length ; i ++ ) { printCoverage ( request , response , libpath + "/" + coverages [ i ] , libName , cat , coverages [ i ] ) ; } }
prints a vpf library .
