Home Manual Reference Source Test
import {CitationWrapper} from '@phyloref/phyx/src/wrappers/CitationWrapper.js'
public class | source

CitationWrapper

Static Method Summary

Static Public Methods
public static

getAgentName(agent: *): string

Helper method to return a single name for a given agent entry.

public static

normalize(citation: *): *

Return a normalized form of a citation.

Constructor Summary

Public Constructor
public

Construct a CitationWrapper.

Member Summary

Public Members
public

Method Summary

Public Methods
public

toString(): *

Returns a single string with the entire bibliographic citation.

Static Public Methods

public static getAgentName(agent: *): string source

Helper method to return a single name for a given agent entry. The algorithm we use is:

  • name, if one is present.
  • Some combination of lastname, firstname and middlename, if present.

Params:

NameTypeAttributeDescription
agent *

Return:

string

public static normalize(citation: *): * source

Return a normalized form of a citation.

I'm not really sure how to normalize a citation, but the main thing we can do is delete any key that is equivalent to ''. We could interconvert between name and firstname/lastname/middlename, but that's not really equivalent, is it?

Params:

NameTypeAttributeDescription
citation *

Return:

*

Public Constructors

public constructor() source

Construct a CitationWrapper.

Public Members

public citation: * source

Public Methods

public toString(): * source

Returns a single string with the entire bibliographic citation.

Return:

*