KeyView 24.3

# Understand the Subfile Hierarchy

When you extract a container file, the paths or relationships between the subfiles might be irrelevant. For example, you might want to filter the subfiles contained in a ZIP archive, but you might not care about the file and folder structure.

KeyView provides information that enables you to recreate the hierarchy, for those use cases where it is important. You can use the hierarchy to recreate the directory structure in a file system, or to process documents according to their relationship to each other. For example, if you use KeyView as part of a search engine, the hierarchical information could be used to enable your users to search a document's parent or siblings within the container. In addition, when a document is returned to the user, the parent, sibling, or child documents could be returned as recommendations.

To obtain information about the position of a subfile in the hierarchy, call fpGetSubFileInfo(). The members `KVSubFileInfo->parentIndex` and `KVSubFileInfo->childArray` identify a subfile’s parent and children. You might need to call `fpGetSubFileInfo()` for multiple subfiles to reconstruct the entire hierarchy.

When KeyView returns the parent index `-1`, this indicates that the subfile has no parent and is at the root level within its container.

## Example

You might extract a PST file that contains five subfiles. The following diagram shows the available hierarchy information for each subfile:

Using this information, you can recreate the hierarchy shown in the following diagram.

## Create a Root Node

If you are programming with the C or Java API, you can instruct KeyView to create an artificial root node at the top of the hierarchy. This artificial root node is an internal object, and may be extracted to disk as a directory called `root`. Its index number is `0`.

To create a root node

- In the KVOpenFileArg structure that you pass to fpOpenFile(), set `openFlag` to `KVOpenFileFlag_CreateRootNode`. When you request a root node, the value of `numSubFiles` in KVMainFileInfo increases by one. For example, when you call `fpGetMainFileInfo()` on a Microsoft Word document with three embedded OLE objects and the root node is enabled, `numSubFiles` is `4` rather than `3`.

Copyright 1997-2024 Open Text
Version 24.3 | Last updated June 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.3

Topic Title: Understand the Subfile Hierarchy