Documentation
¶
Index ¶
- Variables
- func ExtractAll(content []commonmeta.Data) ([]byte, error)
- func GetDisplayName(ror ROR) string
- func MapROR(id string, name string, assertedBy string, match bool) (string, string, string, error)
- func Write(data ROR) ([]byte, error)
- func WriteAll(list []ROR, extension string) ([]byte, error)
- func WriteAllInvenioRDM(list []ROR, extension string) ([]byte, error)
- func WriteInvenioRDM(data ROR) ([]byte, error)
- type Admin
- type Date
- type ExternalID
- type ExternalIDS
- type GeonamesDetails
- type Identifier
- type InvenioRDM
- type Link
- type Links
- type Location
- type Locations
- type Name
- type Names
- type ROR
- func Fetch(str string) (ROR, error)
- func FilterRecords(list []ROR, type_ string, country string, dateUpdated string, file string, ...) ([]ROR, error)
- func Get(str string) (ROR, error)
- func LoadAll(filename string) ([]ROR, error)
- func LoadBuiltin() ([]ROR, error)
- func MatchAffiliation(name string) (ROR, error)
- func Search(id string) (ROR, error)
- type RORCSV
- type Relationship
- type Relationships
- type Strings
- type Title
Constants ¶
This section is empty.
Variables ¶
var Extensions = []string{".avro", ".yaml", ".json"}
var InvenioRDMSchema = `` /* 9382-byte string literal not displayed */
var RORSchema = `` /* 5909-byte string literal not displayed */
RORSchema is the Avro schema for the minimal ROR metadata.
var RORTypes = []string{"archive", "company", "education", "facility", "funder", "government", "healthcare", "nonprofit", "other"}
var RORVersions = map[string]string{
"v1.50": "2024-07-29",
"v1.51": "2024-08-21",
"v1.52": "2024-09-16",
"v1.53": "2023-10-14",
"v1.54": "2024-10-21",
"v1.55": "2024-10-31",
"v1.56": "2024-11-19",
"v1.58": "2024-12-11",
"v1.59": "2025-01-23",
"v1.60": "2025-02-27",
"v1.61": "2025-03-18",
"v1.62": "2025-03-27",
"v1.63": "2025-04-03",
}
RORVersions contains the ROR versions and their release dates, published on Zenodo. The ROR version is the first part of the filename, e.g., v1.63-2025-04-03-ror-data_schema_v2.json Beginning with release v1.45 on 11 April 2024, data releases contain JSON and CSV files formatted according to both schema v1 and schema v2. Version 2 files have _schema_v2 appended to the end of the filename, e.g., v1.45-2024-04-11-ror-data_schema_v2.json.
var SupportedTypes = []string{"ROR", "Wikidata", "Crossref Funder ID", "GRID", "ISNI"}
Functions ¶
func ExtractAll ¶ added in v0.17.1
func ExtractAll(content []commonmeta.Data) ([]byte, error)
ExtractAll extracts ROR metadata from a JSON file in commonmeta format.
func GetDisplayName ¶ added in v0.19.0
GetDisplayName returns the display name of the organization
func MapROR ¶ added in v0.19.0
MapROR maps between a ROR ID and organization name
The function accepts a ROR ID and/or name and returns both values if possible: - If both ID and name are provided, they are returned unchanged - If only ID is provided, the name is fetched from ROR API - If only name is provided and match=true, attempts to find a matching ROR ID
func WriteAllInvenioRDM ¶ added in v0.18.0
WriteAllInvenioRDM writes a list of ROR metadata in InvenioRDM format.
func WriteInvenioRDM ¶ added in v0.18.0
WriteInvenioRDM writes ROR metadata in InvenioRDM format.
Types ¶
type ExternalID ¶
type ExternalIDS ¶ added in v0.19.0
type ExternalIDS []ExternalID
type GeonamesDetails ¶
type GeonamesDetails struct {
ContinentCode string `avro:"continent_code" json:"continent_code" yaml:"continent_code"`
ContinentName string `avro:"continent_name" json:"continent_name" yaml:"continent_name"`
CountryCode string `avro:"country_code" json:"country_code" yaml:"country_code"`
CountryName string `avro:"country_name" json:"country_name" yaml:"country_name"`
CountrySubdivisionCode string `avro:"country_subdivision_code" json:"country_subdivision_code,omitempty" yaml:"country_subdivision_code,omitempty"`
CountrySubdivisionName string `avro:"country_subdivision_name" json:"country_subdivision_name,omitempty" yaml:"country_subdivision_name,omitempty"`
Lat float64 `avro:"lat" json:"lat"`
Lng float64 `avro:"lng" json:"lng"`
Name string `avro:"name" json:"name"`
}
type Identifier ¶
type InvenioRDM ¶
type InvenioRDM struct {
Acronym string `avro:"acronym,omitempty" json:"acronym,omitempty" yaml:"acronym,omitempty"`
ID string `avro:"id" json:"id"`
Country string `avro:"country,omitempty" json:"country,omitempty" yaml:"country,omitempty"`
Identifiers []Identifier `avro:"identifiers" json:"identifiers"`
Name string `avro:"name" json:"name"`
Title Title `avro:"title" json:"title"`
}
InvenioRDM represents the ROR metadata record in InvenioRDM format.
func ConvertInvenioRDM ¶ added in v0.19.0
func ConvertInvenioRDM(data ROR) (InvenioRDM, error)
Convert converts ROR metadata into InvenioRDM format.
type Location ¶
type Location struct {
GeonamesID int `avro:"geonames_id" json:"geonames_id" yaml:"geonames_id"`
GeonamesDetails GeonamesDetails `avro:"geonames_details" json:"geonames_details" yaml:"geonames_details"`
}
type ROR ¶
type ROR struct {
ID string `avro:"id" json:"id" csv:"id"`
Domains Strings `avro:"domains,omitempty" json:"domains,omitempty" yaml:"domains,omitempty"`
Established int `avro:"established" json:"established,omitempty" yaml:"established,omitempty"`
ExternalIDs ExternalIDS `avro:"external_ids" json:"external_ids,omitempty" yaml:"external_ids,omitempty"`
Links Links `avro:"links" json:"links" yaml:"links,omitempty"`
Locations Locations `avro:"locations" json:"locations"`
Names Names `avro:"names" json:"names"`
Relationships Relationships `avro:"relationships" json:"relationships" yaml:"relationships,omitempty"`
Status string `avro:"status" json:"status"`
Types Strings `avro:"types" json:"types"`
Admin Admin `avro:"admin" json:"admin"`
}
ROR represents the ROR metadata record.
func FilterRecords ¶ added in v0.18.0
func FilterRecords(list []ROR, type_ string, country string, dateUpdated string, file string, number int, page int) ([]ROR, error)
FilterRecords filters a list of ROR records by type and/or country.
func LoadBuiltin ¶ added in v0.17.5
LoadBuiltin loads the embedded ROR metadata from the ZIP file with all ROR records.
func MatchAffiliation ¶ added in v0.19.0
MatchAffiliation searches ROR metadata for a given affiliation name, using their matching strategies.
type RORCSV ¶ added in v0.19.0
type RORCSV struct {
ID string `csv:"id"`
Name string `csv:"name"`
Types string `csv:"types"`
Status string `csv:"status"`
Links string `csv:"links,omitempty"`
Aliases string `csv:"aliases,omitempty"`
Labels string `csv:"labels,omitempty"`
Acronyms string `csv:"acronyms,omitempty"`
WikipediaURL string `csv:"wikipedia_url,omitempty"`
Established string `csv:"established,omitempty"`
Latitude string `csv:"addresses[0].lat"`
Longitude string `csv:"addresses[0].lng"`
Place string `csv:"addresses[0].geonames_city.name"`
GeonamesID string `csv:"addresses[0].geonames_city.id"`
CountrySubdivisionName string `csv:"addresses[0].geonames_city.geonames_admin1.name,omitempty"`
CountrySubdivisionCode string `csv:"addresses[0].geonames_city.geonames_admin1.code,omitempty"`
CountryCode string `csv:"country.country_code"`
CountryName string `csv:"country.country_name"`
ExternalIDsGRIDPreferred string `csv:"external_ids.GRID.preferred,omitempty"`
ExternalIDsGRIDAll string `csv:"external_ids.GRID.all,omitempty"`
ExternalIDsISNIPreferred string `csv:"external_ids.ISNI.preferred,omitempty"`
ExternalIDsISNIAll string `csv:"external_ids.ISNI.all,omitempty"`
ExternalIDsFundrefPreferred string `csv:"external_ids.FundRef.preferred,omitempty"`
ExternalIDsFundrefAll string `csv:"external_ids.FundRef.all,omitempty"`
ExternalIDsWikidataPreferred string `csv:"external_ids.Wikidata.preferred,omitempty"`
ExternalIDsWikidataAll string `csv:"external_ids.Wikidata.all,omitempty"`
Relationships string `csv:"relationships,omitempty"`
}
func ConvertRORCSV ¶ added in v0.19.0
ConvertRORCSV converts ROR metadata into RORCSV format.
type Relationship ¶
type Relationships ¶ added in v0.19.0
type Relationships []Relationship
type Title ¶ added in v0.17.4
type Title struct {
Aa string `avro:"aa,omitempty" json:"aa,omitempty" yaml:"aa,omitempty"` // Afar
Af string `avro:"af,omitempty" json:"af,omitempty" yaml:"af,omitempty"` // Afrikaans
Am string `avro:"am,omitempty" json:"am,omitempty" yaml:"am,omitempty"` // Amharic
Ar string `avro:"ar,omitempty" json:"ar,omitempty" yaml:"ar,omitempty"` // Arabic
As string `avro:"as,omitempty" json:"as,omitempty" yaml:"as,omitempty"` // Assamese
Az string `avro:"az,omitempty" json:"az,omitempty" yaml:"az,omitempty"` // Azerbaijani
Ba string `avro:"ba,omitempty" json:"ba,omitempty" yaml:"ba,omitempty"` // Bashkir
Be string `avro:"be,omitempty" json:"be,omitempty" yaml:"be,omitempty"` // Belgian
Bg string `avro:"bu,omitempty" json:"bg,omitempty" yaml:"bg,omitempty"` // Bulgarian
Bi string `avro:"bi,omitempty" json:"bi,omitempty" yaml:"bi,omitempty"` // Bislama
Bn string `avro:"bn,omitempty" json:"bn,omitempty" yaml:"bn,omitempty"` // Bengali
Bs string `avro:"bo,omitempty" json:"bs,omitempty" yaml:"bs,omitempty"` // Bosnian
Ca string `avro:"ca,omitempty" json:"ca,omitempty" yaml:"ca,omitempty"` // Catalan
Ch string `avro:"ch,omitempty" json:"ch,omitempty" yaml:"ch,omitempty"` // Chamorro
Co string `avro:"co,omitempty" json:"co,omitempty" yaml:"co,omitempty"` // Corsican
Cs string `avro:"cs,omitempty" json:"cs,omitempty" yaml:"cs,omitempty"` // Czech
Cu string `avro:"cu,omitempty" json:"cu,omitempty" yaml:"cu,omitempty"` // Church Slavic
Cy string `avro:"cy,omitempty" json:"cy,omitempty" yaml:"cy,omitempty"` // Welsh
Da string `avro:"da,omitempty" json:"da,omitempty" yaml:"da,omitempty"` // Danish
De string `avro:"de,omitempty" json:"de,omitempty" yaml:"de,omitempty"` // German
Dv string `avro:"dv,omitempty" json:"dv,omitempty" yaml:"dv,omitempty"` // Divehi
Dz string `avro:"dz,omitempty" json:"dz,omitempty" yaml:"dz,omitempty"` // Dzongkha
El string `avro:"el,omitempty" json:"el,omitempty" yaml:"el,omitempty"` // Greek
En string `avro:"en,omitempty" json:"en,omitempty" yaml:"en,omitempty"` // English
Es string `avro:"es,omitempty" json:"es,omitempty" yaml:"es,omitempty"` // Spanish
Et string `avro:"et,omitempty" json:"et,omitempty" yaml:"et,omitempty"` // Estonian
Eu string `avro:"eu,omitempty" json:"eu,omitempty" yaml:"eu,omitempty"` // Basque
Fa string `avro:"fa,omitempty" json:"fa,omitempty" yaml:"fa,omitempty"` // Persian
Fi string `avro:"fi,omitempty" json:"fi,omitempty" yaml:"fi,omitempty"` // Finnish
Fo string `avro:"fo,omitempty" json:"fo,omitempty" yaml:"fo,omitempty"` // Faroese
Fr string `avro:"fr,omitempty" json:"fr,omitempty" yaml:"fr,omitempty"` // French
Fy string `avro:"fy,omitempty" json:"fy,omitempty" yaml:"fy,omitempty"` // Frisian
Ga string `avro:"ga,omitempty" json:"ga,omitempty" yaml:"ga,omitempty"` // Irish
Gd string `avro:"gd,omitempty" json:"gd,omitempty" yaml:"gd,omitempty"` // Scottish Gaelic
Gl string `avro:"gl,omitempty" json:"gl,omitempty" yaml:"gl,omitempty"` // Galician
Gu string `avro:"gu,omitempty" json:"gu,omitempty" yaml:"gu,omitempty"` // Gujarati
Gv string `avro:"gv,omitempty" json:"gv,omitempty" yaml:"gv,omitempty"` // Manx
Ha string `avro:"ha,omitempty" json:"ha,omitempty" yaml:"ha,omitempty"` // Hausa
He string `avro:"he,omitempty" json:"he,omitempty" yaml:"he,omitempty"` // Hebrew
Hi string `avro:"hi,omitempty" json:"hi,omitempty" yaml:"hi,omitempty"` // Hindi
Hr string `avro:"hr,omitempty" json:"hr,omitempty" yaml:"hr,omitempty"` // Croatian
Ht string `avro:"ht,omitempty" json:"ht,omitempty" yaml:"ht,omitempty"` // Haitian
Hu string `avro:"hu,omitempty" json:"hu,omitempty" yaml:"hu,omitempty"` // Hungarian
Hy string `avro:"hy,omitempty" json:"hy,omitempty" yaml:"hy,omitempty"` // Armenian
Id string `avro:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty"` // Indonesian
Is string `avro:"is,omitempty" json:"is,omitempty" yaml:"is,omitempty"` // Icelandic
It string `avro:"it,omitempty" json:"it,omitempty" yaml:"it,omitempty"` // Italian
Iu string `avro:"iu,omitempty" json:"iu,omitempty" yaml:"iu,omitempty"` // Inuktitut
Ja string `avro:"ja,omitempty" json:"ja,omitempty" yaml:"ja,omitempty"` // Japanese
Jv string `avro:"jv,omitempty" json:"jv,omitempty" yaml:"jv,omitempty"` // Javanese
Ka string `avro:"ka,omitempty" json:"ka,omitempty" yaml:"ka,omitempty"` // Georgian
Kg string `avro:"kg,omitempty" json:"kg,omitempty" yaml:"kg,omitempty"` // Kongo
Ki string `avro:"ki,omitempty" json:"ki,omitempty" yaml:"ki,omitempty"` // Kikuyu
Kk string `avro:"kk,omitempty" json:"kk,omitempty" yaml:"kk,omitempty"` // Kazakh
Kl string `avro:"kl,omitempty" json:"kl,omitempty" yaml:"kl,omitempty"` // Greenlandic
Km string `avro:"km,omitempty" json:"km,omitempty" yaml:"km,omitempty"` // Khmer
Kn string `avro:"kn,omitempty" json:"kn,omitempty" yaml:"kn,omitempty"` // Kannada
Ko string `avro:"ko,omitempty" json:"ko,omitempty" yaml:"ko,omitempty"` // Korean
Kr string `avro:"kr,omitempty" json:"kr,omitempty" yaml:"kr,omitempty"` // Kanuri
Ku string `avro:"ku,omitempty" json:"ku,omitempty" yaml:"ku,omitempty"` // Kurdish
Ky string `avro:"ky,omitempty" json:"ky,omitempty" yaml:"ky,omitempty"` // Kyrgyz
La string `avro:"la,omitempty" json:"la,omitempty" yaml:"la,omitempty"` // Latin
Lb string `avro:"lb,omitempty" json:"lb,omitempty" yaml:"lb,omitempty"` // Luxembourgish
Lo string `avro:"lo,omitempty" json:"lo,omitempty" yaml:"lo,omitempty"` // Lao
Lt string `avro:"lt,omitempty" json:"lt,omitempty" yaml:"lt,omitempty"` // Lithuanian
Lu string `avro:"lu,omitempty" json:"lu,omitempty" yaml:"lu,omitempty"` // Luba-Katanga
Lv string `avro:"lv,omitempty" json:"lv,omitempty" yaml:"lv,omitempty"` // Latvian
Mg string `avro:"mg,omitempty" json:"mg,omitempty" yaml:"mg,omitempty"` // Malagasy
Mi string `avro:"mi,omitempty" json:"mi,omitempty" yaml:"mi,omitempty"` // Maori
Mk string `avro:"mk,omitempty" json:"mk,omitempty" yaml:"mk,omitempty"` // Macedonian
Ml string `avro:"ml,omitempty" json:"ml,omitempty" yaml:"ml,omitempty"` // Malayalam
Mn string `avro:"mn,omitempty" json:"mn,omitempty" yaml:"mn,omitempty"` // Mongolian
Mr string `avro:"mr,omitempty" json:"mr,omitempty" yaml:"mr,omitempty"` // Marathi
Ms string `avro:"ms,omitempty" json:"ms,omitempty" yaml:"ms,omitempty"` // Malay
Mt string `avro:"mt,omitempty" json:"mt,omitempty" yaml:"mt,omitempty"` // Maltese
My string `avro:"my,omitempty" json:"my,omitempty" yaml:"my,omitempty"` // Burmese
Na string `avro:"na,omitempty" json:"na,omitempty" yaml:"na,omitempty"` // Nauru
Nb string `avro:"nb,omitempty" json:"nb,omitempty" yaml:"nb,omitempty"` // Norwegian Bokmål
Ne string `avro:"ne,omitempty" json:"ne,omitempty" yaml:"ne,omitempty"` // Nepali
Nl string `avro:"nl,omitempty" json:"nl,omitempty" yaml:"nl,omitempty"` // Dutch
Nn string `avro:"nn,omitempty" json:"nn,omitempty" yaml:"nn,omitempty"` // Norwegian Nynorsk
No string `avro:"no,omitempty" json:"no,omitempty" yaml:"no,omitempty"` // Norwegian
Oc string `avro:"oc,omitempty" json:"oc,omitempty" yaml:"oc,omitempty"` // Occitan
Om string `avro:"om,omitempty" json:"om,omitempty" yaml:"om,omitempty"` // Oromo
Or string `avro:"or,omitempty" json:"or,omitempty" yaml:"or,omitempty"` // Oriya
Pa string `avro:"pa,omitempty" json:"pa,omitempty" yaml:"pa,omitempty"` // Punjabi
Pl string `avro:"pl,omitempty" json:"pl,omitempty" yaml:"pl,omitempty"` // Polish
Ps string `avro:"ps,omitempty" json:"ps,omitempty" yaml:"ps,omitempty"` // Pashto
Pt string `avro:"pt,omitempty" json:"pt,omitempty" yaml:"pt,omitempty"` // Portuguese
Rm string `avro:"rm,omitempty" json:"rm,omitempty" yaml:"rm,omitempty"` // Romansh
Ro string `avro:"ro,omitempty" json:"ro,omitempty" yaml:"ro,omitempty"` // Romanian
Ru string `avro:"ru,omitempty" json:"ru,omitempty" yaml:"ru,omitempty"` // Russian
Rw string `avro:"rw,omitempty" json:"rw,omitempty" yaml:"rw,omitempty"` // Kinyarwanda
Sa string `avro:"sa,omitempty" json:"sa,omitempty" yaml:"sa,omitempty"` // Sanskrit
Sd string `avro:"sd,omitempty" json:"sd,omitempty" yaml:"sd,omitempty"` // Sindhi
Se string `avro:"se,omitempty" json:"se,omitempty" yaml:"se,omitempty"` // Northern Sami
Sh string `avro:"sh,omitempty" json:"sh,omitempty" yaml:"sh,omitempty"` // Serbo-Croatian
Si string `avro:"si,omitempty" json:"si,omitempty" yaml:"si,omitempty"` // Sinhalese
Sk string `avro:"sk,omitempty" json:"sk,omitempty" yaml:"sk,omitempty"` // Slovak
Sl string `avro:"sl,omitempty" json:"sl,omitempty" yaml:"sl,omitempty"` // Slovenian
Sm string `avro:"sm,omitempty" json:"sm,omitempty" yaml:"sm,omitempty"` // Samoan
So string `avro:"so,omitempty" json:"so,omitempty" yaml:"so,omitempty"` // Somali
Sq string `avro:"sq,omitempty" json:"sq,omitempty" yaml:"sq,omitempty"` // Albanian
Sr string `avro:"sr,omitempty" json:"sr,omitempty" yaml:"sr,omitempty"` // Serbian
St string `avro:"st,omitempty" json:"st,omitempty" yaml:"st,omitempty"` // Southern Sotho
Sv string `avro:"sv,omitempty" json:"sv,omitempty" yaml:"sv,omitempty"` // Swedish
Sw string `avro:"sw,omitempty" json:"sw,omitempty" yaml:"sw,omitempty"` // Swahili
Ta string `avro:"ta,omitempty" json:"ta,omitempty" yaml:"ta,omitempty"` // Tamil
Te string `avro:"te,omitempty" json:"te,omitempty" yaml:"te,omitempty"` // Telugu
Tg string `avro:"tg,omitempty" json:"tg,omitempty" yaml:"tg,omitempty"` // Tajik
Th string `avro:"th,omitempty" json:"th,omitempty" yaml:"th,omitempty"` // Thai
Ti string `avro:"ti,omitempty" json:"ti,omitempty" yaml:"ti,omitempty"` // Tigrinya
Tk string `avro:"tk,omitempty" json:"tk,omitempty" yaml:"tk,omitempty"` // Turkmen
Tl string `avro:"tl,omitempty" json:"tl,omitempty" yaml:"tl,omitempty"` // Tagalog
Tr string `avro:"tr,omitempty" json:"tr,omitempty" yaml:"tr,omitempty"` // Turkish
Tt string `avro:"tt,omitempty" json:"tt,omitempty" yaml:"tt,omitempty"` // Tatar
Ug string `avro:"ug,omitempty" json:"ug,omitempty" yaml:"ug,omitempty"` // Uighur
Uk string `avro:"uk,omitempty" json:"uk,omitempty" yaml:"uk,omitempty"` // Ukrainian
Ur string `avro:"ur,omitempty" json:"ur,omitempty" yaml:"ur,omitempty"` // Urdu
Uz string `avro:"uz,omitempty" json:"uz,omitempty" yaml:"uz,omitempty"` // Uzbek
Vi string `avro:"vi,omitempty" json:"vi,omitempty" yaml:"vi,omitempty"` // Vietnamese
Xh string `avro:"xh,omitempty" json:"xh,omitempty" yaml:"xh,omitempty"` // Xhosa
Yo string `avro:"yo,omitempty" json:"yo,omitempty" yaml:"yo,omitempty"` // Yoruba
Zh string `avro:"zh,omitempty" json:"zh,omitempty" yaml:"zh,omitempty"` // Chinese
Zu string `avro:"zu,omitempty" json:"zu,omitempty" yaml:"zu,omitempty"` // Zulu
}