Table of Contents

Class LocalSourceIndexer

Namespace
EncDotNet.S100.Collections.Indexing
Assembly
EncDotNet.S100.Collections.dll

Indexes local sources — LocalFolderSource and ExchangeSetSource — in place: exchange sets from their catalogues (folder or ZIP), loose datasets through a DatasetProbe.

public sealed class LocalSourceIndexer : ICollectionSourceIndexer
Inheritance
LocalSourceIndexer
Implements
Inherited Members

Remarks

No dataset is loaded. S-100 items come entirely from CATALOG.XML (including parsed coverage polygons); S-57 items come from CATALOG.031 plus a read of each cell's leading DSID record. Per-file problems become IndexDiagnostics; they never fail the whole index.

Constructors

LocalSourceIndexer(DatasetProbe?)

Creates an indexer.

public LocalSourceIndexer(DatasetProbe? probe = null)

Parameters

probe DatasetProbe

Reads metadata from loose dataset files. When null, only loose S-57 cells are recognised, and without bounds.

Methods

CanIndex(CollectionSource)

Returns true when this indexer handles source.

public bool CanIndex(CollectionSource source)

Parameters

source CollectionSource

Returns

bool

GetFingerprintAsync(CollectionSource, CancellationToken)

Cheaply computes a fingerprint of the source's current state. When it equals a previous index's Fingerprint, that index is still valid. Returns null when the state cannot be determined (for example the source is unavailable).

public ValueTask<string?> GetFingerprintAsync(CollectionSource source, CancellationToken cancellationToken)

Parameters

source CollectionSource
cancellationToken CancellationToken

Returns

ValueTask<string>

IndexAsync(CollectionSource, IProgress<IndexProgress>?, CancellationToken)

Indexes source.

public ValueTask<SourceIndex> IndexAsync(CollectionSource source, IProgress<IndexProgress>? progress, CancellationToken cancellationToken)

Parameters

source CollectionSource
progress IProgress<IndexProgress>
cancellationToken CancellationToken

Returns

ValueTask<SourceIndex>