Skip to main content

doiget_core/sources/
mod.rs

1//! Source implementations.
2//!
3//! Each source is a concrete `Source` trait impl. Per `docs/SOURCES.md` §1:
4//!
5//! - Tier 1 (Open Access, always compiled in): Crossref / Unpaywall / arXiv.
6//! - Tier 2 (metadata enrichment, Phase 4, behind the `metadata` Cargo
7//!   feature): OpenAlex / Semantic Scholar / DOAJ / DataCite / HAL / OpenAIRE / CORE / Europe PMC.
8//! - Tier 3 (TDM, Phase 5, behind per-publisher Cargo features):
9//!   Springer Nature OA / APS Harvest / Elsevier ScienceDirect.
10
11pub mod arxiv;
12pub mod crossref;
13pub mod unpaywall;
14
15// ---------------------------------------------------------------------------
16// Tier 2 (Phase 4) — compile-gated by the `metadata` Cargo feature.
17// ---------------------------------------------------------------------------
18
19#[cfg(feature = "metadata")]
20pub mod openalex;
21
22#[cfg(feature = "metadata")]
23pub mod s2;
24
25#[cfg(feature = "metadata")]
26pub mod doaj;
27
28/// DataCite — DOI **resolution** for the second registration agency
29/// (Zenodo / figshare / Dryad / OSF). Not enrichment: without it those
30/// DOIs report `NotFound`. Runtime-gated by `DOIGET_ENABLE_DATACITE`,
31/// off by default (ADR-0040, #414).
32#[cfg(feature = "metadata")]
33pub mod datacite;
34
35/// HAL — the French national OA repository. Author deposits in maths /
36/// physics / CS that Crossref-centric indexes miss. Runtime-gated by
37/// `DOIGET_ENABLE_HAL`, off by default (ADR-0040, #418).
38#[cfg(feature = "metadata")]
39pub mod hal;
40
41/// OpenAIRE — European institutional / funder repository aggregation via
42/// the Graph API v1 (the legacy search endpoint is unstable and unused).
43/// Mixed access rights, so only COAR OPEN records are returned.
44/// Runtime-gated by `DOIGET_ENABLE_OPENAIRE`, off by default (#416).
45#[cfg(feature = "metadata")]
46pub mod openaire;
47
48/// CORE — cross-repository OA aggregation, the broadest single OA index
49/// outside Unpaywall and therefore the LAST fallback in the chain. Takes
50/// an optional free key from `DOIGET_CORE_API_KEY`; absent, it degrades
51/// to the key-less rate limit. Runtime-gated by `DOIGET_ENABLE_CORE`,
52/// off by default (#417). Named `core_oa` because `core` is a built-in
53/// crate name.
54#[cfg(feature = "metadata")]
55pub mod core_oa;
56
57/// Europe PMC — biomedical OA full text the Crossref-centric Unpaywall
58/// index misses. OA subset only (`isOpenAccess`, not `inEPMC`); the PDF
59/// it points at is fetched by the existing `oa-publisher` leg, not here.
60/// Runtime-gated by `DOIGET_ENABLE_EUROPE_PMC`, off by default (#415).
61#[cfg(feature = "metadata")]
62pub mod europepmc;
63
64// ---------------------------------------------------------------------------
65// Tier 3 (Phase 5) — compile-gated by per-publisher Cargo features.
66// Default release binaries ship NONE of these; opt-in builds enable one
67// or more via `--features tdm-<publisher>` (ADR-0002).
68// ---------------------------------------------------------------------------
69
70#[cfg(feature = "tdm-springer")]
71pub mod tdm_springer;
72
73#[cfg(feature = "tdm-aps")]
74pub mod tdm_aps;
75
76#[cfg(feature = "tdm-elsevier")]
77pub mod tdm_elsevier;
78
79#[cfg(feature = "tdm-ieee")]
80pub mod tdm_ieee;