PHP Class PersonStringNlm30NameSchemaFilter, pkp-lib

Inheritance: extends Nlm30PersonStringFilter
Mostrar archivo Open project: pkp/pkp-lib Class Usage Examples

Public Properties

Property Type Description
$_assocType integer
$_filterDegrees boolean
$_filterTitle boolean

Public Methods

Method Description
__construct ( $assocType, $filterMode = PERSON_STRING_FILTER_SINGLE, $filterTitle = false, $filterDegrees = false ) Constructor
_parsePersonString ( $personString, $title, $degrees ) : MetadataDescription Converts a string with a single person to an NLM name description.
_parsePersonsString ( $personsString, $title, $degrees ) : array Converts a string with multiple persons to an array of NLM name descriptions.
getAssocType ( ) : integer Get the association type
getFilterDegrees ( ) : boolean Do we parse for degrees?
getFilterTitle ( ) : boolean Do we parse for a title?
process ( &$input ) : mixed Transform a person string to an (array of) NLM name description(s).
setFilterDegrees ( $filterDegrees ) Set whether we parse for degrees
setFilterTitle ( $filterTitle ) Set whether we parse for a title
supports ( &$input, &$output )

Method Details

__construct() public method

Constructor
public __construct ( $assocType, $filterMode = PERSON_STRING_FILTER_SINGLE, $filterTitle = false, $filterDegrees = false )

_parsePersonString() public method

TODO: add initials from all given names to initials element
public _parsePersonString ( $personString, $title, $degrees ) : MetadataDescription
$personString string
$title boolean true to parse for title
$degrees boolean true to parse for degrees
return MetadataDescription an NLM name description or null if the string could not be converted

_parsePersonsString() public method

Converts a string with multiple persons to an array of NLM name descriptions.
public _parsePersonsString ( $personsString, $title, $degrees ) : array
$personsString string
$title boolean true to parse for title
$degrees boolean true to parse for degrees
return array an array of NLM name descriptions or null if the string could not be converted plus optionally a single 'et-al' string.

getAssocType() public method

Get the association type
public getAssocType ( ) : integer
return integer

getFilterDegrees() public method

Do we parse for degrees?
public getFilterDegrees ( ) : boolean
return boolean

getFilterTitle() public method

Do we parse for a title?
public getFilterTitle ( ) : boolean
return boolean

process() public method

Transform a person string to an (array of) NLM name description(s).
See also: Filter::process()
public process ( &$input ) : mixed
$input string
return mixed Either a MetadataDescription or an array of MetadataDescriptions plus optionally a single 'et-al' string.

setFilterDegrees() public method

Set whether we parse for degrees
public setFilterDegrees ( $filterDegrees )
$filterDegrees boolean

setFilterTitle() public method

Set whether we parse for a title
public setFilterTitle ( $filterTitle )
$filterTitle boolean

supports() public method

public supports ( &$input, &$output )

Property Details

$_assocType public_oe property

public int $_assocType
return integer

$_filterDegrees public_oe property

public bool $_filterDegrees
return boolean

$_filterTitle public_oe property

public bool $_filterTitle
return boolean