Oracle Help for Java API Reference
Release 4.2.7.0.0
B12198-01

oracle.help.library.helpbook
Class HelpBook

java.lang.Object
  |
  +--oracle.help.library.helpbook.HelpBook
All Implemented Interfaces:
Book

public class HelpBook
extends java.lang.Object
implements Book

An implementation of the Book interface that supports the file formats used in Oracle Help for Java version 3.0 and earlier. This file format, described in the OHJ Authoring Guide, requires that all of the help control files (toc/hhc, tok/hhk, etc.) are in one directory. In addition, there may only be one view of each type. For a more robust Book interface implementation, see the HelpSet class.

See Also:

Constructor Summary
HelpBook()
          Create an empty HelpBook.
HelpBook(java.lang.Class baseClass, java.lang.String dirPathExt, java.lang.String baseName, java.lang.String bookTitle)
          Create a HelpBook with the specified title, loading the data from the given location.
HelpBook(java.lang.Class baseClass, java.lang.String dirPathExt, java.lang.String baseName, java.lang.String bookTitle, java.lang.String helpDefaultEncoding)
          Create a HelpBook with the specified title, loading the data from the given location using the specified encoding.
HelpBook(java.lang.String baseURL, java.lang.String baseName, java.lang.String bookTitle)
          Create a HelpBook with the specified title, loading the data from the given location.
HelpBook(java.lang.String baseURL, java.lang.String baseName, java.lang.String bookTitle, java.lang.String helpDefaultEncoding)
          Create a HelpBook with the specified title, loading the data from the given location using the specified encoding.
 
Method Summary
 oracle.help.common.View[] getAllViews()
          Get all of the View objects defined in this book (views of all types).
 oracle.help.common.AssociativeLink[] getAssociativeLinks()
          Get the AssociativeLink objects defined in this book.
 java.lang.String getBaseName()
          Returns the baseName.
 java.lang.String getBaseURL()
           
 java.lang.String getBookTitle()
          Get the title of the Book
 java.lang.String getTitle()
          Returns the book title.
 oracle.help.common.View[] getViewsByType(java.lang.String type)
          Get the View objects defined in this book of the specified type.
 oracle.help.common.WindowType[] getWindowTypes()
          Get the WindowType objects defined in this book.
 java.net.URL mapIDToURL(java.lang.String id)
          Get the URL the Book mapped to the given ID.
 java.lang.String mapURLToWindowTypeName(java.net.URL url)
          Get the name of the WindowType this Book has mapped to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelpBook

public HelpBook()
Create an empty HelpBook. Note: Most clients will use the HelpBook() constructors that load help content from a directory.

HelpBook

public HelpBook(java.lang.Class baseClass,
                java.lang.String dirPathExt,
                java.lang.String baseName,
                java.lang.String bookTitle)
         throws oracle.help.library.helpbook.HelpBookException
Create a HelpBook with the specified title, loading the data from the given location.
Parameters:
baseClass - A Java class. The HelpBook uses the location of this class to determine the location of your help data. The dirPathExt is appended to the absolute path to the directory containing the Java class. The HelpBook then looks for known control files (TOC, TOK, HHC, HHK, OHT, and IDX) named with the given basename.
dirpathExt - The dirPathExt is a path appended to the absolute path to the directory containing the baseClass. The resulting directory is then examined for control files.
baseName - The baseName of the control files in the specified directory (i.e. if your control files are named discoverer.hhc, discoverer.hhk, etc., the baseName would be "discoverer").
bookTitle - The title to use for this HelpBook.

HelpBook

public HelpBook(java.lang.Class baseClass,
                java.lang.String dirPathExt,
                java.lang.String baseName,
                java.lang.String bookTitle,
                java.lang.String helpDefaultEncoding)
         throws oracle.help.library.helpbook.HelpBookException
Create a HelpBook with the specified title, loading the data from the given location using the specified encoding.
Parameters:
baseClass - A Java class. The HelpBook uses the location of this class to determine the location of your help data. The dirPathExt is appended to the absolute path to the directory containing the Java class. The HelpBook then looks for known control files (TOC, TOK, HHC, HHK, OHT, and IDX) named with the given basename.
dirpathExt - The dirPathExt is a path appended to the absolute path to the directory containing the baseClass. The resulting directory is then examined for control files.
baseName - The baseName of the control files in the specified directory (i.e. if your control files are named discoverer.hhc, discoverer.hhk, etc., the baseName would be "discoverer").
helpDefaultEncoding -  
bookTitle - The title to use for this HelpBook.

HelpBook

public HelpBook(java.lang.String baseURL,
                java.lang.String baseName,
                java.lang.String bookTitle)
         throws oracle.help.library.helpbook.HelpBookException
Create a HelpBook with the specified title, loading the data from the given location.
Parameters:
baseURL - The string representation of the URL to the base directory which contains your help control files. This directory will be examined for control files named with the baseName.
baseName - The baseName of the control files in the specified directory (i.e. if your control files are named discoverer.hhc, discoverer.hhk, etc., the baseName would be "discoverer").
bookTitle - The title to use for this HelpBook.

HelpBook

public HelpBook(java.lang.String baseURL,
                java.lang.String baseName,
                java.lang.String bookTitle,
                java.lang.String helpDefaultEncoding)
         throws oracle.help.library.helpbook.HelpBookException
Create a HelpBook with the specified title, loading the data from the given location using the specified encoding.
Parameters:
baseURL - The string representation of the URL to the base directory which contains your help control files. This directory will be examined for control files named with the baseName.
baseName - The baseName of the control files in the specified directory (i.e. if your control files are named discoverer.hhc, discoverer.hhk, etc., the baseName would be "discoverer").
bookTitle - The title to use for this HelpBook.
helpDefaultEncoding -  
Method Detail

getBookTitle

public java.lang.String getBookTitle()
Description copied from interface: Book
Get the title of the Book
Specified by:
getBookTitle in interface Book

getViewsByType

public oracle.help.common.View[] getViewsByType(java.lang.String type)
Description copied from interface: Book
Get the View objects defined in this book of the specified type.
Specified by:
getViewsByType in interface Book
Following copied from interface: oracle.help.library.Book
Parameters:
type - The type identifier of the views to retrieve

getAllViews

public oracle.help.common.View[] getAllViews()
Description copied from interface: Book
Get all of the View objects defined in this book (views of all types).
Specified by:
getAllViews in interface Book

getWindowTypes

public oracle.help.common.WindowType[] getWindowTypes()
Description copied from interface: Book
Get the WindowType objects defined in this book.
Specified by:
getWindowTypes in interface Book

getAssociativeLinks

public oracle.help.common.AssociativeLink[] getAssociativeLinks()
Description copied from interface: Book
Get the AssociativeLink objects defined in this book.
Specified by:
getAssociativeLinks in interface Book

mapIDToURL

public java.net.URL mapIDToURL(java.lang.String id)
Description copied from interface: Book
Get the URL the Book mapped to the given ID. If the Book cannot map the topicID (i.e. the topicID is not in the book's map file) null will be returned.
Specified by:
mapIDToURL in interface Book
Following copied from interface: oracle.help.library.Book
Parameters:
id - The topicID.

mapURLToWindowTypeName

public java.lang.String mapURLToWindowTypeName(java.net.URL url)
Description copied from interface: Book
Get the name of the WindowType this Book has mapped to the given URL. If the Book cannot map the URL to a WindowType null will be returned.
Specified by:
mapURLToWindowTypeName in interface Book
Following copied from interface: oracle.help.library.Book
Parameters:
url - The URL to map.

getBaseURL

public java.lang.String getBaseURL()

getBaseName

public java.lang.String getBaseName()
Returns the baseName.

getTitle

public java.lang.String getTitle()
Returns the book title.

HELP ${project.version}

Copyright © 1998,2003, Oracle. All Rights Reserved.