|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kiwi.ui.model.DocumentDataSource
This class is an implementation of HierarchicalDataSource
in which tree nodes represent HTML documents that are loaded as system
resources.
Documents are loaded using the provided ResourceManager
. The
default base path for the documents is "docs/", and since they are loaded
as URL resources, they should be located relative to "html/docs/" which in
turn will be relative to the ResourceManager
's resource anchor
class. One form of the constructor allows an alternate base path to be
specified.
Documents may be organized in a hierarchy; each expandable node in the hierarchy corresponds to a directory in the resource file tree. Each directory (including the root directory, "docs/") is expected to contain an index file named "_index.txt" describing the child nodes of that directory. Nodes are listed in this file, one per line. Each line should include the following fields, delimited by vertical bar characters (|):
Here is an example entry:
book-closed.gif|book-open.gif|+|API Specification|api
ResourceManager
,
DocumentBrowserView
,
DocumentBrowserFrame
Inner Class Summary | |
class |
DocumentDataSource.DocumentNode
|
Field Summary | |
static String |
DEFAULT_BASEPATH
The default relative document base path. |
static String |
DEFAULT_DESCRIPTION
The default description of this set of documents. |
Constructor Summary | |
DocumentDataSource(ResourceManager manager)
Construct a new DocumentDataSource with a default
description and base path. |
|
DocumentDataSource(ResourceManager manager,
String description,
String basePath)
Construct a new DocumentDataSource with the specified
description and base path. |
Method Summary | |
Object[] |
getChildren(ITreeNode node)
Get the children of a given node. |
Object |
getRoot()
Get the root object. |
Object |
getValueForProperty(ITreeNode node,
String property)
Get the value for a given property. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final String DEFAULT_DESCRIPTION
public static final String DEFAULT_BASEPATH
Constructor Detail |
public DocumentDataSource(ResourceManager manager)
DocumentDataSource
with a default
description and base path.manager
- the ResourceManager
that will be used to load
index files for the tree.public DocumentDataSource(ResourceManager manager, String description, String basePath)
DocumentDataSource
with the specified
description and base path.manager
- The ResourceManager
that will be used to load
index files for the tree.description
- A brief description of this set of documents; this
becomes the label for the root node in the tree.Method Detail |
public Object getRoot()
public Object[] getChildren(ITreeNode node)
public Object getValueForProperty(ITreeNode node, String property)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |