286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 2001-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * @author Morten Jorgensen 286N/A * Inner class containing a DOMImpl object and DTD handler 286N/A // DOM and DTD handler references 286N/A * Constructor - load document and initialise statistics 286N/A // Initialise statistics variables 286N/A * Loads the document and updates build-time (latency) statistics 286N/A // The build time can be used for statistics for a better 286N/A // priority algorithm (currently round robin). 286N/A * DocumentCache constructor 286N/A * DocumentCache constructor 286N/A // Create a SAX parser and get the XMLReader object it uses 286N/A * Returns the time-stamp for a document's last update 286N/A // Check for a "file:" URI (courtesy of Brian Ewins) 286N/A // Brutal handling of all exceptions 286N/A // Insert out URI in circular buffer 286N/A // Remove oldest URI from reference Hashtable 286N/A // Insert our URI in circular buffer 286N/A * Returns a document either by finding it in the cache or 286N/A * downloading it and putting it in the cache. 286N/A // Try to get the document from the cache first 286N/A // If the document is in the cache we must check if it is still valid 286N/A // Has the modification time for this file been checked lately? 286N/A // Reload document if it has been modified since last download 286N/A // Get the references to the actual DOM and DTD handler 286N/A // The dom reference may be null if the URL pointed to a 286N/A // non-existing document 286N/A // Give the translet an early opportunity to extract any 286N/A // information from the DOM object that it would like. 286N/A * Outputs the cache statistics 286N/A "<tr><td><b>Document URI</b></td>"+
286N/A "<td><center><b>Build time</b></center></td>"+
286N/A "<td><center><b>Access count</b></center></td>"+
286N/A "<td><center><b>Last accessed</b></center></td>"+
286N/A "<td><center><b>Last modified</b></center></td></tr>");