Class SampleDataRegistry
java.lang.Object
ai.pipestream.module.pipelineprobe.sampledata.SampleDataRegistry
Discovers every sample-data fixture jar on the classpath by scanning for its
META-INF/pipestream-sample-data.json descriptor, and exposes them as a
queryable registry — keyed by artifactId and by the step each dataset feeds.
This is the consumer side of the "register each dataset" design: the data
jars stay pure (a single passive JSON resource, zero CDI/framework deps); this
one bean in the harness does the discovery. Drop a new <step>-input-court
dependency on the classpath and it shows up here automatically — no code change.
The registry powers expected-vs-actual count assertions (the descriptor's
sourceDocCount is the expected per-step count already surfaced in the
crawl panels) and tells the stress/Module-Test features where each step's input
docs live.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the registry; itsObjectMapperis injected and it is managed by CDI. -
Method Summary
Modifier and TypeMethodDescriptionall()All discovered datasets, ordered by step it feeds.expectedDocCount(String stage) Expected doc count for a step's input dataset, or empty if no such dataset.forArtifact(String artifactId) Dataset by Maven artifactId, if present.Dataset that feeds the given step (e.g.stages()The set of steps that have a registered input dataset.
-
Constructor Details
-
SampleDataRegistry
public SampleDataRegistry()Creates the registry; itsObjectMapperis injected and it is managed by CDI.
-
-
Method Details
-
all
All discovered datasets, ordered by step it feeds.- Returns:
- the discovered descriptors sorted by
SampleDataDescriptor.stage()
-
forStage
Dataset that feeds the given step (e.g."chunker"), if present.- Parameters:
stage- the pipeline step the dataset feeds- Returns:
- the matching descriptor, or empty if no dataset feeds that step
-
forArtifact
Dataset by Maven artifactId, if present.- Parameters:
artifactId- the Maven artifactId to look up- Returns:
- the matching descriptor, or empty if no such dataset is registered
-
expectedDocCount
-
stages
The set of steps that have a registered input dataset.- Returns:
- the stage keys of all discovered datasets
-