2ronwalf// Copyright (c) 2004 Evren Sirin 2ronwalf// Permission is hereby granted, free of charge, to any person obtaining a copy 2ronwalf// of this software and associated documentation files (the "Software"), to 2ronwalf// deal in the Software without restriction, including without limitation the 2ronwalf// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 2ronwalf// sell copies of the Software, and to permit persons to whom the Software is 2ronwalf// furnished to do so, subject to the following conditions: 2ronwalf// The above copyright notice and this permission notice shall be included in 2ronwalf// all copies or substantial portions of the Software. 2ronwalf// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2ronwalf// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2ronwalf// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2ronwalf// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2ronwalf// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2ronwalf// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 2ronwalf * Forces the readers to use the cached copies of the files even if the remote 2ronwalf * file may be available. When the forcing of cache is enabled the reader will 2ronwalf * first check if the cached copy exists and then only try to use the remote file 2ronwalf * when there is no cached copy. 2ronwalf * Returns if the using of cache is forced. 2ronwalf * Sets the cache dir for the inference engine to find the cached files when a 2ronwalf * file cannot be downparseed from its original URL. The cache dir should include 2ronwalf * a file named service.idx. This index file is a text file where each line is in 2ronwalf * [service description url]=[local filename] 2ronwalf * The ':' characters in the url's should be escaped as "\:" 2ronwalf * @param dir sets the local cache directory. if null it forces not to use the cache. 2ronwalf * if the given dir or index file inthat dir does not exist then nothing is 2ronwalf * Returns the full path to the local cache directory as a string 2ronwalf * @return a String indicating the path to the local cache directory 2ronwalf * Returns the cached source for the given URI. Returns null if there isn't an entry in the 2ronwalf * cache for the given file or cached file is not found. 2ronwalf * Add a local file to be used as a cached copy for the given URI. 2ronwalf * @param fileURI URI for the remote file 2ronwalf * @param localFile File for the local cached copy 2ronwalf * Attempt to update a cached file from remote site. The key can 2ronwalf * <p><b>WARNING</b>: Default implementation will not do anything when this function is called but this 2ronwalf * behaviour can be overridden with a new OWLCache implementation that saves the remote file 2ronwalf * locally and calls the addCachedFile() function so subsequent read operations will use the 2ronwalf * @param uri update the local cache by using the latest content from uri. 2ronwalf * Saves the current status of the index file (service.idx) persistently. 2ronwalf * All changes performed during the running session by calls of 2ronwalf * <code>addCachedFile(String, File)</code> are stored. 2ronwalf * @see addCachedFile(String fileURI, File localFile)