Class ParserScaffold
java.lang.Object
ai.pipestream.module.pipelineprobe.moduletest.scaffold.ParserScaffold
- All Implemented Interfaces:
StepScaffold
Parser scaffold: the parser has no captured
<step>-input-court dataset
— its input is the raw source file, which exists BEFORE any capture tap (and
the court corpus is JDBC, which skips the parser entirely). So this scaffold
supplies its own corpus: the mixed-format sample-doc-types raw corpus
(pdf/office/epub/html/email/…) that the e2e S3 crawl hydrates into the bucket,
read via the SAME S3SampleDocLoader — but handed straight to the door
instead of going through S3 + crawl.
Each raw file is wrapped the way connector-intake's gRPC upload wraps it:
a PipeDoc carrying the bytes in its BlobBag — exactly the
shape the parser hydrates and parses in production.
Samples are resolved once per session (prepare()) and held in
memory — same footprint the e2e hydration path already pays (the corpus is
capped at max-sample-docs, ~250 files).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Tear down anythingStepScaffold.prepare()created (e.g.Optional<ai.pipestream.data.v1.PipeDoc> corpusDoc(int index) The scaffold-supplied corpus doc at 1-basedindex; empty when out of range.Display name of the scaffold-supplied corpus (e.g.Number of docs in the scaffold-supplied corpus; empty = use the fixture-jar dataset.module()The module/step this scaffold targets (e.g.voidprepare()Provision external state (vector sets, fresh index, …).ai.pipestream.data.v1.PipeStreamwrap(ai.pipestream.data.v1.PipeDoc doc) Turn a corpus doc into the step's expected input PipeStream (directives, context_params, …).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StepScaffold
info
-
Constructor Details
-
ParserScaffold
Creates the parser scaffold.- Parameters:
sampleLoader- the loader used to resolve the raw sample-doc-types corpus
-
-
Method Details
-
module
Description copied from interface:StepScaffoldThe module/step this scaffold targets (e.g."chunker").- Specified by:
modulein interfaceStepScaffold- Returns:
- the module/step name this scaffold targets
-
prepare
public void prepare()Description copied from interface:StepScaffoldProvision external state (vector sets, fresh index, …). Called once per session.- Specified by:
preparein interfaceStepScaffold
-
corpusSize
Description copied from interface:StepScaffoldNumber of docs in the scaffold-supplied corpus; empty = use the fixture-jar dataset.- Specified by:
corpusSizein interfaceStepScaffold- Returns:
- the scaffold-supplied corpus size, or empty to use the fixture-jar dataset
-
corpusDoc
Description copied from interface:StepScaffoldThe scaffold-supplied corpus doc at 1-basedindex; empty when out of range. Only meaningful whenStepScaffold.corpusSize()is present.- Specified by:
corpusDocin interfaceStepScaffold- Parameters:
index- the 1-based index of the corpus doc to fetch- Returns:
- the corpus doc at
index, or empty when out of range
-
corpusName
Description copied from interface:StepScaffoldDisplay name of the scaffold-supplied corpus (e.g. the source jar).- Specified by:
corpusNamein interfaceStepScaffold- Returns:
- the corpus display name, or
nullwhen there is no scaffold-supplied corpus
-
wrap
public ai.pipestream.data.v1.PipeStream wrap(ai.pipestream.data.v1.PipeDoc doc) Description copied from interface:StepScaffoldTurn a corpus doc into the step's expected input PipeStream (directives, context_params, …).- Specified by:
wrapin interfaceStepScaffold- Parameters:
doc- the corpus document to wrap- Returns:
- the
PipeStreamshaped as the step expects
-
cleanup
public void cleanup()Description copied from interface:StepScaffoldTear down anythingStepScaffold.prepare()created (e.g. drop the fresh index).- Specified by:
cleanupin interfaceStepScaffold
-