Documentation
¶
Overview ¶
Package jsonfeed converts JSON Feed metadata to/from the commonmeta metadata format.
Index ¶
- Variables
- func Fetch(str string) (commonmeta.Data, error)
- func GetContributors(contrib Authors) ([]commonmeta.Contributor, error)
- func GetFundingReferences(content Content) []commonmeta.FundingReference
- func Load(filename string) (commonmeta.Data, error)
- func LoadAll(filename string) ([]commonmeta.Data, error)
- func Read(content Content) (commonmeta.Data, error)
- func ReadAll(content []Content) ([]commonmeta.Data, error)
- type Affiliation
- type Authors
- type Blog
- type Content
- type Funding
- type Reference
- type Relation
Constants ¶
This section is empty.
Variables ¶
var FOSKeyMappings = map[string]string{
"naturalSciences": "Natural sciences",
"mathematics": "Mathematics",
"computerAndInformationSciences": "Computer and information sciences",
"physicalSciences": "Physical sciences",
"chemicalSciences": "Chemical sciences",
"earthAndRelatedEnvironmentalSciences": "Earth and related environmental sciences",
"biologicalSciences": "Biological sciences",
"otherNaturalSciences": "Other natural sciences",
"engineeringAndTechnology": "Engineering and technology",
"civilEngineering": "Civil engineering",
"electricalEngineering": "Electrical engineering, electronic engineering, information engineering",
"mechanicalEngineering": "Mechanical engineering",
"chemicalEngineering": "Chemical engineering",
"materialsEngineering": "Materials engineering",
"medicalEngineering": "Medical engineering",
"environmentalEngineering": "Environmental engineering",
"environmentalBiotechnology": "Environmental biotechnology",
"industrialBiotechnology": "Industrial biotechnology",
"nanoTechnology": "Nano technology",
"otherEngineeringAndTechnologies": "Other engineering and technologies",
"medicalAndHealthSciences": "Medical and health sciences",
"basicMedicine": "Basic medicine",
"clinicalMedicine": "Clinical medicine",
"healthSciences": "Health sciences",
"healthBiotechnology": "Health biotechnology",
"otherMedicalSciences": "Other medical sciences",
"agriculturalSciences": "Agricultural sciences",
"agricultureForestryAndFisheries": "Agriculture, forestry, and fisheries",
"animalAndDairyScience": "Animal and dairy science",
"veterinaryScience": "Veterinary science",
"agriculturalBiotechnology": "Agricultural biotechnology",
"otherAgriculturalSciences": "Other agricultural sciences",
"socialScience": "Social science",
"socialSciences": "Social science",
"psychology": "Psychology",
"economicsAndBusiness": "Economics and business",
"educationalSciences": "Educational sciences",
"sociology": "Sociology",
"law": "Law",
"politicalScience": "Political science",
"socialAndEconomicGeography": "Social and economic geography",
"mediaAndCommunications": "Media and communications",
"otherSocialSciences": "Other social sciences",
"humanities": "Humanities",
"historyAndArchaeology": "History and archaeology",
"languagesAndLiterature": "Languages and literature",
"philosophyEthicsAndReligion": "Philosophy, ethics and religion",
"artsArtsHistoryOfArtsPerformingArtsMusic": "Arts (arts, history of arts, performing arts, music)",
"otherHumanities": "Other humanities",
}
FOSKeyMappings maps OECD FOS keys to OECD FOS strings
Functions ¶
func Fetch ¶ added in v0.2.14
func Fetch(str string) (commonmeta.Data, error)
Fetch fetches JSON Feed metadata and returns Commonmeta metadata.
func GetContributors ¶ added in v0.2.14
func GetContributors(contrib Authors) ([]commonmeta.Contributor, error)
func GetFundingReferences ¶ added in v0.2.14
func GetFundingReferences(content Content) []commonmeta.FundingReference
GetFundingReferences returns the funding references from the JSON Feed metadata. Either provided by the blog metadata or via HasAward relationships
func Load ¶ added in v0.2.14
func Load(filename string) (commonmeta.Data, error)
Load loads the metadata for a single work from a JSON file
func LoadAll ¶ added in v0.2.14
func LoadAll(filename string) ([]commonmeta.Data, error)
LoadAll loads the metadata for a list of works from a JSON file and converts it to the Commonmeta format
Types ¶
type Affiliation ¶ added in v0.2.14
Affiliation represents an affiliation in the JSON Feed item.
type Authors ¶ added in v0.2.14
type Authors []struct {
Name string `json:"name"`
URL string `json:"url"`
Affiliation []Affiliation `json:"affiliation"`
}
Authors represents the authors in the JSON Feed item.
type Blog ¶ added in v0.2.14
type Blog struct {
ID string `json:"id"`
Category string `json:"category"`
Description string `json:"description"`
Favicon string `json:"favicon"`
Funding Funding `json:"funding"`
HomePageURL string `json:"home_page_url"`
ISSN string `json:"issn"`
Language string `json:"language"`
License string `json:"license"`
Prefix string `json:"prefix"`
Slug string `json:"slug"`
Status string `json:"status"`
Title string `json:"title"`
}
type Content ¶
type Content struct {
ID string `json:"id"`
DOI string `json:"doi"`
GUID string `json:"guid"`
RID string `json:"rid"`
Abstract string `json:"abstract"`
ArchiveURL string `json:"archive_url"`
Authors Authors `json:"authors"`
Blog Blog `json:"blog"`
BlogName string `json:"blog_name"`
BlogSlug string `json:"blog_slug"`
ContentText string `json:"content_text"`
FeatureImage string `json:"image"`
IndexedAt int64 `json:"indexed_at"`
Language string `json:"language"`
PublishedAt int64 `json:"published_at"`
Relationships []Relation `json:"relationships"`
Reference []Reference `json:"reference"`
Summary string `json:"summary"`
Title string `json:"title"`
UpdatedAt int64 `json:"updated_at"`
URL string `json:"url"`
}
Content represents the JSON Feed metadata.