Skip to main content

DocBook.Hierarchy

persistent class DocBook.Hierarchy extends %Library.Persistent

SQL Table Name: DocBook.Hierarchy

Property Inventory

Method Inventory

Properties

property LevelA as %String (MAXLEN = 200);
Property methods: LevelADisplayToLogical(), LevelAGet(), LevelAGetStored(), LevelAIsValid(), LevelALogicalToDisplay(), LevelALogicalToOdbc(), LevelANormalize(), LevelASet()
property LevelB as %String (MAXLEN = 200);
Property methods: LevelBDisplayToLogical(), LevelBGet(), LevelBGetStored(), LevelBIsValid(), LevelBLogicalToDisplay(), LevelBLogicalToOdbc(), LevelBNormalize(), LevelBSet()
property LevelC as %String (MAXLEN = 200);
Property methods: LevelCDisplayToLogical(), LevelCGet(), LevelCGetStored(), LevelCIsValid(), LevelCLogicalToDisplay(), LevelCLogicalToOdbc(), LevelCNormalize(), LevelCSet()
property LevelD as %String (MAXLEN = 200);
Property methods: LevelDDisplayToLogical(), LevelDGet(), LevelDGetStored(), LevelDIsValid(), LevelDLogicalToDisplay(), LevelDLogicalToOdbc(), LevelDNormalize(), LevelDSet()

Methods

classmethod AddItemToLogObject(logobject As %DynamicArray, itemType As %String, itemText As %String, itemId As %String = "", verbose As %Boolean = 0) as %Status
classmethod CheckHierarchy(verbose As %Boolean = 1, printWarning As %Boolean = 0)
For the hierarchy data currently loaded in the database:
  • Check that all IDs correspond to valid DocBook content: produce errors for invalid IDs on final nodes, produce warnings for invalid IDs on other nodes.
  • Produce warnings on repeated IDs
  • Check that all loaded books are present in the hierarchy.
  • Check that all loaded articles are present in the hierarchy.
  • Check that all loaded nav pages are present in the hierarchy.
Prints errors and summary if printWarning is 0, otherwise additionally prints warnings including details on which books and/or articles are missing. This info is written in JSON format to the file errors-hierarchy.txt in the doc update log directory, which is used to populate the relevant report tables.
classmethod ClearHierarchyCache(verbose As %Boolean = 0)
Kill global used to store DocBook hierarchy object
classmethod GetHierarchyFilePath(ByRef hierfilename As %String) as %Status
classmethod GetHierarchyObject() as %DynamicObject
classmethod GetLevelB(levelA As %String)
classmethod GetLevelC(levelB As %String, levelA As %String)
classmethod GetLevelD(levelC As %String, levelB As %String, levelA As %String)
classmethod GetObjectForTOC(id As %String) as %DynamicObject
classmethod GetParents(key As %String = "") as %DynamicObject
Method to return parents of a given item. Returns empty object if item is not found in hierarchy. NOTE: result contains the parents of the item AS WELL AS the item itself, if that item is explicitly included in the hierarchy (not a chapter). This method now handles both DocBook keys and plain text entries such as category names.
classmethod GetStoredHierarchyObject() as %DynamicObject
Retrieve hierarchy object stored in global or "" if no such object
classmethod LoadHierarchyFromFile(verbose As %Boolean = 0) as %Status
Load hierarchy info into table from hierarchy.txt in the release's MASTERDIR, if such a file exists. File is expected to be tab-separated.
classmethod ProcessHierarchy(verbose As %Boolean = 0, removeInvalid As %Boolean = 1, checkHierarchy As %Boolean = 1)
Read hierarchy info from file, remove invalid final nodes, and cache a copy of the hierarchy object.
classmethod RemoveInvalidFinalNodes(verbose As %Boolean = 1)
Delete any final nodes which do not lead to valid DocBook content
classmethod StoreHierarchy(verbose As %Boolean = 1) as %Status
After loading hierarchy for DocBook lefttoc, store it in a global for quicker access

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (Unique on LevelA,LevelB,LevelC,LevelD) [Unique];
Index methods: UniqueCheck(), UniqueCheckUnique(), UniqueDelete(), UniqueExists(), UniqueOpen(), UniqueSQLCheckUnique(), UniqueSQLExists(), UniqueSQLFindPKeyByConstraint(), UniqueSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheStorage (DocBook.Hierarchy)

^DocBook.HierarchyD(ID)
=
%%CLASSNAME
LevelA
LevelB
LevelC
LevelD
FeedbackOpens in a new tab