Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PersonStringNlm30NameSchemaFilter Class Reference
Inheritance diagram for PersonStringNlm30NameSchemaFilter:
Nlm30PersonStringFilter Filter Filter DataObject 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 ()
 
 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 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 152 of file PersonStringNlm30NameSchemaFilter.inc.php.

Referenced by supports().

& 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 231 of file PersonStringNlm30NameSchemaFilter.inc.php.

Referenced by supports().

& PersonStringNlm30NameSchemaFilter::getAssocType ( )

Get the association type

Returns
integer

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

PersonStringNlm30NameSchemaFilter::getFilterDegrees ( )

Do we parse for degrees?

Returns
boolean

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

PersonStringNlm30NameSchemaFilter::getFilterTitle ( )

Do we parse for a title?

Returns
boolean

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

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

Constructor

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

& 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 124 of file PersonStringNlm30NameSchemaFilter.inc.php.

PersonStringNlm30NameSchemaFilter::setFilterDegrees (   $filterDegrees)

Set whether we parse for degrees

Parameters
$filterDegreesboolean

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

PersonStringNlm30NameSchemaFilter::setFilterTitle (   $filterTitle)

Set whether we parse for a title

Parameters
$filterTitleboolean

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

PersonStringNlm30NameSchemaFilter::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 107 of file PersonStringNlm30NameSchemaFilter.inc.php.

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


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