CombinedRecordWriterStrategy

Extends \VuFindHarvest\RecordWriterStrategy\AbstractRecordWriterStrategy

Strategy for writing records to disk as a combined file.

category

VuFind

package

Harvest_Tools

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Methods

Constructor

__construct(string $basePath) 
inherited

Arguments

$basePath

string

Target directory for harvested files

Add the ID of a deleted record.

addDeletedRecord(string $id) : void

Arguments

$id

string

ID

Add a non-deleted record.

addRecord(string $id, string $record) : void

Arguments

$id

string

ID

$record

string

Record XML

Called before the writing process begins.

beginWrite() : void

Close out the writing process.

endWrite() : void

Get base path for writes.

getBasePath() : string
inherited

Response

string

Support method for building combined XML document.

getCombinedXML(string $innerXML) : string

Arguments

$innerXML

string

XML for inside of document.

Response

string

Get the filename for a specific record ID.

getFilename(string $id, string $ext) : string
inherited

Arguments

$id

string

ID of record to save.

$ext

string

File extension to use.

Response

string

Full path + filename.

Create a tracking file to record the deletion of a record.

saveDeletedRecords(string|array $ids) : void
inherited

Arguments

$ids

string|array

ID(s) of deleted record(s).

Save a record to disk.

saveFile(string $id, string $xml) : void
inherited

Arguments

$id

string

Record ID to use for filename generation.

$xml

string

XML to save.

Properties

The wrapping XML tag to be used if combinedRecords is set to true

wrappingTag : string
var

Type(s)

string

Collection of deleted IDs.

deletedIds : array
var

Type(s)

array

Collection of XML to include inside final output tag.

innerXML : array
var

Type(s)

array

The ID of the first successfully harvested record.

firstHarvestedId : string
var

Type(s)

string

Directory for storing harvested files

basePath : string
inherited
var

Type(s)

string