Documentation
¶
Index ¶
- Variables
- func ExtractAll(content []commonmeta.Data) ([]byte, 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 GeonamesDetails
- type Identifier
- type InvenioRDM
- type Link
- type Location
- type Name
- type ROR
- type Relationship
- type Title
Constants ¶
This section is empty.
Variables ¶
var Extensions = []string{".avro", ".yaml", ".json"}
var InvenioRDMSchema = `` /* 9382-byte string literal not displayed */
var RORSchema = `` /* 5970-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.
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 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 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,omitempty" json:"country_subdivision_code,omitempty" yaml:"country_subdivision_code,omitempty"`
CountrySubdivisionName string `avro:"country_subdivision_name,omitempty" 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 Convert ¶
func Convert(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"`
Domains []string `avro:"domains,omitempty" json:"domains,omitempty" yaml:"domains,omitempty"`
Established int `avro:"established,omitempty" json:"established,omitempty" yaml:"established,omitempty"`
ExternalIDs []ExternalID `avro:"external_ids" json:"external_ids" yaml:"external_ids,omitempty"`
Links []Link `avro:"links" json:"links" yaml:"links,omitempty"`
Locations []Location `avro:"locations" json:"locations"`
Names []Name `avro:"names" json:"names"`
Relationships []Relationship `avro:"relationships" json:"relationships" yaml:"relationships,omitempty"`
Status string `avro:"status" json:"status"`
Types []string `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, 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.
type 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:"aa,omitempty" yaml:"ba,omitempty"` // Bashkir
Be string `avro:"be,omitempty" json:"aa,omitempty" yaml:"be,omitempty"` // Belgian
Bg string `avro:"bu,omitempty" json:"aa,omitempty" yaml:"bg,omitempty"` // Bulgarian
Bi string `avro:"bi,omitempty" json:"aa,omitempty" yaml:"bi,omitempty"` // Bislama
Bn string `avro:"bn,omitempty" json:"aa,omitempty" yaml:"bn,omitempty"` // Bengali
Bs string `avro:"bo,omitempty" json:"aa,omitempty" yaml:"bs,omitempty"` // Bosnian
Ca string `avro:"ca,omitempty" json:"aa,omitempty" yaml:"ca,omitempty"` // Catalan
Ch string `avro:"ch,omitempty" json:"aa,omitempty" yaml:"ch,omitempty"` // Chamorro
Co string `avro:"co,omitempty" json:"aa,omitempty" yaml:"co,omitempty"` // Corsican
Cs string `avro:"cs,omitempty" json:"aa,omitempty" yaml:"cs,omitempty"` // Czech
Cu string `avro:"cu,omitempty" json:"aa,omitempty" yaml:"cu,omitempty"` // Church Slavic
Cy string `avro:"cy,omitempty" json:"aa,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:"aa,omitempty" yaml:"dv,omitempty"` // Divehi
Dz string `avro:"dz,omitempty" json:"aa,omitempty" yaml:"dz,omitempty"` // Dzongkha
El string `avro:"el,omitempty" json:"aa,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:"aa,omitempty" yaml:"et,omitempty"` // Estonian
Eu string `avro:"eu,omitempty" json:"aa,omitempty" yaml:"eu,omitempty"` // Basque
Fa string `avro:"fa,omitempty" json:"aa,omitempty" yaml:"fa,omitempty"` // Persian
Fi string `avro:"fi,omitempty" json:"aa,omitempty" yaml:"fi,omitempty"` // Finnish
Fo string `avro:"fo,omitempty" json:"aa,omitempty" yaml:"fo,omitempty"` // Faroese
Fr string `avro:"fr,omitempty" json:"fr,omitempty" yaml:"fr,omitempty"` // French
Fy string `avro:"fy,omitempty" json:"aa,omitempty" yaml:"fy,omitempty"` // Frisian
Ga string `avro:"ga,omitempty" json:"aa,omitempty" yaml:"ga,omitempty"` // Irish
Gd string `avro:"gd,omitempty" json:"aa,omitempty" yaml:"gd,omitempty"` // Scottish Gaelic
Gl string `avro:"gl,omitempty" json:"aa,omitempty" yaml:"gl,omitempty"` // Galician
Gu string `avro:"gu,omitempty" json:"aa,omitempty" yaml:"gu,omitempty"` // Gujarati
Gv string `avro:"gv,omitempty" json:"aa,omitempty" yaml:"gv,omitempty"` // Manx
Ha string `avro:"ha,omitempty" json:"aa,omitempty" yaml:"ha,omitempty"` // Hausa
He string `avro:"he,omitempty" json:"aa,omitempty" yaml:"he,omitempty"` // Hebrew
Hi string `avro:"hi,omitempty" json:"aa,omitempty" yaml:"hi,omitempty"` // Hindi
Hr string `avro:"hr,omitempty" json:"aa,omitempty" yaml:"hr,omitempty"` // Croatian
Ht string `avro:"ht,omitempty" json:"aa,omitempty" yaml:"ht,omitempty"` // Haitian
Hu string `avro:"hu,omitempty" json:"aa,omitempty" yaml:"hu,omitempty"` // Hungarian
Hy string `avro:"hy,omitempty" json:"aa,omitempty" yaml:"hy,omitempty"` // Armenian
Id string `avro:"id,omitempty" json:"aa,omitempty" yaml:"id,omitempty"` // Indonesian
Is string `avro:"is,omitempty" json:"aa,omitempty" yaml:"is,omitempty"` // Icelandic
It string `avro:"it,omitempty" json:"aa,omitempty" yaml:"it,omitempty"` // Italian
Iu string `avro:"iu,omitempty" json:"aa,omitempty" yaml:"iu,omitempty"` // Inuktitut
Ja string `avro:"ja,omitempty" json:"aa,omitempty" yaml:"ja,omitempty"` // Japanese
Jv string `avro:"jv,omitempty" json:"aa,omitempty" yaml:"jv,omitempty"` // Javanese
Ka string `avro:"ka,omitempty" json:"aa,omitempty" yaml:"ka,omitempty"` // Georgian
Kg string `avro:"kg,omitempty" json:"aa,omitempty" yaml:"kg,omitempty"` // Kongo
Ki string `avro:"ki,omitempty" json:"aa,omitempty" yaml:"ki,omitempty"` // Kikuyu
Kk string `avro:"kk,omitempty" json:"aa,omitempty" yaml:"kk,omitempty"` // Kazakh
Kl string `avro:"kl,omitempty" json:"aa,omitempty" yaml:"kl,omitempty"` // Greenlandic
Km string `avro:"km,omitempty" json:"aa,omitempty" yaml:"km,omitempty"` // Khmer
Kn string `avro:"kn,omitempty" json:"aa,omitempty" yaml:"kn,omitempty"` // Kannada
Ko string `avro:"ko,omitempty" json:"aa,omitempty" yaml:"ko,omitempty"` // Korean
Kr string `avro:"kr,omitempty" json:"aa,omitempty" yaml:"kr,omitempty"` // Kanuri
Ku string `avro:"ku,omitempty" json:"aa,omitempty" yaml:"ku,omitempty"` // Kurdish
Ky string `avro:"ky,omitempty" json:"aa,omitempty" yaml:"ky,omitempty"` // Kyrgyz
La string `avro:"la,omitempty" json:"aa,omitempty" yaml:"la,omitempty"` // Latin
Lb string `avro:"lb,omitempty" json:"aa,omitempty" yaml:"lb,omitempty"` // Luxembourgish
Lo string `avro:"lo,omitempty" json:"aa,omitempty" yaml:"lo,omitempty"` // Lao
Lt string `avro:"lt,omitempty" json:"aa,omitempty" yaml:"lt,omitempty"` // Lithuanian
Lu string `avro:"lu,omitempty" json:"aa,omitempty" yaml:"lu,omitempty"` // Luba-Katanga
Lv string `avro:"lv,omitempty" json:"aa,omitempty" yaml:"lv,omitempty"` // Latvian
Mg string `avro:"mg,omitempty" json:"aa,omitempty" yaml:"mg,omitempty"` // Malagasy
Mi string `avro:"mi,omitempty" json:"aa,omitempty" yaml:"mi,omitempty"` // Maori
Mk string `avro:"mk,omitempty" json:"aa,omitempty" yaml:"mk,omitempty"` // Macedonian
Ml string `avro:"ml,omitempty" json:"aa,omitempty" yaml:"ml,omitempty"` // Malayalam
Mn string `avro:"mn,omitempty" json:"aa,omitempty" yaml:"mn,omitempty"` // Mongolian
Mr string `avro:"mr,omitempty" json:"aa,omitempty" yaml:"mr,omitempty"` // Marathi
Ms string `avro:"ms,omitempty" json:"aa,omitempty" yaml:"ms,omitempty"` // Malay
Mt string `avro:"mt,omitempty" json:"aa,omitempty" yaml:"mt,omitempty"` // Maltese
My string `avro:"my,omitempty" json:"aa,omitempty" yaml:"my,omitempty"` // Burmese
Na string `avro:"na,omitempty" json:"aa,omitempty" yaml:"na,omitempty"` // Nauru
Nb string `avro:"nb,omitempty" json:"aa,omitempty" yaml:"nb,omitempty"` // Norwegian Bokmål
Ne string `avro:"ne,omitempty" json:"aa,omitempty" yaml:"ne,omitempty"` // Nepali
Nl string `avro:"nl,omitempty" json:"aa,omitempty" yaml:"nl,omitempty"` // Dutch
Nn string `avro:"nn,omitempty" json:"aa,omitempty" yaml:"nn,omitempty"` // Norwegian Nynorsk
No string `avro:"no,omitempty" json:"aa,omitempty" yaml:"no,omitempty"` // Norwegian
Oc string `avro:"oc,omitempty" json:"aa,omitempty" yaml:"oc,omitempty"` // Occitan
Om string `avro:"om,omitempty" json:"aa,omitempty" yaml:"om,omitempty"` // Oromo
Or string `avro:"or,omitempty" json:"aa,omitempty" yaml:"or,omitempty"` // Oriya
Pa string `avro:"pa,omitempty" json:"aa,omitempty" yaml:"pa,omitempty"` // Punjabi
Pl string `avro:"pl,omitempty" json:"aa,omitempty" yaml:"pl,omitempty"` // Polish
Ps string `avro:"ps,omitempty" json:"aa,omitempty" yaml:"ps,omitempty"` // Pashto
Pt string `avro:"pt,omitempty" json:"aa,omitempty" yaml:"pt,omitempty"` // Portuguese
Rm string `avro:"rm,omitempty" json:"aa,omitempty" yaml:"rm,omitempty"` // Romansh
Ro string `avro:"ro,omitempty" json:"aa,omitempty" yaml:"ro,omitempty"` // Romanian
Ru string `avro:"ru,omitempty" json:"aa,omitempty" yaml:"ru,omitempty"` // Russian
Rw string `avro:"rw,omitempty" json:"aa,omitempty" yaml:"rw,omitempty"` // Kinyarwanda
Sa string `avro:"sa,omitempty" json:"aa,omitempty" yaml:"sa,omitempty"` // Sanskrit
Sd string `avro:"sd,omitempty" json:"aa,omitempty" yaml:"sd,omitempty"` // Sindhi
Se string `avro:"se,omitempty" json:"aa,omitempty" yaml:"se,omitempty"` // Northern Sami
Sh string `avro:"sh,omitempty" json:"aa,omitempty" yaml:"sh,omitempty"` // Serbo-Croatian
Si string `avro:"si,omitempty" json:"aa,omitempty" yaml:"si,omitempty"` // Sinhalese
Sk string `avro:"sk,omitempty" json:"aa,omitempty" yaml:"sk,omitempty"` // Slovak
Sl string `avro:"sl,omitempty" json:"aa,omitempty" yaml:"sl,omitempty"` // Slovenian
Sm string `avro:"sm,omitempty" json:"aa,omitempty" yaml:"sm,omitempty"` // Samoan
So string `avro:"so,omitempty" json:"aa,omitempty" yaml:"so,omitempty"` // Somali
Sq string `avro:"sq,omitempty" json:"aa,omitempty" yaml:"sq,omitempty"` // Albanian
Sr string `avro:"sr,omitempty" json:"aa,omitempty" yaml:"sr,omitempty"` // Serbian
St string `avro:"st,omitempty" json:"aa,omitempty" yaml:"st,omitempty"` // Southern Sotho
Sv string `avro:"sv,omitempty" json:"aa,omitempty" yaml:"sv,omitempty"` // Swedish
Sw string `avro:"sw,omitempty" json:"aa,omitempty" yaml:"sw,omitempty"` // Swahili
Ta string `avro:"ta,omitempty" json:"aa,omitempty" yaml:"ta,omitempty"` // Tamil
Te string `avro:"te,omitempty" json:"aa,omitempty" yaml:"te,omitempty"` // Telugu
Tg string `avro:"tg,omitempty" json:"aa,omitempty" yaml:"tg,omitempty"` // Tajik
Th string `avro:"th,omitempty" json:"aa,omitempty" yaml:"th,omitempty"` // Thai
Ti string `avro:"ti,omitempty" json:"aa,omitempty" yaml:"ti,omitempty"` // Tigrinya
Tk string `avro:"tk,omitempty" json:"aa,omitempty" yaml:"tk,omitempty"` // Turkmen
Tl string `avro:"tl,omitempty" json:"aa,omitempty" yaml:"tl,omitempty"` // Tagalog
Tr string `avro:"tr,omitempty" json:"aa,omitempty" yaml:"tr,omitempty"` // Turkish
Tt string `avro:"tt,omitempty" json:"aa,omitempty" yaml:"tt,omitempty"` // Tatar
Ug string `avro:"ug,omitempty" json:"aa,omitempty" yaml:"ug,omitempty"` // Uighur
Uk string `avro:"uk,omitempty" json:"aa,omitempty" yaml:"uk,omitempty"` // Ukrainian
Ur string `avro:"ur,omitempty" json:"aa,omitempty" yaml:"ur,omitempty"` // Urdu
Uz string `avro:"uz,omitempty" json:"aa,omitempty" yaml:"uz,omitempty"` // Uzbek
Vi string `avro:"vi,omitempty" json:"aa,omitempty" yaml:"vi,omitempty"` // Vietnamese
Xh string `avro:"xh,omitempty" json:"aa,omitempty" yaml:"xh,omitempty"` // Xhosa
Yo string `avro:"yo,omitempty" json:"aa,omitempty" yaml:"yo,omitempty"` // Yoruba
Zh string `avro:"zh,omitempty" json:"zh,omitempty" yaml:"zh,omitempty"` // Chinese
Zu string `avro:"zu,omitempty" json:"aa,omitempty" yaml:"zu,omitempty"` // Zulu
}