Class RegistryIndex
java.lang.Object
network.ike.docs.plugin.diff.RegistryIndex
One side's view of the IKE topic registry: topic id → source file and
assembly id → flattened topic-refs. This is what lets an assembly
module's
idoc:diff run project the corpus diff onto
its own membership (ike-issues#649 scoping decision) — the registry,
not include-line parsing, is the source of truth for which topics an
assembly contains.
Also hosts the registry YAML shape helpers shared with
RegistryDelta.
-
Method Summary
Modifier and TypeMethodDescriptionassemblyRefs(String assemblyId) An assembly's flattened topic-refs, in document order.static RegistryIndexLoad the registry as it stands on one side of a comparison.static StringmembershipDelta(GitSource git, String fromRef, String toRef, String registryRoot, String assemblyId) Render one assembly's membership delta (topic-refs added and removed between two sides) as a small registry-delta partial for an assembly-projection packet.Resolve a topic id to its source file, relative to the registry root (e.g.
-
Method Details
-
load
Load the registry as it stands on one side of a comparison.- Parameters:
git- repository accessref- the side to read (GitSource.WORKTREEor a committish) — projections use the to side, so membership reflects the state under reviewregistryRoot- repository-relative source root that containstopic-registry.yamlandtopic-registry/- Returns:
- the index (empty maps when no registry exists on that side)
- Throws:
IOException- on repository access failure
-
topicFile
-
assemblyRefs
-
membershipDelta
public static String membershipDelta(GitSource git, String fromRef, String toRef, String registryRoot, String assemblyId) throws IOException Render one assembly's membership delta (topic-refs added and removed between two sides) as a small registry-delta partial for an assembly-projection packet.- Parameters:
git- repository accessfromRef- the from sidetoRef- the to side (may beGitSource.WORKTREE)registryRoot- the registry source rootassemblyId- the assembly to report on- Returns:
- the partial's text with a level-1 title, or an empty string when this assembly's membership is unchanged
- Throws:
IOException- on repository access failure
-