database

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 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 added in v0.2.0

type Affiliation struct {
	SID     string
	Name    string
	City    string
	Country string
}

type Author added in v0.2.0

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

type Citation added in v0.1.5

type Citation struct {
	Title        string
	PubType      string
	PubName      string
	SubType      string
	Volume       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 added in v0.2.0

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

func (*Collection) Decode added in v0.2.0

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

func (*Collection) Drop added in v0.2.0

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

func (*Collection) Filter added in v0.2.0

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

func (*Collection) Insert added in v0.2.0

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

func (*Collection) Project added in v0.2.0

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

func (*Collection) Search added in v0.2.0

func (collection *Collection) Search() *Search

type Connection added in v0.2.0

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

func Connect

func Connect() *Connection

func (*Connection) Clear added in v0.2.0

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

func (*Connection) Disconnect added in v0.2.0

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

func (*Connection) LoadCitations added in v0.2.0

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

func (*Connection) LoadFaculty added in v0.2.0

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

func (*Connection) LoadThemes added in v0.2.0

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

type DatabaseInfo added in v0.1.5

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

type Department added in v0.1.5

type Department struct {
	Name string
	SIDs []string
}

type Faculty added in v0.1.5

type Faculty struct {
	GivenName string
	Surname   string
	Title     string
	SID       []string
	Email     string
	Strengths []Strength
}

type Pending added in v0.1.5

type Pending struct {
	SID           string
	DateRetreived string
}

type Projection added in v0.2.0

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

func (*Projection) Decode added in v0.2.0

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

type Record added in v0.1.5

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

func (*Search) Check added in v0.2.0

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

func (*Search) Decode added in v0.2.0

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

func (*Search) Filter added in v0.2.0

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

func (*Search) Project added in v0.2.0

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

type Status added in v0.1.5

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

type Strength added in v0.2.0

type Strength struct {
	Theme    string
	SubTheme string
}

type Theme added in v0.1.5

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:"description"`
		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