Documentation ¶
Overview ¶
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jsonstore.go holds the operations for openning and close a JSON Document Store currently implemented in MySQL 8 using JSON columns.
Index ¶
- Constants
- Variables
- func CloseConnections(config *Config) error
- func CloseJSONStore(config *Config) error
- func CrosswalkEPrintToRecord(eprint *EPrint, rec *simplified.Record) error
- func DefaultConfig() []byte
- func DisplayLicense(out io.Writer, appName string)
- func DisplayUsage(out io.Writer, appName string, flagSet *flag.FlagSet, description string, ...)
- func DisplayVersion(out io.Writer, appName string)
- func FmtHelp(src string, appName string, version string, releaseDate string, ...) string
- func GenerateGroupFeed(cfg *Config, verbose bool) error
- func GenerateIDNumber(eprint *EPrint) string
- func GenerateImportID(prefix string, eprint *EPrint) string
- func GenerateOfficialURL(eprint *EPrint) string
- func GeneratePeopleFeed(cfg *Config, verbose bool) error
- func GetAllEPrintIDs(config *Config, repoID string) ([]int, error)
- func GetAllEPrintIDsWithStatus(config *Config, repoID string, status string) ([]int, error)
- func GetAllItems(config *Config, repoID string, field string) ([]string, error)
- func GetAllORCIDs(config *Config, repoID string) ([]string, error)
- func GetAllPersonNames(config *Config, repoID string, field string) ([]string, error)
- func GetAllPersonOrOrgIDs(config *Config, repoID string, field string) ([]string, error)
- func GetAllUniqueID(config *Config, repoID string, field string) ([]string, error)
- func GetAllYears(config *Config, repoID string) ([]int, error)
- func GetDocumentAsEPrint(cfg *Config, repoName string, id int, eprint *EPrint) error
- func GetEPrintIDsForDateType(config *Config, repoID string, dateType string, start string, end string) ([]int, error)
- func GetEPrintIDsForItem(config *Config, repoID string, field string, value string) ([]int, error)
- func GetEPrintIDsForORCID(config *Config, repoID string, orcid string) ([]int, error)
- func GetEPrintIDsForPersonName(config *Config, repoID, field string, family string, given string) ([]int, error)
- func GetEPrintIDsForPersonOrOrgID(config *Config, repoID string, personOrOrgType string, personOrOrgID string) ([]int, error)
- func GetEPrintIDsForUniqueID(config *Config, repoID string, field string, value string) ([]int, error)
- func GetEPrintIDsForYear(config *Config, repoID string, year int) ([]int, error)
- func GetEPrintIDsInTimestampRange(config *Config, repoID string, field string, start string, end string) ([]int, error)
- func GetEPrintIDsWithStatus(config *Config, repoID string, status string, start string, end string) ([]int, error)
- func GetEPrintIDsWithStatusForDateType(config *Config, repoID string, status string, dateType string, start string, ...) ([]int, error)
- func GetEPrintIDsWithStatusInTimestampRange(config *Config, repoID string, status string, field string, start string, ...) ([]int, error)
- func GetGroupAggregations(cfg *Config, groupID string) (map[string]map[string][]int, error)
- func GetGroupIDByName(cfg *Config, groupName string) (string, error)
- func GetGroupIDs(cfg *Config) ([]string, error)
- func GetJSONDocument(cfg *Config, repoName string, id int) ([]byte, error)
- func GetJSONRow(cfg *Config, repoName string, id int) ([]byte, error)
- func GetKeys(baseURL string) ([]int, error)
- func GetPersonByRoleAggregations(cfg *Config, person *Person, role string) (map[string]map[string][]int, error)
- func GetPersonIDs(cfg *Config) ([]string, error)
- func GetTablesAndColumns(config *Config, repoID string) (map[string][]string, error)
- func GetUserID(config *Config, repoID string, username string) ([]int, error)
- func GetUsernames(config *Config, repoID string, userids ...int) ([]string, error)
- func HarvesterDBSchema(cfgName string) (string, error)
- func ImportEPrints(config *Config, repoID string, ds *DataSource, eprints *EPrints) ([]int, error)
- func IsPublic(config *Config, repoID string, eprintid int) (bool, error)
- func OpenConnections(config *Config) error
- func OpenJSONStore(config *Config) error
- func RunDataset(cfgName string, repoName string, dsn string, keyList string, verbose bool) error
- func RunDatasets(cfgName string, dsn string, keyList string, verbose bool) error
- func RunEPrintsRESTClient(out io.Writer, getURL string, auth string, username string, secret string, ...) int
- func RunExtendedAPIClient(out io.Writer, args []string, asJSON bool, verbose bool) int
- func RunGenGroups(cfgName string, verbose bool) error
- func RunGenPeople(cfgName string, verbose bool) error
- func RunGenfeeds(cfgName string, verbose bool) error
- func RunHarvestGroups(cfgName string, verbose bool) error
- func RunHarvestPeople(cfgName string, verbose bool) error
- func RunHarvestRepoID(cfgName string, repoName, start string, end string, keyList string, ...) error
- func RunHarvester(cfgName string, start string, end string, keyList string, useSimpleRecord bool, ...) error
- func SQLCreateEPrint(config *Config, repoID string, ds *DataSource, eprint *EPrint) (int, error)
- func SQLCreateUser(config *Config, repoID string, user *EPrintUser) (int, error)
- func SQLUpdateUser(config *Config, repoID string, user *EPrintUser) error
- func SaveGroupJSON(cfg *Config, group *Group) error
- func SaveJSONDocument(cfg *Config, repoName string, id int, src []byte, action string, ...) error
- func SavePersonJSON(cfg *Config, person *Person) error
- func SetDefaults(collection string, rights string, officialURL string, refereed string, ...)
- type AccompanimentItemList
- func (itemList *AccompanimentItemList) Append(item *Item) int
- func (itemList *AccompanimentItemList) IndexOf(i int) *Item
- func (itemList *AccompanimentItemList) Init()
- func (itemList *AccompanimentItemList) Length() int
- func (itemList *AccompanimentItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type AltTitleItemList
- type ConductorItemList
- type ConfCreatorItemList
- func (itemList *ConfCreatorItemList) Append(item *Item) int
- func (itemList *ConfCreatorItemList) IndexOf(i int) *Item
- func (itemList *ConfCreatorItemList) Init()
- func (itemList *ConfCreatorItemList) Length() int
- func (itemList *ConfCreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type Config
- type ContributorItemList
- func (itemList *ContributorItemList) Append(item *Item) int
- func (itemList *ContributorItemList) GetIDs() []string
- func (itemList *ContributorItemList) IndexOf(i int) *Item
- func (itemList *ContributorItemList) Init()
- func (itemList *ContributorItemList) Length() int
- func (itemList *ContributorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type CopyrightHolderItemList
- func (itemList *CopyrightHolderItemList) Append(item *Item) int
- func (itemList *CopyrightHolderItemList) IndexOf(i int) *Item
- func (itemList *CopyrightHolderItemList) Init()
- func (itemList *CopyrightHolderItemList) Length() int
- func (itemList *CopyrightHolderItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type CorpContributorItemList
- func (itemList *CorpContributorItemList) Append(item *Item) int
- func (itemList *CorpContributorItemList) GetIDs() []string
- func (itemList *CorpContributorItemList) IndexOf(i int) *Item
- func (itemList *CorpContributorItemList) Init()
- func (itemList *CorpContributorItemList) Length() int
- func (itemList *CorpContributorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type CorpCreatorItemList
- func (itemList *CorpCreatorItemList) Append(item *Item) int
- func (itemList *CorpCreatorItemList) IndexOf(i int) *Item
- func (itemList *CorpCreatorItemList) Init()
- func (itemList *CorpCreatorItemList) Length() int
- func (itemList *CorpCreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type CreatorItemList
- func (itemList *CreatorItemList) Append(item *Item) int
- func (itemList *CreatorItemList) GetIDs() []string
- func (itemList *CreatorItemList) IndexOf(i int) *Item
- func (itemList *CreatorItemList) Init()
- func (itemList *CreatorItemList) Length() int
- func (itemList *CreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type DataSource
- type DivisionItemList
- type Doc
- type Document
- type DocumentList
- type EP3API
- type EPrint
- type EPrintUser
- type EPrints
- type EPrintsDataSet
- type EditorItemList
- func (itemList *EditorItemList) Append(item *Item) int
- func (itemList *EditorItemList) GetIDs() []string
- func (itemList *EditorItemList) IndexOf(i int) *Item
- func (itemList *EditorItemList) Init()
- func (itemList *EditorItemList) Length() int
- func (itemList *EditorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type ExhibitorItemList
- type File
- type FunderItemList
- type GScholarItemList
- type Group
- type Item
- type ItemIssueItemList
- type ItemsInterface
- type KeywordItemList
- type LearningLevelItemList
- func (itemList *LearningLevelItemList) Append(item *Item) int
- func (itemList *LearningLevelItemList) IndexOf(i int) *Item
- func (itemList *LearningLevelItemList) Init()
- func (itemList *LearningLevelItemList) Length() int
- func (itemList *LearningLevelItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type LocalGroupItemList
- func (itemList *LocalGroupItemList) Append(item *Item) int
- func (itemList *LocalGroupItemList) GetGroups() []string
- func (itemList *LocalGroupItemList) IndexOf(i int) *Item
- func (itemList *LocalGroupItemList) Init()
- func (itemList *LocalGroupItemList) Length() int
- func (itemList *LocalGroupItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type LyricistItemList
- type Name
- type OptionMajorItemList
- func (itemList *OptionMajorItemList) Append(item *Item) int
- func (itemList *OptionMajorItemList) GetOptions() []string
- func (itemList *OptionMajorItemList) IndexOf(i int) *Item
- func (itemList *OptionMajorItemList) Init()
- func (itemList *OptionMajorItemList) Length() int
- func (itemList *OptionMajorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type OptionMinorItemList
- func (itemList *OptionMinorItemList) Append(item *Item) int
- func (itemList *OptionMinorItemList) GetOptions() []string
- func (itemList *OptionMinorItemList) IndexOf(i int) *Item
- func (itemList *OptionMinorItemList) Init()
- func (itemList *OptionMinorItemList) Length() int
- func (itemList *OptionMinorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type OtherNumberingSystemItemList
- func (itemList *OtherNumberingSystemItemList) Append(item *Item) int
- func (itemList *OtherNumberingSystemItemList) IndexOf(i int) *Item
- func (itemList *OtherNumberingSystemItemList) Init()
- func (itemList *OtherNumberingSystemItemList) Length() int
- func (itemList *OtherNumberingSystemItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type PatentAssigneeItemList
- func (itemList *PatentAssigneeItemList) Append(item *Item) int
- func (itemList *PatentAssigneeItemList) IndexOf(i int) *Item
- func (itemList *PatentAssigneeItemList) Init()
- func (itemList *PatentAssigneeItemList) Length() int
- func (itemList *PatentAssigneeItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type PatentClassificationItemList
- func (itemList *PatentClassificationItemList) Append(item *Item) int
- func (itemList *PatentClassificationItemList) IndexOf(i int) *Item
- func (itemList *PatentClassificationItemList) Init()
- func (itemList *PatentClassificationItemList) Length() int
- func (itemList *PatentClassificationItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type Person
- type ProducerItemList
- type ProjectItemList
- type ReferenceItemList
- type ReferenceTextItemList
- func (itemList *ReferenceTextItemList) Append(item *Item) int
- func (itemList *ReferenceTextItemList) IndexOf(i int) *Item
- func (itemList *ReferenceTextItemList) Init()
- func (itemList *ReferenceTextItemList) Length() int
- func (itemList *ReferenceTextItemList) SetAttributeOf(i int, key string, value interface{}) bool
- func (itemList *ReferenceTextItemList) UnmarshalJSON(src []byte) error
- type RelatedPatentItemList
- func (itemList *RelatedPatentItemList) Append(item *Item) int
- func (itemList *RelatedPatentItemList) IndexOf(i int) *Item
- func (itemList *RelatedPatentItemList) Init()
- func (itemList *RelatedPatentItemList) Length() int
- func (itemList *RelatedPatentItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type RelatedURLItemList
- func (itemList *RelatedURLItemList) Append(item *Item) int
- func (itemList *RelatedURLItemList) IndexOf(i int) *Item
- func (itemList *RelatedURLItemList) Init()
- func (itemList *RelatedURLItemList) Length() int
- func (itemList *RelatedURLItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type RelationItemList
- type ShelfItemList
- type SkillAreaItemList
- type SubjectItemList
- type ThesisAdvisorItemList
- func (itemList *ThesisAdvisorItemList) Append(item *Item) int
- func (itemList *ThesisAdvisorItemList) GetIDs() []string
- func (itemList *ThesisAdvisorItemList) IndexOf(i int) *Item
- func (itemList *ThesisAdvisorItemList) Init()
- func (itemList *ThesisAdvisorItemList) Length() int
- func (itemList *ThesisAdvisorItemList) SetAttributeOf(i int, key string, value interface{}) bool
- type ThesisCommitteeItemList
- func (itemList *ThesisCommitteeItemList) Append(item *Item) int
- func (itemList *ThesisCommitteeItemList) GetIDs() []string
- func (itemList *ThesisCommitteeItemList) IndexOf(i int) *Item
- func (itemList *ThesisCommitteeItemList) Init()
- func (itemList *ThesisCommitteeItemList) Length() int
- func (itemList *ThesisCommitteeItemList) SetAttributeOf(i int, key string, value interface{}) bool
Constants ¶
const ( AuthNone = iota BasicAuth )
const ( // Version number of release Version = "1.3.8" // ReleaseDate, the date version.go was generated ReleaseDate = "2024-06-10" // ReleaseHash, the Git hash when version.go was generated ReleaseHash = "e0ce6fa" LicenseText = `` /* 1524-byte string literal not displayed */ )
const MySQLTimestamp = "2006-01-02 15:04:05"
Variables ¶
var ( // DefaultCollection holds the default collection to use on deposit DefaultCollection string // DefaultRights sets the eprint.Rights to a default value on deposit DefaultRights string // DefaultOfficialURL holds a URL prefix for the persistent URL, // an ID Number will get added when generating per record // official_url values. DefaultOfficialURL string // DefaultRefereed DefaultRefereed string // DefaultStatus DefaultStatus string )
These default values are used when apply clsrules set
var (
UseSimpleRecord bool
)
Functions ¶
func CloseConnections ¶ added in v1.1.8
CloseConnections
func CrosswalkEPrintToRecord ¶ added in v1.0.2
func CrosswalkEPrintToRecord(eprint *EPrint, rec *simplified.Record) error
func DefaultConfig ¶ added in v1.2.2
func DefaultConfig() []byte
func DisplayLicense ¶ added in v1.0.2
func DisplayUsage ¶ added in v1.0.2
func DisplayVersion ¶ added in v1.0.2
func FmtHelp ¶ added in v1.3.3
func FmtHelp(src string, appName string, version string, releaseDate string, releaseHash string) string
FmtHelp lets you process a text block with simple curly brace markup.
func GenerateGroupFeed ¶ added in v1.2.2
GenerateGroupFeed returns a JSON document containing an array of group keys. Group keys are sorted alphabetically. Group keys are formed from the group field slugified.
func GenerateIDNumber ¶ added in v1.1.8
GenerateIDNumber generates a unique ID number based on the instance of generation and the default collection name. I.e. COLLECTION_NAME:DATESTAMP-NANOSECOND
NOTE: You need to have set the values for DefaultCollection and DefaultOfficialURL before calling this function.
func GenerateImportID ¶ added in v1.1.8
GenerateImportID generates a unique ID number based on the instance of generation and the default collection name. I.e. PREFIX:DATESTAMP-NANOSECOND.USER_ID
NOTE: You need to have set the values for DefaultCollection and DefaultOfficialURL before calling this function.
func GenerateOfficialURL ¶ added in v1.1.8
GenerateOfficialURL generates an OfficalURL (i.e.
idNumber string appended to OfficialURLPrefix)
func GeneratePeopleFeed ¶ added in v1.2.2
GeneratePeopleFeed returns a JSON document contiainer an array of people ids. People keys are sorted alphabetically.
func GetAllEPrintIDs ¶ added in v1.1.8
GetAllEPrintIDs return a list of all eprint ids in repository or error
func GetAllEPrintIDsWithStatus ¶ added in v1.1.8
GetAllEPrintIDsWithStatus return a list of all eprint ids in a repository with a given status or return error
func GetAllItems ¶ added in v1.1.8
GetAllItems returns a list of simple items (e.g. local_group)
func GetAllORCIDs ¶ added in v1.1.8
GetAllORCIDs return a list of all ORCID in repository
func GetAllPersonNames ¶ added in v1.1.8
GetAllPersonNames return a list of person names in repository
func GetAllPersonOrOrgIDs ¶ added in v1.1.8
GetAllPersonOrOrgIDs return a list of creator ids or error
func GetAllUniqueID ¶ added in v1.1.8
GetAllUniqueID return a list of unique id values in repository
func GetAllYears ¶ added in v1.1.8
GetAllYears returns the publication years found in a repository
func GetDocumentAsEPrint ¶ added in v1.2.2
GetDocumentAsEPrint trake a configuration, repoName, eprint if and returns an EPrint struct or error based on the contents in the json store.
func GetEPrintIDsForDateType ¶ added in v1.1.8
func GetEPrintIDsForDateType(config *Config, repoID string, dateType string, start string, end string) ([]int, error)
GetEPrintIDsForDateType returns list of eprints in date range or returns an error
func GetEPrintIDsForItem ¶ added in v1.1.8
GetEPrintIDsForItem
func GetEPrintIDsForORCID ¶ added in v1.1.8
GetEPrintIDsForORCID return a list of eprint ids associated with the ORCID
func GetEPrintIDsForPersonName ¶ added in v1.1.8
func GetEPrintIDsForPersonName(config *Config, repoID, field string, family string, given string) ([]int, error)
GetEPrintIDsForPersonName return a list of eprint id for a person's name (family, given)
func GetEPrintIDsForPersonOrOrgID ¶ added in v1.1.8
func GetEPrintIDsForPersonOrOrgID(config *Config, repoID string, personOrOrgType string, personOrOrgID string) ([]int, error)
GetEPrintIDForPersonOrOrgID return a list of eprint ids associated with the person or organization id
func GetEPrintIDsForUniqueID ¶ added in v1.1.8
func GetEPrintIDsForUniqueID(config *Config, repoID string, field string, value string) ([]int, error)
GetEPrintIDsForUniqueID return list of eprints for DOI
func GetEPrintIDsForYear ¶ added in v1.1.8
GetEPrintsIDsForYear returns a list of published eprint IDs for a given year.
func GetEPrintIDsInTimestampRange ¶ added in v1.1.8
func GetEPrintIDsInTimestampRange(config *Config, repoID string, field string, start string, end string) ([]int, error)
GetEPrintIDsInTimestampRange return a list of EPrintIDs in created timestamp range or return error. field maybe either "datestamp" (for created date), "lastmod" (for last modified date)
func GetEPrintIDsWithStatus ¶ added in v1.1.8
func GetEPrintIDsWithStatus(config *Config, repoID string, status string, start string, end string) ([]int, error)
GetEPrintIDsWithStatus returns a list of eprints in a timestmap range for a given status or returns an error
func GetEPrintIDsWithStatusForDateType ¶ added in v1.1.8
func GetEPrintIDsWithStatusForDateType(config *Config, repoID string, status string, dateType string, start string, end string) ([]int, error)
GetEPrintIDsWithStatusForDateType returns list of eprints in date range for a given status or returns an error
func GetEPrintIDsWithStatusInTimestampRange ¶ added in v1.1.8
func GetEPrintIDsWithStatusInTimestampRange(config *Config, repoID string, status string, field string, start string, end string) ([]int, error)
GetEPrintIDsWithStatusInTimestampRange return a list of EPrintIDs with eprint_status in field timestamp range or return error. field maybe either "datestamp" (for created date), "lastmod" (for last modified date)
func GetGroupAggregations ¶ added in v1.2.2
func GetGroupIDByName ¶ added in v1.2.2
func GetGroupIDs ¶ added in v1.2.2
func GetJSONDocument ¶ added in v1.1.8
GetJSONDocument takes a configuration, repoName, eprint id and returns the JSON source document.
func GetJSONRow ¶ added in v1.2.2
GetJSONRow takes a configuration, repoName, eprint id and returns the table row as JSON source.
func GetKeys ¶ added in v0.0.14
GetKeys returns a list of eprint record ids from the EPrints REST API
func GetPersonByRoleAggregations ¶ added in v1.2.2
func GetPersonIDs ¶ added in v1.2.2
func GetTablesAndColumns ¶ added in v1.1.8
func GetUsernames ¶ added in v1.1.8
GetUsernames returns a list of all usernames in a repository
func HarvesterDBSchema ¶ added in v1.2.2
HarvesterDBSchema returns SQL statements for creating the tables and database for the harvester based on the initialization file provides.
func ImportEPrints ¶ added in v1.1.8
ImportEPrints take an repository id, eprints structure. It is a re-implementation of EPrints Perl Import EPrint XML.
ImportEPrints will create EPrint records using SQLCreateEPrint function. ImportEPrint is responsible for applly any rule sets and eprint status, SQLCreateEPRint is responsible for datestamps and timestamps.
ImportEPrints returns a list of EPrint IDs created if successful and an error if something goes wrong.
func IsPublic ¶ added in v1.1.8
IsPublic takes an EPrintID and returns true if public, false otherwise
Check if an EPrint record "is public"
func RunDataset ¶ added in v1.2.3
RunDataset will use the eprinttools settings.jons config file and a repository ID (e.g. caltechauthors) and render a dataset collection based on the previously harvested contents.
func RunDatasets ¶ added in v1.2.2
RunDatasets will use the eprinttools settings.jons config file and reader dataset collections based on the contents.
func RunEPrintsRESTClient ¶ added in v1.1.8
func RunExtendedAPIClient ¶ added in v1.1.8
func RunGenGroups ¶ added in v1.2.2
RunGenGroups will use the config file names by cfgName and render all the directorys, JSON documents and non-templated markdown content needed for a feeds v1.1 website in the htdocs directory indicated in the configuration file.
func RunGenPeople ¶ added in v1.2.2
RunGenPeople will use the config file names by cfgName and render all the directorys, JSON documents and non-templated markdown content needed for a feeds v1.1 website in the htdocs directory indicated in the configuration file.
func RunGenfeeds ¶ added in v1.2.2
RunGenfeeds will use the config file names by cfgName and render all the directorys, JSON documents and non-templated markdown content needed for a feeds v1.1 website in the htdocs directory indicated in the configuration file.
func RunHarvestGroups ¶ added in v1.2.2
RunHarvestGroups loads CSV files containing people and group crosswalk tables. These synthesize Person and Group objects not present in EPrints.
func RunHarvestPeople ¶ added in v1.2.2
RunHarvestPeople loads CSV files containing people and group crosswalk tables. These synthesize Person and Group objects not present in EPrints.
func RunHarvestRepoID ¶ added in v1.2.2
func RunHarvestRepoID(cfgName string, repoName, start string, end string, keyList string, useSimpleRecord bool, verbose bool) error
RunHarvestRepoID will use the config file names by cfgName and the repository id, the start and end time strings if set to retrieve all eprint records created or modified during that time sequence for that repository.
func RunHarvester ¶ added in v1.1.8
func RunHarvester(cfgName string, start string, end string, keyList string, useSimpleRecord bool, verbose bool) error
RunHarvester will use the config file names by cfgName and the start and end time strings if set to retrieve all eprint records created or modified during that time sequence.
func SQLCreateEPrint ¶ added in v1.1.8
SQLCreateEPrint will read a EPrint structure and generate SQL INSERT, REPLACE and DELETE statements suitable for creating a new EPrint record in the repository.
func SQLCreateUser ¶ added in v1.1.8
func SQLCreateUser(config *Config, repoID string, user *EPrintUser) (int, error)
func SQLUpdateUser ¶ added in v1.1.8
func SQLUpdateUser(config *Config, repoID string, user *EPrintUser) error
func SaveGroupJSON ¶ added in v1.2.2
func SaveJSONDocument ¶ added in v1.1.8
func SaveJSONDocument(cfg *Config, repoName string, id int, src []byte, action string, created string, lastmod string, pubdate string, status string, isPublic bool, recordType string, thesisType string) error
SaveJSONDocument takes a configuration, repoName, eprint id as integer and JSON source saving it to the appropriate JSON table.
func SavePersonJSON ¶ added in v1.2.2
Types ¶
type AccompanimentItemList ¶ added in v0.0.14
type AccompanimentItemList struct { XMLName xml.Name `xml:"accompaniment" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
AccompanimentItemList
func (*AccompanimentItemList) Append ¶ added in v1.1.8
func (itemList *AccompanimentItemList) Append(item *Item) int
Append adds an item to the accompaniment item list and returns the new count of items
func (*AccompanimentItemList) IndexOf ¶ added in v1.1.8
func (itemList *AccompanimentItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*AccompanimentItemList) Init ¶ added in v1.3.7
func (itemList *AccompanimentItemList) Init()
Init will initilize the Items array attribute of List
func (*AccompanimentItemList) Length ¶ added in v1.1.8
func (itemList *AccompanimentItemList) Length() int
Length return item count
func (*AccompanimentItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *AccompanimentItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type AltTitleItemList ¶ added in v0.0.14
type AltTitleItemList struct { XMLName xml.Name `xml:"alt_title" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
AltTitleItemList
func (*AltTitleItemList) Append ¶ added in v1.1.8
func (itemList *AltTitleItemList) Append(item *Item) int
Append adds an item to the altTitle item list and returns the new count of items
func (*AltTitleItemList) IndexOf ¶ added in v1.1.8
func (itemList *AltTitleItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*AltTitleItemList) Init ¶ added in v1.3.7
func (itemList *AltTitleItemList) Init()
Init will initilize the Items array attribute of List
func (*AltTitleItemList) Length ¶ added in v1.1.8
func (itemList *AltTitleItemList) Length() int
Length return item count
func (*AltTitleItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *AltTitleItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ConductorItemList ¶ added in v0.0.14
type ConductorItemList struct { XMLName xml.Name `xml:"conductors" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ConductorItemList
func (*ConductorItemList) Append ¶ added in v1.1.8
func (itemList *ConductorItemList) Append(item *Item) int
Append adds an item to the conductor item list and returns the new count of items
func (*ConductorItemList) IndexOf ¶ added in v1.1.8
func (itemList *ConductorItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*ConductorItemList) Init ¶ added in v1.3.7
func (itemList *ConductorItemList) Init()
Init will initilize the Items array attribute of List
func (*ConductorItemList) Length ¶ added in v1.1.8
func (itemList *ConductorItemList) Length() int
Length returns count of items
func (*ConductorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ConductorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ConfCreatorItemList ¶ added in v0.0.14
type ConfCreatorItemList struct { XMLName xml.Name `xml:"conf_creators" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ConfCreatorItemList
func (*ConfCreatorItemList) Append ¶ added in v1.1.8
func (itemList *ConfCreatorItemList) Append(item *Item) int
Append adds an item to the confCreator item list and returns the new count of items
func (*ConfCreatorItemList) IndexOf ¶ added in v1.1.8
func (itemList *ConfCreatorItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*ConfCreatorItemList) Init ¶ added in v1.3.7
func (itemList *ConfCreatorItemList) Init()
Init will initilize the Items array attribute of List
func (*ConfCreatorItemList) Length ¶ added in v1.1.8
func (itemList *ConfCreatorItemList) Length() int
Length return item count
func (*ConfCreatorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ConfCreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type Config ¶ added in v1.0.2
type Config struct { // Hostname for running service Hostname string `json:"hostname"` // BaseURL is the base URL passed to any client configuration BaseURL string `json:"base_url"` // Logfile Logfile string `json:"logfile,omitempty"` // PeopleCSV points to a curated people.csv file, this file contains crosswalk ids and general name info PeopleCSV string `json:"people_csv,omitempty"` // GroupsCSV points to a curated groups.csv file, this file contains crosswalk ids and general group info GroupsCSV string `json:"groups_csv,omitempty"` // Repositories are defined by a REPO_ID (string) // that points at a MySQL Db connection string Repositories map[string]*DataSource `json:"eprint_repositories"` // Connections is a map to database connections Connections map[string]*sql.DB `json:"-"` // JSONStore is the name of a MySQL 8 database in DNS format // that holds for each repository. The tables have two columns // eprint id (INTEGER) and document (JSON COLUMNS). // The JSONStore is where data is harvested into and where it is // staged for writing out to a published Object store like S3. JSONStore string `json:"jsonstore"` // Jdb holds the MySQL connector to the jsonstore Jdb *sql.DB `json:"-"` // Routes holds the mapping of end points to repository id // instances. Routes map[string]map[string]func(http.ResponseWriter, *http.Request, string, []string) (int, error) `json:"-"` // ProjectDir is the directory where you stage harvested content ProjectDir string `json:"project_dir,omitempty"` // Htdocs is the directory where aggregated information and // website content is generated to after running the harvester. Htdocs string `json:"htdocs,omitempty"` // PandocServer is the URL to the Pandoc server // E.g. localhost:8080 PandocServer string `json:"pandoc_server,omitempty"` }
Config holds a configuration file structure used by EPrints Extended API Configuration file is expected to be in JSON format.
func LoadConfig ¶ added in v1.1.8
LoadConfig reads a JSON file and returns a Config structure or error.
type ContributorItemList ¶ added in v0.0.14
type ContributorItemList struct { XMLName xml.Name `xml:"contributors" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ContributorItemList
func (*ContributorItemList) Append ¶ added in v1.1.8
func (itemList *ContributorItemList) Append(item *Item) int
Append adds an item to the contributor item list and returns the new count of items
func (*ContributorItemList) GetIDs ¶ added in v1.2.2
func (itemList *ContributorItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*ContributorItemList) IndexOf ¶ added in v1.1.8
func (itemList *ContributorItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*ContributorItemList) Init ¶ added in v1.3.7
func (itemList *ContributorItemList) Init()
Init will initilize the Items array attribute of List
func (*ContributorItemList) Length ¶ added in v1.1.8
func (itemList *ContributorItemList) Length() int
Length returns the number of items in list
func (*ContributorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ContributorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type CopyrightHolderItemList ¶ added in v0.0.14
type CopyrightHolderItemList struct { XMLName xml.Name `xml:"copyright_holders" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
CopyrightHolderItemList
func (*CopyrightHolderItemList) Append ¶ added in v1.1.8
func (itemList *CopyrightHolderItemList) Append(item *Item) int
Append adds an item to the copyrightHolder item list and returns the new count of items
func (*CopyrightHolderItemList) IndexOf ¶ added in v1.1.8
func (itemList *CopyrightHolderItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*CopyrightHolderItemList) Init ¶ added in v1.3.7
func (itemList *CopyrightHolderItemList) Init()
Init will initilize the Items array attribute of List
func (*CopyrightHolderItemList) Length ¶ added in v1.1.8
func (itemList *CopyrightHolderItemList) Length() int
Length return item count
func (*CopyrightHolderItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *CopyrightHolderItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type CorpContributorItemList ¶ added in v1.0.2
type CorpContributorItemList struct { XMLName xml.Name `xml:"corp_contributors" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
CorpContributorItemList (not used in EPrints, but used in Invenio)
func (*CorpContributorItemList) Append ¶ added in v1.1.8
func (itemList *CorpContributorItemList) Append(item *Item) int
Append adds an item to the corp creator item list and returns the new count of items
func (*CorpContributorItemList) GetIDs ¶ added in v1.2.2
func (itemList *CorpContributorItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*CorpContributorItemList) IndexOf ¶ added in v1.1.8
func (itemList *CorpContributorItemList) IndexOf(i int) *Item
IndexOf returns an items or nil
func (*CorpContributorItemList) Init ¶ added in v1.3.7
func (itemList *CorpContributorItemList) Init()
Init will initilize the Items array attribute of List
func (*CorpContributorItemList) Length ¶ added in v1.1.8
func (itemList *CorpContributorItemList) Length() int
Length returns count of items in list
func (*CorpContributorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *CorpContributorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type CorpCreatorItemList ¶ added in v0.0.14
type CorpCreatorItemList struct { XMLName xml.Name `xml:"corp_creators" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
CorpCreatorItemList
func (*CorpCreatorItemList) Append ¶ added in v1.1.8
func (itemList *CorpCreatorItemList) Append(item *Item) int
Append adds an item to the corp creator item list and returns the new count of items
func (*CorpCreatorItemList) IndexOf ¶ added in v1.1.8
func (itemList *CorpCreatorItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*CorpCreatorItemList) Init ¶ added in v1.3.7
func (itemList *CorpCreatorItemList) Init()
Init will initilize the Items array attribute of List
func (*CorpCreatorItemList) Length ¶ added in v1.1.8
func (itemList *CorpCreatorItemList) Length() int
Length returns count of items in list
func (*CorpCreatorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *CorpCreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type CreatorItemList ¶ added in v0.0.14
type CreatorItemList struct { XMLName xml.Name `xml:"creators" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
CreatorItemList holds a list of authors
func (*CreatorItemList) Append ¶ added in v1.1.8
func (itemList *CreatorItemList) Append(item *Item) int
Append adds an item to the Creator list and returns the new count of items
func (*CreatorItemList) GetIDs ¶ added in v1.2.2
func (itemList *CreatorItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*CreatorItemList) IndexOf ¶ added in v1.1.8
func (itemList *CreatorItemList) IndexOf(i int) *Item
IndexOf() returns item or nil
func (*CreatorItemList) Init ¶ added in v1.3.7
func (itemList *CreatorItemList) Init()
Init will initilize the Items array attribute of List
func (*CreatorItemList) Length ¶ added in v1.1.8
func (itemList *CreatorItemList) Length() int
Length() returns item count
func (*CreatorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *CreatorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type DataSource ¶ added in v1.0.2
type DataSource struct { // DSN is used to connect to a MySQL style DB. DSN string `json:"dsn,omitempty"` // BaseURL is the URL to use in constructing eprint id, document id // and file id attribute strings. BaseURL string `json:"base_url,omitempty"` // Rest is used to connect to EPrints REST API // NOTE: assumes Basic Auth for authentication RestAPI string `json:"rest,omitempty"` // Write enables the write API for creating // or replacing EPrint records via SQL database calls. // The default value is false. Write bool `json:"write" default:"false"` // DefaultCollection DefaultCollection string `json:"default_collection,omitempty"` // DefaultOfficialURL DefaultOfficialURL string `json:"default_official_url,omitempty"` // DefaultRights (i.e. usage statement) DefaultRights string `json:"default_rights,omitempty"` // DefaultIsRefereed (i.e. refereed field applied for "article" types. // Caltech Library defaults this to "TRUE" for type "article". DefaultRefereed string `json:"default_refereed,omitempty"` // DefaultStatus is the eprint.eprint_status value to set by default // on creating new eprint records. Normally this is "inbox" or "buffer" DefaultStatus string `json:"default_status,omitempty"` // StripTags bool is true then an EPrint Abstract will have XML/HTML tags // stripped on import. StripTags bool `json:"strip_tags,omitempty"` // TableMap holds the mapping of tables and columns for // the repository presented. TableMap map[string][]string `json:"tables,omitempty"` // PublicOnly is a boolean indicating if the "harvested" content // should be restricted to public records. PublicOnly bool `json:"is_public,omitempty"` }
DataSource can contain one or more types of datasources. E.g. E.g. dsn for MySQL connections and also data for REST API access.
type DivisionItemList ¶ added in v0.0.14
type DivisionItemList struct { XMLName xml.Name `xml:"divisions" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
DivisionItemList
func (*DivisionItemList) Append ¶ added in v1.1.8
func (itemList *DivisionItemList) Append(item *Item) int
Append adds an item to the division item list and returns the new count of items
func (*DivisionItemList) IndexOf ¶ added in v1.1.8
func (itemList *DivisionItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*DivisionItemList) Init ¶ added in v1.3.7
func (itemList *DivisionItemList) Init()
Init will initilize the Items array attribute of List
func (*DivisionItemList) Length ¶ added in v1.1.8
func (itemList *DivisionItemList) Length() int
Length return a count of items
func (*DivisionItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *DivisionItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type Doc ¶ added in v1.2.2
type Doc struct { ID int `json:"id"` Src []byte `json:"src"` Action string `json:"action,omitempty"` Created string `json:"created,omitempty"` LastModified string `json:"lastmod,omitempty"` PubDate string `json:"pubDate,omitempty"` Status string `json:"status,omitempty"` IsPublic bool `json:"is_public,omitempty"` RecordType string `json:"record_type,omitempty"` ThesisType string `json:"thesis_type,omitempty"` }
Doc holds the data structure of our jsonstore row.
type Document ¶
type Document struct { XMLName xml.Name `json:"-"` ID string `xml:"id,attr" json:"id"` DocID int `xml:"docid" json:"doc_id"` RevNumber int `xml:"rev_number" json:"rev_number,omitempty"` Files []*File `xml:"files>file" json:"files,omitempty"` EPrintID int `xml:"eprintid" json:"eprint_id"` Pos int `xml:"pos" json:"pos,omitempty"` Placement int `xml:"placement,omitempty" json:"placement,omitempty"` MimeType string `xml:"mime_type,omitempty" json:"mime_type,omitempty"` Format string `xml:"format" json:"format"` FormatDesc string `xml:"formatdesc,omitempty" json:"format_desc,omitempty"` Language string `xml:"language,omitempty" json:"language,omitempty"` Security string `xml:"security" json:"security"` License string `xml:"license" json:"license"` Main string `xml:"main" json:"main"` DateEmbargo string `xml:"date_embargo,omitempty" json:"date_embargo,omitempty"` DateEmbargoYear int `xml:"-" json:"-"` DateEmbargoMonth int `xml:"-" json:"-"` DateEmbargoDay int `xml:"-" json:"-"` MediaDuration string `xml:"media_duration,omitempty" json:"media_duration,omitempty"` MediaAudioCodec string `xml:"media_audio_codec,omitempty" json:"media_audio_code,omitempty"` MediaVideoCodec string `xml:"media_video_codec,omitempty" json:"media_video_code,omitempty"` MediaWidth int `xml:"media_width,omitempty" json:"media_width,omitempty"` MediaHeight int `xml:"media_height,omitempty" json:"media_height,omitempty"` MediaAspectRatio string `xml:"media_aspect_ratio,omitempty" json:"media_aspect_ratio,omitempty"` MediaSampleStart string `xml:"media_sample_start,omitempty" json:"media_sample_start,omitempty"` MediaSampleStop string `xml:"media_sample_stop,omitempty" json:"media_sample_stop,omitempty"` Content string `xml:"content,omitempty" json:"content,omitempty"` Relation *RelationItemList `xml:"relation,omitempty" json:"relation,omitempty"` }
Document structures inside a Record (i.e. <eprint>...<documents><document>...</document>...</documents>...</eprint>)
type DocumentList ¶
type DocumentList []*Document
DocumentList is an array of pointers to Document structs
func (*DocumentList) Append ¶ added in v1.1.8
func (documentList *DocumentList) Append(document *Document) int
Append adds a document to the documents list and returns the new count of items
func (DocumentList) IndexOf ¶ added in v0.0.28
func (documentList DocumentList) IndexOf(i int) *Document
GetDocument takes a position (zero based) and returns the *Document in the DocumentList.
func (*DocumentList) Length ¶ added in v0.0.28
func (documentList *DocumentList) Length() int
Length returns the length of DocumentList
type EP3API ¶ added in v1.1.8
func (*EP3API) InitExtendedAPI ¶ added in v1.1.8
func (*EP3API) Reload ¶ added in v1.1.8
Reload performs a Shutdown and an init after re-reading in the settings.json file.
func (*EP3API) RunExtendedAPI ¶ added in v1.1.8
type EPrint ¶ added in v0.0.14
type EPrint struct { XMLName xml.Name `json:"-"` ID string `xml:"id,attr,omitempty" json:"id,omitempty"` EPrintID int `xml:"eprintid,omitempty" json:"eprint_id,omitempty"` RevNumber int `xml:"rev_number,omitempty" json:"rev_number,omitempty"` Documents *DocumentList `xml:"documents>document,omitempty" json:"documents,omitempty"` EPrintStatus string `xml:"eprint_status,omitempty" json:"eprint_status,omitempty"` UserID int `xml:"userid,omitempty" json:"userid,omitempty"` Dir string `xml:"dir,omitempty" json:"dir,omitempty"` Datestamp string `xml:"datestamp,omitempty" json:"datestamp,omitempty"` DatestampYear int `xml:"-" json:"-"` DatestampMonth int `xml:"-" json:"-"` DatestampDay int `xml:"-" json:"-"` DatestampHour int `xml:"-" json:"-"` DatestampMinute int `xml:"-" json:"-"` DatestampSecond int `xml:"-" json:"-"` LastModified string `xml:"lastmod,omitempty" json:"lastmod,omitempty"` LastModifiedYear int `xml:"-" json:"-"` LastModifiedMonth int `xml:"-" json:"-"` LastModifiedDay int `xml:"-" json:"-"` LastModifiedHour int `xml:"-" json:"-"` LastModifiedMinute int `xml:"-" json:"-"` LastModifiedSecond int `xml:"-" json:"-"` StatusChanged string `xml:"status_changed,omitempty" json:"status_changed,omitempty"` StatusChangedYear int `xml:"-" json:"-"` StatusChangedMonth int `xml:"-" json:"-"` StatusChangedDay int `xml:"-" json:"-"` StatusChangedHour int `xml:"-" json:"-"` StatusChangedMinute int `xml:"-" json:"-"` StatusChangedSecond int `xml:"-" json:"-"` Type string `xml:"type,omitempty" json:"type,omitempty"` MetadataVisibility string `xml:"metadata_visibility,omitempty" json:"metadata_visibility,omitempty"` Creators *CreatorItemList `xml:"creators,omitempty" json:"creators,omitempty"` Title string `xml:"title,omitempty" json:"title,omitempty"` IsPublished string `xml:"ispublished,omitempty" json:"ispublished,omitempty"` FullTextStatus string `xml:"full_text_status,omitempty" json:"full_text_status,omitempty"` Keywords string `xml:"keywords,omitempty" json:"keywords,omitempty"` //Keyword *KeywordItemList `xml:"-" json:""` Note string `xml:"note,omitempty" json:"note,omitempty"` Abstract string `xml:"abstract,omitempty" json:"abstract,omitempty"` Date string `xml:"date,omitempty" json:"date,omitempty"` DateYear int `xml:"-" json:"-"` DateMonth int `xml:"-" json:"-"` DateDay int `xml:"-" json:"-"` DateType string `xml:"date_type,omitempty" json:"date_type,omitempty"` Series string `xml:"series,omitempty" json:"series,omitempty"` Publication string `xml:"publication,omitempty" json:"publication,omitempty"` Volume string `xml:"volume,omitempty" json:"volume,omitempty"` Number string `xml:"number,omitempty" json:"number,omitempty"` Publisher string `xml:"publisher,omitempty" json:"publisher,omitempty"` PlaceOfPub string `xml:"place_of_pub,omitempty" json:"place_of_pub,omitempty"` Edition string `xml:"edition,omitempty" json:"edition,omitempty"` PageRange string `xml:"pagerange,omitempty" json:"pagerange,omitempty"` Pages int `xml:"pages,omitempty" json:"pages,omitempty"` EventType string `xml:"event_type,omitempty" json:"event_type,omitempty"` EventTitle string `xml:"event_title,omitempty" json:"event_title,omitempty"` EventLocation string `xml:"event_location,omitempty" json:"event_location,omitempty"` EventDates string `xml:"event_dates,omitempty" json:"event_dates,omitempty"` IDNumber string `xml:"id_number,omitempty" json:"id_number,omitempty"` Refereed string `xml:"refereed,omitempty" json:"refereed,omitempty"` ISBN string `xml:"isbn,omitempty" json:"isbn,omitempty"` ISSN string `xml:"issn,omitempty" json:"issn,omitempty"` BookTitle string `xml:"book_title,omitempty" json:"book_title,omitempty"` Editors *EditorItemList `xml:"editors,omitempty" json:"editors,omitempty"` OfficialURL string `xml:"official_url,omitempty" json:"official_url,omitempty"` AltURL string `xml:"alt_url,omitempty" json:"alt_url,omitempty"` RelatedURL *RelatedURLItemList `xml:"related_url,omitempty" json:"related_url,omitempty"` ReferenceText *ReferenceTextItemList `xml:"referencetext,omitempty" json:"referencetext,omitempty"` Projects *ProjectItemList `xml:"projects,omitempty" json:"projects,omitempty"` Rights string `xml:"rights,omitempty" json:"rights,omitempty"` Funders *FunderItemList `xml:"funders,omitempty" json:"funders,omitempty"` Collection string `xml:"collection,omitempty" json:"collection,omitempty"` Reviewer string `xml:"reviewer,omitempty" json:"reviewer,omitempty"` OfficialCitation string `xml:"official_cit,omitempty" json:"official_cit,omitempty"` OtherNumberingSystem *OtherNumberingSystemItemList `xml:"other_numbering_system,omitempty" json:"other_numbering_system,omitempty"` LocalGroup *LocalGroupItemList `xml:"local_group,omitempty" json:"local_group,omitempty"` ErrataText string `xml:"errata,omitempty" json:"errata,omitempty"` Contributors *ContributorItemList `xml:"contributors,omitempty" json:"contributors,omitempty"` MonographType string `xml:"monograph_type,omitempty" json:"monograph_type,omitempty"` // Caltech Library uses suggestions as an internal note field (RSD, 2018-02-15) Suggestions string `xml:"suggestions,omitempty" json:"suggestions,omitempty"` // Deposited By from user table, assemble a name string (E.g. Ruth Sustaita) DepositedBy string `xml:"-" json:"deposited_by,omitempty"` // Deposited On is from the datestamp_* fields brining together as a sngle timetstamp string that includes hour, minute as well as date. DepositedOn string `xml:"-" json:"deposited_on,omitempty"` // CaletchLN has a "coverage_dates" field in the eprint table. CoverageDates string `xml:"coverage_dates,omitempty" json:"coverage_dates,omitempty"` // NOTE: Misc fields discoverd exploring REST API records, not currently used at Caltech Library (RSD, 2018-01-02) Subjects *SubjectItemList `xml:"subjects,omitempty" json:"subjects,omitempty"` PresType string `xml:"pres_type,omitempty" json:"presentation_type,omitempty"` Succeeds int `xml:"succeeds,omitempty" json:"succeeds,omitempty"` Commentary int `xml:"commentary,omitempty" json:"commentary,omitempty"` ContactEMail string `xml:"contact_email,omitempty" json:"contect_email,omitempty"` // NOTE: EPrints XML doesn't include fileinfo FileInfo string `xml:"-" json:"-"` Latitude float64 `xml:"latitude,omitempty" json:"latitude,omitempty"` Longitude float64 `xml:"longitude,omitempty" json:"longitude,omitempty"` ItemIssues *ItemIssueItemList `xml:"item_issues,omitempty" json:"item_issues,omitempty"` ItemIssuesCount int `xml:"item_issues_count,omitempty" json:"item_issues_count,omitempty"` CorpCreators *CorpCreatorItemList `xml:"corp_creators,omitempty" json:"corp_creators,omitempty"` CorpContributors *CorpContributorItemList `xml:"corp_contributors,omitempty" json:"corp_contributors,omitempty"` Department string `xml:"department,omitempty" json:"department,omitempty"` OutputMedia string `xml:"output_media,omitempty" json:"output_media,omitempty"` Exhibitors *ExhibitorItemList `xml:"exhibitors,omitempty" json:"exhibitors,omitempty"` NumPieces int `xml:"num_pieces,omitempty" json:"num_pieces,omitempty"` CompositionType string `xml:"composition_type,omitempty" json:"composition_type,omitempty"` Producers *ProducerItemList `xml:"producers,omitempty" json:"producers,omitempty"` Conductors *ConductorItemList `xml:"conductors,omitempty" json:"conductors,omitempty"` Lyricists *LyricistItemList `xml:"lyricists,omitempty" json:"lyricists,omitempty"` Accompaniment *AccompanimentItemList `xml:"accompaniment,omitempty" json:"accompaniment,omitempty"` DataType string `xml:"data_type,omitempty" json:"data_type,omitempty"` PedagogicType string `xml:"pedagogic_type,omitempty" json:"pedagogic_type,omitempty"` CompletionTime string `xml:"completion_time,omitempty" json:"completion_time,omitempty"` TaskPurpose string `xml:"task_purpose,omitempty" json:"task_purpose,omitempty"` SkillAreas *SkillAreaItemList `xml:"skill_areas,omitempty" json:"skill_areas,omitempty"` CopyrightHolders *CopyrightHolderItemList `xml:"copyright_holders,omitempty" json:"copyright_holders,omitempty"` LearningLevelText string `xml:"learning_level,omitempty" json:"learning_level,omitempty"` //LearningLevel *LearningLevelItemList `xml:"-" json:"-"` DOI string `xml:"doi,omitempty" json:"doi,omitempty"` PMCID string `xml:"pmc_id,omitempty" json:"pmcid,omitempty"` PMID string `xml:"pmid,omitempty" json:"pmid,omitempty"` ParentURL string `xml:"parent_url,omitempty" json:"parent_url,omitempty"` Reference *ReferenceItemList `xml:"reference,omitempty" json:"reference,omitempty"` ConfCreators *ConfCreatorItemList `xml:"conf_creators,omitempty" json:"conf_creators,omitempty"` AltTitle *AltTitleItemList `xml:"alt_title,omitempty" json:"alt_title,omitempty"` TOC string `xml:"toc,omitempty" json:"toc,omitempty"` Interviewer string `xml:"interviewer,omitempty" json:"interviewer,omitempty"` InterviewDate string `xml:"interviewdate,omitempty" json:"interviewdate,omitempty"` //GScholar *GScholarItemList `xml:"gscholar,omitempty" json:"gscholar,omitempty"` NonSubjKeywords string `xml:"nonsubj_keywords,omitempty" json:"nonsubj_keywords,omitempty"` Season string `xml:"season,omitempty" json:"season,omitempty"` ClassificationCode string `xml:"classification_code,omitempty" json:"classification_code,omitempty"` Shelves *ShelfItemList `xml:"shelves,omitempty" json:"shelves,omitempty"` Relation *RelationItemList `xml:"relation,omitempty" json:"relation,omitempty"` // NOTE: Sword deposit fields SwordDepository string `xml:"sword_depository,omitempty" json:"sword_depository,omitempty"` SwordDepositor int `xml:"sword_depositor,omitempty" json:"sword_depositor,omitempty"` SwordSlug string `xml:"sword_slug,omitempty" json:"sword_slug,omitempty"` ImportID int `xml:"importid,omitempty" json:"import_id,omitempty"` // Patent related fields PatentApplicant string `xml:"patent_applicant,omitempty" json:"patent_applicant,omitempty"` PatentNumber string `xml:"patent_number,omitempty" json:"patent_number,omitempty"` PatentAssignee *PatentAssigneeItemList `xml:"patent_assignee,omitempty" json:"patent_assignee,omitempty"` PatentClassificationText string `xml:"-" json:"-"` //PatentClassification *PatentClassificationItemList `xml:"patent_classification,omitempty" json:"patent_classification,omitempty"` RelatedPatents *RelatedPatentItemList `xml:"related_patents,omitempty" json:"related_patents,omitempty"` // Thesis oriented fields Divisions *DivisionItemList `xml:"divisions,omitemmpty" json:"divisions,omitempty"` Institution string `xml:"institution,omitempty" json:"institution,omitempty"` ThesisType string `xml:"thesis_type,omitempty" json:"thesis_type,omitempty"` ThesisAdvisor *ThesisAdvisorItemList `xml:"thesis_advisor,omitempty" json:"thesis_advisor,omitempty"` ThesisCommittee *ThesisCommitteeItemList `xml:"thesis_committee,omitempty" json:"thesis_committee,omitempty"` ThesisDegree string `xml:"thesis_degree,omitempty" json:"thesis_degree,omitempty"` ThesisDegreeGrantor string `xml:"thesis_degree_grantor,omitempty" json:"thesis_degree_grantor,omitempty"` ThesisDegreeDate string `xml:"thesis_degree_date,omitempty" json:"thesis_degree_date,omitempty"` ThesisDegreeDateYear int `xml:"-" json:"-"` ThesisDegreeDateMonth int `xml:"-" json:"-"` ThesisDegreeDateDay int `xml:"-" json:"-"` ThesisSubmittedDate string `xml:"thesis_submitted_date,omitempty" json:"thesis_submitted_date,omitempty"` ThesisSubmittedDateYear int `xml:"-" json:"-"` ThesisSubmittedDateMonth int `xml:"-" json:"-"` ThesisSubmittedDateDay int `xml:"-" json:"-"` ThesisDefenseDate string `xml:"thesis_defense_date,omitempty" json:"thesis_defense_date,omitempty"` ThesisDefenseDateYear int `xml:"-" json:"-"` ThesisDefenseDateMonth int `xml:"-" json:"-"` ThesisDefenseDateDay int `xml:"-" json:"-"` ThesisApprovedDate string `xml:"thesis_approved_date,omitempty" json:"thesis_approved_date,omitempty"` ThesisApprovedDateYear int `xml:"-" json:"-"` ThesisApprovedDateMonth int `xml:"-" json:"-"` ThesisApprovedDateDay int `xml:"-" json:"-"` ThesisPublicDate string `xml:"thesis_public_date,omitempty" json:"thesis_public_date,omitempty"` ThesisPublicDateYear int `xml:"-" json:"-"` ThesisPublicDateMonth int `xml:"-" json:"-"` ThesisPublicDateDay int `xml:"-" json:"-"` ThesisAuthorEMail string `xml:"thesis_author_email,omitempty" json:"thesis_author_email,omitempty"` HideThesisAuthorEMail string `xml:"hide_thesis_author_email,omitempty" json:"hide_thesis_author_email,omitempty"` // NOTE: GradOfficeApproval isn't output by CaltechTHESIS. GradOfficeApprovalDate string `xml:"gradofc_approval_date,omitempty" json:"gradofc_approval_date,omitempty"` GradOfficeApprovalDateYear int `xml:"-" json:"-"` GradOfficeApprovalDateMonth int `xml:"-" json:"-"` GradOfficeApprovalDateDay int `xml:"-" json:"-"` ThesisAwards string `xml:"thesis_awards,omitempty" json:"thesis_awards,omitempty"` ReviewStatus string `xml:"review_status,omitempty" json:"review_status,omitempty"` OptionMajor *OptionMajorItemList `xml:"option_major,omitempty" json:"option_major,omitempty"` OptionMinor *OptionMinorItemList `xml:"option_minor,omitempty" json:"option_minor,omitempty"` CopyrightStatement string `xml:"copyright_statement,omitempty" json:"copyright_statement,omitempty"` // Custom fields from some EPrints repositories Source string `xml:"source,omitempty" json:"source,omitempty"` ReplacedBy int `xml:"replacedby,omitempty" json:"replacedby,omitempty"` // Edit Control Fields EditLockUser int `xml:"-" json:"-"` EditLockSince int `xml:"-" json:"-"` EditLockUntil int `xml:"-" json:"-"` // Fields identified through harvesting. //ReferenceTextString string `xml:"referencetext,omitempty" json:"referencetext,omitempty"` Language string `xml:"language,omitempty" json:"language,omitempty"` // Synthetic fields are created to help in eventual migration of // EPrints field data to other JSON formats. PrimaryObject map[string]interface{} `xml:"-" json:"primary_object,omitempty"` RelatedObjects []map[string]interface{} `xml:"-" json:"related_objects,omitempty"` }
EPrint is the record contated in a EPrints XML document such as they used to store revisions.
func CrossRefWorksToEPrint ¶ added in v0.0.17
func CrossRefWorksToEPrint(obj crossrefapi.Object) (*EPrint, error)
CrossRefWorksToEPrint takes a works object from the CrossRef API and maps the fields into an EPrint struct return a new struct or error.
func DataCiteWorksToEPrint ¶ added in v0.0.17
func DataCiteWorksToEPrint(obj dataciteapi.Object) (*EPrint, error)
DataCiteWorksToEPrint takes a works object from the DataCite API and maps the fields into an EPrint struct return a new struct or error.
func SQLReadEPrint ¶ added in v1.1.8
SQLReadEPrint expects a repository map and EPrint ID and will generate a series of SELECT statements populating a new EPrint struct or return an error (e.g. "not found" if eprint id is not in repository)
func (*EPrint) IsPublic ¶ added in v1.2.2
IsPublic takes an EPrint data strucure and returns true if the record is public, false otherwise
Check if an EPrint record "is public"
func (*EPrint) SyntheticFields ¶ added in v0.0.52
func (e *EPrint) SyntheticFields()
SyntheticFields renders analyzes an EPrint object and populates or updates any synthetic fields like primary_object and related_object.
type EPrintUser ¶ added in v1.1.8
type EPrintUser struct { XMLName xml.Name `xml:"user" json:"-"` UserID int `xml:"userid" json:"userid"` Username string `xml:"username" json:"username"` Type string `xml:"type" json:"type"` Name *Name `xml:"name,omitempty" json:"name,omitempty"` EMail string `xml:"email,omitempty" json:"email,omitempty"` HideEMail bool `xml:"hideemail,omitempty" json:"hideemail,omitempty"` Joined string `xml:"joined,omitempty" json:"joined,omitempty"` Dept string `xml:"dept,omitempty" json:"dept,omitempty"` Org string `xml:"org,omitempty" json:"org,omitempty"` Address string `xml:"address,omitempty" json:"address,omitempty"` Country string `xml:"country,omitempty" json:"country,omitempty"` }
EPrintUser is a struct for representing a user in a EPrint repository. NOTE: it does not represent all user fields and attributes.
func GetUserBy ¶ added in v1.1.8
func GetUserBy(config *Config, repoID string, queryField string, queryValue interface{}) (*EPrintUser, error)
GetUserBy takes a field name (e.g. userid, username) and value and returns an EPrintUser object.
func SQLReadUser ¶ added in v1.1.8
func SQLReadUser(config *Config, repoID string, userid int) (*EPrintUser, error)
type EPrints ¶ added in v0.0.14
type EPrints struct { XMLName xml.Name `xml:"eprints" json:"-"` XMLNS string `xml:"xmlns,attr,omitempty" json:"xmlns,omitempty"` EPrint []*EPrint `xml:"eprint" json:"eprint"` }
EPrints is the high level XML you get from the REST API. E.g. curl -L -O https://eprints3.example.org/rest/eprint/1234.xml Then parse the 1234.xml document stucture.
func NewEPrints ¶ added in v1.1.8
func NewEPrints() *EPrints
NewEPrints returns a *EPrint with the name space set.
func (*EPrints) Append ¶ added in v1.1.8
Append an EPrint struct to an EPrints struct returning the count of attached eprints
type EPrintsDataSet ¶ added in v0.0.14
type EPrintsDataSet struct { XMLName xml.Name `xml:"html" json:"-"` Paths []string `xml:"body>ul>li>a,omitempty" json:"paths"` }
EPrintsDataSet is a struct for parsing the HTML page that returns a list of available EPrint IDs with links.
func (EPrintsDataSet) MarshalJSON ¶ added in v0.0.14
func (epds EPrintsDataSet) MarshalJSON() ([]byte, error)
MarshalJSON() renders the EPrintsDataSet HTML/XML as a list of ids
type EditorItemList ¶ added in v0.0.14
type EditorItemList struct { XMLName xml.Name `xml:"editors" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
EditorItemList holds a list of editors
func (*EditorItemList) Append ¶ added in v1.1.8
func (itemList *EditorItemList) Append(item *Item) int
Append adds an item to the Editor item list and returns the new count of items
func (*EditorItemList) GetIDs ¶ added in v1.2.2
func (itemList *EditorItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*EditorItemList) IndexOf ¶ added in v1.1.8
func (itemList *EditorItemList) IndexOf(i int) *Item
IndexOf() returns an item in the list or nil
func (*EditorItemList) Init ¶ added in v1.3.7
func (itemList *EditorItemList) Init()
Init will initilize the Items array attribute of List
func (*EditorItemList) Length ¶ added in v1.1.8
func (itemList *EditorItemList) Length() int
Length() returns the number of items in the list
func (*EditorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *EditorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ExhibitorItemList ¶ added in v0.0.14
type ExhibitorItemList struct { XMLName xml.Name `xml:"exhibitors" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ExhibitorItemList
func (*ExhibitorItemList) Append ¶ added in v1.1.8
func (itemList *ExhibitorItemList) Append(item *Item) int
Append adds an item to the exhibitor item list and returns the new count of items
func (*ExhibitorItemList) IndexOf ¶ added in v1.1.8
func (itemList *ExhibitorItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*ExhibitorItemList) Init ¶ added in v1.3.7
func (itemList *ExhibitorItemList) Init()
Init will initilize the Items array attribute of List
func (*ExhibitorItemList) Length ¶ added in v1.1.8
func (itemList *ExhibitorItemList) Length() int
Length returns count of items
func (*ExhibitorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ExhibitorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type File ¶
type File struct { XMLName xml.Name `json:"-"` ID string `xml:"id,attr" json:"id"` FileID int `xml:"fileid" json:"fileid"` DatasetID string `xml:"datasetid" json:"datasetid"` ObjectID int `xml:"objectid" json:"objectid"` Filename string `xml:"filename" json:"filename"` MimeType string `xml:"mime_type" json:"mime_type"` Hash string `xml:"hash,omitempty" json:"hash,omitempty"` HashType string `xml:"hash_type,omitempty" json:"hash_type,omitempty"` FileSize int `xml:"filesize" json:"filesize"` MTime string `xml:"mtime" json:"mtime"` MTimeYear int `xml:"-" json:"-"` MTimeMonth int `xml:"-" json:"-"` MTimeDay int `xml:"-" json:"-"` MTimeHour int `xml:"-" json:"-"` MTimeMinute int `xml:"-" json:"-"` MTimeSecond int `xml:"-" json:"-"` URL string `xml:"url" json:"url"` // Additional fields found with working with our smaller repositories PronomID string `xml:"pronomid,omitempty" json:"pronomID,omitempty"` ClassificationDateYear int `xml:"classification_date_year,omitempty" json:"classification_date_year,omitempty"` ClassificationDateMonth int `xml:"classification_date_month,omitempty" json:"classification_date_month,omitempty"` ClassificationDateDay int `xml:"classification_date_day,omitempty" json:"classification_date_day,omitempty"` ClassificationDateHour int `xml:"classification_date_hour,omitempty" json:"classification_date_hour,omitempty"` ClassificationDateMinute int `xml:"classification_date_minute,omitempty" json:"classification_date_minute,omitempty"` ClassificationDateSecond int `xml:"classification_date_second,omitempty" json:"classification_date_second,omitempty"` ClassificationQuality string `xml:"classification_quality,omitempty" json:"classification_quality,omitempty"` }
File structures in Document
type FunderItemList ¶ added in v0.0.14
type FunderItemList struct { XMLName xml.Name `xml:"funders" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
FunderItemList
func (*FunderItemList) Append ¶ added in v1.1.8
func (itemList *FunderItemList) Append(item *Item) int
Append adds an item to the funder item list and returns the new count of items
func (*FunderItemList) IndexOf ¶ added in v1.1.8
func (itemList *FunderItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*FunderItemList) Init ¶ added in v1.3.7
func (itemList *FunderItemList) Init()
Init will initilize the Items array attribute of List
func (*FunderItemList) Length ¶ added in v1.1.8
func (itemList *FunderItemList) Length() int
Length of item list
func (*FunderItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *FunderItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type GScholarItemList ¶ added in v0.0.14
type GScholarItemList struct { XMLName xml.Name `xml:"gscholar" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
GScholarItemList
func (*GScholarItemList) Append ¶ added in v1.1.8
func (itemList *GScholarItemList) Append(item *Item) int
Append adds an item to the gScholar item list and returns the new count of items
func (*GScholarItemList) IndexOf ¶ added in v1.1.8
func (itemList *GScholarItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*GScholarItemList) Init ¶ added in v1.3.7
func (itemList *GScholarItemList) Init()
Init will initilize the Items array attribute of List
func (*GScholarItemList) Length ¶ added in v1.1.8
func (itemList *GScholarItemList) Length() int
Length return item count
func (*GScholarItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *GScholarItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type Group ¶ added in v1.2.2
type Group struct { GroupID string `json:"key"` Name string `json:"name,omitempty"` Alternative string `json:"alternative"` EMail string `json:"email,omitempty"` Date string `json:"date,omitempty"` Description string `json:"description,omitempty"` Start string `json:"start,omitempty"` ApproxStart string `json:"approx_start,omitempty"` Activity string `json:"activity,omitempty"` End string `json:"end,omitempty"` ApproxEnd string `json:"approx_end,omitempty"` Website string `json:"website,omitempty"` PI string `json:"pi,omitempty"` Parent string `json:"parent,omitempty"` Prefix string `json:"prefix,omitempty"` GRID string `json:"grid,omitempty"` ISNI string `json:"isni,omitempty"` RinGold string `json:"ringold,omitempty"` VIAF string `json:"viaf,omitempty"` ROR string `json:"ror,omitempty"` Updated time.Time `json:"updated,omitempty"` }
Group holds the data structure presenting the group information and the crossswalk IDs maintained in groups.csv
type Item ¶ added in v0.0.14
type Item struct { XMLName xml.Name `xml:"item" json:"-"` Name *Name `xml:"name,omitempty" json:"name,omitempty"` Pos int `xml:"-" json:"-"` ID string `xml:"id,omitempty" json:"id,omitempty"` EMail string `xml:"email,omitempty" json:"email,omitempty"` ShowEMail string `xml:"show_email,omitempty" json:"show_email,omitempty"` Role string `xml:"role,omitempty" json:"role,omitempty"` URL string `xml:"url,omitempty" json:"url,omitempty"` Type string `xml:"type,omitempty" json:"type,omitempty"` Description string `xml:"description,omitempty" json:"description,omitempty"` Agency string `xml:"agency,omitempty" json:"agency,omitempty"` GrantNumber string `xml:"grant_number,omitempty" json:"grant_number,omitempty"` URI string `xml:"uri,omitempty" json:"uri,omitempty"` ORCID string `xml:"orcid,omitempty" json:"orcid,omitempty"` ROR string `xml:"ror,omitempty" json:"ror,omitempty"` Timestamp string `xml:"timestamp,omitempty" json:"timestamp,omitempty"` Status string `xml:"status,omitempty" json:"status,omitempty"` ReportedBy string `xml:"reported_by,omitempty" json:"reported_by,omitempty"` ResolvedBy string `xml:"resolved_by,omitempty" json:"resolved_by,omitempty"` Comment string `xml:"comment,omitempty" json:"comment,omitempty"` Value string `xml:",chardata" json:"value,omitempty"` }
Item is a generic type used by various fields (e.g. Creator, Division, OptionMajor)
func (*Item) MarshalJSON ¶ added in v0.0.14
MarshalJSON() is a custom JSON marshaler for Item
func (*Item) SetAttribute ¶ added in v1.1.8
SetAttribute takes a lower case string and value and sets the attribute of the related item.
func (*Item) UnmarshalJSON ¶ added in v0.0.33
type ItemIssueItemList ¶ added in v0.0.14
type ItemIssueItemList struct { XMLName xml.Name `xml:"item_issues" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ItemIssueItemList
func (*ItemIssueItemList) Append ¶ added in v1.1.8
func (itemList *ItemIssueItemList) Append(item *Item) int
Append adds an item to the issue item list and returns the new count of items
func (*ItemIssueItemList) IndexOf ¶ added in v1.1.8
func (itemList *ItemIssueItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*ItemIssueItemList) Init ¶ added in v1.3.7
func (itemList *ItemIssueItemList) Init()
Init will initilize the Items array attribute of List
func (*ItemIssueItemList) Length ¶ added in v1.1.8
func (itemList *ItemIssueItemList) Length() int
Lengths returns the number of items in the list
func (*ItemIssueItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ItemIssueItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ItemsInterface ¶ added in v1.1.8
type ItemsInterface interface { // Init will initialize the item interface element (e.g. initialize .Items array) Init() // Append an item to an ItemList Append(*Item) int // Length returns the item count Length() int // IndexOf returns Item or nil IndexOf(int) *Item // SetAttributOf at index position sets an item's attribute SetAttributeOf(int, string, interface{}) bool }
ItemsInterface describes a common set of operations on an item list.
type KeywordItemList ¶ added in v1.1.8
type KeywordItemList struct { XMLName xml.Name `xml:"keywords" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
KeywordItemList
func (*KeywordItemList) Append ¶ added in v1.1.8
func (itemList *KeywordItemList) Append(item *Item) int
Append adds an item to the subject item list and returns the new count of items
func (*KeywordItemList) IndexOf ¶ added in v1.1.8
func (itemList *KeywordItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*KeywordItemList) Init ¶ added in v1.3.7
func (itemList *KeywordItemList) Init()
Init will initilize the Items array attribute of List
func (*KeywordItemList) Length ¶ added in v1.1.8
func (itemList *KeywordItemList) Length() int
Length returns number of items in list
func (*KeywordItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *KeywordItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type LearningLevelItemList ¶ added in v0.0.14
type LearningLevelItemList struct { XMLName xml.Name `xml:"learning_level" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
LearningLevelItemList
func (*LearningLevelItemList) Append ¶ added in v1.1.8
func (itemList *LearningLevelItemList) Append(item *Item) int
Append adds an item to the learningLevel item list and returns the new count of items
func (*LearningLevelItemList) IndexOf ¶ added in v1.1.8
func (itemList *LearningLevelItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*LearningLevelItemList) Init ¶ added in v1.3.7
func (itemList *LearningLevelItemList) Init()
Init will initilize the Items array attribute of List
func (*LearningLevelItemList) Length ¶ added in v1.1.8
func (itemList *LearningLevelItemList) Length() int
Length return item count
func (*LearningLevelItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *LearningLevelItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type LocalGroupItemList ¶ added in v0.0.14
type LocalGroupItemList struct { XMLName xml.Name `xml:"local_group" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
LocalGroupItemList holds the related URLs (e.g. doi, aux material doi)
func (*LocalGroupItemList) Append ¶ added in v1.1.8
func (itemList *LocalGroupItemList) Append(item *Item) int
Append adds an item to the local group item list and returns the new count of items
func (*LocalGroupItemList) GetGroups ¶ added in v1.2.2
func (itemList *LocalGroupItemList) GetGroups() []string
GetGroups returns a slice of string with local_group values
func (*LocalGroupItemList) IndexOf ¶ added in v1.1.8
func (itemList *LocalGroupItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*LocalGroupItemList) Init ¶ added in v1.3.7
func (itemList *LocalGroupItemList) Init()
Init will initilize the Items array attribute of List
func (*LocalGroupItemList) Length ¶ added in v1.1.8
func (itemList *LocalGroupItemList) Length() int
Length returns length of item list
func (*LocalGroupItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *LocalGroupItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type LyricistItemList ¶ added in v0.0.14
type LyricistItemList struct { XMLName xml.Name `xml:"lyricists" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
LyricistItemList
func (*LyricistItemList) Append ¶ added in v1.1.8
func (itemList *LyricistItemList) Append(item *Item) int
Append adds an item to the lyricist item list and returns the new count of items
func (*LyricistItemList) IndexOf ¶ added in v1.1.8
func (itemList *LyricistItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*LyricistItemList) Init ¶ added in v1.3.7
func (itemList *LyricistItemList) Init()
Init will initilize the Items array attribute of List
func (*LyricistItemList) Length ¶ added in v1.1.8
func (itemList *LyricistItemList) Length() int
Length return count of items
func (*LyricistItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *LyricistItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type Name ¶ added in v0.0.14
type Name struct { XMLName xml.Name `json:"-"` Family string `xml:"family,omitempty" json:"family,omitempty"` Given string `xml:"given,omitempty" json:"given,omitempty"` ID string `xml:"id,omitempty" json:"id,omitempty"` ORCID string `xml:"orcid,omitempty" json:"orcid,omitempty"` Honourific string `xml:"honourific,omitempty" json:"honourific,omitempty"` Lineage string `xml:"lineage,omitempty" json:"lineage,omitempty"` Value string `xml:",chardata" json:"value,omitempty"` }
Name handles the "name" types found in Items.
func (*Name) MarshalJSON ¶ added in v0.0.14
MarshalJSON() is a custom JSON marshaler for Name
func (*Name) SetAttribute ¶ added in v1.1.8
type OptionMajorItemList ¶ added in v0.0.14
type OptionMajorItemList struct { XMLName xml.Name `xml:"option_major" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
OptionMajorItemList
func (*OptionMajorItemList) Append ¶ added in v1.1.8
func (itemList *OptionMajorItemList) Append(item *Item) int
Append adds an item to the option major item list and returns the new count of items
func (*OptionMajorItemList) GetOptions ¶ added in v1.2.2
func (itemList *OptionMajorItemList) GetOptions() []string
GetOptions returns a slice of options
func (*OptionMajorItemList) IndexOf ¶ added in v1.1.8
func (itemList *OptionMajorItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*OptionMajorItemList) Init ¶ added in v1.3.7
func (itemList *OptionMajorItemList) Init()
Init will initilize the Items array attribute of List
func (*OptionMajorItemList) Length ¶ added in v1.1.8
func (itemList *OptionMajorItemList) Length() int
Length return count of items
func (*OptionMajorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *OptionMajorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type OptionMinorItemList ¶ added in v1.0.2
type OptionMinorItemList struct { XMLName xml.Name `xml:"option_minor" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
OptionMinorItemList
func (*OptionMinorItemList) Append ¶ added in v1.1.8
func (itemList *OptionMinorItemList) Append(item *Item) int
Append adds an item to the option minor item list and returns the new count of items
func (*OptionMinorItemList) GetOptions ¶ added in v1.2.2
func (itemList *OptionMinorItemList) GetOptions() []string
GetOptions returns a slice of options
func (*OptionMinorItemList) IndexOf ¶ added in v1.1.8
func (itemList *OptionMinorItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*OptionMinorItemList) Init ¶ added in v1.3.7
func (itemList *OptionMinorItemList) Init()
Init will initilize the Items array attribute of List
func (*OptionMinorItemList) Length ¶ added in v1.1.8
func (itemList *OptionMinorItemList) Length() int
Length return count of items
func (*OptionMinorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *OptionMinorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type OtherNumberingSystemItemList ¶ added in v0.0.14
type OtherNumberingSystemItemList struct { XMLName xml.Name `xml:"other_numbering_system" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
OtherNumberingSystemItemList
func (*OtherNumberingSystemItemList) Append ¶ added in v1.1.8
func (itemList *OtherNumberingSystemItemList) Append(item *Item) int
Append adds an item to the other numbering system item list and returns the new count of items
func (*OtherNumberingSystemItemList) IndexOf ¶ added in v1.1.8
func (itemList *OtherNumberingSystemItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*OtherNumberingSystemItemList) Init ¶ added in v1.3.7
func (itemList *OtherNumberingSystemItemList) Init()
Init will initilize the Items array attribute of List
func (*OtherNumberingSystemItemList) Length ¶ added in v1.1.8
func (itemList *OtherNumberingSystemItemList) Length() int
Length returns the length of the item
func (*OtherNumberingSystemItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *OtherNumberingSystemItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type PatentAssigneeItemList ¶ added in v0.0.14
type PatentAssigneeItemList struct { XMLName xml.Name `xml:"patent_assignee" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
PatentAssigneeItemList
func (*PatentAssigneeItemList) Append ¶ added in v1.1.8
func (itemList *PatentAssigneeItemList) Append(item *Item) int
Append adds an item to the patent assignee item list and returns the new count of items
func (*PatentAssigneeItemList) IndexOf ¶ added in v1.1.8
func (itemList *PatentAssigneeItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*PatentAssigneeItemList) Init ¶ added in v1.3.7
func (itemList *PatentAssigneeItemList) Init()
Init will initilize the Items array attribute of List
func (*PatentAssigneeItemList) Length ¶ added in v1.1.8
func (itemList *PatentAssigneeItemList) Length() int
Length return item count
func (*PatentAssigneeItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *PatentAssigneeItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type PatentClassificationItemList ¶ added in v0.0.14
type PatentClassificationItemList struct { XMLName xml.Name `xml:"patent_classification" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
PatentClassificationItemList
func (*PatentClassificationItemList) Append ¶ added in v1.1.8
func (itemList *PatentClassificationItemList) Append(item *Item) int
Append adds an item to the patent classification item list and returns the new count of items
func (*PatentClassificationItemList) IndexOf ¶ added in v1.1.8
func (itemList *PatentClassificationItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*PatentClassificationItemList) Init ¶ added in v1.3.7
func (itemList *PatentClassificationItemList) Init()
Init will initilize the Items array attribute of List
func (*PatentClassificationItemList) Length ¶ added in v1.1.8
func (itemList *PatentClassificationItemList) Length() int
Length return an item count
func (*PatentClassificationItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *PatentClassificationItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type Person ¶
type Person struct { PersonID string `json:"id"` CLPeopleID string `json:"cl_people_id,omitempty"` FamilyName string `json:"family_name,omitempty"` GivenName string `json:"given_name,omitempty"` SortName string `json:"sort_name,omitempty"` ThesisID string `json:"thesis_id,omitempty"` AdvisorID string `json:"advisor_id,omitempty"` AuthorsID string `json:"authors_id,omitempty"` ArchivesSpaceID string `json:"archivesspace_id,omitempty"` DirectoryID string `json:"directory_id,omitempty"` VIAF string `json:"viaf_id,omitempty"` LCNAF string `json:"lcnaf,omitempty"` ISNI string `json:"isni,omitempty"` Wikidata string `json:"wikidata,omitempty"` SNAC string `json:"snac,omitempty"` ORCID string `json:"orcid,omitempty"` Image string `json:"image,omitempty"` EducatedAt string `json:"educated_at,omitempty"` Caltech bool `json:"caltech,omitempty"` JPL bool `json:"jpl,omitempty"` Faculty bool `json:"faculty,omitempty"` Alumn bool `json:"alumn,omitempty"` Status string `json:"status,omitempty"` DirectoryPersonType string `json:"directory_person_type,omitempty"` Title string `json:"title,omitempty"` Bio string `json:"bio,omitempty"` Division string `json:"division,omitempty"` Updated time.Time `json:"updated"` }
Person holds the data structure representing the general person information and the crosswalk IDs maintained in the people.csv file.
type ProducerItemList ¶ added in v0.0.14
type ProducerItemList struct { XMLName xml.Name `xml:"producers" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ProducerItemList
func (*ProducerItemList) Append ¶ added in v1.1.8
func (itemList *ProducerItemList) Append(item *Item) int
Append adds an item to the producer item list and returns the new count of items
func (*ProducerItemList) IndexOf ¶ added in v1.1.8
func (itemList *ProducerItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*ProducerItemList) Init ¶ added in v1.3.7
func (itemList *ProducerItemList) Init()
Init will initilize the Items array attribute of List
func (*ProducerItemList) Length ¶ added in v1.1.8
func (itemList *ProducerItemList) Length() int
Length return count of items
func (*ProducerItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ProducerItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ProjectItemList ¶ added in v0.0.14
type ProjectItemList struct { XMLName xml.Name `xml:"projects" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ProjectItemList
func (*ProjectItemList) Append ¶ added in v1.1.8
func (itemList *ProjectItemList) Append(item *Item) int
Append adds an item to the project item list and returns the new count of items
func (*ProjectItemList) IndexOf ¶ added in v1.1.8
func (itemList *ProjectItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*ProjectItemList) Init ¶ added in v1.3.7
func (itemList *ProjectItemList) Init()
Init will initilize the Items array attribute of List
func (*ProjectItemList) Length ¶ added in v1.1.8
func (itemList *ProjectItemList) Length() int
Length() returns the length of the item list
func (*ProjectItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ProjectItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ReferenceItemList ¶ added in v0.0.14
type ReferenceItemList struct { XMLName xml.Name `xml:"reference" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ReferenceItemList
func (*ReferenceItemList) Append ¶ added in v1.1.8
func (itemList *ReferenceItemList) Append(item *Item) int
Append adds an item to the reference item list and returns the new count of items
func (*ReferenceItemList) IndexOf ¶ added in v1.1.8
func (itemList *ReferenceItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*ReferenceItemList) Init ¶ added in v1.3.7
func (itemList *ReferenceItemList) Init()
Init will initilize the Items array attribute of List
func (*ReferenceItemList) Length ¶ added in v1.1.8
func (itemList *ReferenceItemList) Length() int
Length return item count
func (*ReferenceItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ReferenceItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ReferenceTextItemList ¶ added in v0.0.14
type ReferenceTextItemList struct { XMLName xml.Name `xml:"referencetext" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ReferenceTextItemList
func (*ReferenceTextItemList) Append ¶ added in v1.1.8
func (itemList *ReferenceTextItemList) Append(item *Item) int
Append adds an item to the reference text url item list and returns the new count of items
func (*ReferenceTextItemList) IndexOf ¶ added in v1.1.8
func (itemList *ReferenceTextItemList) IndexOf(i int) *Item
IndexOf returns an Item or nil
func (*ReferenceTextItemList) Init ¶ added in v1.3.7
func (itemList *ReferenceTextItemList) Init()
Init will initilize the Items array attribute of List
func (*ReferenceTextItemList) Length ¶ added in v1.1.8
func (itemList *ReferenceTextItemList) Length() int
Length returns the length of an ReferenceTextItemList
func (*ReferenceTextItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ReferenceTextItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
func (*ReferenceTextItemList) UnmarshalJSON ¶ added in v0.0.32
func (itemList *ReferenceTextItemList) UnmarshalJSON(src []byte) error
UnmarshJSON takes a reference text list of item and returns an appropriately values to assigned struct.
type RelatedPatentItemList ¶ added in v0.0.14
type RelatedPatentItemList struct { XMLName xml.Name `xml:"related_patents" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
RelatedPatentItemList
func (*RelatedPatentItemList) Append ¶ added in v1.1.8
func (itemList *RelatedPatentItemList) Append(item *Item) int
Append adds an item to the related patent item list and returns the new count of items
func (*RelatedPatentItemList) IndexOf ¶ added in v1.1.8
func (itemList *RelatedPatentItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*RelatedPatentItemList) Init ¶ added in v1.3.7
func (itemList *RelatedPatentItemList) Init()
Init will initilize the Items array attribute of List
func (*RelatedPatentItemList) Length ¶ added in v1.1.8
func (itemList *RelatedPatentItemList) Length() int
Length return count of items
func (*RelatedPatentItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *RelatedPatentItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type RelatedURLItemList ¶ added in v0.0.14
type RelatedURLItemList struct { XMLName xml.Name `xml:"related_url" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
RelatedURLItemList holds the related URLs (e.g. doi, aux material doi)
func (*RelatedURLItemList) Append ¶ added in v1.1.8
func (itemList *RelatedURLItemList) Append(item *Item) int
Append an item to the related url item list
func (*RelatedURLItemList) IndexOf ¶ added in v1.1.8
func (itemList *RelatedURLItemList) IndexOf(i int) *Item
IndexOf() returns item or nil
func (*RelatedURLItemList) Init ¶ added in v1.3.7
func (itemList *RelatedURLItemList) Init()
Init will initilize the Items array attribute of List
func (*RelatedURLItemList) Length ¶ added in v1.1.8
func (itemList *RelatedURLItemList) Length() int
Length() returns item count
func (*RelatedURLItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *RelatedURLItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type RelationItemList ¶ added in v1.1.8
type RelationItemList struct { XMLName xml.Name `xml:"relation" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
RelationItemList is an array of pointers to Item structs
func (*RelationItemList) Append ¶ added in v1.1.8
func (itemList *RelationItemList) Append(item *Item) int
Append adds an item to the subject item list and returns the new count of items
func (*RelationItemList) IndexOf ¶ added in v1.1.8
func (itemList *RelationItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*RelationItemList) Init ¶ added in v1.3.7
func (itemList *RelationItemList) Init()
Init will initilize the Items array attribute of List
func (*RelationItemList) Length ¶ added in v1.1.8
func (itemList *RelationItemList) Length() int
Length returns number of items in list
func (*RelationItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *RelationItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ShelfItemList ¶ added in v0.0.14
type ShelfItemList struct { XMLName xml.Name `xml:"shelves" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ShelfItemList
func (*ShelfItemList) Append ¶ added in v1.1.8
func (itemList *ShelfItemList) Append(item *Item) int
Append adds an item to the shelf item list and returns the new count of items
func (*ShelfItemList) IndexOf ¶ added in v1.1.8
func (itemList *ShelfItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*ShelfItemList) Init ¶ added in v1.3.7
func (itemList *ShelfItemList) Init()
Init will initilize the Items array attribute of List
func (*ShelfItemList) Length ¶ added in v1.1.8
func (itemList *ShelfItemList) Length() int
Length return item count
func (*ShelfItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ShelfItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type SkillAreaItemList ¶ added in v0.0.14
type SkillAreaItemList struct { XMLName xml.Name `xml:"skill_areas" json:"-"` Items []*Item `xml:"item,omitempty" jsons:"item,omitempty"` }
SkillAreaItemList
func (*SkillAreaItemList) Append ¶ added in v1.1.8
func (itemList *SkillAreaItemList) Append(item *Item) int
Append adds an item to the skillArea item list and returns the new count of items
func (*SkillAreaItemList) IndexOf ¶ added in v1.1.8
func (itemList *SkillAreaItemList) IndexOf(i int) *Item
IndexOf return item or nil
func (*SkillAreaItemList) Init ¶ added in v1.3.7
func (itemList *SkillAreaItemList) Init()
Init will initilize the Items array attribute of List
func (*SkillAreaItemList) Length ¶ added in v1.1.8
func (itemList *SkillAreaItemList) Length() int
Length return item count
func (*SkillAreaItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *SkillAreaItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type SubjectItemList ¶ added in v0.0.14
type SubjectItemList struct { XMLName xml.Name `xml:"subjects" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
SubjectItemList
func (*SubjectItemList) Append ¶ added in v1.1.8
func (itemList *SubjectItemList) Append(item *Item) int
Append adds an item to the subject item list and returns the new count of items
func (*SubjectItemList) IndexOf ¶ added in v1.1.8
func (itemList *SubjectItemList) IndexOf(i int) *Item
IndexOf returns an item or nil
func (*SubjectItemList) Init ¶ added in v1.3.7
func (itemList *SubjectItemList) Init()
Init will initilize the Items array attribute of List
func (*SubjectItemList) Length ¶ added in v1.1.8
func (itemList *SubjectItemList) Length() int
Length returns number of items in list
func (*SubjectItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *SubjectItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ThesisAdvisorItemList ¶ added in v0.0.14
type ThesisAdvisorItemList struct { XMLName xml.Name `xml:"thesis_advisor" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ThesisAdvisorItemList
func (*ThesisAdvisorItemList) Append ¶ added in v1.1.8
func (itemList *ThesisAdvisorItemList) Append(item *Item) int
Append adds an item to the thesis advisor item list and returns the new count of items
func (*ThesisAdvisorItemList) GetIDs ¶ added in v1.2.2
func (itemList *ThesisAdvisorItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*ThesisAdvisorItemList) IndexOf ¶ added in v1.1.8
func (itemList *ThesisAdvisorItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*ThesisAdvisorItemList) Init ¶ added in v1.3.7
func (itemList *ThesisAdvisorItemList) Init()
Init will initilize the Items array attribute of List
func (*ThesisAdvisorItemList) Length ¶ added in v1.1.8
func (itemList *ThesisAdvisorItemList) Length() int
Length return count of items
func (*ThesisAdvisorItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ThesisAdvisorItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
type ThesisCommitteeItemList ¶ added in v0.0.14
type ThesisCommitteeItemList struct { XMLName xml.Name `xml:"thesis_committee" json:"-"` Items []*Item `xml:"item,omitempty" json:"items,omitempty"` }
ThesisCommitteeItemList
func (*ThesisCommitteeItemList) Append ¶ added in v1.1.8
func (itemList *ThesisCommitteeItemList) Append(item *Item) int
Append adds an item to the thesis committee item list and returns the new count of items
func (*ThesisCommitteeItemList) GetIDs ¶ added in v1.2.2
func (itemList *ThesisCommitteeItemList) GetIDs() []string
GetIDs for each item in the list return a slice of strings holding the ids.
func (*ThesisCommitteeItemList) IndexOf ¶ added in v1.1.8
func (itemList *ThesisCommitteeItemList) IndexOf(i int) *Item
IndexOf return an item or nil
func (*ThesisCommitteeItemList) Init ¶ added in v1.3.7
func (itemList *ThesisCommitteeItemList) Init()
Init will initilize the Items array attribute of List
func (*ThesisCommitteeItemList) Length ¶ added in v1.1.8
func (itemList *ThesisCommitteeItemList) Length() int
Length return count of items in list
func (*ThesisCommitteeItemList) SetAttributeOf ¶ added in v1.1.8
func (itemList *ThesisCommitteeItemList) SetAttributeOf(i int, key string, value interface{}) bool
SetAttributeOf at pos set item attribute return success
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Cleaner implements a naive HTML/XML sanitizer
|
Cleaner implements a naive HTML/XML sanitizer |
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
cmd
|
|
doi2eprintxml
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
ep3apid
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
ep3datasets
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
ep3genfeeds
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
ep3harvester
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
epfmt
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures, functions and programs// for working with the EPrints XML and EPrints REST API |
eputil
Package eprinttools is a collection of structures and functions for working with the EPrints XML and EPrints REST API
|
Package eprinttools is a collection of structures and functions for working with the EPrints XML and EPrints REST API |