Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
Nlm30NameSchemaPersonStringFilter Class Reference
Inheritance diagram for Nlm30NameSchemaPersonStringFilter:
Nlm30PersonStringFilter Filter DataObject

Public Member Functions

 _flattenPersonDescription (&$personDescription)
 
 _flattenPersonDescriptions (&$personDescriptions)
 
 getDelimiter ()
 
 getTemplate ()
 
 Nlm30NameSchemaPersonStringFilter ($filterMode=PERSON_STRING_FILTER_SINGLE, $template= '%surname%%suffix%,%initials%(%firstname%)%prefix%', $delimiter= '; ')
 
process (&$input)
 
 setDelimiter ($delimiter)
 
 setTemplate ($template)
 
 supports (&$input, &$output)
 
- Public Member Functions inherited from Nlm30PersonStringFilter
 getFilterMode ()
 
 Nlm30PersonStringFilter ($inputType, $outputType, $filterMode=PERSON_STRING_FILTER_SINGLE)
 
removeEtAlEntries ($personDescriptions)
 
- Public Member Functions inherited from Filter
 addError ($message)
 
 clearErrors ()
 
execute (&$input)
 
 Filter ($inputType, $outputType)
 
 getDisplayName ()
 
 getErrors ()
 
getInputType ()
 
getLastInput ()
 
getLastOutput ()
 
getOutputType ()
 
getRuntimeEnvironment ()
 
 getSeq ()
 
 hasErrors ()
 
 isCompatibleWithRuntimeEnvironment ()
 
process (&$input)
 
 setDisplayName ($displayName)
 
 setRuntimeEnvironment (&$runtimeEnvironment)
 
 setSeq ($seq)
 
 setTransformationType (&$inputType, &$outputType)
 
 supportedRuntimeEnvironmentSettings ()
 
 supports (&$input, &$output)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter (&$metadataAdapter)
 
 DataObject ($callHooks=true)
 
extractMetadata (&$metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
getSupportedExtractionAdapters ()
 
getSupportedInjectionAdapters ()
 
getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata (&$metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
upcastTo (&$targetObject)
 

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()
 

Detailed Description

Filter that converts from NLM name to a string.

See Also
Nlm30NameSchema

Definition at line 20 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Member Function Documentation

Nlm30NameSchemaPersonStringFilter::_flattenPersonDescription ( $personDescription)

Transform a single NLM name description to a person string. NB: We use the style: surname suffix, initials (first-name) prefix which is relatively easy to parse back.

Parameters
$personDescriptionMetadataDescription|'et-al'
Returns
string

Definition at line 145 of file Nlm30NameSchemaPersonStringFilter.inc.php.

References getTemplate(), String\strlen(), and String\substr().

Referenced by process().

Nlm30NameSchemaPersonStringFilter::_flattenPersonDescriptions ( $personDescriptions)

Transform an NLM name description array to a person string. NB: We use ; as name separator.

Parameters
$personDescriptionsarray an array of MetadataDescriptions
Returns
string

Definition at line 131 of file Nlm30NameSchemaPersonStringFilter.inc.php.

References getDelimiter().

Referenced by process().

Nlm30NameSchemaPersonStringFilter::getDelimiter ( )

Get the author delimiter (for multiple mode)

Returns
string

Definition at line 71 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Referenced by _flattenPersonDescriptions().

Nlm30NameSchemaPersonStringFilter::getTemplate ( )

Get the output template

Returns
string

Definition at line 55 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Referenced by _flattenPersonDescription().

Nlm30NameSchemaPersonStringFilter::Nlm30NameSchemaPersonStringFilter (   $filterMode = PERSON_STRING_FILTER_SINGLE,
  $template = '%surname%%suffix%,
%initials%(%firstname%)%prefix%'  ,
  $delimiter = '; ' 
)

Constructor

Parameters
$filterModeinteger
$templatestring default: DRIVER guidelines 2.0 name template Possible template variables are surname%, suffix%, prefix%, initials%, firstname%

Definition at line 33 of file Nlm30NameSchemaPersonStringFilter.inc.php.

References Filter\setDisplayName().

& Nlm30NameSchemaPersonStringFilter::process ( $input)
Nlm30NameSchemaPersonStringFilter::setDelimiter (   $delimiter)

Set the author delimiter (for multiple mode)

Parameters
$delimiterstring

Definition at line 79 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Nlm30NameSchemaPersonStringFilter::setTemplate (   $template)

Set the output template

Parameters
$templatestring

Definition at line 63 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Nlm30NameSchemaPersonStringFilter::supports ( $input,
$output 
)

The documentation for this class was generated from the following file: