Class: QgsAcademicReference

Encapsulates an academic reference and formats it according to style guidelines.

Added in version 4.4.

List of all members, including inherited members

Constructor

__init__

Methods

asHtml

Returns a HTML formatted representation of the reference (in APA style).

asPlainText

Returns a plain text representation of the reference (in APA style).

authors

Returns the authors of the reference.

isValid

Returns False if this is a default constructed, invalid reference.

issue

Returns the issue number.

journal

Returns the journal title.

pages

Returns the page numbers.

publisher

Returns the publisher name.

setAuthors

Sets the authors of the reference.

setIssue

Sets the issue number.

setJournal

Sets the journal title.

setPages

Sets the page numbers.

setPublisher

Sets the publisher name.

setTitle

Sets the title of the work.

setType

Sets the reference type.

setUrl

Sets the url.

setVolume

Sets the volume identifier.

setYear

Sets the publication year.

title

Returns the title of the work.

type

Returns the reference type.

url

Returns the URL.

volume

Returns the volume identifier.

year

Returns the publication year.

Static Methods

createBook

Creates a book reference.

createJournalArticle

Creates a journal article reference.

createPreprint

Creates a preprint reference.

createPresentation

Creates a conference paper or presentation reference.

createWebPage

Creates a web page or online resource reference.

class qgis.core.QgsAcademicReference[source]

Bases: object

__init__()

Constructor for an invalid QgsAcademicReference.

__init__(a0: QgsAcademicReference)
Parameters:

a0 (QgsAcademicReference)

asHtml(self) str[source]

Returns a HTML formatted representation of the reference (in APA style).

Return type:

str

asPlainText(self) str[source]

Returns a plain text representation of the reference (in APA style).

Return type:

str

authors(self) list[str][source]

Returns the authors of the reference.

See also

setAuthors()

Return type:

list[str]

static createBook(authors: Iterable[str | None], year: int, title: str | None, publisher: str | None) QgsAcademicReference[source]

Creates a book reference.

Parameters:
  • authors (Iterable[Optional[str]]) – list of authors

  • year (int) – publication year

  • title (Optional[str]) – book title

  • publisher (Optional[str]) – publisher name

Return type:

QgsAcademicReference

static createJournalArticle(authors: Iterable[str | None], year: int, title: str | None, journal: str | None, volume: str | None = '', issue: str | None = '', pages: str | None = '') QgsAcademicReference[source]

Creates a journal article reference.

Parameters:
  • authors (Iterable[Optional[str]]) – list of authors

  • year (int) – publication year

  • title (Optional[str]) – article title

  • journal (Optional[str]) – journal name

  • volume (Optional[str] = '') – volume identifier

  • issue (Optional[str] = '') – issue identifier

  • pages (Optional[str] = '') – page range or number

Return type:

QgsAcademicReference

static createPreprint(authors: Iterable[str | None], year: int, title: str | None, repository: str | None, url: str | None) QgsAcademicReference[source]

Creates a preprint reference.

Parameters:
  • authors (Iterable[Optional[str]]) – list of authors

  • year (int) – publication year

  • title (Optional[str]) – paper title

  • repository (Optional[str]) – repository or archive name

  • url (Optional[str]) – repository target address

Return type:

QgsAcademicReference

static createPresentation(authors: Iterable[str | None], year: int, title: str | None, meeting: str | None, publisher: str | None = '', pages: str | None = '') QgsAcademicReference[source]

Creates a conference paper or presentation reference.

Parameters:
  • authors (Iterable[Optional[str]]) – list of authors

  • year (int) – presentation year

  • title (Optional[str]) – paper title

  • meeting (Optional[str]) – conference or meeting title

  • publisher (Optional[str] = '') – publisher name

  • pages (Optional[str] = '') – page range or number

Return type:

QgsAcademicReference

static createWebPage(authors: Iterable[str | None], year: int, title: str | None, url: str | None) QgsAcademicReference[source]

Creates a web page or online resource reference.

Parameters:
  • authors (Iterable[Optional[str]]) – list of authors

  • year (int) – publication or access year

  • title (Optional[str]) – web page title

  • url (Optional[str]) – target address

Return type:

QgsAcademicReference

isValid(self) bool[source]

Returns False if this is a default constructed, invalid reference.

Return type:

bool

issue(self) str[source]

Returns the issue number.

See also

setIssue()

Return type:

str

journal(self) str[source]

Returns the journal title.

See also

setJournal()

Return type:

str

pages(self) str[source]

Returns the page numbers.

See also

setPages()

Return type:

str

publisher(self) str[source]

Returns the publisher name.

See also

setPublisher()

Return type:

str

setAuthors(self, authors: Iterable[str | None])[source]

Sets the authors of the reference.

Individual authors should be formatted using surname first, followed by a comma and the author’s initials. E.g. “Smith, J. P.”.

See also

authors()

Parameters:

authors (Iterable[Optional[str]])

setIssue(self, issue: str | None)[source]

Sets the issue number.

See also

issue()

Parameters:

issue (Optional[str])

setJournal(self, journal: str | None)[source]

Sets the journal title.

See also

journal()

Parameters:

journal (Optional[str])

setPages(self, pages: str | None)[source]

Sets the page numbers.

See also

pages()

Parameters:

pages (Optional[str])

setPublisher(self, publisher: str | None)[source]

Sets the publisher name.

See also

publisher()

Parameters:

publisher (Optional[str])

setTitle(self, title: str | None)[source]

Sets the title of the work.

See also

title()

Parameters:

title (Optional[str])

setType(self, type: Qgis.AcademicReferenceType)[source]

Sets the reference type.

See also

type()

Parameters:

type (Qgis.AcademicReferenceType)

setUrl(self, url: str | None)[source]

Sets the url.

See also

url()

Parameters:

url (Optional[str])

setVolume(self, volume: str | None)[source]

Sets the volume identifier.

See also

volume()

Parameters:

volume (Optional[str])

setYear(self, year: int)[source]

Sets the publication year.

See also

year()

Parameters:

year (int)

title(self) str[source]

Returns the title of the work.

See also

setTitle()

Return type:

str

type(self) Qgis.AcademicReferenceType[source]

Returns the reference type.

See also

setType()

Return type:

Qgis.AcademicReferenceType

url(self) str[source]

Returns the URL.

See also

setUrl()

Return type:

str

volume(self) str[source]

Returns the volume identifier.

See also

setVolume()

Return type:

str

year(self) int[source]

Returns the publication year.

See also

setYear()

Return type:

int