dataciteModel

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContributorTypeReverse = map[string]ContributorType{
	"ContactPerson":         ContributorTypeContactPerson,
	"DataCollector":         ContributorTypeDataCollector,
	"DataCurator":           ContributorTypeDataCurator,
	"DataManager":           ContributorTypeDataManager,
	"Distributor":           ContributorTypeDistributor,
	"Editor":                ContributorTypeEditor,
	"HostingInstitution":    ContributorTypeHostingInstitution,
	"Other":                 ContributorTypeOther,
	"Producer":              ContributorTypeProducer,
	"ProjectLeader":         ContributorTypeProjectLeader,
	"ProjectManager":        ContributorTypeProjectManager,
	"ProjectMember":         ContributorTypeProjectMember,
	"RegistrationAgency":    ContributorTypeRegistrationAgency,
	"RegistrationAuthority": ContributorTypeRegistrationAuthority,
	"RelatedPerson":         ContributorTypeRelatedPerson,
	"ResearchGroup":         ContributorTypeResearchGroup,
	"RightsHolder":          ContributorTypeRightsHolder,
	"Researcher":            ContributorTypeResearcher,
	"Sponsor":               ContributorTypeSponsor,
	"Supervisor":            ContributorTypeSupervisor,
	"WorkPackageLeader":     ContributorTypeWorkPackageLeader,
}
View Source
var MyfairResourceTypeGeneral = map[myfair.ResourceType]ResourceTypeGeneral{
	myfair.ResourceTypeBook:                ResourceTypeGeneralBook,
	myfair.ResourceTypeBookSection:         ResourceTypeGeneralBookChapter,
	myfair.ResourceTypeThesis:              ResourceTypeGeneralDissertation,
	myfair.ResourceTypeJournalArticle:      ResourceTypeGeneralJournalArticle,
	myfair.ResourceTypeMagazineArticle:     ResourceTypeGeneralJournalArticle,
	myfair.ResourceTypeOnlineResource:      ResourceTypeGeneralOther,
	myfair.ResourceTypeReport:              ResourceTypeGeneralReport,
	myfair.ResourceTypeWebpage:             ResourceTypeGeneralOther,
	myfair.ResourceTypeConferencePaper:     ResourceTypeGeneralConferencePaper,
	myfair.ResourceTypePatent:              ResourceTypeGeneralOther,
	myfair.ResourceTypeNote:                ResourceTypeGeneralOther,
	myfair.ResourceTypeArtisticPerformance: ResourceTypeGeneralOther,
	myfair.ResourceTypeDataset:             ResourceTypeGeneralDataset,
	myfair.ResourceTypePresentation:        ResourceTypeGeneralOther,
	myfair.ResourceTypePhysicalObject:      ResourceTypeGeneralPhysicalObject,
	myfair.ResourceTypeComputerProgram:     ResourceTypeGeneralSoftware,
	myfair.ResourceTypeOther:               ResourceTypeGeneralOther,
	myfair.ResourceTypeArtwork:             ResourceTypeGeneralOther,
	myfair.ResourceTypeAttachment:          ResourceTypeGeneralOther,
	myfair.ResourceTypeAudioRecording:      ResourceTypeGeneralSound,
	myfair.ResourceTypeDocument:            ResourceTypeGeneralOther,
	myfair.ResourceTypeEmail:               ResourceTypeGeneralOther,
	myfair.ResourceTypeEncyclopediaArticle: ResourceTypeGeneralOther,
	myfair.ResourceTypeFilm:                ResourceTypeGeneralOther,
	myfair.ResourceTypeInstantMessage:      ResourceTypeGeneralOther,
	myfair.ResourceTypeInterview:           ResourceTypeGeneralOther,
	myfair.ResourceTypeLetter:              ResourceTypeGeneralOther,
	myfair.ResourceTypeManuscript:          ResourceTypeGeneralOther,
	myfair.ResourceTypeMap:                 ResourceTypeGeneralOther,
	myfair.ResourceTypeNewspaperArticle:    ResourceTypeGeneralOther,
	myfair.ResourceTypePodcast:             ResourceTypeGeneralOther,
	myfair.ResourceTypeRadioBroadcast:      ResourceTypeGeneralOther,
	myfair.ResourceTypeTvBroadcast:         ResourceTypeGeneralOther,
	myfair.ResourceTypeVideoRecording:      ResourceTypeGeneralOther,
}
View Source
var NameTypeReverse = map[string]NameType{
	"":               NameTypeDefault,
	"Organizational": NameTypeOrganizational,
	"Personal":       NameTypePersonal,
}
View Source
var TitleTypeReverse = map[string]TitleType{
	"":                 TitleTypeDefaultTitle,
	"AlternativeTitle": TitleTypeAlternativeTitle,
	"Subtitle":         TitleTypeSubTitle,
	"TranslatedTitle":  TitleTypeTranslatedTitle,
	"Other":            TitleTypeOther,
}

Functions

This section is empty.

Types

type AlternateIdentifier

type AlternateIdentifier struct {
	XMLName                 xml.Name              `xml:"alternateIdentifier" json:"-"`
	Value                   string                `xml:",chardata" json:"alternateIdentifier"`
	AlternateIdentifierType RelatedIdentifierType `xml:"alternateIdentifierType,attr" json:"alternateIdentifierType"`
}

type AlternateIdentifiers

type AlternateIdentifiers struct {
	AlternateIdentifier []AlternateIdentifier
}

type Contributor

type Contributor struct {
	ContributorType ContributorType `xml:"contributorType" json:"contributorType"`
	ContributorName Name            `xml:"contributorName" json:"contributorName"`
	GivenName       string          `xml:"givenName,omitempty" json:"givenName,omitempty"`
	FamilyName      string          `xml:"familyName,omitempty" json:"familyName,omitempty"`
	Affiliation     string          `xml:"affiliation,omitempty" json:"affiliation,omitempty"`
	NameIdentifier  NameIdentifier  `xml:"nameIdentifier,omitempty" json:"nameIdentifier,omitempty"`
}

type ContributorType

type ContributorType string
const (
	ContributorTypeContactPerson         ContributorType = "ContactPerson"
	ContributorTypeDataCollector         ContributorType = "DataCollector"
	ContributorTypeDataCurator           ContributorType = "DataCurator"
	ContributorTypeDataManager           ContributorType = "DataManager"
	ContributorTypeDistributor           ContributorType = "Distributor"
	ContributorTypeEditor                ContributorType = "Editor"
	ContributorTypeHostingInstitution    ContributorType = "HostingInstitution"
	ContributorTypeOther                 ContributorType = "Other"
	ContributorTypeProducer              ContributorType = "Producer"
	ContributorTypeProjectLeader         ContributorType = "ProjectLeader"
	ContributorTypeProjectManager        ContributorType = "ProjectManager"
	ContributorTypeProjectMember         ContributorType = "ProjectMember"
	ContributorTypeRegistrationAgency    ContributorType = "RegistrationAgency"
	ContributorTypeRegistrationAuthority ContributorType = "RegistrationAuthority"
	ContributorTypeRelatedPerson         ContributorType = "RelatedPerson"
	ContributorTypeResearchGroup         ContributorType = "ResearchGroup"
	ContributorTypeRightsHolder          ContributorType = "RightsHolder"
	ContributorTypeResearcher            ContributorType = "Researcher"
	ContributorTypeSponsor               ContributorType = "Sponsor"
	ContributorTypeSupervisor            ContributorType = "Supervisor"
	ContributorTypeWorkPackageLeader     ContributorType = "WorkPackageLeader"
)

type Contributors

type Contributors struct {
	Contributor []Contributor
}

func (Contributors) MarshalJSON

func (contributors Contributors) MarshalJSON() ([]byte, error)

func (Contributors) UnmarshalJSON

func (contributors Contributors) UnmarshalJSON(data []byte) error

type Creator

type Creator struct {
	XMLName        xml.Name         `xml:"creator" json:"-"`
	CreatorName    Name             `xml:"creatorName" json:"creatorName,omitempty"`
	GivenName      string           `xml:"givenName,omitempty" json:"givenName,omitempty"`
	FamilyName     string           `xml:"familyName,omitempty" json:"familyName,omitempty"`
	Affiliation    []string         `xml:"affiliation,omitempty" json:"affiliation,omitempty"`
	NameIdentifier []NameIdentifier `xml:"nameIdentifier,omitempty" json:"nameIdentifier,omitempty"`
}

type Creators

type Creators struct {
	Creator []Creator
}

func (Creators) MarshalJSON

func (creators Creators) MarshalJSON() ([]byte, error)

func (Creators) UnmarshalJSON

func (creators Creators) UnmarshalJSON(data []byte) error

type DataCite

type DataCite struct {
	XMLName           xml.Name `xml:"http://datacite.org/schema/kernel-4 resource" json:"-"`
	XsiType           string   `xml:"xmlns:xsi,attr" json:"-"`
	XsiSchemaLocation string   `xml:"xsi:schemaLocation,attr" json:"-"`

	// DataCite: #1 Identifier (with mandatory type sub-property)
	Identifier Identifier `xml:"identifier"`

	AlternateIdentifiers AlternateIdentifiers `xml:"alternateIdentifiers"`

	// DataCite: #2 Creator (with optional given name, family name, name identifier
	//              and affiliation sub-properties)
	Creators Creators `xml:"creators"`

	// DataCite: #3 Title (with optional type sub-properties
	Titles Titles `xml:"titles"`

	// DataCite: #4 Publisher
	Publisher string `xml:"publisher"`

	// DataCite: #5 PublicationYear
	PublicationYear int `xml:"publicationYear"`

	// DataCite: #10 ResourceType (with mandatory general type description subproperty)
	ResourceType ResourceType `xml:"resourceType"`

	// optional fields
	Contributors Contributors `xml:"contributors"`
}

func (*DataCite) FromCore

func (datacite *DataCite) FromCore(core myfair.Core) error

func (*DataCite) InitNamespace

func (datacite *DataCite) InitNamespace()

type Identifier

type Identifier struct {
	XMLName        xml.Name              `xml:"identifier" json:"-"`
	Value          string                `xml:",chardata" json:"identifier"`
	IdentifierType RelatedIdentifierType `xml:"identifierType,attr" json:"identifierType"`
}

type Name

type Name struct {
	Value string   `xml:",chardata" json:"value"`
	Lang  string   `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty" json:"lang,omitempty"`
	Type  NameType `xml:"nameType,attr,omitempty" json:"type,omitempty"`
}

type NameIdentifier

type NameIdentifier struct {
	XMLName              xml.Name `xml:"nameIdentifier" json:"-"`
	Value                string   `xml:",chardata" json:"nameIdentifier"`
	Lang                 string   `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty" json:"lang,omitempty"`
	SchemeURI            string   `xml:"schemeURI,attr,omitempty" json:"schemeUri,omitempty"`
	NameIdentifierScheme string   `xml:"nameIdentifierScheme,attr,omitempty" json:"name_identifierScheme,omitempty"`
}

type NameType

type NameType string
const NameTypeDefault NameType = ""
const NameTypeOrganizational NameType = "Organizational"
const NameTypePersonal NameType = "Personal"

type RelatedIdentifierType

type RelatedIdentifierType string
const (
	RelatedIdentifierTypeARK     RelatedIdentifierType = "ARK"
	RelatedIdentifierTypeArXiv   RelatedIdentifierType = "arXiv"
	RelatedIdentifierTypeBibcode RelatedIdentifierType = "bibcode"
	RelatedIdentifierTypeDOI     RelatedIdentifierType = "DOI"
	RelatedIdentifierTypeEAN13   RelatedIdentifierType = "EAN13"
	RelatedIdentifierTypeEISSN   RelatedIdentifierType = "EISSN"
	RelatedIdentifierTypeHandle  RelatedIdentifierType = "Handle"
	RelatedIdentifierTypeIGSN    RelatedIdentifierType = "IGSN"
	RelatedIdentifierTypeISBN    RelatedIdentifierType = "ISBN"
	RelatedIdentifierTypeISSN    RelatedIdentifierType = "ISSN"
	RelatedIdentifierTypeISTC    RelatedIdentifierType = "ISTC"
	RelatedIdentifierTypeLISSN   RelatedIdentifierType = "LISSN"
	RelatedIdentifierTypeLSID    RelatedIdentifierType = "LSID"
	RelatedIdentifierTypePMID    RelatedIdentifierType = "PMID"
	RelatedIdentifierTypePURL    RelatedIdentifierType = "PURL"
	RelatedIdentifierTypeUPC     RelatedIdentifierType = "UPC"
	RelatedIdentifierTypeURL     RelatedIdentifierType = "URL"
	RelatedIdentifierTypeURN     RelatedIdentifierType = "URN"
	RelatedIdentifierTypeW3id    RelatedIdentifierType = "w3id"
)

type ResourceType

type ResourceType struct {
	XMLName        xml.Name            `xml:"resourceType" json:"-"`
	Value          string              `xml:",chardata" json:"resourceType"`
	IdentifierType ResourceTypeGeneral `xml:"resourceTypeGeneral,attr" json:"identifierType"`
}

type ResourceTypeGeneral

type ResourceTypeGeneral string
const (
	ResourceTypeGeneralAudiovisual           ResourceTypeGeneral = "Audiovisual"
	ResourceTypeGeneralBook                  ResourceTypeGeneral = "Book"
	ResourceTypeGeneralBookChapter           ResourceTypeGeneral = "BookChapter"
	ResourceTypeGeneralCollection            ResourceTypeGeneral = "Collection"
	ResourceTypeGeneralComputationalNotebook ResourceTypeGeneral = "ComputationalNotebook"
	ResourceTypeGeneralConferencePaper       ResourceTypeGeneral = "ConferencePaper"
	ResourceTypeGeneralConferenceProceeding  ResourceTypeGeneral = "ConferenceProceeding"
	ResourceTypeGeneralDataPaper             ResourceTypeGeneral = "DataPaper"
	ResourceTypeGeneralDataset               ResourceTypeGeneral = "Dataset"
	ResourceTypeGeneralDissertation          ResourceTypeGeneral = "Dissertation"
	ResourceTypeGeneralEvent                 ResourceTypeGeneral = "Event"
	ResourceTypeGeneralImage                 ResourceTypeGeneral = "Image"
	ResourceTypeGeneralInteractiveResource   ResourceTypeGeneral = "InteractiveResource"
	ResourceTypeGeneralJournal               ResourceTypeGeneral = "Journal"
	ResourceTypeGeneralJournalArticle        ResourceTypeGeneral = "JournalArticle"
	ResourceTypeGeneralModel                 ResourceTypeGeneral = "Model"
	ResourceTypeGeneralOutputManagementPlan  ResourceTypeGeneral = "OutputManagementPlan"
	ResourceTypeGeneralPeerReview            ResourceTypeGeneral = "PeerReview"
	ResourceTypeGeneralPhysicalObject        ResourceTypeGeneral = "PhysicalObject"
	ResourceTypeGeneralPreprint              ResourceTypeGeneral = "Preprint"
	ResourceTypeGeneralReport                ResourceTypeGeneral = "Report"
	ResourceTypeGeneralService               ResourceTypeGeneral = "Service"
	ResourceTypeGeneralSoftware              ResourceTypeGeneral = "Software"
	ResourceTypeGeneralSound                 ResourceTypeGeneral = "Sound"
	ResourceTypeGeneralStandard              ResourceTypeGeneral = "Standard"
	ResourceTypeGeneralText                  ResourceTypeGeneral = "Text"
	ResourceTypeGeneralWorkflow              ResourceTypeGeneral = "Workflow"
	ResourceTypeGeneralOther                 ResourceTypeGeneral = "Other"
)

type Title

type Title struct {
	XMLName xml.Name  `xml:"title" json:"-"`
	Value   string    `xml:",chardata" json:"title"`
	Lang    string    `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty" json:"lang,omitempty"`
	Type    TitleType `xml:"titleType,attr,omitempty" json:"type,omitempty"`
}

type TitleType

type TitleType string
const TitleTypeAlternativeTitle TitleType = "AlternativeTitle"
const TitleTypeDefaultTitle TitleType = ""
const TitleTypeOther TitleType = "Other"
const TitleTypeSubTitle TitleType = "Subtitle"
const TitleTypeTranslatedTitle TitleType = "TranslatedTitle"

type Titles

type Titles struct {
	Title []Title
}

func (Titles) MarshalJSON

func (titles Titles) MarshalJSON() ([]byte, error)

func (Titles) UnmarshalJSON

func (titles Titles) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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