VuFindHarvest API Documentation

HarvesterFactory
in package

Factory for OAI-PMH Harvest Tool

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

getHarvester()  : Harvester
Get the harvester
addAutoSslOptions()  : void
Add SSL options to $options if standard files can be autodetected.
configureClient()  : Client
Configure the HTTP client
getBasePath()  : string
Set up directory structure for harvesting.
getClientOptions()  : array<string|int, mixed>
Get HTTP client options from $settings array
getCommunicator()  : Communicator
Get the communicator.
getConsoleWriter()  : ConsoleWriter
Get console output writer (if applicable).
getFormatter()  : RecordXmlFormatter
Get the record XML formatter.
getResponseProcessor()  : SimpleXmlResponseProcessor
Get XML response processor.
getSetLoader()  : SetLoader
Get the set loader (used to load set names).
getStateManager()  : StateManager
Get state manager
getWriter()  : RecordWriter
Build the writer support object.
getWriterStrategyFactory()  : RecordWriterStrategyFactory
Get the factory for record writer strategies.

Methods

getHarvester()

Get the harvester

public getHarvester(string $target, string $harvestRoot[, Client $client = null ][, array<string|int, mixed> $settings = [] ][, OutputInterface $output = null ]) : Harvester
Parameters
$target : string

Name of source being harvested (used as directory name for storing harvested data inside $harvestRoot)

$harvestRoot : string

Root directory containing harvested data.

$client : Client = null

HTTP client

$settings : array<string|int, mixed> = []

Additional settings

$output : OutputInterface = null

Output interface (optional)

Tags
throws
Exception
Return values
Harvester

addAutoSslOptions()

Add SSL options to $options if standard files can be autodetected.

protected addAutoSslOptions(array<string|int, mixed> &$options) : void
Parameters
$options : array<string|int, mixed>

Options to modify.

Return values
void

configureClient()

Configure the HTTP client

protected configureClient(Client $client, array<string|int, mixed> $settings) : Client
Parameters
$client : Client

HTTP client

$settings : array<string|int, mixed>

Settings

Tags
throws
Exception
Return values
Client

getBasePath()

Set up directory structure for harvesting.

protected getBasePath(string $harvestRoot, string $target) : string
Parameters
$harvestRoot : string

Root directory containing harvested data.

$target : string

The OAI-PMH target directory to create inside $harvestRoot.

Return values
string

getClientOptions()

Get HTTP client options from $settings array

protected getClientOptions(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>

Settings

Return values
array<string|int, mixed>

getCommunicator()

Get the communicator.

protected getCommunicator(Client $client, array<string|int, mixed> $settings, ResponseProcessorInterface $processor, string $target[, OutputInterface $output = null ]) : Communicator
Parameters
$client : Client

HTTP client

$settings : array<string|int, mixed>

Additional settings

$processor : ResponseProcessorInterface

Response processor

$target : string

Target being configured (used for error messages)

$output : OutputInterface = null

Output interface

Return values
Communicator

getConsoleWriter()

Get console output writer (if applicable).

protected getConsoleWriter(OutputInterface $output, array<string|int, mixed> $settings) : ConsoleWriter
Parameters
$output : OutputInterface

Output interface

$settings : array<string|int, mixed>

OAI-PMH settings

Return values
ConsoleWriter

getFormatter()

Get the record XML formatter.

protected getFormatter(Communicator $communicator, array<string|int, mixed> $settings[, OutputInterface $output = null ]) : RecordXmlFormatter
Parameters
$communicator : Communicator

Communicator

$settings : array<string|int, mixed>

Additional settings

$output : OutputInterface = null

Output interface

Return values
RecordXmlFormatter

getSetLoader()

Get the set loader (used to load set names).

protected getSetLoader(Communicator $communicator, array<string|int, mixed> $settings) : SetLoader
Parameters
$communicator : Communicator

API communicator

$settings : array<string|int, mixed>

OAI-PMH settings

Return values
SetLoader

Search results