PubdbBibTexExporter - JoomlaPubDB/PubDB GitHub Wiki

Class: \PubdbBibTexExporter

Namespace: [](../namespaces/default)


Summary:

Class PubdbBibTexExporter Class to export literature in BibTeX formatting for download.

Description:

Use the publication_list database View as base for all the data. Export every entry in the table or only the literature with the given id.


Constants

  • No constants found

Properties


Methods


Details


Tags

Tag Version Description
since v0.0.5

Properties

private $ids : array


Type: array array with literature ids to export Details:

Tags
Tag Version Description
since v0.0.7

private $latexMapping : array


Type: array mapping table for umlauts Details:

Tags
Tag Version Description
since v0.0.7

private $json_file : String


Type: String json file path for latex mapping Details:

Tags
Tag Version Description
since v0.0.7

private $defaultFields : mixed


Type: mixed Array to map database fields to BibTex fields Details:

Tags
Tag Version Description
since v0.0.7

private $articleFields : array


Type: array mapping for article ref types journal, publisher, address, subtitle Details:

Tags
Tag Version Description
since v0.0.7

private $bookFields : array


Type: array mapping for book ref types publisher, address, subtitle Details:

Tags
Tag Version Description
since v0.0.7

private $bookletFields : array


Type: array mapping for booklet ref types howpublished, address, subtitle Details:

Tags
Tag Version Description
since v0.0.7

private $inbookFields : array


Type: array mapping for inbook ref type publisher, address, subtitle Details:

Tags
Tag Version Description
since v0.0.7

private $incollectionFields : array


Type: array mapping for incollection ref type editor, publisher, address, title Details:

Tags
Tag Version Description
since v0.0.7

private $inproceedingsFields : array


Type: array mapping for inproceedings ref type, editor, publisher, address, title, series Details:

Tags
Tag Version Description
since v0.0.7

private $manualFields : array


Type: array mapping for manual ref type address organization Details:

Tags
Tag Version Description
since v0.0.7

private $masterthesisFields : array


Type: array mapping for masterthesis ref type school, address Details:

Tags
Tag Version Description
since v0.0.7

private $miscFields : array


Type: array mapping for misc ref type howpublished, note Details:

Tags
Tag Version Description
since v0.0.7

private $phdFields : array


Type: array mapping for phd ref type school, address Details:

Tags
Tag Version Description
since v0.0.7

private $proceedingsFields : array


Type: array mapping for proceedings ref type editor, publisher, address, series Details:

Tags
Tag Version Description
since v0.0.7

private $techreportFields : array


Type: array mapping for techreport ref type editor, institution, address, series Details:

Tags
Tag Version Description
since v0.0.7

Methods

public __construct()

public __construct(  $ids) 

Summary

PubdbBibTexExporter constructor.

Details:

Parameters:
Type Name Description
$ids mixed Ids to export
Tags
Tag Version Description
since v0.0.7

public startExport() : string

public startExport() : string

Summary

Public entry point to trigger export, call database function to get all items and build export

Details:

Returns: string - formatted BibTeX String

Tags
Tag Version Description
since v0.0.5

private getItems() : mixed

private getItems() : mixed

Summary

Query database to get all records of stored literature and if id filter exists use only these

Details:

Returns: mixed

Tags
Tag Version Description
since v0.0.5

private formatItems() : array

private formatItems(  $items) : array

Summary

Loop through all Items and map all values to corresponding bibtex fields If an extra formatting function exists use it in addition

Details:

Parameters:
Type Name Description
$items Array with all Items

Returns: array - Array with formatted Items

Tags
Tag Version Description
since v0.0.5

private buildBibTexOutput() : string

private buildBibTexOutput(  $items) : string

Summary

Build BibTeX Literature Blocks from given items and generate random citekey for identification and remove empty fields

Details:

Parameters:
Type Name Description
$items Array with all items

Returns: string - formatted BibTex String

Tags
Tag Version Description
since v0.0.5

private getCiteKey() : string

private getCiteKey(  $item) : string

Summary

generate unique citekey for corresponding literature with it's author, year and random number

Details:

Parameters:
Type Name Description
$item literature item

Returns: string - citekey

Tags
Tag Version Description
since v0.0.5

private formatAuthors() : string

private formatAuthors(  $item) : string

Summary

Format Authors of an Literature with last and first name In addition connect them with an "and" to get BibTeX format

Details:

Parameters:
Type Name Description
$item

Returns: string

Tags
Tag Version Description
since v0.0.5

private formatOthers_involved() : string

private formatOthers_involved(  $item) : string

Summary

Format Authors of an Literature with last and first name In addition connect them with an "and" to get BibTeX format

Details:

Parameters:
Type Name Description
$item

Returns: string

Tags
Tag Version Description
since v0.0.5

private formatMonth() : String

private formatMonth(  $item) : String

Summary

Replace numeric month value with BibTex String

Details:

Parameters:
Type Name Description
$item stdClass Item Object to Fromat

Returns: String - month String in BibTex format

Tags
Tag Version Description
since v0.0.7

private formatKeywords() : String

private formatKeywords(  $item) : String

Summary

Format the in joomla! saved comma separated list of keywords to an semicolon separated list

Details:

Parameters:
Type Name Description
$item mixed Item to format

Returns: String - keyword string with semicolon

Tags
Tag Version Description
since v0.0.7

private formatBibTexString() : string&#124;array<mixed,string>

private formatBibTexString(  $value, boolean  $dq = false) : string&amp;#124;array&lt;mixed,string&gt;

Summary

Format strings to get ensure BibTex format.

Description

Add Brackets, replace special chars with escaping etc

Details:

Parameters:
Type Name Description
$value
boolean $dq flag if double quotes should be ignored

Returns: string|array<mixed,string>

Tags
Tag Version Description
since v0.0.5

Top Namespaces


Reports


This document was automatically generated from source code comments on 2020-07-13 using phpDocumentor and fr3nch13/phpdoc-markdown

⚠️ **GitHub.com Fallback** ⚠️