Table of Contents

Namespace EncDotNet.S100.Collections.Library

Classes

CollectionLibrary

Owns a set of dataset collections (issue #655): persists their definitions to a store file (collections.json), keeps each source's index cached on disk, and re-indexes sources in the background without loading any dataset. UI-free, so the viewer's Library and a headless host (#792) share it.

CollectionLibraryOptions

Where a CollectionLibrary persists, and how.

CollectionManifestScope

A scope of a local collection manifest (*.s100collection.json): by group. A manifest that cannot be read reports every problem in it (Problems) rather than a single error.

CommunityListScope

A scope of a community chart list (chartcatalogs format; issue #670): by entry.

CoverageHitTest

Point hit-testing of library item coverage (issue #655): whether a position lies within an item's coverage polygons (or bounds), across the antimeridian.

ForecastRuns

Forecast-run facts of a library item from an S-100 forecast feed (#685, NOAA's S-111): its model, run time and valid window.

LibraryActivitySnapshot

Whether a Library is busy, at one moment.

LibraryActivityTracker

Counts Library work that outlives a download batch's progress (issue #790): a download goes on to re-index its source and open its datasets after the batch's progress clears, and a load opens datasets after its call starts. Each piece of work holds a scope from start to finish, so a host's "idle" check (the await_library_idle MCP tool) can wait for all of it. Thread-safe and UI-free, so the viewer and a headless host (#792) share it.

LibraryAvailabilityNames

The wire names of LibraryAvailability states, as the MCP Library tools report and filter them (online, local, on_pan, update, …).

LibraryAvailabilityResolver

Computes a LibraryAvailability from an item's location.

LibraryCatalogueCounts

How many of a remote catalogue's datasets are on disk, and how many of those have a newer edition online.

LibraryCatalogueReaders

Reads the online catalogues a LibrarySourceDraft scopes; a kind whose reader is missing cannot be added.

LibraryCatalogueScope

What part of an online catalogue a new Library source includes (#792): the catalogue as read, its choices, what the ticked choices amount to, and the source they make. One per catalogue kind; the viewer's Add-to-Library dialog and headless hosts share them.

LibraryChoice

One value that can be chosen when adding a Library source (#792): a NOAA state, district or region, a USACE river, a feed's product, a community list's entry, a manifest group, a remote catalogue's area, a forecast model. Hosts bind to it directly; ticking it is what selects it.

LibraryChoiceGroup

A titled group of choices (one tab in the viewer's dialog), e.g. States or Rivers.

LibraryCollection

An immutable view of one collection in the library, with the current indexing state of each of its sources.

LibraryDataPaths

Where a Library keeps its state on disk.

LibraryDetailField

A labelled value in an item's details.

LibraryDetailGroup

A group of an item's details (Forecast, Product, Coverage, Source).

LibraryDownloadItemStatus

One item's download status.

LibraryDownloadOutcome

The outcome of DownloadAsync(IReadOnlyList<(CollectionItem Item, LibrarySource Source)>, bool, IProgress<LibraryDownloadProgress>?, CancellationToken).

LibraryDownloadProgress

The running bulk download: how many items are done and how many bytes remain.

LibraryDownloadResult

The outcome of DownloadAsync(IReadOnlyList<CollectionItem>, IProgress<LibraryDownloadProgress>?, CancellationToken).

LibraryDownloads

Downloads online library items (NOAA and USACE ENCs, community packages, S-100 feeds and the NOAA S-102/S-104/S-111 forecast catalogues; issues #655, #670, #680, #685) into managed folders, a few at a time, and resolves their downloaded copies so they behave as local items. UI-free: the viewer adds its progress notification on top, and a headless host (#792) reads Progress and StatusOf(CollectionItem) directly.

LibraryForecastCounts

A forecast source's models (#685): how many have a run on disk, a newer run listed, or an ended run.

LibraryIdleWait

The outcome of AwaitIdleAsync(TimeSpan, CancellationToken).

LibraryItemQuery

Filters for Find<T>(IReadOnlyList<LibraryCollection>, LibraryItemQuery, Func<CollectionItem, LibrarySource, T>, Func<T, LibraryItemState>).

LibraryItemState

One library item as a host sees it now: where its data can be had (Availability), the copy that would open (EffectiveItem) and the time its data covers (ValidWindow). The viewer's Library rows and the MCP Library tools both read items through it, so they agree.

LibraryItemText

The tags and details of a Library item, in the words the viewer's Library panel uses, for every host (#792).

LibraryItemTextInput

One Library item as its row describes it: the item, where it stands, and what the host knows about its download and load. Group rows (an unpacked package, a forecast model's tiles) are the host's own and not described here.

LibraryLoadResult

The outcome of LibraryLoader.LoadAsync.

LibraryLoader

Opens library items in a host's session (issues #655, #792): skips what cannot be opened (online, missing, catalogue-only, unknown product), groups the rest by exchange set (Plan(IEnumerable<CollectionItem>, Func<CollectionItem, LibrarySourceLabel?>?)) and opens each group through the host's ILibraryDatasetOpener. UI-free, so the viewer and a headless host share it.

LibraryNodeStatusInput

What a Library node (a collection, one of its sources, or a manifest group) knows when its status line is worked out; see Status(LibraryNodeStatusInput).

LibraryNodeText

The names, kind tags and status lines of Library collections and sources, in the words the viewer's Library panel uses, for every host (#792).

LibraryOpenGroup

Library items that open together: the local items of one exchange set (or one loose-dataset folder), so a host gives the set one source, one header and one catalogue read.

LibraryOpenOutcome

What a host's opener managed for one LibraryOpenGroup.

LibraryOperations

The Library's actions for a host without view models (issue #792): open items into the host's session, download online items (then re-index or open them), and tell when all that work has finished. Every operation is tracked by Activity from the moment it is called until the datasets it opens are open, so AwaitIdleAsync(TimeSpan, CancellationToken) never reports idle between a download finishing and its datasets opening (#790).

LibraryQuery

Finds library items (issue #655): the filters behind the Library panel's map taps and the MCP query_library_items tool.

LibraryReplacedCopies

The open datasets a download is about to replace (#1075): a downloaded copy that is open in the host's session keeps its files open (a GRIB2 run, a lazily read S-111 grid), and Windows won't move or delete an open file, so the download that replaces the copy would fail. Close(IEnumerable<(CollectionItem Item, LibrarySource? Source)>, ILibraryLocalCopies, Func<CollectionItem, LibraryLoadState>, Func<IReadOnlyList<CollectionItem>, int>) closes them before the download; ReopenAsync(Func<IReadOnlyList<(CollectionItem Local, LibrarySource? Source)>, bool, Task>) opens them again afterwards (the new copy, or the old one when the download failed), unless the caller has opened them already.

LibraryResolution

One resolution choice of a remote S-100 catalogue: a navigation purpose, or all of them.

LibraryServices

A Library and everything it reads and downloads with, for a host without the viewer's dependency injection (#792; s100 mcp serve): the indexers of every source kind over one feed cache, the Library, its downloads and sync, the catalogue readers that add sources, and the catalogue-URL probe.

LibraryServicesOptions

How LibraryServices runs.

LibrarySource

An immutable view of one collection source and its index.

LibrarySourceDraft

A Library source being added, for a host without the viewer's dialog (#792): what it is, the part of its catalogue it includes, the collection name it suggests, and the source it makes. Uses the same scopes and words as the viewer's Add-to-Library dialog.

LibrarySourceIndexedEventArgs

Describes a SourceIndexed event.

LibrarySourceKinds

Recognises what kind of Library source a known catalogue or a local path is (#792).

LibrarySourceLabel

The Library source items were loaded from (#809), so a host can show a source's datasets together (one row per source) however many exchange sets or folders they come from.

LibrarySourceText

The words used when a Library source is being added (#792): titles, catalogue details, scope summaries and suggested names, shared by the viewer's Add-to-Library dialog and headless hosts.

LibrarySync

Keeps synced sources' local copies current (issue #807): after a synced source is indexed, the items its ILibrarySyncPolicy wants are downloaded when missing or outdated, and copies in its managed folder that no source lists any more (or lists as cancelled) are deleted. The source is then re-indexed once, so downloaded items get their bounds (and packages their cells). A source is synced when Sync is on and a policy supports its kind: SecomSyncPolicy (which prunes) and OnlineSyncPolicy (the other online kinds, which only download, #809).

LibrarySyncOptions

Options for LibrarySync.

LibrarySyncStatus

Where a synced source stands after its last sync.

LibrarySyncedEventArgs

Describes a Synced event.

LibraryTag

A short sentence-case tag after an item's name, e.g. "Ed 46 available" or "Loaded".

LibraryText

The Library's user-visible text (LibraryText.resx): item tags and details, source status lines and names, shared by every host so the viewer's Library panel and an MCP host describe items in the same words (#792).

LibraryTextFormat

Formats the values the Library shows (sizes, positions, run times, ages, property labels, URLs) the same way in every host (#792).

NavigationPurposes

Names a remote S-100 dataset's navigation purpose and grid resolution ("Port 4 m").

NoaaEncScope

A scope of the NOAA ENC product catalogue: by state, Coast Guard district or region.

OnlineSyncPolicy

Sync rules for the other online kinds (issue #809): NOAA and USACE ENC feeds, community chart lists, S-100 feeds, remote S-100 catalogues and forecast feeds. Every listed item that is not cancelled is kept downloaded and current — a newer edition or update, a newer package, a forecast's latest run (which replaces the last in place).

S100CatalogueScope

A scope of a remote S-100 exchange catalogue (issue #685; NOAA's S-102 on AWS): regions, each with its areas, and a resolution that applies to every area. Sizes come from listing the bucket one region at a time (SizeGroupAsync(LibraryChoiceGroup?)); Changed is raised when they arrive.

S100FeedScope

A scope of an S-100 feed (issue #680), e.g. one served by s100 feed serve: by product.

S100ForecastScope

A scope of a forecast feed (#685; NOAA's S-111 on AWS, handoff A3): one list of models — water body, code, how often it runs, and the size of one run — with a note on regional models that overlap smaller ones, and how runs download (Shapes: tiles, or one file per model).

SecomIdentityUsage

Which SECOM sources use which identity (#883): for re-reading them when it changes, the Identities tab's "Used by" list, and what removing it does.

SecomIdentityUser

A SECOM source that uses an identity (#883).

SecomScope

A scope of a SECOM service (issue #804): the service's objects counted per product, read through GetSummary with the source's Identity (#883), with the products as the one group. A source can be kept in sync (#807; Sync) and narrowed to the current map view (InMapView).

SecomSyncPolicy

Sync rules for SECOM services (issue #807): every listed object that is not cancelled is kept downloaded, in the service's managed folder.

SecomTrustRefresh

Reads SECOM sources again when what they present, or were refused for, may have changed (#880, #883):

  • the default identity changes: the sources set to Default;
  • an identity is added, replaced or removed: the sources that resolve to it (set to it, or following the default when it is the default);
  • the trusted authorities change: the sources whose server certificate was not trusted.

A change to one source's own Identity reads that source only, as any UpdateSource(Guid, CollectionSource) does.

UsStateNames

Display names for the two-letter state and territory codes used by the NOAA ENC product catalogue.

UsaceIencScope

A scope of the USACE Inland ENC product catalogue: by river.

WeatherScope

A scope of a weather service (#1075; design note weather-sources.md §6.3): for a GRIB2 model, its parameters and forecast days; for ERDDAP, its datasets and forecast days; for alerts, nothing to choose. The area is the map view when the source is added (the GRIB filter and ERDDAP cut to it, alerts are its marine zones'); NOAA's whole-grid files on AWS take the whole globe. Reading the "catalogue" finds the service's latest run (or the alerts in force), so a service that can't be reached says so before the source is added. The service's defaults start ticked, and only the ticked choices are included.

Interfaces

ILibraryDatasetOpener

The host seam LibraryLoader opens datasets through: the viewer registers a group with its exchange-set service (one Datasets-panel header, optional load-as-you-pan); a headless host loads each item into its dataset catalog. The opener also remembers what each item became, so the Library can show it as loaded.

ILibraryLocalCopies

The downloaded copies of online library items, as far as an item's state needs them: where a copy is, and whether it is behind the source.

ILibrarySyncPolicy

The per-kind rules LibrarySync keeps a source in sync by: whether the source is synced, which of its items should have a current local copy, and where its copies live and when they may be pruned. The sync itself (downloading, the size cap, safe pruning, settling) is the same for every kind.

Enums

LibraryAvailability

Where a collection item's data can be had right now.

LibraryDownloadItemState

Where one item stands in a download.

LibraryLoadState

Whether a library item is open in the host's session.

LibraryNodeStatusKind

How a Library node's status line is marked (the colour of its dot).

LibrarySourceKind

What kind of source is being added to the Library (#792).

LibrarySourceState

The indexing state of a LibrarySource.

LibraryTagKind

What a Library item tag says about the item (and how it is drawn).

LibraryTimeFormat

How a host shows times to its user: in their time zone or in UTC (#730).