org.crosswire.jsword.book.install.sword
Class HttpSwordInstaller
java.lang.Object
org.crosswire.jsword.book.basic.AbstractBookList
org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
org.crosswire.jsword.book.install.sword.HttpSwordInstaller
- All Implemented Interfaces:
- Comparable, BookList, Installer
public class HttpSwordInstaller
- extends AbstractSwordInstaller
- implements Comparable
An implementation of Installer for reading data from Sword Web sites.
Distribution Licence:
JSword is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License,
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
The License is available on the internet
here, or by writing to:
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
The copyright to this program is held by it's authors.
|
- Version:
- $Id: HttpSwordInstaller.java,v 1.21 2005/03/22 12:40:03 dmsmith Exp $
- Author:
- Mark Goodwin [goodwinster at gmail dot com], Joe Walker [joe at eireneh dot com]
- See Also:
Licence
Field Summary |
private static String |
PROTOCOL_WEB
We need to be ablee to provide a URL as part of the API |
Methods inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller |
compareTo, downloadSearchIndex, equals, getBooks, getCachedIndexFile, getDirectory, getHost, install, isNewer, reloadBookList, setDirectory, setHost |
PROTOCOL_WEB
private static final String PROTOCOL_WEB
- We need to be ablee to provide a URL as part of the API
- See Also:
- Constant Field Values
HttpSwordInstaller
public HttpSwordInstaller()
getURL
public String getURL()
- Description copied from interface:
Installer
- Accessor for the URL
- Specified by:
getURL
in interface Installer
- Returns:
- the source url
toRemoteURL
public URL toRemoteURL(Book book)
- Specified by:
toRemoteURL
in interface Installer
- Parameters:
book
- The book meta-data to get a URL from.
- Returns:
- the remote url for the BookMetaData
download
protected void download(Job job,
String dir,
String file,
URL 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(Job job,
URL url,
URL dest)
throws IOException,
InstallException
- Parameters:
job
- url
- dest
-
- Throws:
IOException
InstallException
equals
public boolean equals(Object object)
- Overrides:
equals
in class AbstractSwordInstaller
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractSwordInstaller