Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book.install.sword
Class FtpSwordInstaller

    java.lang.Object
      org.crosswire.jsword.book.basic.AbstractBookList
          org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
              org.crosswire.jsword.book.install.sword.FtpSwordInstaller

All Implemented Interfaces:
  Comparable, BookList, Installer

    public class FtpSwordInstaller

extends AbstractSwordInstaller
implements Comparable

An implementation of Installer for reading data from Sword FTP 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: FtpSwordInstaller.java,v 1.12 2005/03/19 01:56:47 dmsmith Exp $
Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `Licence`

Field Summary
`private static Logger` | `log` The log stream
`private String` | `password` The password to go with `username`.
`private static String` | `PROTOCOL_SWORD` We need to be ablee to provide a URL as part of the API
`private String` | `username` The remote username for a valid account on the `host`.

Fields inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
`directory, DOWNLOAD_PREFIX, entries, FILE_LIST_GZ, host, loaded, PACKAGE_DIR, SEARCH_DIR, ZIP_SUFFIX`

Constructor Summary
`FtpSwordInstaller()`

Method Summary
`protected void` | `download(Job job, String dir, String file, URL dest)` Utility to download a file from a remote site
`boolean` | `equals(Object object)`
`String` | `getPassword()`
`String` | `getURL()` Accessor for the URL
`String` | `getUsername()`
`int` | `hashCode()`
`void` | `setPassword(String password)`
`void` | `setUsername(String username)`
`URL` | `toRemoteURL(Book book)`
`String` | `toString()` Like getURL() except that we skip the password for display purposes.

Methods inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
`compareTo, downloadSearchIndex, equals, getBooks, getCachedIndexFile, getDirectory, getHost, install, isNewer, reloadBookList, setDirectory, setHost`

Methods inherited from class org.crosswire.jsword.book.basic.AbstractBookList
`addBooksListener, fireBooksChanged, getBooks, removeBooksListener`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.lang.Comparable
`compareTo`

Methods inherited from interface org.crosswire.jsword.book.BookList
`addBooksListener, getBooks, removeBooksListener`

Field Detail

### username

    private String username

  The remote username for a valid account on the `host`.

### password

    private String password

  The password to go with `username`.

### PROTOCOL_SWORD

    private static final String PROTOCOL_SWORD

  We need to be ablee to provide a URL as part of the API

  See Also:
    Constant Field Values

### log

    private static final Logger log

  The log stream

Constructor Detail

### FtpSwordInstaller

    public FtpSwordInstaller()

Method Detail

### 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 progress
    `dir` - The directory from which to download the file
    `file` - The file to download
  Throws:
    `InstallException`

### getPassword

    public String getPassword()

  Returns:
    Returns the password.

### setPassword

    public void setPassword(String password)

  Parameters:
    `password` - The password to set.

### getUsername

    public String getUsername()

  Returns:
    Returns the username.

### setUsername

    public void setUsername(String username)

  Parameters:
    `username` - The username to set.

### toString

    public String toString()

  Like getURL() except that we skip the password for display purposes.

  Overrides:
    `toString` in class `Object`
  See Also:
    `getURL()`, `Object.toString()`

### equals

    public boolean equals(Object object)

  Overrides:
    `equals` in class `AbstractSwordInstaller`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `AbstractSwordInstaller`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ? 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD