Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
Nlm30CitationSchemaFilter Class Reference
Inheritance diagram for Nlm30CitationSchemaFilter:
PersistableFilter Filter DataObject CrossrefNlm30CitationSchemaFilter FreeciteRawCitationNlm30CitationSchemaFilter IsbndbNlm30CitationSchemaFilter ParaciteRawCitationNlm30CitationSchemaFilter ParscitRawCitationNlm30CitationSchemaFilter PubmedNlm30CitationSchemaFilter RegexRawCitationNlm30CitationSchemaFilter WorldcatNlm30CitationSchemaFilter

Public Member Functions

 _allowedPublicationTypes ()
 _guessPublicationType (&$metadataArray)
_recursivelyTrimPunctuation (&$metadataArray)
callWebService ($url, &$params, $returnType=XSL_TRANSFORMER_DOCTYPE_DOM, $method= 'GET')
 constructSearchStrings (&$searchTemplates, &$citationDescription)
fixPublisherNameAndLocation (&$metadata)
 getIsOptional ()
getNlm30CitationDescriptionFromMetadataArray (&$metadataArray)
 getSupportedPublicationTypes ()
 Nlm30CitationSchemaFilter (&$filterGroup, $supportedPublicationTypes=array())
postProcessMetadataArray (&$preliminaryNlm30Array)
 supports (&$input, &$output)
transformWebServiceResults (&$xmlResult, $xslFileName)
- Public Member Functions inherited from PersistableFilter
 addSetting (&$setting)
 getClassName ()
getFilterGroup ()
 getInternalSettings ()
 getIsTemplate ()
 getLocalizedSettingNames ()
 getParentFilterId ()
getSetting ($settingName)
 getSettingNames ()
getSettings ()
 hasSetting ($settingName)
 hasSettings ()
 PersistableFilter (&$filterGroup)
 setIsTemplate ($isTemplate)
 setParentFilterId ($parentFilterId)
 tempGroup ($inputType, $outputType)
- 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

Abstract base class for all filters that transform NLM citation metadata descriptions.

Definition at line 32 of file

Member Function Documentation

Nlm30CitationSchemaFilter::_allowedPublicationTypes ( )

Static method that returns a list of permitted publication types. NB: PHP4 workaround for static class member.


Definition at line 516 of file

Nlm30CitationSchemaFilter::_guessPublicationType ( $metadataArray)

Try to guess a citation's publication type based on detected elements


Definition at line 433 of file

Referenced by postProcessMetadataArray().

& Nlm30CitationSchemaFilter::_recursivelyTrimPunctuation ( $metadataArray)

Recursively trim punctuation from a metadata array.


Definition at line 491 of file

References String\trimPunctuation().

Referenced by postProcessMetadataArray().

Nlm30CitationSchemaFilter::constructSearchStrings ( $searchTemplates,

Construct an array of search strings from a citation description and an array of search templates. The templates may contain the placeholders aulast%: the first author's surname au%: the first author full name title%: the article-title (if it exists), otherwise the source date%: the publication year isbn%: ISBN

$searchTemplatesan array of templates

Definition at line 136 of file

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

Referenced by IsbndbNlm30CitationSchemaIsbnFilter\process(), and WorldcatNlm30CitationSchemaFilter\process().

& Nlm30CitationSchemaFilter::fixPublisherNameAndLocation ( $metadata)

Take an NLM preliminary meta-data array and fix publisher-loc and publisher-name entries:

  • If there is a location but no name then try to extract a publisher name from the location string.
  • Make sure that location and name are not the same.
  • Copy institution to publisher if no publisher is set, otherwise leave the institution.

Definition at line 395 of file

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

Referenced by FreeciteRawCitationNlm30CitationSchemaFilter\process(), and ParscitRawCitationNlm30CitationSchemaFilter\process().

Nlm30CitationSchemaFilter::getIsOptional ( )

Whether this filter is optional within its context (journal, conference, press, etc.)


Definition at line 79 of file

References DataObject\getData().

& Nlm30CitationSchemaFilter::getNlm30CitationDescriptionFromMetadataArray ( $metadataArray)
Nlm30CitationSchemaFilter::getSupportedPublicationTypes ( )

Get the supported publication types


Definition at line 70 of file

Referenced by supports().

Nlm30CitationSchemaFilter::Nlm30CitationSchemaFilter ( $filterGroup,
  $supportedPublicationTypes = array() 



Definition at line 41 of file

References PersistableFilter\addSetting(), and DataObject\setData().

& Nlm30CitationSchemaFilter::postProcessMetadataArray ( $preliminaryNlm30Array)

Post processes an NLM meta-data array


Definition at line 271 of file

References _guessPublicationType(), and _recursivelyTrimPunctuation().

Referenced by WorldcatNlm30CitationSchemaFilter\_lookupXIsbn(), RegexRawCitationNlm30CitationSchemaFilter\process(), and transformWebServiceResults().

Nlm30CitationSchemaFilter::supports ( $input,
See Also
$fromStringboolean true if the filter accepts a string as input.
$toStringboolean true if the filter produces a string as output.

Definition at line 95 of file

References Filter\getInputType(), and getSupportedPublicationTypes().

& Nlm30CitationSchemaFilter::transformWebServiceResults ( $xmlResult,

Takes the raw xml result of a web service and transforms it via XSL to a (preliminary) XML similar to NLM which is then re-encoded into an array. Finally some typical post-processing is performed. FIXME: Rewrite parser/lookup filter XSL to produce real NLM element-citation XML and factor this code into an NLM XML to NLM description filter.

$xmlResultstring or DOMDocument
array a metadata array

Definition at line 242 of file

References Filter\addError(), Filter\getDisplayName(), postProcessMetadataArray(), and PersistableFilter\tempGroup().

Referenced by WorldcatNlm30CitationSchemaFilter\_lookupWorldcat(), ParscitRawCitationNlm30CitationSchemaFilter\process(), FreeciteRawCitationNlm30CitationSchemaFilter\process(), IsbndbIsbnNlm30CitationSchemaFilter\process(), and CrossrefNlm30CitationSchemaFilter\process().

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