Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
PersistableFilter Class Reference
Inheritance diagram for PersistableFilter:
Filter DataObject CompositeFilter MetadataDataObjectAdapter Mods34DescriptionXmlFilter Nlm30CitationSchemaFilter PersistableTestFilter TemplateBasedFilter XSLTransformationFilter GenericMultiplexerFilter GenericSequencerFilter Dc11SchemaArticleAdapter MetadataDescriptionDummyAdapter Mods34SchemaSubmissionAdapter Nlm30CitationSchemaCitationAdapter CrossrefNlm30CitationSchemaFilter FreeciteRawCitationNlm30CitationSchemaFilter IsbndbNlm30CitationSchemaFilter ParaciteRawCitationNlm30CitationSchemaFilter ParscitRawCitationNlm30CitationSchemaFilter PubmedNlm30CitationSchemaFilter RegexRawCitationNlm30CitationSchemaFilter WorldcatNlm30CitationSchemaFilter Nlm30CitationSchemaCitationOutputFormatFilter TemplateBasedReferencesListFilter

Public Member Functions

 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

A filter that can be persisted to the database.

See Also

Persisted filters are attributed to a filter group so that all filters of the same kind can be discovered from the database.

Persisted filters also can provide a list of FilterSetting objects which represent persistable filter configuration parameters.

Persisted filters are templatable. This means that a non-parameterized copy of the filter can be persisted as a template for actual filter instances. The end user can discover such templates and use them to configure personalized transformations.

The filter template can provide default settings for all filter settings.

Persistable filters can be accessed via the FilterDAO which acts as a filter registry.

Filters can be organized hierarchically into filter networks or filter pipelines. The hierarchical relation is represented via parent- child relationships. See CompositeFilter for more details.

Definition at line 44 of file

Member Function Documentation

PersistableFilter::getClassName ( )

Return the fully qualified class name of the filter class. This information must be persisted when saving a filter so that the filter can later be reconstructed from the information in the database.

(This must be hard coded by sub-classes for PHP4 compatibility. PHP4 always returns class names lowercase which we cannot tolerate as we need this path to find the class on case sensitive file systems.)

Definition at line 199 of file

& PersistableFilter::getFilterGroup ( )

Get the filter group


Definition at line 87 of file

PersistableFilter::getInternalSettings ( )

Returns names of settings which are in use by the filter class and therefore cannot be set as filter settings.


Definition at line 286 of file

Referenced by addSetting().

PersistableFilter::getIsTemplate ( )

Is this a transformation template rather than an actual transformation?


Definition at line 115 of file

References DataObject\getData().

PersistableFilter::getLocalizedSettingNames ( )

Return an array with the names of localized filter settings.

This will be used by the FilterDAO for filter setting persistence.


Definition at line 234 of file

References getSettings().

PersistableFilter::getParentFilterId ( )

Get the parent filter id


Definition at line 131 of file

References DataObject\getData().

& PersistableFilter::getSetting (   $settingName)

Get a filter setting


Definition at line 156 of file

PersistableFilter::getSettingNames ( )

Return an array with the names of non-localized filter settings.

This will be used by the FilterDAO for filter setting persistence.


Definition at line 215 of file

References getSettings().

& PersistableFilter::getSettings ( )

Get all filter settings

array a list of FilterSetting objects

Definition at line 165 of file

Referenced by getLocalizedSettingNames(), and getSettingNames().

PersistableFilter::hasSetting (   $settingName)

Check whether a given setting is present in this filter.

Definition at line 173 of file

PersistableFilter::hasSettings ( )

Can this filter be parameterized?


Definition at line 181 of file

PersistableFilter::PersistableFilter ( $filterGroup)


NB: Sub-classes of this class must not add additional mandatory constructor arguments. Sub-classes that implement additional optional constructor arguments must make these also accessible via setters if they are required to fully parameterize the transformation. Filter parameters must be stored as data in the underlying DataObject.

This is necessary as the FilterDAO does not support constructor configuration. Filter parameters will be configured via DataObject::setData(). Only parameters that are available in the DataObject will be persisted.


Definition at line 68 of file

References setIsTemplate(), and setParentFilterId().

PersistableFilter::setIsTemplate (   $isTemplate)

Set whether this is a transformation template rather than an actual transformation.

Transformation templates are saved to the database when the filter is first registered. They are configured with default settings and will be used to let users identify available transformation types.

There must be exactly one transformation template for each supported filter group.


Definition at line 106 of file

References DataObject\setData().

Referenced by PersistableFilter().

PersistableFilter::setParentFilterId (   $parentFilterId)

Set the parent filter id


Definition at line 123 of file

References DataObject\setData().

Referenced by PersistableFilter().

PersistableFilter::tempGroup (   $inputType,

There are certain generic filters (e.g. CompositeFilters) that sometimes need to be persisted and sometimes are instantiated and used in code only.

As we don't have multiple inheritance in PHP we'll have to use the more general filter type (PersistableFilter) as the base class of these "hybrid" filters.

This means that we carry around some structure (e.g. filter groups) that do only make sense when a filter is actually being persisted and otherwise create unnecessary code.

We provide this helper function to instantiate a temporary filter group on the fly with only an input and an output type which takes away at least some of the cruft.


Definition at line 268 of file

Referenced by CitationDAO\_filterCitation(), TemplateBasedReferencesListFilter\getCitationOutputFilterInstance(), MetadataDescriptionDummyAdapter\MetadataDescriptionDummyAdapter(), ParscitRawCitationNlm30CitationSchemaFilterTest\testAllCitationsWithThisParser(), FreeciteRawCitationNlm30CitationSchemaFilterTest\testAllCitationsWithThisParser(), ParaciteRawCitationNlm30CitationSchemaFilterTest\testAllCitationsWithThisParser(), RegexRawCitationNlm30CitationSchemaFilterTest\testAllCitationsWithThisParser(), Nlm30Nlm23CrosswalkFilterTest\testExecute(), PKPSubmissionNlm30XmlFilterTest\testExecute(), FreeciteRawCitationNlm30CitationSchemaFilterTest\testExecute(), ParscitRawCitationNlm30CitationSchemaFilterTest\testExecute(), IsbndbNlm30CitationSchemaIsbnFilterTest\testExecute(), RegexRawCitationNlm30CitationSchemaFilterTest\testExecute(), ParaciteRawCitationNlm30CitationSchemaFilterTest\testExecute(), IsbndbIsbnNlm30CitationSchemaFilterTest\testExecute(), WorldcatNlm30CitationSchemaFilterTest\testExecuteWithDoi(), CrossrefNlm30CitationSchemaFilterTest\testExecuteWithDoi(), CrossrefNlm30CitationSchemaFilterTest\testExecuteWithOpenurl10Search(), PubmedNlm30CitationSchemaFilterTest\testExecuteWithPmid(), PubmedNlm30CitationSchemaFilterTest\testExecuteWithSearch(), ParscitRawCitationNlm30CitationSchemaFilterTest\testExecuteWithWebServiceError(), FreeciteRawCitationNlm30CitationSchemaFilterTest\testExecuteWithWebServiceError(), Mods34DescriptionXmlFilterTest\testMods34DescriptionXmlFilter(), Nlm30CitationSchemaCitationAdapterTest\testNlm30CitationSchemaCitationAdapter(), and Nlm30CitationSchemaFilter\transformWebServiceResults().

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