Recreate a File’s Hierarchy

When a container file is extracted, any relationships between the subfiles in the container are not maintained. However, the File Extraction interface provides information that enables you to recreate the hierarchy. The hierarchy can be used to create a directory structure in a file system, or to categorize documents according to their relationship to each other. For example, if you use KeyView to generate text for a search engine, the hierarchical information enables your users to search for a document based on the document’s parent or sibling. In addition, when the document is returned to the user, the parent and sibling documents can be returned as recommendations.

The information needed to recreate a file’s hierarchy is provided in the call to ExtractGetSubFileInfo. Call this method to retrieve an object of ExtractSubFileInfo, then use the ParentIndex and ChildArray() properties in this object to retrieve information about the subfile’s parent and children. Since you can only retrieve the first-level children in a subfile, you must call ExtractGetSubFileInfo repeatedly until information for the leaf-node children is extracted.