agentland.help.helpfile
Class HelpFile

java.lang.Object
  |
  +--agentland.help.helpfile.HelpFile
All Implemented Interfaces:
Comparable, Serializable, Speakable

public class HelpFile
extends Object
implements Comparable, Serializable, Speakable

HelpFile is a Java object that represents a help file. This object is passed between agents in the Help System.

See Also:
Comparable, Serializable, Help, Serialized Form

Constructor Summary
HelpFile(String sXMLFile)
          Creates a new HelpFile instance.
HelpFile(String sXMLFile, String sBasePath)
          Creates a new HelpFile instance.
 
Method Summary
 int compareTo(Object o)
          Compares this HelpFile with another Object.
 boolean equals(Object oObj)
          Returns whether this HelpFile is equal to another HelpFile.
 String get()
          Returns the textual information associated with the current subtopic of the help file.
 String get(String sSubtopicName)
          Gets the text of the given subtopic.
 String getID()
          Returns a String ID for this HelpFile (and the current subtopic).
 ArrayList getKeywords()
          Gets the keywords associated with this topic.
 String getName()
          Gets the name of this.
 String getNext()
          Gets the text of the next subtopic (the one following the current subtopic).
 String getRelativeHTMLFileName()
          Gets the filename of the relative HTML file.
 ArrayList getSubtopicNames()
          Gets the names of the subtopics of this topic.
 URL getTopURL()
          Gets the main URL of the HTML equivalent of this help file.
 URL getURL()
          Gets the URL of the current subtopic.
 String getXMLSourceFullFileName()
          Gets the file name of the source XML help file.
 boolean isHTMLCurrent()
           
 void toHTML(org.jdom.Document dXSL)
          Translates the XML help file to HTML using the specified XSL style sheet.
 String toSpeech()
          Returns a String describing this object.
 String toString()
          Returns a String representation of this.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HelpFile

public HelpFile(String sXMLFile,
                String sBasePath)
         throws HelpFileException
Creates a new HelpFile instance.
Parameters:
sXMLFile - a String value
sBasePath - a String value
Throws:
HelpFileException - if an error occurs

HelpFile

public HelpFile(String sXMLFile)
         throws HelpFileException
Creates a new HelpFile instance.
Parameters:
sXMLFile - a String value
Throws:
HelpFileException - if an error occurs
Method Detail

toSpeech

public String toSpeech()
Description copied from interface: Speakable
Returns a String describing this object. The returned String should be easily spoken by a speech synthesis program.
Specified by:
toSpeech in interface Speakable
Following copied from interface: speech.Speakable
Returns:
a String value
Throws:
RemoteException - if an error occurs

isHTMLCurrent

public boolean isHTMLCurrent()

toHTML

public void toHTML(org.jdom.Document dXSL)
Translates the XML help file to HTML using the specified XSL style sheet.
Parameters:
dXSL - an org.jdom.Document value

get

public String get()
Returns the textual information associated with the current subtopic of the help file.
Returns:
a String value

get

public String get(String sSubtopicName)
Gets the text of the given subtopic.
Parameters:
sSubtopicName - a String value
Returns:
a String value

getNext

public String getNext()
Gets the text of the next subtopic (the one following the current subtopic).
Returns:
a String value

getName

public String getName()
Gets the name of this.
Returns:
a String value

getKeywords

public ArrayList getKeywords()
Gets the keywords associated with this topic.
Returns:
a Vector value

getSubtopicNames

public ArrayList getSubtopicNames()
Gets the names of the subtopics of this topic.
Returns:
a Vector value

getTopURL

public URL getTopURL()
Gets the main URL of the HTML equivalent of this help file.
Returns:
an URL value

getURL

public URL getURL()
Gets the URL of the current subtopic.
Returns:
an URL value

getXMLSourceFullFileName

public String getXMLSourceFullFileName()
Gets the file name of the source XML help file.
Returns:
a String value

getRelativeHTMLFileName

public String getRelativeHTMLFileName()
Gets the filename of the relative HTML file. This is used for JavaHelp's map file.
Returns:
a String value

compareTo

public int compareTo(Object o)
Compares this HelpFile with another Object.
Specified by:
compareTo in interface Comparable
Parameters:
o - an Object value
Returns:
an int value

getID

public String getID()
Returns a String ID for this HelpFile (and the current subtopic). This method is used by the JavaHelp system.
Returns:
a String value

toString

public String toString()
Returns a String representation of this.
Overrides:
toString in class Object
Returns:
a String value

equals

public boolean equals(Object oObj)
Returns whether this HelpFile is equal to another HelpFile.
Overrides:
equals in class Object
Parameters:
oObj - an Object value
Returns:
a boolean value