eml

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

package eml contains structures that represent the EML file format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abstract

type Abstract struct {
	Para string `xml:"para"`
}

type Address

type Address struct {
	Country    string `xml:"country,omitempty"`
	City       string `xml:"city,omitempty"`
	PostalCode string `xml:"postalCode,omitempty"`
}

type AltID

type AltID struct {
	XMLName xml.Name `xml:"alternateIdentifier"`
	System  string   `xml:"system,attr,omitempty"`
	Value   string   `xml:",chardata"`
}

type AssociatedParty

type AssociatedParty struct {
	IndividualName   *IndividualName   `xml:"individualName"`
	OrganizationName *OrganizationName `xml:"organizationName"`
	Address          *Address          `xml:"address,omitempty"`
	Roles            []string          `xml:"role"`
}

type BoundingCoordinates

type BoundingCoordinates struct {
	WestBoundingCoordinate  float64 `xml:"westBoundingCoordinate"`
	EastBoundingCoordinate  float64 `xml:"eastBoundingCoordinate"`
	SouthBoundingCoordinate float64 `xml:"southBoundingCoordinate"`
	NorthBoundingCoordinate float64 `xml:"northBoundingCoordinate"`
}

type CalendarDate

type CalendarDate struct {
	Value string `xml:",chardata"`
}

type Contact

type Contact struct {
	IndividualName        *IndividualName   `xml:"individualName"`
	OrganizationName      *OrganizationName `xml:"organizationName"`
	Address               *Address          `xml:"address,omitempty"`
	ElectronicMailAddress string            `xml:"electronicMailAddress"`
}

type Coverage

type Coverage struct {
	GeographicCoverage *GeographicCoverage `xml:"geographicCoverage"`
	TemporalCoverage   *TemporalCoverage   `xml:"temporalCoverage"`
}

type Creator

type Creator struct {
	ID                    string `xml:"id,attr"`
	Scope                 string `xml:"scope,attr,omitempty"`
	IndividualName        *IndividualName
	OrganizationName      *OrganizationName `xml:"organizationName"`
	ElectronicMailAddress string            `xml:"electronicMailAddress"`
}

type Dataset

type Dataset struct {
	ID                    string              `xml:"id,attr"`
	AlternativeIdentifier AltID               `xml:"alternateIdentifier"`
	Title                 string              `xml:"title"`
	Creators              []Creator           `xml:"creator"`
	MetadataProviders     []MetadataProvider  `xml:"metadataProvider"`
	AssociatedParties     []AssociatedParty   `xml:"associatedParty"`
	PubDate               string              `xml:"pubDate"`
	Language              string              `xml:"language"`
	Abstract              Abstract            `xml:"abstract"`
	KeywodSets            []KeywordSet        `xml:"keywordSet"`
	IntellectualRights    *IntellectualRights `xml:"intellectualRights"`
	Coverage              *Coverage           `xml:"coverage"`
	Contacts              []Contact           `xml:"contact"`
}

type EML

type EML struct {
	XMLName        xml.Name `xml:"eml"`
	Lang           string   `xml:"xml:lang,attr"`
	SchemaLocation string   `xml:"xsi:schemaLocation,attr"`
	Dataset        Dataset  `xml:"dataset"`
}

func New

func New(r io.Reader) (*EML, error)

New reads an EML file from an io.Reader and returns an EML struct.

func (*EML) Bytes

func (e *EML) Bytes() ([]byte, error)

type ErrDecoder

type ErrDecoder struct {
	OrigErr error
}

func (*ErrDecoder) Error

func (e *ErrDecoder) Error() string

type ErrReader

type ErrReader struct {
	OrigErr error
}

func (*ErrReader) Error

func (e *ErrReader) Error() string

type GeographicCoverage

type GeographicCoverage struct {
	GeographicDescription string               `xml:"geographicDescription,omitempty"`
	BoundingCoordinates   *BoundingCoordinates `xml:"boundingCoordinates,omitempty"`
}

type IndividualName

type IndividualName struct {
	XMLName   xml.Name `xml:"individualName"`
	GivenName string   `xml:"givenName"`
	SurName   string   `xml:"surName"`
}

type IntellectualRights

type IntellectualRights struct {
	Para string `xml:"para"`
}

type Keyword

type Keyword struct {
	Value string `xml:",chardata"`
}

type KeywordSet

type KeywordSet struct {
	Keywords []Keyword `xml:"keyword"`
}

type MetadataProvider

type MetadataProvider struct {
	IndividualName        *IndividualName   `xml:"individualName"`
	OrganizationName      *OrganizationName `xml:"organizationName"`
	Address               *Address          `xml:"address,omitempty"`
	ElectronicMailAddress string            `xml:"electronicMailAddress"`
	OnlineURL             string            `xml:"onlineUrl,omitempty"`
}

type OrganizationName

type OrganizationName struct {
	XMLName xml.Name `xml:"organizationName"`
	Value   string   `xml:",chardata"`
}

type TemporalCoverage

type TemporalCoverage struct {
	BeginDate CalendarDate `xml:"beginDate"`
	EndDate   CalendarDate `xml:"endDate"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL