Documentation
¶
Index ¶
- func OpenAlexFilterPreset(name string) (map[string]string, bool)
- func PaperRecords(response SourceResponse) ([]library.PaperRecord, error)
- func RedactNASAADSToken(value string) string
- type ArXivConnector
- type BASEConnector
- type BioRxivConnector
- type COREConnector
- type ChemRxivConnector
- type CitationEdge
- type CitationGraphExpansion
- type ClinicalTrialsConnector
- type CrossrefConnector
- func (c CrossrefConnector) LookupDOI(ctx context.Context, doi string) (SourceRecord, string, error)
- func (CrossrefConnector) Name() string
- func (c CrossrefConnector) References(ctx context.Context, doi string) (SourceResponse, error)
- func (c CrossrefConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
- type DBLPConnector
- type DOAJConnector
- type DataCiteConnector
- type DimensionsConnector
- type ERICConnector
- type EuropePMCConnector
- type FigshareConnector
- type GraphExpansionBudget
- type GraphExpansionBudgetEstimate
- type HALConnector
- type HTTPClient
- type HTTPClientOptions
- type Identifiers
- type InspireHEPConnector
- type LensConnector
- type NASAADSConnector
- type OSFConnector
- type OpenAccessCandidate
- type OpenAccessCandidateComparison
- type OpenAccessRecord
- type OpenAlexConnector
- func (c OpenAlexConnector) ExpandCitationGraph(ctx context.Context, query OpenAlexGraphQuery) (CitationGraphExpansion, error)
- func (OpenAlexConnector) Name() string
- func (c OpenAlexConnector) RelatedWorks(ctx context.Context, workID string, limit int) (SourceResponse, error)
- func (c OpenAlexConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
- func (c OpenAlexConnector) SearchAuthors(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
- func (c OpenAlexConnector) SearchConcepts(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
- func (c OpenAlexConnector) SearchInstitutions(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
- type OpenAlexDisambiguationItem
- type OpenAlexDisambiguationQueue
- type OpenAlexEntity
- type OpenAlexGraphQuery
- type OpenCitationsConnector
- type PubChemConnector
- type PubMedConnector
- type PubMedOptions
- type RequestProvenance
- type ResponseCache
- type ResponseProvenance
- type SearchRun
- type SemanticScholarConnector
- type SemanticScholarGraphDirection
- type SemanticScholarGraphQuery
- type SemanticScholarGraphRun
- type SemanticScholarGraphRunOptions
- type SourceConnector
- type SourceQuery
- type SourceRecord
- type SourceResponse
- type UnpaywallConnector
- type ZbMATHConnector
- type ZenodoConnector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PaperRecords ¶
func PaperRecords(response SourceResponse) ([]library.PaperRecord, error)
PaperRecords converts source records into library PaperRecords.
func RedactNASAADSToken ¶
Types ¶
type ArXivConnector ¶
type ArXivConnector struct {
// contains filtered or unexported fields
}
ArXivConnector searches arXiv Atom feeds.
func NewArXivConnector ¶
func NewArXivConnector(httpClient HTTPClient) ArXivConnector
NewArXivConnector creates an arXiv source connector.
func (ArXivConnector) Name ¶
func (ArXivConnector) Name() string
Name returns the connector source name.
func (ArXivConnector) Search ¶
func (c ArXivConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries arXiv and normalizes entries into SourceRecords.
type BASEConnector ¶ added in v0.1.5
type BASEConnector struct {
// contains filtered or unexported fields
}
BASEConnector searches the Bielefeld Academic Search Engine (BASE).
func NewBASEConnector ¶ added in v0.1.5
func NewBASEConnector(httpClient HTTPClient) BASEConnector
NewBASEConnector creates a BASE source connector.
func (BASEConnector) Name ¶ added in v0.1.5
func (BASEConnector) Name() string
Name returns the connector source name.
func (BASEConnector) Search ¶ added in v0.1.5
func (c BASEConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the BASE HTTP search interface and normalizes results into SourceRecords.
type BioRxivConnector ¶ added in v0.1.5
type BioRxivConnector struct {
// contains filtered or unexported fields
}
BioRxivConnector lists recent preprints from bioRxiv or medRxiv.
The biorxiv.org API does not support keyword search — it lists preprints by date range. This connector fetches the most recent 30 days of preprints from the requested server and filters by the query terms against title and abstract. For keyword-based discovery of bioRxiv content, the europepmc and semantic-scholar connectors provide broader coverage.
Use the filter "server=medrxiv" to search medRxiv instead.
func NewBioRxivConnector ¶ added in v0.1.5
func NewBioRxivConnector(httpClient HTTPClient) BioRxivConnector
NewBioRxivConnector creates a bioRxiv/medRxiv source connector.
func (BioRxivConnector) Name ¶ added in v0.1.5
func (BioRxivConnector) Name() string
Name returns the connector source name.
func (BioRxivConnector) Search ¶ added in v0.1.5
func (c BioRxivConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search lists recent preprints from bioRxiv (or medRxiv via filter) and filters by query terms against title and abstract.
type COREConnector ¶
type COREConnector struct {
// contains filtered or unexported fields
}
func NewCOREConnector ¶
func NewCOREConnector(httpClient HTTPClient) COREConnector
func (COREConnector) Name ¶
func (COREConnector) Name() string
func (COREConnector) Search ¶
func (c COREConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
type ChemRxivConnector ¶ added in v0.1.5
type ChemRxivConnector struct {
// contains filtered or unexported fields
}
ChemRxivConnector searches ChemRxiv, the chemistry preprint server.
ChemRxiv is hosted by the American Chemical Society and powered by the Cambridge Open Engage platform. It covers chemistry, chemical biology, and related fields. All records are openly accessible preprints; license is populated from the Cambridge Open Engage license field when present.
func NewChemRxivConnector ¶ added in v0.1.5
func NewChemRxivConnector(httpClient HTTPClient) ChemRxivConnector
NewChemRxivConnector creates a ChemRxiv source connector.
func (ChemRxivConnector) Name ¶ added in v0.1.5
func (ChemRxivConnector) Name() string
Name returns the connector source name.
func (ChemRxivConnector) Search ¶ added in v0.1.5
func (c ChemRxivConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the ChemRxiv Cambridge Open Engage API and normalizes results.
type CitationEdge ¶
CitationEdge is a normalized citing paper -> referenced paper relationship.
type CitationGraphExpansion ¶
type CitationGraphExpansion struct {
SeedID string
Edges []CitationEdge
Records map[string]SourceRecord
RawRef string
}
CitationGraphExpansion is a normalized Semantic Scholar graph neighborhood.
type ClinicalTrialsConnector ¶ added in v0.1.5
type ClinicalTrialsConnector struct {
// contains filtered or unexported fields
}
ClinicalTrialsConnector searches the ClinicalTrials.gov registry.
func NewClinicalTrialsConnector ¶ added in v0.1.5
func NewClinicalTrialsConnector(httpClient HTTPClient) ClinicalTrialsConnector
NewClinicalTrialsConnector creates a ClinicalTrials.gov source connector.
func (ClinicalTrialsConnector) Name ¶ added in v0.1.5
func (ClinicalTrialsConnector) Name() string
Name returns the connector source name.
func (ClinicalTrialsConnector) Search ¶ added in v0.1.5
func (c ClinicalTrialsConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the ClinicalTrials.gov v2 API and normalizes results into SourceRecords.
type CrossrefConnector ¶
type CrossrefConnector struct {
// contains filtered or unexported fields
}
CrossrefConnector searches Crossref works.
func NewCrossrefConnector ¶
func NewCrossrefConnector(httpClient HTTPClient) CrossrefConnector
NewCrossrefConnector creates a Crossref source connector.
func (CrossrefConnector) LookupDOI ¶
func (c CrossrefConnector) LookupDOI(ctx context.Context, doi string) (SourceRecord, string, error)
LookupDOI fetches one Crossref work by DOI and normalizes its metadata.
func (CrossrefConnector) Name ¶
func (CrossrefConnector) Name() string
Name returns the connector source name.
func (CrossrefConnector) References ¶
func (c CrossrefConnector) References(ctx context.Context, doi string) (SourceResponse, error)
References fetches one Crossref work and normalizes its reference-list DOI/title entries.
func (CrossrefConnector) Search ¶
func (c CrossrefConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries Crossref works and normalizes results into SourceRecords.
type DBLPConnector ¶ added in v0.1.5
type DBLPConnector struct {
// contains filtered or unexported fields
}
DBLPConnector searches the DBLP computer science bibliography.
func NewDBLPConnector ¶ added in v0.1.5
func NewDBLPConnector(httpClient HTTPClient) DBLPConnector
NewDBLPConnector creates a DBLP source connector.
func (DBLPConnector) Name ¶ added in v0.1.5
func (DBLPConnector) Name() string
Name returns the connector source name.
func (DBLPConnector) Search ¶ added in v0.1.5
func (c DBLPConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the DBLP publication search API and normalizes results into SourceRecords.
type DOAJConnector ¶
type DOAJConnector struct {
// contains filtered or unexported fields
}
func NewDOAJConnector ¶
func NewDOAJConnector(httpClient HTTPClient) DOAJConnector
func (DOAJConnector) Name ¶
func (DOAJConnector) Name() string
func (DOAJConnector) Search ¶
func (c DOAJConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
type DataCiteConnector ¶ added in v0.1.5
type DataCiteConnector struct {
// contains filtered or unexported fields
}
DataCiteConnector searches the DataCite research data DOI registry.
func NewDataCiteConnector ¶ added in v0.1.5
func NewDataCiteConnector(httpClient HTTPClient) DataCiteConnector
NewDataCiteConnector creates a DataCite source connector.
func (DataCiteConnector) Name ¶ added in v0.1.5
func (DataCiteConnector) Name() string
Name returns the connector source name.
func (DataCiteConnector) Search ¶ added in v0.1.5
func (c DataCiteConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the DataCite REST API and normalizes results into SourceRecords.
type DimensionsConnector ¶ added in v0.1.5
type DimensionsConnector struct {
// contains filtered or unexported fields
}
DimensionsConnector searches Dimensions (free academic API tier).
Dimensions requires a JWT bearer token obtained via the free academic access program at app.dimensions.ai. Set the RFORGE_DIMENSIONS_TOKEN environment variable to enable this connector. The connector uses the DSL POST endpoint with a plain-text query body.
DSL reference: https://docs.dimensions.ai/dsl/
func NewDimensionsConnector ¶ added in v0.1.5
func NewDimensionsConnector(httpClient HTTPClient) DimensionsConnector
NewDimensionsConnector creates a Dimensions source connector.
func (DimensionsConnector) Name ¶ added in v0.1.5
func (DimensionsConnector) Name() string
Name returns the connector source name.
func (DimensionsConnector) Search ¶ added in v0.1.5
func (c DimensionsConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the Dimensions DSL API and normalizes results into SourceRecords.
type ERICConnector ¶ added in v0.1.5
type ERICConnector struct {
// contains filtered or unexported fields
}
ERICConnector searches the Education Resources Information Center (ERIC).
ERIC is the US Department of Education's bibliographic database covering education research and practice (2M+ records). It has no DOI field in the search API; SourceID (EJ/ED number) is stored in CrossrefID as "eric:<id>".
func NewERICConnector ¶ added in v0.1.5
func NewERICConnector(httpClient HTTPClient) ERICConnector
NewERICConnector creates an ERIC source connector.
func (ERICConnector) Name ¶ added in v0.1.5
func (ERICConnector) Name() string
Name returns the connector source name.
func (ERICConnector) Search ¶ added in v0.1.5
func (c ERICConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the ERIC API and normalizes results into SourceRecords.
type EuropePMCConnector ¶
type EuropePMCConnector struct {
// contains filtered or unexported fields
}
EuropePMCConnector searches Europe PMC metadata.
func NewEuropePMCConnector ¶
func NewEuropePMCConnector(httpClient HTTPClient) EuropePMCConnector
NewEuropePMCConnector creates a Europe PMC source connector.
func (EuropePMCConnector) Name ¶
func (EuropePMCConnector) Name() string
Name returns the connector source name.
func (EuropePMCConnector) Search ¶
func (c EuropePMCConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries Europe PMC and normalizes results into SourceRecords.
type FigshareConnector ¶ added in v0.1.5
type FigshareConnector struct {
// contains filtered or unexported fields
}
FigshareConnector searches the figshare research outputs repository.
func NewFigshareConnector ¶ added in v0.1.5
func NewFigshareConnector(httpClient HTTPClient) FigshareConnector
NewFigshareConnector creates a figshare source connector.
func (FigshareConnector) Name ¶ added in v0.1.5
func (FigshareConnector) Name() string
Name returns the connector source name.
func (FigshareConnector) Search ¶ added in v0.1.5
func (c FigshareConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the figshare API and normalizes results into SourceRecords.
type GraphExpansionBudget ¶
type GraphExpansionBudget struct {
MaxDepth int `json:"maxDepth"`
MaxNodes int `json:"maxNodes"`
MaxAPICalls int `json:"maxApiCalls"`
RetryBudget int `json:"retryBudget"`
ResumeCursor string `json:"resumeCursor,omitempty"`
}
func NormalizeGraphExpansionBudget ¶
func NormalizeGraphExpansionBudget(b GraphExpansionBudget) GraphExpansionBudget
type GraphExpansionBudgetEstimate ¶
type GraphExpansionBudgetEstimate struct {
SchemaVersion string `json:"schemaVersion"`
Source string `json:"source"`
SeedID string `json:"seedId"`
Direction SemanticScholarGraphDirection `json:"direction"`
Limit int `json:"limit"`
MaxDepth int `json:"maxDepth"`
MaxNodes int `json:"maxNodes"`
MaxAPICalls int `json:"maxApiCalls"`
RetryBudget int `json:"retryBudget"`
ResumeCursor string `json:"resumeCursor,omitempty"`
EstimatedAPICalls int `json:"estimatedApiCalls"`
EstimatedMaxNodes int `json:"estimatedMaxNodes"`
WithinBudget bool `json:"withinBudget"`
DryRunPlan string `json:"dryRunPlan"`
}
func EstimateGraphExpansionBudget ¶
func EstimateGraphExpansionBudget(source, seedID string, direction SemanticScholarGraphDirection, limit int, budget GraphExpansionBudget) GraphExpansionBudgetEstimate
type HALConnector ¶ added in v0.1.5
type HALConnector struct {
// contains filtered or unexported fields
}
HALConnector searches the French HAL open-access archive.
HAL (Hyper Articles en Ligne) is France's national OA repository with strong coverage in humanities, social sciences, and STEM. The API is SOLR-based and returns structured JSON. HAL IDs (hal-XXXXXXX) are stored in CrossrefID when no DOI is available.
func NewHALConnector ¶ added in v0.1.5
func NewHALConnector(httpClient HTTPClient) HALConnector
NewHALConnector creates a HAL source connector.
func (HALConnector) Name ¶ added in v0.1.5
func (HALConnector) Name() string
Name returns the connector source name.
func (HALConnector) Search ¶ added in v0.1.5
func (c HALConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the HAL open search API and normalizes results into SourceRecords.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient makes source HTTP requests through an injected base URL.
func NewHTTPClient ¶
func NewHTTPClient(options HTTPClientOptions) HTTPClient
NewHTTPClient creates an HTTP client suitable for real adapters and httptest servers.
func NewNASAADSHTTPClient ¶
func NewNASAADSHTTPClient(baseURL, token string) HTTPClient
func (HTTPClient) Get ¶
Get fetches a relative source path with query parameters and returns the response body.
type HTTPClientOptions ¶
type HTTPClientOptions struct {
BaseURL string
UserAgent string
Timeout time.Duration
MaxRetries int
MaxResponseBytes int64
Headers map[string]string
Sleep func(time.Duration)
}
HTTPClientOptions configures a local-testable scholarly source HTTP client.
type Identifiers ¶
type Identifiers struct {
DOI string
OpenAlexID string
ArXivID string
PMID string
PMCID string
CrossrefID string
SemanticScholarID string
ADSBibcode string
}
Identifiers are normalized scholarly IDs on a source result.
type InspireHEPConnector ¶ added in v0.1.5
type InspireHEPConnector struct {
// contains filtered or unexported fields
}
InspireHEPConnector searches the INSPIRE HEP literature database.
func NewInspireHEPConnector ¶ added in v0.1.5
func NewInspireHEPConnector(httpClient HTTPClient) InspireHEPConnector
NewInspireHEPConnector creates an INSPIRE HEP source connector.
func (InspireHEPConnector) Name ¶ added in v0.1.5
func (InspireHEPConnector) Name() string
Name returns the connector source name.
func (InspireHEPConnector) Search ¶ added in v0.1.5
func (c InspireHEPConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the INSPIRE HEP literature API and normalizes results into SourceRecords.
type LensConnector ¶ added in v0.1.5
type LensConnector struct {
// contains filtered or unexported fields
}
LensConnector searches Lens.org scholarly and patent literature.
func NewLensConnector ¶ added in v0.1.5
func NewLensConnector(httpClient HTTPClient) LensConnector
NewLensConnector creates a Lens.org source connector.
func (LensConnector) Name ¶ added in v0.1.5
func (LensConnector) Name() string
Name returns the connector source name.
func (LensConnector) Search ¶ added in v0.1.5
func (c LensConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the Lens.org scholarly search API and normalizes results into SourceRecords.
type NASAADSConnector ¶
type NASAADSConnector struct {
// contains filtered or unexported fields
}
NASAADSConnector searches NASA ADS Solr records for physics/astronomy bibliography normalization.
func NewNASAADSConnector ¶
func NewNASAADSConnector(httpClient HTTPClient) NASAADSConnector
func (NASAADSConnector) ExpandCitationGraph ¶
func (c NASAADSConnector) ExpandCitationGraph(ctx context.Context, bibcode string, limit int) (CitationGraphExpansion, error)
func (NASAADSConnector) Name ¶
func (NASAADSConnector) Name() string
func (NASAADSConnector) Search ¶
func (c NASAADSConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
type OSFConnector ¶ added in v0.1.5
type OSFConnector struct {
// contains filtered or unexported fields
}
OSFConnector searches OSF Preprints, which aggregates PsyArXiv, SocArXiv, EarthArXiv, and other community preprint servers under a single API.
func NewOSFConnector ¶ added in v0.1.5
func NewOSFConnector(httpClient HTTPClient) OSFConnector
NewOSFConnector creates an OSF source connector.
func (OSFConnector) Name ¶ added in v0.1.5
func (OSFConnector) Name() string
Name returns the connector source name.
func (OSFConnector) Search ¶ added in v0.1.5
func (c OSFConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the OSF Preprints API and normalizes results into SourceRecords.
type OpenAccessCandidate ¶
type OpenAccessCandidate struct {
PaperTitle string `json:"paperTitle"`
DOI string `json:"doi,omitempty"`
Source string `json:"source"`
URL string `json:"url"`
License string `json:"license,omitempty"`
OAStatus string `json:"oaStatus,omitempty"`
Provenance string `json:"provenance"`
Attribution string `json:"attribution,omitempty"`
RateLimitPolicy string `json:"rateLimitPolicy,omitempty"`
APIProvenance string `json:"apiProvenance,omitempty"`
ReviewerApprovalRequired bool `json:"reviewerApprovalRequired"`
}
type OpenAccessCandidateComparison ¶
type OpenAccessCandidateComparison struct {
SchemaVersion string `json:"schemaVersion"`
Candidates []OpenAccessCandidate `json:"candidates"`
}
func CompareOpenAccessCandidates ¶
func CompareOpenAccessCandidates(records []library.PaperRecord) OpenAccessCandidateComparison
type OpenAccessRecord ¶
type OpenAccessRecord struct {
DOI string
OpenAccess bool
OAStatus string
License string
BestURL string
PDFURL string
SourceRef library.SourceRef
}
OpenAccessRecord is normalized Unpaywall open-access metadata for one DOI.
type OpenAlexConnector ¶
type OpenAlexConnector struct {
// contains filtered or unexported fields
}
OpenAlexConnector searches OpenAlex works.
func NewOpenAlexConnector ¶
func NewOpenAlexConnector(httpClient HTTPClient) OpenAlexConnector
NewOpenAlexConnector creates an OpenAlex source connector.
func (OpenAlexConnector) ExpandCitationGraph ¶
func (c OpenAlexConnector) ExpandCitationGraph(ctx context.Context, query OpenAlexGraphQuery) (CitationGraphExpansion, error)
ExpandCitationGraph fetches OpenAlex references, citations, or both for one work.
func (OpenAlexConnector) Name ¶
func (OpenAlexConnector) Name() string
Name returns the connector source name.
func (OpenAlexConnector) RelatedWorks ¶
func (c OpenAlexConnector) RelatedWorks(ctx context.Context, workID string, limit int) (SourceResponse, error)
RelatedWorks returns related OpenAlex work IDs as lightweight discovery records.
func (OpenAlexConnector) Search ¶
func (c OpenAlexConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries OpenAlex works and normalizes results into SourceRecords.
func (OpenAlexConnector) SearchAuthors ¶
func (c OpenAlexConnector) SearchAuthors(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
SearchAuthors queries OpenAlex authors.
func (OpenAlexConnector) SearchConcepts ¶
func (c OpenAlexConnector) SearchConcepts(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
SearchConcepts queries OpenAlex concepts.
func (OpenAlexConnector) SearchInstitutions ¶
func (c OpenAlexConnector) SearchInstitutions(ctx context.Context, query SourceQuery) ([]OpenAlexEntity, string, error)
SearchInstitutions queries OpenAlex institutions.
type OpenAlexDisambiguationItem ¶
type OpenAlexDisambiguationItem struct {
Key string `json:"key"`
Reason string `json:"reason"`
Candidates []OpenAlexEntity `json:"candidates"`
ProvenanceRef string `json:"provenanceRef"`
}
type OpenAlexDisambiguationQueue ¶
type OpenAlexDisambiguationQueue struct {
SchemaVersion string `json:"schemaVersion"`
Query string `json:"query"`
Entity string `json:"entity"`
Items []OpenAlexDisambiguationItem `json:"items"`
}
func BuildOpenAlexDisambiguationQueue ¶
func BuildOpenAlexDisambiguationQueue(query, entity string, candidates []OpenAlexEntity, rawRef string) OpenAlexDisambiguationQueue
type OpenAlexEntity ¶
type OpenAlexEntity struct {
Source string `json:"source"`
SourceID string `json:"sourceId"`
DisplayName string `json:"displayName"`
WorksCount int `json:"worksCount"`
Metadata map[string]string `json:"metadata,omitempty"`
}
OpenAlexEntity is a normalized OpenAlex author or institution search result.
type OpenAlexGraphQuery ¶
type OpenAlexGraphQuery struct {
WorkID string
Limit int
Direction SemanticScholarGraphDirection
}
OpenAlexGraphQuery describes an OpenAlex citation graph expansion.
type OpenCitationsConnector ¶ added in v0.1.5
type OpenCitationsConnector struct {
// contains filtered or unexported fields
}
OpenCitationsConnector queries the OpenCitations COCI citation graph.
Query terms must be a DOI. The connector returns papers that cite that DOI by calling the Index v1 citations endpoint, then batch-fetches bibliographic metadata from the Meta v1 endpoint.
API migration note (2026): the legacy /index/coci/api/v1/ paths and the /index/v1/metadata endpoint have been retired. The current paths are:
- https://api.opencitations.net/index/v1/citations/{doi}
- https://api.opencitations.net/meta/v1/metadata/doi:{doi1}__doi:{doi2}
func NewOpenCitationsConnector ¶ added in v0.1.5
func NewOpenCitationsConnector(httpClient HTTPClient) OpenCitationsConnector
NewOpenCitationsConnector creates an OpenCitations source connector.
func (OpenCitationsConnector) Name ¶ added in v0.1.5
func (OpenCitationsConnector) Name() string
Name returns the connector source name.
func (OpenCitationsConnector) Search ¶ added in v0.1.5
func (c OpenCitationsConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries OpenCitations for papers citing the DOI in query.Terms.
type PubChemConnector ¶ added in v0.1.5
type PubChemConnector struct {
// contains filtered or unexported fields
}
PubChemConnector searches PubChem for chemical compounds.
PubChem is NCBI's open chemical database (100M+ compounds). The connector searches by compound name and returns compound records with IUPAC names, molecular formulas, molecular weights, InChIKeys, and SMILES. All PubChem data is open (CC0). Compound IDs (CIDs) are stored as CrossrefID.
Two-step query: (1) name→CID list, (2) CID list→properties batch fetch.
func NewPubChemConnector ¶ added in v0.1.5
func NewPubChemConnector(httpClient HTTPClient) PubChemConnector
NewPubChemConnector creates a PubChem source connector.
func (PubChemConnector) Name ¶ added in v0.1.5
func (PubChemConnector) Name() string
Name returns the connector source name.
func (PubChemConnector) Search ¶ added in v0.1.5
func (c PubChemConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries PubChem by compound name and returns compound SourceRecords.
type PubMedConnector ¶
type PubMedConnector struct {
// contains filtered or unexported fields
}
PubMedConnector searches PubMed through NCBI E-utilities JSON endpoints.
func NewPubMedConnector ¶
func NewPubMedConnector(httpClient HTTPClient) PubMedConnector
NewPubMedConnector creates a PubMed source connector.
func NewPubMedConnectorWithOptions ¶
func NewPubMedConnectorWithOptions(httpClient HTTPClient, options PubMedOptions) PubMedConnector
NewPubMedConnectorWithOptions creates a PubMed source connector with optional NCBI identification.
func (PubMedConnector) Name ¶
func (PubMedConnector) Name() string
Name returns the connector source name.
func (PubMedConnector) Search ¶
func (c PubMedConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries PubMed ESearch then ESummary and normalizes results into SourceRecords.
type PubMedOptions ¶
PubMedOptions configures optional NCBI E-utilities identification parameters.
type RequestProvenance ¶
type RequestProvenance struct {
Source string
Query SourceQuery
}
RequestProvenance records what was sent to a SourceConnector.
type ResponseCache ¶
type ResponseCache struct {
// contains filtered or unexported fields
}
ResponseCache stores raw source payloads for reproducible connector runs.
func NewResponseCache ¶
func NewResponseCache(root string) ResponseCache
NewResponseCache creates a filesystem-backed source response cache.
type ResponseProvenance ¶
ResponseProvenance records what came back from a SourceConnector.
type SearchRun ¶
type SearchRun struct {
Connector string
Query SourceQuery
Response SourceResponse
RequestProvenance RequestProvenance
ResponseProvenance ResponseProvenance
}
SearchRun ties connector output to request and response Provenance metadata.
func RunSearch ¶
func RunSearch(ctx context.Context, connector SourceConnector, query SourceQuery) (SearchRun, error)
RunSearch validates a query, invokes a connector, and records request/response Provenance metadata.
type SemanticScholarConnector ¶
type SemanticScholarConnector struct {
// contains filtered or unexported fields
}
SemanticScholarConnector searches the Semantic Scholar Graph API paper index.
func NewSemanticScholarConnector ¶
func NewSemanticScholarConnector(httpClient HTTPClient) SemanticScholarConnector
NewSemanticScholarConnector creates a Semantic Scholar source connector.
func (SemanticScholarConnector) ExpandCitationGraph ¶
func (c SemanticScholarConnector) ExpandCitationGraph(ctx context.Context, query SemanticScholarGraphQuery) (CitationGraphExpansion, error)
ExpandCitationGraph fetches references, citations, or both around one Semantic Scholar paper.
func (SemanticScholarConnector) Name ¶
func (SemanticScholarConnector) Name() string
Name returns the connector source name.
func (SemanticScholarConnector) Search ¶
func (c SemanticScholarConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries Semantic Scholar papers and normalizes results into SourceRecords.
type SemanticScholarGraphDirection ¶
type SemanticScholarGraphDirection string
SemanticScholarGraphDirection selects which graph neighborhood to fetch.
const ( SemanticScholarDirectionReferences SemanticScholarGraphDirection = "references" SemanticScholarDirectionCitations SemanticScholarGraphDirection = "citations" SemanticScholarDirectionBoth SemanticScholarGraphDirection = "both" )
type SemanticScholarGraphQuery ¶
type SemanticScholarGraphQuery struct {
PaperID string
Limit int
Direction SemanticScholarGraphDirection
}
SemanticScholarGraphQuery describes a Semantic Scholar citation graph expansion.
type SemanticScholarGraphRun ¶
type SemanticScholarGraphRun struct {
SchemaVersion string `json:"schemaVersion"`
SeedID string `json:"seedId"`
Direction SemanticScholarGraphDirection `json:"direction"`
Limit int `json:"limit"`
Depth int `json:"depth"`
MaxRecords int `json:"maxRecords"`
RequestedFields []string `json:"requestedFields"`
FieldRestrictions []string `json:"fieldRestrictions,omitempty"`
QuotaRemaining int `json:"quotaRemaining"`
Budget GraphExpansionBudget `json:"budget"`
BudgetEstimate GraphExpansionBudgetEstimate `json:"budgetEstimate"`
ResumeCursor string `json:"resumeCursor,omitempty"`
Visited []string `json:"visited"`
NextFrontier []string `json:"nextFrontier"`
EdgeCount int `json:"edgeCount"`
RecordCount int `json:"recordCount"`
Completed bool `json:"completed"`
}
func NewSemanticScholarGraphRun ¶
func NewSemanticScholarGraphRun(opts SemanticScholarGraphRunOptions) SemanticScholarGraphRun
func (SemanticScholarGraphRun) HasFieldRestriction ¶
func (r SemanticScholarGraphRun) HasFieldRestriction(field string) bool
func (SemanticScholarGraphRun) RecordExpansion ¶
func (r SemanticScholarGraphRun) RecordExpansion(expansion CitationGraphExpansion, nextFrontier []string, quotaRemaining int) SemanticScholarGraphRun
type SemanticScholarGraphRunOptions ¶
type SemanticScholarGraphRunOptions struct {
SeedID string
Direction SemanticScholarGraphDirection
Limit, Depth, MaxRecords int
RequestedFields []string
QuotaRemaining int
Budget GraphExpansionBudget
}
type SourceConnector ¶
type SourceConnector interface {
Name() string
Search(context.Context, SourceQuery) (SourceResponse, error)
}
SourceConnector searches one scholarly metadata source.
type SourceQuery ¶
SourceQuery describes a scholarly metadata search request.
type SourceRecord ¶
type SourceRecord struct {
Source string
SourceID string
Title string
Identifiers Identifiers
Year int
Abstract string
Venue string
Publisher string
URLs []string
License string
OpenAccess bool
Metadata map[string]string
}
SourceRecord is a source-specific scholarly metadata result.
type SourceResponse ¶
type SourceResponse struct {
Records []SourceRecord
RawRef string
NextPageCursor string
}
SourceResponse is the normalized response from a SourceConnector.
type UnpaywallConnector ¶
type UnpaywallConnector struct {
// contains filtered or unexported fields
}
UnpaywallConnector looks up open-access metadata for a DOI.
func NewUnpaywallConnector ¶
func NewUnpaywallConnector(httpClient HTTPClient, email string) UnpaywallConnector
NewUnpaywallConnector creates an Unpaywall DOI lookup connector.
func (UnpaywallConnector) LookupDOI ¶
func (c UnpaywallConnector) LookupDOI(ctx context.Context, doi string) (OpenAccessRecord, error)
LookupDOI fetches and normalizes Unpaywall metadata for a DOI.
func (UnpaywallConnector) Name ¶
func (UnpaywallConnector) Name() string
Name returns the connector source name.
type ZbMATHConnector ¶ added in v0.1.5
type ZbMATHConnector struct {
// contains filtered or unexported fields
}
ZbMATHConnector searches the zbMATH Open mathematics database.
Some records have title/abstract redacted due to publisher license conflicts; those records are skipped. The search path is /v1/document/_search with search_string parameter (not /v1/document/ with q=).
func NewZbMATHConnector ¶ added in v0.1.5
func NewZbMATHConnector(httpClient HTTPClient) ZbMATHConnector
NewZbMATHConnector creates a zbMATH source connector.
func (ZbMATHConnector) Name ¶ added in v0.1.5
func (ZbMATHConnector) Name() string
Name returns the connector source name.
func (ZbMATHConnector) Search ¶ added in v0.1.5
func (c ZbMATHConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the zbMATH Open REST API and normalizes results into SourceRecords.
type ZenodoConnector ¶ added in v0.1.5
type ZenodoConnector struct {
// contains filtered or unexported fields
}
ZenodoConnector searches the Zenodo open repository.
func NewZenodoConnector ¶ added in v0.1.5
func NewZenodoConnector(httpClient HTTPClient) ZenodoConnector
NewZenodoConnector creates a Zenodo source connector.
func (ZenodoConnector) Name ¶ added in v0.1.5
func (ZenodoConnector) Name() string
Name returns the connector source name.
func (ZenodoConnector) Search ¶ added in v0.1.5
func (c ZenodoConnector) Search(ctx context.Context, query SourceQuery) (SourceResponse, error)
Search queries the Zenodo REST API and normalizes results into SourceRecords.
Source Files
¶
- arxiv.go
- base.go
- biorxiv.go
- cache.go
- chemrxiv.go
- clinicaltrials.go
- crossref.go
- datacite.go
- dblp.go
- dimensions.go
- eric.go
- europepmc.go
- figshare.go
- graph_budget.go
- hal.go
- http.go
- inspirehep.go
- lens.go
- nasa_ads.go
- open_access_candidates.go
- openalex.go
- openalex_disambiguation.go
- openalex_presets.go
- opencitations.go
- osf.go
- pubchem.go
- pubmed.go
- semantic_scholar.go
- semantic_scholar_run.go
- sources.go
- unpaywall.go
- zbmath.go
- zenodo.go