-
Notifications
You must be signed in to change notification settings - Fork 10
Fetcher manipulator: RangeSet
Fetcher manipulator that limits an MIK run to a set of objects whose record keys are within a specific alphanumeric range, or whose record keys are in a specific range within the full record set.
Can be used within any toolchain (i.e., is not specific to CONTENTdm CSV, etc.).
To register this manipulator in your toolchain, add the following line to the "[MANIPULATORS]" section of your .ini file:
fetchermanipulators[] = "RangeSet|[range]"
This manipulator takes a single mandatory parameter: the range of identifiers for the records you want MIK to process. A range can take any of these forms, which are explained in the next section:
<identifier
>identifier
identifier@identifier
limit,offset
Four types of ranges are available:
Less than:
fetchermanipulators[] = "RangeSet|<50"
Greater than:
fetchermanipulators[] = "RangeSet|>50"
Between:
fetchermanipulators[] = "RangeSet|50@60"
In these examples, the less than range selects objects whose record key is less than 50, the greater than range selects objects whose record key is greater than 50, and the between range selects objects whose record keys are between 50 and 60. Note that the ranges are not "less than or equal to", etc. - the range boundary is not included in the resulting record set. Comparisons to determine inclusion in the range are performed using PHP's strnatcmp()
function to handle both numeric and alphanumeric record keys.
The fourth type of range is not based on the value of objects' record keys but on their position in the complete record set. This range uses a syntax similar to SQL's LIMIT:
fetchermanipulators[] = "RangeSet|50,100"
This example selects a set of 50 records starting at the 100th record in the entire set of records.
Content on the Move to Islandora Kit wiki is licensed under a Creative Commons Attribution 4.0 International License.