Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
Nlm30NameSchemaPersonStringFilter Class Reference
Inheritance diagram for Nlm30NameSchemaPersonStringFilter:
Nlm30PersonStringFilter Filter Filter DataObject 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 ()
 
 getFilterMode ()
 
 Nlm30PersonStringFilter ($inputType, $outputType, $filterMode=PERSON_STRING_FILTER_SINGLE)
 
 Nlm30PersonStringFilter ($inputType, $outputType, $filterMode=PERSON_STRING_FILTER_SINGLE)
 
removeEtAlEntries ($personDescriptions)
 
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)
 
 supports (&$input, &$output)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter ($metadataAdapter)
 
 DataObject ()
 
 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

- Static Public Member Functions inherited from Filter
static supportedRuntimeEnvironmentSettings ()
 
- Public Attributes inherited from Filter
 $_errors = array()
 
 $_runtimeEnvironment = false
 
- Public Attributes inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = 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 151 of file Nlm30NameSchemaPersonStringFilter.inc.php.

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

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 137 of file Nlm30NameSchemaPersonStringFilter.inc.php.

Nlm30NameSchemaPersonStringFilter::getDelimiter ( )

Get the author delimiter (for multiple mode)

Returns
string

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

Nlm30NameSchemaPersonStringFilter::getTemplate ( )

Get the output template

Returns
string

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

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 39 of file Nlm30NameSchemaPersonStringFilter.inc.php.

& Nlm30NameSchemaPersonStringFilter::process ( $input)
See Also
Filter::process()
Parameters
$inputmixed a(n array of) MetadataDescription(s)
Returns
string

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

Nlm30NameSchemaPersonStringFilter::setDelimiter (   $delimiter)

Set the author delimiter (for multiple mode)

Parameters
$delimiterstring

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

References Nlm30PersonStringFilter\removeEtAlEntries().

Nlm30NameSchemaPersonStringFilter::setTemplate (   $template)

Set the output template

Parameters
$templatestring

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

Nlm30NameSchemaPersonStringFilter::supports ( $input,
$output 
)

Returns true if the given input and output objects represent a valid transformation for this filter.

This check must be type based. It can optionally include an additional stateful inspection of the given object instances.

If the output type is null then only check whether the given input type is one of the input types accepted by this filter.

The standard implementation provides full type based checking. Subclasses must implement any required stateful inspection of the provided objects.

Parameters
$inputmixed
$outputmixed
Returns
boolean

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


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