database

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	META        = "__dbinfo__"
	DEPARTMENTS = "Departments"
	FACULTY     = "Faculty"
	CITATIONS   = "Citations"
	THEMES      = "Themes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Affiliation

type Affiliation struct {
	SID     string
	Name    string
	City    string
	Country string
	Alias   []string
}

type Author

type Author struct {
	Name      string
	GivenName string
	Surname   string
	Initials  string
	SID       string
	AffilIDs  []string
}

type Citation

type Citation struct {
	Title        string
	PubType      string
	PubName      string
	SubType      string
	Volume       string
	Issue        string
	Pages        string
	Date         string
	ISODate      string
	DOI          string
	Abstract     string
	CitedByCount int
	Keywords     []string
	EID          string
	Authors      []Author
	Affiliations []Affiliation
	Status       Status
}

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func (*Collection) Decode

func (collection *Collection) Decode(results interface{}) error

func (*Collection) Drop

func (collection *Collection) Drop(ctx context.Context) error

func (*Collection) Filter

func (collection *Collection) Filter(key string, filter interface{}) *Search

func (*Collection) Insert

func (collection *Collection) Insert(item interface{}) error

func (*Collection) Project

func (collection *Collection) Project(includeFields ...string) *Projection

func (*Collection) Search

func (collection *Collection) Search() *Search

type Connection

type Connection struct {
	Departments *Collection
	Faculty     *Collection
	Citations   *Collection
	Themes      *Collection
	// contains filtered or unexported fields
}

func Connect

func Connect() *Connection

func (*Connection) Clear

func (conn *Connection) Clear(ctx context.Context) error

func (*Connection) Disconnect

func (conn *Connection) Disconnect(ctx context.Context) error

func (*Connection) LoadCitations

func (db *Connection) LoadCitations(citationsJSON io.Reader)

func (*Connection) LoadFaculty

func (db *Connection) LoadFaculty(facultyCSV io.Reader)

func (*Connection) LoadThemes

func (db *Connection) LoadThemes(themesXML io.Reader)

type DatabaseInfo

type DatabaseInfo struct {
	Initialized              bool
	UninitializedCollections []struct {
		Name     string
		Recovery string
	}
}

type Department

type Department struct {
	Name string
	SIDs []string
}

type Faculty

type Faculty struct {
	Name       string
	Department string
	Title      string
	SID        []string
	Email      string
	Strengths  []Strength
}

type Pending

type Pending struct {
	SID           string
	DateRetreived string
}

type Projection

type Projection Search

func (*Projection) Decode

func (projection *Projection) Decode(results interface{}) error

type Record

type Record struct {
	Pending
	DateReviewed string
}
type Search struct {
	// contains filtered or unexported fields
}

func (*Search) Check

func (search *Search) Check() (bool, error)

func (*Search) Decode

func (search *Search) Decode(results interface{}) error

func (*Search) Filter

func (search *Search) Filter(key string, filter interface{}) *Search

func (*Search) Project

func (search *Search) Project(fields ...string) *Projection

type Status

type Status int
const (
	STATUS_UNCONFIRMED Status = iota
	STATUS_CONFIRMED
	STATUS_EXCLUDED
)

type Strength

type Strength struct {
	ThemeAbbr    string
	SubThemeAbbr string
}

type Theme

type Theme struct {
	Name      string `xml:"name,attr"`
	Abbr      string `xml:"abbr,attr"`
	SubThemes []struct {
		Name        string   `xml:"name,attr"`
		Abbr        string   `xml:"abbr,attr"`
		Description string   `xml:"definition"`
		Keywords    []string `xml:"keywords>kw"`
	} `xml:"subtheme"`
}

Jump to

Keyboard shortcuts

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