Class TermIndex
java.lang.Object
network.ike.docs.plugin.registry.TermIndex
The term index
IKE-INDEX.md and IKE-TOPIC-REGISTRY.md
describe, term-index.yaml: the reverse mapping from the index
terms a topic marks (indexterm:[primary, secondary],
indexterm2:[term], ((term)), (((primary, secondary))))
to the topics that mark them. The registry's keywords say what a topic
is about; its index terms say what it discusses.
Terms are collected once, when a topic is parsed, and kept on its
registry entry as index-terms, each level joined with
" > "; the index is then derived from the registry alone, so an
incremental registry run never reopens a file to rebuild it
(IKE-Network/ike-issues#1341).
- Since:
- 136
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe term index as an ordered map, ready for YAML, from a registry model whose topic entries carryindex-terms:generated,term-count, thenterms, a tree of levels in alphabetical order, each level with its_topicsin id order and its sub-levels after.The index terms one file marks, in order of appearance, each as its levels joined withLEVEL_SEPARATOR; a term marked twice is listed once.static StringRender the term index as YAML, in the registry's block style.
-
Field Details
-
TOPICS_KEY
The key under which a level lists the topics indexed at it.- See Also:
-
LEVEL_SEPARATOR
The separator between the levels of a term as the registry records it.- See Also:
-
-
Method Details
-
termsOf
The index terms one file marks, in order of appearance, each as its levels joined withLEVEL_SEPARATOR; a term marked twice is listed once. A visible term,((term)), is one level; a concealed one,(((primary, secondary))), splits on commas asindexterm:[]does. Lines that are comments are passed over.- Parameters:
content- the file content- Returns:
- the terms, empty when the file marks none
-
model
The term index as an ordered map, ready for YAML, from a registry model whose topic entries carryindex-terms:generated,term-count, thenterms, a tree of levels in alphabetical order, each level with its_topicsin id order and its sub-levels after.- Parameters:
registry- the registry model, fromTopicRegistry.modelorTopicRegistry.loadnow- the generation instant, recorded as a date- Returns:
- the term index model
-
yaml
Render the term index as YAML, in the registry's block style.- Parameters:
model- the model frommodel(Map, Instant)- Returns:
- the YAML text
-