Documentation
¶
Overview ¶
Package bioparser parses a bioschemas's CSV file into an YAML document for jekyll
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Specifications stores an slice of Specification structs Specifications []Specification )
Functions ¶
Types ¶
type Specification ¶
type Specification struct { SpecificationInfo SpecificationInfo `yaml:"spec_info"` SpecificationParams []SpecificationParam `yaml:"mapping"` }
Specification is an object representation of the Bioschemas specification spreadsheet the "Bioschemas fields" sheet
func LoadFile ¶
func LoadFile(fp string) (Specification, error)
LoadFile loads CSV file into an spec object
func LoadURL ¶
func LoadURL(u string) (Specification, error)
LoadURL loads CSV from url into an spec object
func ParseSpecificationCSV ¶
func ParseSpecificationCSV(r *csv.Reader) (Specification, error)
ParseSpecificationCSV reads the CSV file
parses it into an Specification struct. The CSV second row has the Specification Info, and from the fourth row the mapping.
type SpecificationInfo ¶
type SpecificationInfo struct { Title string `yaml:"title"` Subtitle string `yaml:"subtitle"` Description string `yaml:"description"` Version string `yaml:"version"` VersionDate string `yaml:"version_date"` OfficialType string `yaml:"official_type"` FullExample string `yaml:"full_example"` }
SpecificationInfo Details for an specification struct
type SpecificationParam ¶
type SpecificationParam struct { Property string `yaml:"property"` ExpectedTypes []string `yaml:"expected_types"` Description string `yaml:"description"` Type string `yaml:"type"` TypeURL string `yaml:"type_url"` BscDescription string `yaml:"bsc_description"` Marginality string `yaml:"marginality"` Cardinality string `yaml:"cardinality"` ControlledVocabulary string `yaml:"controlled_vocab"` Example string `yaml:"example"` }
SpecificationParam Represents a parameter of a bioschemas spec
Click to show internal directories.
Click to hide internal directories.