org.crosswire.jsword.book.install.sword
Class HttpSwordInstaller
java.lang.Object
org.crosswire.jsword.book.AbstractBookList
org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
org.crosswire.jsword.book.install.sword.HttpSwordInstaller
- All Implemented Interfaces:
- Comparable<AbstractSwordInstaller>, BookList, Installer
public class HttpSwordInstaller
- extends AbstractSwordInstaller
An implementation of Installer for reading data from Sword Web sites.
- Author:
- Mark Goodwin, Joe Walker, DM Smith
- See Also:
The GNU Lesser General Public License for details.
Fields inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller |
catalogDirectory, DOWNLOAD_PREFIX, entries, FILE_LIST_GZ, host, indexDirectory, loaded, log, packageDirectory, proxyHost, proxyPort, SEARCH_DIR, ZIP_SUFFIX |
Methods inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller |
close, compareTo, downloadSearchIndex, equals, getBook, getBooks, getBooks, getCachedIndexFile, getCatalogDirectory, getHost, getIndexDirectory, getInstallerDefinition, getPackageDirectory, getProxyHost, getProxyPort, install, isNewer, loadCachedIndex, reloadBookList, setCatalogDirectory, setHost, setIndexDirectory, setPackageDirectory, setProxyHost, setProxyPort |
HttpSwordInstaller
public HttpSwordInstaller()
getType
public String getType()
- Description copied from interface:
Installer
- Get the type of the Installer.
- Returns:
- the type of the installer
getSize
public int getSize(Book book)
- Description copied from interface:
Installer
- Return true if the book is not installed or there is a newer version to
install.
- Parameters:
book
- The book meta-data to check on.
- Returns:
- whether there is a newer version to install
toRemoteURI
public URI toRemoteURI(Book book)
- Parameters:
book
- The book meta-data to get a URI from.
- Returns:
- the remote URI for the BookMetaData
download
protected void download(Progress job,
String dir,
String file,
URI dest)
throws InstallException
- Description copied from class:
AbstractSwordInstaller
- Utility to download a file from a remote site
- Specified by:
download
in class AbstractSwordInstaller
- Parameters:
job
- The way of noting progressdir
- The directory from which to download the filefile
- The file to download
- Throws:
InstallException
copy
private void copy(Progress job,
URI uri,
URI dest)
throws LucidException
- Parameters:
job
- uri
- dest
-
- Throws:
LucidException
equals
public boolean equals(Object object)
- Overrides:
equals
in class AbstractSwordInstaller
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractSwordInstaller