Package javax.help
Class IndexView.DefaultIndexFactory
java.lang.Object
javax.help.IndexView.DefaultIndexFactory
- All Implemented Interfaces:
TreeItemFactory
- Enclosing class:
IndexView
A default TreeItemFactory that can be used to parse TOC items as used
by this navigator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a default IndexItem.createItem
(String tagName, Hashtable atts, HelpSet hs, Locale locale) Creates an IndexItem with the given data.Lists all the error messages.Parsing has ended.void
parsingStarted
(URL source) Parsing has startedvoid
processDOCTYPE
(String root, String publicID, String systemID) Process a DOCTYPEvoid
We have found a PI; ignore itvoid
reportMessage
(String msg, boolean validParse) Reports an error message.
-
Constructor Details
-
DefaultIndexFactory
public DefaultIndexFactory()
-
-
Method Details
-
parsingStarted
Parsing has started- Specified by:
parsingStarted
in interfaceTreeItemFactory
- Parameters:
source
- The URL of the document being parsed.
-
processDOCTYPE
Process a DOCTYPE- Specified by:
processDOCTYPE
in interfaceTreeItemFactory
- Parameters:
root
- The root tag of the document.publicID
- PublicID from the DOCTYPE.systemID
- SystemID from the DOCTYPE.
-
processPI
We have found a PI; ignore it- Specified by:
processPI
in interfaceTreeItemFactory
- Parameters:
target
- The target of the PI.data
- A String for the data in the PI.
-
createItem
Creates an IndexItem with the given data.- Specified by:
createItem
in interfaceTreeItemFactory
- Parameters:
tagName
- The index type to create. Valid types are "indexitem". Null or invalid types throw an IllegalArgumentException.atts
- Attributes of the Item. Valid attributes are "target" and "text". A null atts is valid and means no attributes.hs
- The HelpSet this item was created under.locale
- Locale of this item. A null locale is valid.- Returns:
- A TreeItem.
- Throws:
IllegalArgumentException
- if tagname is null or invalid.
-
createItem
Creates a default IndexItem.- Specified by:
createItem
in interfaceTreeItemFactory
- Returns:
- A TreeItem
-
reportMessage
Reports an error message.- Specified by:
reportMessage
in interfaceTreeItemFactory
- Parameters:
msg
- The message to report.validParse
- Whether the result of the parse is still valid.
-
listMessages
Lists all the error messages.- Specified by:
listMessages
in interfaceTreeItemFactory
-
parsingEnded
Parsing has ended. The last chance to do something to the node- Specified by:
parsingEnded
in interfaceTreeItemFactory
- Parameters:
node
- The DefaultMutableTreeNode that has been built during the the parsing. If node is null or there were parsing errors a null is returned.
-