story.scheherazade.virgil.help
Class HelpTopic

java.lang.Object
  extended by story.scheherazade.virgil.help.HelpTopic

public class HelpTopic
extends java.lang.Object

This class represents a Scheherazade HelpTopic. Every HelpTopic contains an ID (a name), a header (indicating the category or enclosed content), and the content itself. This class also includes information about the HelpTopic's parent and a vector of HelpTopics that represent its children

Author:
Marshall

Field Summary
static java.lang.String CONTENT
           
static java.lang.String HEADER
           
static java.lang.String T_ID
           
static java.lang.String TOPIC
           
 
Constructor Summary
HelpTopic(org.w3c.dom.Node node, HelpTopic parent)
          Constructor to create a HelpTopic object from a node
HelpTopic(java.lang.String ID, java.lang.String header, java.lang.String content, HelpTopic parent, java.util.Vector<HelpTopic> topicChildren)
          Constructor to explicitly create a HelpTopic object
 
Method Summary
 java.util.Vector<HelpTopic> getChildren()
          Returns a Vector of HelpTopics that are the children of this topic
 java.lang.String getContent()
          Returns the CONTENT element of the HelpTopic
 java.lang.String getHeader()
          Returns the HEADER element of the HelpTopic
 java.lang.String getID()
          Returns the ID attribute of the HelpTopic
 HelpTopic getParent()
          Returns the HelpTopic that is the parent of this HelpTopic
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

T_ID

public static final java.lang.String T_ID
See Also:
Constant Field Values

HEADER

public static final java.lang.String HEADER
See Also:
Constant Field Values

CONTENT

public static final java.lang.String CONTENT
See Also:
Constant Field Values

TOPIC

public static final java.lang.String TOPIC
See Also:
Constant Field Values
Constructor Detail

HelpTopic

public HelpTopic(java.lang.String ID,
                 java.lang.String header,
                 java.lang.String content,
                 HelpTopic parent,
                 java.util.Vector<HelpTopic> topicChildren)
Constructor to explicitly create a HelpTopic object

Parameters:
ID - the ID of the HelpTopic
header - the header of the HelpTopic
content - the content of the HelpTopic (use null if none)
topicChildren - a Vector of HelpTopics that are the children of this HelpTopic

HelpTopic

public HelpTopic(org.w3c.dom.Node node,
                 HelpTopic parent)
          throws java.lang.Exception
Constructor to create a HelpTopic object from a node

Parameters:
node - a HelpTopic represented as a Node data structure that has children in the form of a Header, Content (optional), and Topic(s) (optional). The parent of the HelpTopic will be null if the HelpTopic is at the top level
Throws:
java.lang.Exception
Method Detail

getParent

public HelpTopic getParent()
Returns the HelpTopic that is the parent of this HelpTopic

Returns:
the parent of this HelpTopic

getChildren

public java.util.Vector<HelpTopic> getChildren()
Returns a Vector of HelpTopics that are the children of this topic

Returns:
a Vector of HelpTopics

getID

public java.lang.String getID()
Returns the ID attribute of the HelpTopic

Returns:
the ID attribute of the HelpTopic

getHeader

public java.lang.String getHeader()
Returns the HEADER element of the HelpTopic

Returns:
the HEADER element of the HelpTopic

getContent

public java.lang.String getContent()
Returns the CONTENT element of the HelpTopic

Returns:
the CONTENT element of the HelpTopic (null if no content)


Copyright © 2011 David K. Elson. All Rights Reserved.