Documentation ¶
Index ¶
- Constants
- Variables
- type Affiliation
- type CandidateRecord
- type Completion
- type Contributor
- type Dataset
- func (d *Dataset) AddAbstract(t *Text)
- func (d *Dataset) AddContributor(role string, c *Contributor)
- func (d *Dataset) AddLink(l *DatasetLink)
- func (d *Dataset) AddOrganization(org *Organization)
- func (d *Dataset) AddProject(project *Project)
- func (d *Dataset) ClearEmbargo()
- func (d *Dataset) Contributors(role string) []*Contributor
- func (d *Dataset) FirstIdentifier() (string, []string)
- func (d *Dataset) GetAbstract(id string) *Text
- func (d *Dataset) GetContributor(role string, i int) (*Contributor, error)
- func (d *Dataset) GetLink(id string) *DatasetLink
- func (d *Dataset) HasContributor(role string, u *Person) bool
- func (d *Dataset) HasRelatedPublication(id string) bool
- func (d *Dataset) IdentifierType() string
- func (d *Dataset) IdentifierValue() string
- func (d *Dataset) RemoveAbstract(id string)
- func (d *Dataset) RemoveContributor(role string, i int) error
- func (d *Dataset) RemoveLink(id string)
- func (d *Dataset) RemoveOrganization(id string)
- func (d *Dataset) RemoveProject(id string)
- func (d *Dataset) RemoveRelatedPublication(id string)
- func (d *Dataset) SetAbstract(t *Text)
- func (d *Dataset) SetContributor(role string, i int, c *Contributor) error
- func (d *Dataset) SetContributors(role string, c []*Contributor)
- func (d *Dataset) SetLink(l *DatasetLink)
- func (d *Dataset) Validate() error
- type DatasetHits
- type DatasetLink
- type EUProject
- type ExternalPerson
- type Facet
- type FacetValues
- type Handle
- type HandleData
- type HandleValue
- type Organization
- type OrganizationTreeElement
- type Person
- func (u *Person) CanChangeType(p *Publication) bool
- func (u *Person) CanCurate() bool
- func (u *Person) CanDeleteDataset(d *Dataset) bool
- func (u *Person) CanDeletePublication(p *Publication) bool
- func (u *Person) CanEditDataset(d *Dataset) bool
- func (u *Person) CanEditPublication(p *Publication) bool
- func (u *Person) CanImpersonateUser() bool
- func (u *Person) CanPublishDataset(d *Dataset) bool
- func (u *Person) CanPublishPublication(p *Publication) bool
- func (u *Person) CanViewDashboard() bool
- func (u *Person) CanViewDataset(d *Dataset) bool
- func (u *Person) CanViewPublication(p *Publication) bool
- func (u *Person) CanWithdrawDataset(d *Dataset) bool
- func (u *Person) CanWithdrawPublication(p *Publication) bool
- type Project
- type Publication
- func (p *Publication) AddAbstract(t *Text)
- func (p *Publication) AddContributor(role string, c *Contributor)
- func (p *Publication) AddFile(file *PublicationFile)
- func (p *Publication) AddLaySummary(t *Text)
- func (p *Publication) AddLink(l *PublicationLink)
- func (p *Publication) AddOrganization(org *Organization)
- func (p *Publication) AddProject(project *Project)
- func (p *Publication) ChangeType(newType string)
- func (p *Publication) ClassificationChoices() []string
- func (p *Publication) CleanupUnusedFields() bool
- func (p *Publication) Contributors(role string) []*Contributor
- func (p *Publication) FileIndex(id string) int
- func (p *Publication) GetAbstract(id string) *Text
- func (p *Publication) GetContributor(role string, i int) (*Contributor, error)
- func (p *Publication) GetFile(id string) *PublicationFile
- func (p *Publication) GetLaySummary(id string) *Text
- func (p *Publication) GetLink(id string) *PublicationLink
- func (p *Publication) HasContributor(role string, u *Person) bool
- func (p *Publication) HasRelatedDataset(id string) bool
- func (p *Publication) InORCIDWorks(orcidID string) bool
- func (p *Publication) MainFile() *PublicationFile
- func (p *Publication) PrimaryContributors(role string, limit int) ([]*Contributor, bool)
- func (p *Publication) RemoveAbstract(id string)
- func (p *Publication) RemoveContributor(role string, i int) error
- func (p *Publication) RemoveFile(id string)
- func (p *Publication) RemoveLaySummary(id string)
- func (p *Publication) RemoveLink(id string)
- func (p *Publication) RemoveOrganization(id string)
- func (p *Publication) RemoveProject(id string)
- func (p *Publication) RemoveRelatedDataset(id string)
- func (p *Publication) SetAbstract(t *Text)
- func (p *Publication) SetContributor(role string, i int, c *Contributor) error
- func (p *Publication) SetContributors(role string, c []*Contributor)
- func (p *Publication) SetFile(f *PublicationFile)
- func (p *Publication) SetLaySummary(ls *Text)
- func (p *Publication) SetLink(l *PublicationLink)
- func (p *Publication) ShowDefenseAsRequired() bool
- func (p *Publication) ShowPublicationAsRequired() bool
- func (p *Publication) SummaryParts() []string
- func (p *Publication) UsesAbstract() bool
- func (p *Publication) UsesAdditionalInfo() bool
- func (p *Publication) UsesAlternativeTitle() bool
- func (p *Publication) UsesArticleNumber() bool
- func (p *Publication) UsesArxivID() bool
- func (p *Publication) UsesAuthor() bool
- func (p *Publication) UsesConference() bool
- func (p *Publication) UsesConferenceType() bool
- func (p *Publication) UsesConfirmations() bool
- func (p *Publication) UsesContributors(role string) bool
- func (p *Publication) UsesDOI() bool
- func (p *Publication) UsesDefense() bool
- func (p *Publication) UsesESCIID() bool
- func (p *Publication) UsesEdition() bool
- func (p *Publication) UsesEditor() bool
- func (p *Publication) UsesISBN() bool
- func (p *Publication) UsesISSN() bool
- func (p *Publication) UsesIssue() bool
- func (p *Publication) UsesJournalArticleType() bool
- func (p *Publication) UsesKeyword() bool
- func (p *Publication) UsesLanguage() bool
- func (p *Publication) UsesLaySummary() bool
- func (p *Publication) UsesLink() bool
- func (p *Publication) UsesMiscellaneousType() bool
- func (p *Publication) UsesPage() bool
- func (p *Publication) UsesPageCount() bool
- func (p *Publication) UsesProject() bool
- func (p *Publication) UsesPubMedID() bool
- func (p *Publication) UsesPublication() bool
- func (p *Publication) UsesPublicationAbbreviation() bool
- func (p *Publication) UsesPublicationStatus() bool
- func (p *Publication) UsesPublisher() bool
- func (p *Publication) UsesReportNumber() bool
- func (p *Publication) UsesResearchField() bool
- func (p *Publication) UsesSeriesTitle() bool
- func (p *Publication) UsesSupervisor() bool
- func (p *Publication) UsesTitle() bool
- func (p *Publication) UsesVolume() bool
- func (p *Publication) UsesWOS() bool
- func (p *Publication) UsesYear() bool
- func (p *Publication) VABB() string
- func (p *Publication) Validate() error
- type PublicationFile
- type PublicationHits
- type PublicationLink
- type PublicationORCIDWork
- type RelatedDataset
- type RelatedOrganization
- type RelatedProject
- type RelatedPublication
- type SearchArgs
- func (s *SearchArgs) Cleanup()
- func (s *SearchArgs) Clone() *SearchArgs
- func (s *SearchArgs) FilterFor(field string) string
- func (s *SearchArgs) FiltersFor(field string) []string
- func (s *SearchArgs) HasActiveCollapsedFacets() bool
- func (s *SearchArgs) HasFilter(field string, terms ...string) bool
- func (s *SearchArgs) HasSort(sort string) bool
- func (s *SearchArgs) IsCollapsedFacet(field string) bool
- func (s *SearchArgs) Limit() int
- func (s *SearchArgs) Offset() int
- func (s *SearchArgs) WithFacetLines(facetLines [][]string) *SearchArgs
- func (s *SearchArgs) WithFilter(field string, terms ...string) *SearchArgs
- func (s *SearchArgs) WithPage(p int) *SearchArgs
- func (s *SearchArgs) WithPageSize(p int) *SearchArgs
- func (s *SearchArgs) WithQuery(q string) *SearchArgs
- func (s *SearchArgs) WithSort(sort string) *SearchArgs
- type SearchHits
- type Text
- type Values
Constants ¶
View Source
const CollapseFromFacetLine = 2
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
This section is empty.
Types ¶
type Affiliation ¶
type Affiliation struct { OrganizationID string `json:"organization_id"` Organization *Organization `json:"-"` }
type CandidateRecord ¶ added in v1.0.56
type CandidateRecord struct { ID string `json:"id"` SourceName string `json:"source_name"` SourceID string `json:"source_id"` SourceMetadata []byte `json:"source_metadata"` Type string `json:"type"` Metadata json.RawMessage `json:"metadata"` Status string `json:"status"` DateCreated time.Time `json:"date_created"` // TODO tightly coupled with Publication for now, refactor later Publication *Publication `json:"publication"` }
type Completion ¶
type Contributor ¶
type Contributor struct { PersonID string `json:"person_id,omitempty"` Person *Person `json:"-"` ExternalPerson *ExternalPerson `json:"external_person,omitempty"` CreditRole []string `json:"credit_role,omitempty"` }
func ContributorFromFirstLastName ¶
func ContributorFromFirstLastName(fn, ln string) *Contributor
func ContributorFromPerson ¶
func ContributorFromPerson(p *Person) *Contributor
func (*Contributor) FirstName ¶
func (c *Contributor) FirstName() string
func (*Contributor) LastName ¶
func (c *Contributor) LastName() string
func (*Contributor) Name ¶
func (c *Contributor) Name() string
func (*Contributor) ORCID ¶
func (c *Contributor) ORCID() string
func (*Contributor) Validate ¶
func (c *Contributor) Validate() error
type Dataset ¶
type Dataset struct { Abstract []*Text `json:"abstract,omitempty"` AccessLevel string `json:"access_level,omitempty"` Author []*Contributor `json:"author,omitempty"` // TODO rename to Creator // CompletenessScore int `json:"completeness_score,omitempty"` BatchID string `json:"batch_id,omitempty"` Contributor []*Contributor `json:"contributor,omitempty"` CreatorID string `json:"creator_id,omitempty"` Creator *Person `json:"-"` DateCreated *time.Time `json:"date_created,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` DateFrom *time.Time `json:"date_from,omitempty"` DateUntil *time.Time `json:"date_until,omitempty"` EmbargoDate string `json:"embargo_date,omitempty"` AccessLevelAfterEmbargo string `json:"access_level_after_embargo,omitempty"` Format []string `json:"format,omitempty"` Handle string `json:"handle,omitempty"` ID string `json:"id,omitempty"` Identifiers Values `json:"identifiers,omitempty"` Keyword []string `json:"keyword,omitempty"` HasBeenPublic bool `json:"has_been_public"` Language []string `json:"language,omitempty"` LastUserID string `json:"last_user_id,omitempty"` LastUser *Person `json:"-"` License string `json:"license,omitempty"` Link []*DatasetLink `json:"link,omitempty"` Locked bool `json:"locked"` Message string `json:"message,omitempty"` OtherLicense string `json:"other_license,omitempty"` Publisher string `json:"publisher,omitempty"` RelatedOrganizations []*RelatedOrganization `json:"related_organizations,omitempty"` RelatedProjects []*RelatedProject `json:"related_projects,omitempty"` RelatedPublication []RelatedPublication `json:"related_publication,omitempty"` ReviewerNote string `json:"reviewer_note,omitempty"` ReviewerTags []string `json:"reviewer_tags,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` Status string `json:"status,omitempty"` Title string `json:"title,omitempty"` UserID string `json:"user_id,omitempty"` User *Person `json:"-"` Year string `json:"year,omitempty"` }
func (*Dataset) AddAbstract ¶
func (*Dataset) AddContributor ¶
func (d *Dataset) AddContributor(role string, c *Contributor)
func (*Dataset) AddLink ¶
func (d *Dataset) AddLink(l *DatasetLink)
func (*Dataset) AddOrganization ¶
func (d *Dataset) AddOrganization(org *Organization)
func (*Dataset) AddProject ¶
func (*Dataset) ClearEmbargo ¶
func (d *Dataset) ClearEmbargo()
func (*Dataset) Contributors ¶
func (d *Dataset) Contributors(role string) []*Contributor
func (*Dataset) FirstIdentifier ¶ added in v1.0.56
func (*Dataset) GetAbstract ¶
func (*Dataset) GetContributor ¶
func (d *Dataset) GetContributor(role string, i int) (*Contributor, error)
func (*Dataset) GetLink ¶
func (d *Dataset) GetLink(id string) *DatasetLink
func (*Dataset) HasContributor ¶ added in v1.0.56
func (*Dataset) HasRelatedPublication ¶
func (*Dataset) IdentifierType ¶ added in v1.0.56
TODO: remove when we really support multiple identifiers
func (*Dataset) IdentifierValue ¶ added in v1.0.56
TODO: remove when we really support multiple identifiers
func (*Dataset) RemoveAbstract ¶
func (*Dataset) RemoveLink ¶
func (*Dataset) RemoveOrganization ¶
func (*Dataset) RemoveProject ¶
func (*Dataset) RemoveRelatedPublication ¶
func (*Dataset) SetAbstract ¶
func (*Dataset) SetContributor ¶
func (d *Dataset) SetContributor(role string, i int, c *Contributor) error
func (*Dataset) SetContributors ¶
func (d *Dataset) SetContributors(role string, c []*Contributor)
func (*Dataset) SetLink ¶
func (d *Dataset) SetLink(l *DatasetLink)
type DatasetHits ¶
type DatasetHits struct { pagination.Pagination Hits []*Dataset `json:"hits"` Facets map[string]FacetValues `json:"facets"` }
type DatasetLink ¶
type DatasetLink struct { ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` Relation string `json:"relation,omitempty"` Description string `json:"description,omitempty"` }
func (*DatasetLink) Validate ¶
func (dl *DatasetLink) Validate() error
type ExternalPerson ¶
type ExternalPerson struct { FullName string `json:"full_name,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` // TODO forms are not yet aware of these new fields HonorificPrefix string `json:"honorific_prefix,omitempty"` Affiliation string `json:"affiliation,omitempty"` }
type FacetValues ¶
type FacetValues []Facet
func (FacetValues) HasMatches ¶
func (fv FacetValues) HasMatches() bool
type Handle ¶
type Handle struct { Handle string `json:"handle"` ResponseCode int `json:"responseCode"` Values []*HandleValue `json:"values,omitempty"` Message string `json:"message,omitempty"` }
func (*Handle) GetFullHandleURL ¶
type HandleData ¶
copy from handle-server-api
type HandleValue ¶
type HandleValue struct { Timestamp string `json:"timestamp"` Type string `json:"type"` Index int `json:"index"` Ttl int `json:"ttl"` Data *HandleData `json:"data"` }
type Organization ¶
type Organization struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Tree []OrganizationTreeElement `json:"tree,omitempty"` }
type OrganizationTreeElement ¶ added in v1.0.56
type OrganizationTreeElement struct {
ID string `json:"id,omitempty"`
}
type Person ¶
type Person struct { Active bool `json:"active"` DateCreated *time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated"` Affiliations []*Affiliation `json:"affiliations"` Email string `json:"email"` FirstName string `json:"first_name"` FullName string `json:"full_name"` ID string `json:"id"` LastName string `json:"last_name"` ORCID string `json:"orcid"` UGentID []string `json:"ugent_id"` // fields below are only relevant for Active people (users) Username string `json:"username"` Role string `json:"role"` ORCIDToken string `json:"orcid_token"` }
func (*Person) CanChangeType ¶ added in v1.0.42
func (u *Person) CanChangeType(p *Publication) bool
func (*Person) CanDeleteDataset ¶ added in v1.0.42
func (*Person) CanDeletePublication ¶ added in v1.0.42
func (u *Person) CanDeletePublication(p *Publication) bool
func (*Person) CanEditDataset ¶ added in v1.0.42
func (*Person) CanEditPublication ¶ added in v1.0.42
func (u *Person) CanEditPublication(p *Publication) bool
func (*Person) CanImpersonateUser ¶ added in v1.0.42
func (*Person) CanPublishDataset ¶ added in v1.0.56
func (*Person) CanPublishPublication ¶ added in v1.0.56
func (u *Person) CanPublishPublication(p *Publication) bool
func (*Person) CanViewDashboard ¶ added in v1.0.42
func (*Person) CanViewDataset ¶ added in v1.0.42
func (*Person) CanViewPublication ¶ added in v1.0.42
func (u *Person) CanViewPublication(p *Publication) bool
func (*Person) CanWithdrawDataset ¶ added in v1.0.56
func (*Person) CanWithdrawPublication ¶ added in v1.0.56
func (u *Person) CanWithdrawPublication(p *Publication) bool
type Publication ¶
type Publication struct { Abstract []*Text `json:"abstract,omitempty"` AdditionalInfo string `json:"additional_info,omitempty"` AlternativeTitle []string `json:"alternative_title,omitempty"` ArticleNumber string `json:"article_number,omitempty"` ArxivID string `json:"arxiv_id,omitempty"` Author []*Contributor `json:"author,omitempty"` BatchID string `json:"batch_id,omitempty"` Classification string `json:"classification,omitempty"` // CompletenessScore int `json:"completeness_score,omitempty"` ConferenceName string `json:"conference_name,omitempty"` ConferenceLocation string `json:"conference_location,omitempty"` ConferenceOrganizer string `json:"conference_organizer,omitempty"` ConferenceStartDate string `json:"conference_start_date,omitempty"` ConferenceEndDate string `json:"conference_end_date,omitempty"` ConferenceType string `json:"conference_type,omitempty"` CreatorID string `json:"creator_id,omitempty"` Creator *Person `json:"-"` DateCreated *time.Time `json:"date_created,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` DateFrom *time.Time `json:"date_from,omitempty"` DateUntil *time.Time `json:"date_until,omitempty"` DefenseDate string `json:"defense_date,omitempty"` DefensePlace string `json:"defense_place,omitempty"` // DefenseTime is deprecated, see https://github.com/ugent-library/biblio-backoffice/issues/1058 DefenseTime string `json:"defense_time,omitempty"` DOI string `json:"doi,omitempty"` Edition string `json:"edition,omitempty"` Editor []*Contributor `json:"editor,omitempty"` EISBN []string `json:"eisbn,omitempty"` EISSN []string `json:"eissn,omitempty"` ESCIID string `json:"esci_id,omitempty"` Extern bool `json:"extern"` ExternalFields Values `json:"external_fields,omitempty"` File []*PublicationFile `json:"file,omitempty"` Handle string `json:"handle,omitempty"` HasConfidentialData string `json:"has_confidential_data,omitempty"` HasPatentApplication string `json:"has_patent_application,omitempty"` HasPublicationsPlanned string `json:"has_publications_planned,omitempty"` HasPublishedMaterial string `json:"has_published_material,omitempty"` ID string `json:"id,omitempty"` ISBN []string `json:"isbn,omitempty"` ISSN []string `json:"issn,omitempty"` Issue string `json:"issue,omitempty"` IssueTitle string `json:"issue_title,omitempty"` JournalArticleType string `json:"journal_article_type,omitempty"` Keyword []string `json:"keyword,omitempty"` Language []string `json:"language,omitempty"` LastUserID string `json:"last_user_id,omitempty"` LastUser *Person `json:"-"` LaySummary []*Text `json:"lay_summary,omitempty"` Legacy bool `json:"legacy"` Link []*PublicationLink `json:"link,omitempty"` Locked bool `json:"locked"` Message string `json:"message,omitempty"` MiscellaneousType string `json:"miscellaneous_type,omitempty"` ORCIDWork []PublicationORCIDWork `json:"orcid_work,omitempty"` PageCount string `json:"page_count,omitempty"` PageFirst string `json:"page_first,omitempty"` PageLast string `json:"page_last,omitempty"` PlaceOfPublication string `json:"place_of_publication,omitempty"` Publication string `json:"publication,omitempty"` PublicationAbbreviation string `json:"publication_abbreviation,omitempty"` PublicationStatus string `json:"publication_status,omitempty"` Publisher string `json:"publisher,omitempty"` PubMedID string `json:"pubmed_id,omitempty"` RelatedDataset []RelatedDataset `json:"related_dataset,omitempty"` RelatedOrganizations []*RelatedOrganization `json:"related_organizations,omitempty"` RelatedProjects []*RelatedProject `json:"related_projects,omitempty"` ReportNumber string `json:"report_number,omitempty"` ResearchField []string `json:"research_field,omitempty"` ReviewerNote string `json:"reviewer_note,omitempty"` ReviewerTags []string `json:"reviewer_tags,omitempty"` SeriesTitle string `json:"series_title,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` SourceDB string `json:"source_db,omitempty"` SourceID string `json:"source_id,omitempty"` SourceRecord string `json:"source_record,omitempty"` Status string `json:"status,omitempty"` Supervisor []*Contributor `json:"supervisor,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` UserID string `json:"user_id,omitempty"` User *Person `json:"-"` Volume string `json:"volume,omitempty"` VABBType string `json:"vabb_type,omitempty"` VABBID string `json:"vabb_id,omitempty"` VABBApproved bool `json:"vabb_approved"` VABBYear []string `json:"vabb_year,omitempty"` HasBeenPublic bool `json:"has_been_public"` WOSID string `json:"wos_id,omitempty"` WOSType string `json:"wos_type,omitempty"` Year string `json:"year,omitempty"` }
func (*Publication) AddAbstract ¶
func (p *Publication) AddAbstract(t *Text)
func (*Publication) AddContributor ¶
func (p *Publication) AddContributor(role string, c *Contributor)
func (*Publication) AddFile ¶
func (p *Publication) AddFile(file *PublicationFile)
func (*Publication) AddLaySummary ¶
func (p *Publication) AddLaySummary(t *Text)
func (*Publication) AddLink ¶
func (p *Publication) AddLink(l *PublicationLink)
func (*Publication) AddOrganization ¶
func (p *Publication) AddOrganization(org *Organization)
func (*Publication) AddProject ¶
func (p *Publication) AddProject(project *Project)
func (*Publication) ChangeType ¶
func (p *Publication) ChangeType(newType string)
func (*Publication) ClassificationChoices ¶
func (p *Publication) ClassificationChoices() []string
func (*Publication) CleanupUnusedFields ¶
func (p *Publication) CleanupUnusedFields() bool
func (*Publication) Contributors ¶
func (p *Publication) Contributors(role string) []*Contributor
func (*Publication) FileIndex ¶ added in v1.0.42
func (p *Publication) FileIndex(id string) int
func (*Publication) GetAbstract ¶
func (p *Publication) GetAbstract(id string) *Text
func (*Publication) GetContributor ¶
func (p *Publication) GetContributor(role string, i int) (*Contributor, error)
func (*Publication) GetFile ¶
func (p *Publication) GetFile(id string) *PublicationFile
func (*Publication) GetLaySummary ¶
func (p *Publication) GetLaySummary(id string) *Text
func (*Publication) GetLink ¶
func (p *Publication) GetLink(id string) *PublicationLink
func (*Publication) HasContributor ¶ added in v1.0.56
func (p *Publication) HasContributor(role string, u *Person) bool
func (*Publication) HasRelatedDataset ¶
func (p *Publication) HasRelatedDataset(id string) bool
func (*Publication) InORCIDWorks ¶
func (p *Publication) InORCIDWorks(orcidID string) bool
func (*Publication) MainFile ¶
func (p *Publication) MainFile() *PublicationFile
NOTE this assumes publication_file_access_levels are ordered from most to least accessible
func (*Publication) PrimaryContributors ¶ added in v1.0.56
func (p *Publication) PrimaryContributors(role string, limit int) ([]*Contributor, bool)
func (*Publication) RemoveAbstract ¶
func (p *Publication) RemoveAbstract(id string)
func (*Publication) RemoveContributor ¶
func (p *Publication) RemoveContributor(role string, i int) error
func (*Publication) RemoveFile ¶
func (p *Publication) RemoveFile(id string)
func (*Publication) RemoveLaySummary ¶
func (p *Publication) RemoveLaySummary(id string)
func (*Publication) RemoveLink ¶
func (p *Publication) RemoveLink(id string)
func (*Publication) RemoveOrganization ¶
func (p *Publication) RemoveOrganization(id string)
func (*Publication) RemoveProject ¶
func (p *Publication) RemoveProject(id string)
func (*Publication) RemoveRelatedDataset ¶
func (p *Publication) RemoveRelatedDataset(id string)
func (*Publication) SetAbstract ¶
func (p *Publication) SetAbstract(t *Text)
func (*Publication) SetContributor ¶
func (p *Publication) SetContributor(role string, i int, c *Contributor) error
func (*Publication) SetContributors ¶
func (p *Publication) SetContributors(role string, c []*Contributor)
func (*Publication) SetFile ¶
func (p *Publication) SetFile(f *PublicationFile)
func (*Publication) SetLaySummary ¶
func (p *Publication) SetLaySummary(ls *Text)
func (*Publication) SetLink ¶
func (p *Publication) SetLink(l *PublicationLink)
func (*Publication) ShowDefenseAsRequired ¶
func (p *Publication) ShowDefenseAsRequired() bool
func (*Publication) ShowPublicationAsRequired ¶
func (p *Publication) ShowPublicationAsRequired() bool
func (*Publication) SummaryParts ¶
func (p *Publication) SummaryParts() []string
Citation TODO this shouldn't be in the model
func (*Publication) UsesAbstract ¶
func (p *Publication) UsesAbstract() bool
func (*Publication) UsesAdditionalInfo ¶
func (p *Publication) UsesAdditionalInfo() bool
func (*Publication) UsesAlternativeTitle ¶
func (p *Publication) UsesAlternativeTitle() bool
func (*Publication) UsesArticleNumber ¶
func (p *Publication) UsesArticleNumber() bool
func (*Publication) UsesArxivID ¶
func (p *Publication) UsesArxivID() bool
func (*Publication) UsesAuthor ¶
func (p *Publication) UsesAuthor() bool
func (*Publication) UsesConference ¶
func (p *Publication) UsesConference() bool
func (*Publication) UsesConferenceType ¶
func (p *Publication) UsesConferenceType() bool
func (*Publication) UsesConfirmations ¶
func (p *Publication) UsesConfirmations() bool
func (*Publication) UsesContributors ¶
func (p *Publication) UsesContributors(role string) bool
func (*Publication) UsesDOI ¶
func (p *Publication) UsesDOI() bool
func (*Publication) UsesDefense ¶
func (p *Publication) UsesDefense() bool
func (*Publication) UsesESCIID ¶
func (p *Publication) UsesESCIID() bool
func (*Publication) UsesEdition ¶
func (p *Publication) UsesEdition() bool
func (*Publication) UsesEditor ¶
func (p *Publication) UsesEditor() bool
func (*Publication) UsesISBN ¶
func (p *Publication) UsesISBN() bool
func (*Publication) UsesISSN ¶
func (p *Publication) UsesISSN() bool
func (*Publication) UsesIssue ¶
func (p *Publication) UsesIssue() bool
func (*Publication) UsesJournalArticleType ¶
func (p *Publication) UsesJournalArticleType() bool
func (*Publication) UsesKeyword ¶
func (p *Publication) UsesKeyword() bool
func (*Publication) UsesLanguage ¶
func (p *Publication) UsesLanguage() bool
func (*Publication) UsesLaySummary ¶
func (p *Publication) UsesLaySummary() bool
func (*Publication) UsesLink ¶
func (p *Publication) UsesLink() bool
func (*Publication) UsesMiscellaneousType ¶
func (p *Publication) UsesMiscellaneousType() bool
func (*Publication) UsesPage ¶
func (p *Publication) UsesPage() bool
func (*Publication) UsesPageCount ¶
func (p *Publication) UsesPageCount() bool
func (*Publication) UsesProject ¶
func (p *Publication) UsesProject() bool
func (*Publication) UsesPubMedID ¶
func (p *Publication) UsesPubMedID() bool
func (*Publication) UsesPublication ¶
func (p *Publication) UsesPublication() bool
func (*Publication) UsesPublicationAbbreviation ¶
func (p *Publication) UsesPublicationAbbreviation() bool
func (*Publication) UsesPublicationStatus ¶
func (p *Publication) UsesPublicationStatus() bool
func (*Publication) UsesPublisher ¶
func (p *Publication) UsesPublisher() bool
func (*Publication) UsesReportNumber ¶
func (p *Publication) UsesReportNumber() bool
func (*Publication) UsesResearchField ¶
func (p *Publication) UsesResearchField() bool
func (*Publication) UsesSeriesTitle ¶
func (p *Publication) UsesSeriesTitle() bool
func (*Publication) UsesSupervisor ¶
func (p *Publication) UsesSupervisor() bool
func (*Publication) UsesTitle ¶
func (p *Publication) UsesTitle() bool
func (*Publication) UsesVolume ¶
func (p *Publication) UsesVolume() bool
func (*Publication) UsesWOS ¶
func (p *Publication) UsesWOS() bool
func (*Publication) UsesYear ¶
func (p *Publication) UsesYear() bool
func (*Publication) VABB ¶
func (p *Publication) VABB() string
format: c:vabb:419551, VABB-1, not approved, 2017
func (*Publication) Validate ¶
func (p *Publication) Validate() error
type PublicationFile ¶
type PublicationFile struct { AccessLevel string `json:"access_level,omitempty"` License string `json:"license,omitempty"` ContentType string `json:"content_type,omitempty"` DateCreated *time.Time `json:"date_created,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` EmbargoDate string `json:"embargo_date,omitempty"` AccessLevelDuringEmbargo string `json:"access_level_during_embargo,omitempty"` AccessLevelAfterEmbargo string `json:"access_level_after_embargo,omitempty"` Name string `json:"name,omitempty"` Size int `json:"size,omitempty"` ID string `json:"id,omitempty"` SHA256 string `json:"sha256,omitempty"` OtherLicense string `json:"other_license,omitempty"` PublicationVersion string `json:"publication_version,omitempty"` Relation string `json:"relation,omitempty"` }
func (*PublicationFile) ClearEmbargo ¶
func (pf *PublicationFile) ClearEmbargo()
func (*PublicationFile) Validate ¶
func (pf *PublicationFile) Validate() error
type PublicationHits ¶
type PublicationHits struct { pagination.Pagination Hits []*Publication `json:"hits"` Facets map[string]FacetValues `json:"facets"` }
type PublicationLink ¶
type PublicationLink struct { ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` Relation string `json:"relation,omitempty"` Description string `json:"description,omitempty"` }
func (*PublicationLink) Validate ¶
func (pl *PublicationLink) Validate() error
type PublicationORCIDWork ¶
type RelatedDataset ¶
type RelatedDataset struct {
ID string `json:"id,omitempty"`
}
type RelatedOrganization ¶
type RelatedOrganization struct { OrganizationID string `json:"organization_id,omitempty"` Organization *Organization `json:"-"` }
type RelatedProject ¶
type RelatedPublication ¶
type RelatedPublication struct {
ID string `json:"id,omitempty"`
}
type SearchArgs ¶
type SearchArgs struct { Query string `query:"q,omitempty"` Filters map[string][]string `query:"f,omitempty"` Page int `query:"page"` Sort []string `query:"sort,omitempty"` PageSize int `query:"page-size"` Facets []string `query:"-"` FacetLines [][]string `query:"-"` }
func NewSearchArgs ¶
func NewSearchArgs() *SearchArgs
func (*SearchArgs) Cleanup ¶
func (s *SearchArgs) Cleanup()
func (*SearchArgs) Clone ¶
func (s *SearchArgs) Clone() *SearchArgs
func (*SearchArgs) FilterFor ¶
func (s *SearchArgs) FilterFor(field string) string
func (*SearchArgs) FiltersFor ¶
func (s *SearchArgs) FiltersFor(field string) []string
func (*SearchArgs) HasActiveCollapsedFacets ¶ added in v1.0.56
func (s *SearchArgs) HasActiveCollapsedFacets() bool
func (*SearchArgs) HasSort ¶
func (s *SearchArgs) HasSort(sort string) bool
func (*SearchArgs) IsCollapsedFacet ¶ added in v1.0.56
func (s *SearchArgs) IsCollapsedFacet(field string) bool
func (*SearchArgs) Limit ¶
func (s *SearchArgs) Limit() int
func (*SearchArgs) Offset ¶
func (s *SearchArgs) Offset() int
func (*SearchArgs) WithFacetLines ¶ added in v1.0.56
func (s *SearchArgs) WithFacetLines(facetLines [][]string) *SearchArgs
func (*SearchArgs) WithFilter ¶
func (s *SearchArgs) WithFilter(field string, terms ...string) *SearchArgs
func (*SearchArgs) WithPage ¶
func (s *SearchArgs) WithPage(p int) *SearchArgs
func (*SearchArgs) WithPageSize ¶
func (s *SearchArgs) WithPageSize(p int) *SearchArgs
func (*SearchArgs) WithQuery ¶
func (s *SearchArgs) WithQuery(q string) *SearchArgs
func (*SearchArgs) WithSort ¶
func (s *SearchArgs) WithSort(sort string) *SearchArgs
type SearchHits ¶
type SearchHits struct { pagination.Pagination Hits []string Facets map[string]FacetValues }
type Text ¶
Click to show internal directories.
Click to hide internal directories.