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

Public Member Functions

_parsePersonsString ($personsString, $title, $degrees)
 
_parsePersonString ($personString, $title, $degrees)
 
getAssocType ()
 
 getFilterDegrees ()
 
 getFilterTitle ()
 
 PersonStringNlm30NameSchemaFilter ($assocType, $filterMode=PERSON_STRING_FILTER_SINGLE, $filterTitle=false, $filterDegrees=false)
 
process (&$input)
 
 setFilterDegrees ($filterDegrees)
 
 setFilterTitle ($filterTitle)
 
 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 a string to an (array of) NLM name description(s).

See Also
Nlm30NameSchema

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

Member Function Documentation

& PersonStringNlm30NameSchemaFilter::_parsePersonsString (   $personsString,
  $title,
  $degrees 
)

Converts a string with multiple persons to an array of NLM name descriptions.

Parameters
$personsStringstring
$titleboolean true to parse for title
$degreesboolean true to parse for degrees
Returns
array an array of NLM name descriptions or null if the string could not be converted plus optionally a single 'et-al' string.

Definition at line 143 of file PersonStringNlm30NameSchemaFilter.inc.php.

References _parsePersonString(), String\iterativeExplode(), String\regexp_match(), String\regexp_match_all(), String\regexp_replace(), and String\strlen().

Referenced by process().

& PersonStringNlm30NameSchemaFilter::_parsePersonString (   $personString,
  $title,
  $degrees 
)

Converts a string with a single person to an NLM name description.

TODO: add initials from all given names to initials element

Parameters
$personStringstring
$titleboolean true to parse for title
$degreesboolean true to parse for degrees
Returns
MetadataDescription an NLM name description or null if the string could not be converted

Definition at line 222 of file PersonStringNlm30NameSchemaFilter.inc.php.

References String\regexp_match_get(), String\regexp_replace(), String\strlen(), and String\trimPunctuation().

Referenced by _parsePersonsString(), and process().

& PersonStringNlm30NameSchemaFilter::getAssocType ( )

Get the association type

Returns
integer

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

PersonStringNlm30NameSchemaFilter::getFilterDegrees ( )

Do we parse for degrees?

Returns
boolean

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

PersonStringNlm30NameSchemaFilter::getFilterTitle ( )

Do we parse for a title?

Returns
boolean

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

PersonStringNlm30NameSchemaFilter::PersonStringNlm30NameSchemaFilter (   $assocType,
  $filterMode = PERSON_STRING_FILTER_SINGLE,
  $filterTitle = false,
  $filterDegrees = false 
)

Constructor

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

References Filter\setDisplayName().

& PersonStringNlm30NameSchemaFilter::process ( $input)

Transform a person string to an (array of) NLM name description(s).

See Also
Filter::process()
Parameters
$inputstring
Returns
mixed Either a MetadataDescription or an array of MetadataDescriptions plus optionally a single 'et-al' string.

Definition at line 115 of file PersonStringNlm30NameSchemaFilter.inc.php.

References _parsePersonsString(), _parsePersonString(), and Nlm30PersonStringFilter\getFilterMode().

PersonStringNlm30NameSchemaFilter::setFilterDegrees (   $filterDegrees)

Set whether we parse for degrees

Parameters
$filterDegreesboolean

Definition at line 87 of file PersonStringNlm30NameSchemaFilter.inc.php.

PersonStringNlm30NameSchemaFilter::setFilterTitle (   $filterTitle)

Set whether we parse for a title

Parameters
$filterTitleboolean

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

PersonStringNlm30NameSchemaFilter::supports ( $input,
$output 
)

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