mdr2.production

Functionality for productions

add-default-meta-data

(add-default-meta-data production)

Add the default meta data to a production

add-structure

(add-structure production f)

Add a DTBook XML to a production. This will also set the status to :structured

create!

(create! production)

Create a production

create-dirs

(create-dirs production)

Create all working dirs for a production

dam-number

(dam-number {id :id})

Return an id for a production as it is expected by legacy systems

default-meta-data

(default-meta-data)

Return default meta data

delete!

(delete! production)

Delete a production

delete-all-dirs!

(delete-all-dirs! production)

Delete all artifacts on the file system for a production

find

(find id)

Find a production given its id

find-all-in-production

(find-all-in-production)

Find all productions which are currently in production, i.e. which haven’t been archived or deleted

find-archived

(find-archived id)

Find an archived production given its id

find-archived-by-date

(find-archived-by-date year)(find-archived-by-date year month)

Find an archived production given the year and optionaly month it was produced

find-archived-by-library-signature

(find-archived-by-library-signature library_signature)

Find an archived production given a library_signature

find-archived-by-productnumber

(find-archived-by-productnumber product_number)

Find an archived production given its product_number

find-archived-by-title-or-creator

(find-archived-by-title-or-creator term)

Find archived productions given a search term. Search in title and creator

find-by-productnumber

(find-by-productnumber product_number)

Find a production given its product_number

find-by-state

(find-by-state state)

Find all productions with the given state

iso8601ify

(iso8601ify production)

Convert all dates in a production from java.util.Date into java.sql.Date so that we can just use str to get an ISO 8601 date. Use this on productions you grab from a queue

library-signature?

(library-signature? id)

Return true if id is a valid library signature

manifest-valid?

(manifest-valid? production)

Return true if all exports for this production are valid

manifest-validate

(manifest-validate production)

Return a list of validation errors for all DAISY exports of given production. If there are no validation errors or no DAISY exports returns an empty list

manifest?

(manifest? production)

Return true if the production has a DAISY export

multi-volume?

(multi-volume? production)

Return true if this production has multiple volumes

parse

(parse production)

Return a production with all values parsed into their proper types, e.g. dates are converted from strings to dates

set-state!

(set-state! production state)

Set production to state

set-state-archived!

(set-state-archived! production)

set-state-cataloged!

(set-state-cataloged! production)

set-state-encoded!

(set-state-encoded! {:keys [production_type], :as production})

set-state-recorded!

(set-state-recorded! production)

set-state-split!

(set-state-split! production volumes sample-rate bitrate)

set-state-structured!

(set-state-structured! production)

smil-clock-value

(smil-clock-value {total_time :total_time})

split?

(split? production)

Return true if the production has a manual split

update!

(update! production)

update-production-dates

(update-production-dates production date)

Update the production dates for a new revision according to http://www.daisy.org/z3986/2005/Z3986-2005.html#PubMed

uuid

(uuid)(uuid prefix)

Return a randomly generated UUID optionally prefixed with prefix

xml-path

(xml-path {id :id, :as production})

Return the path to the meta data XML file, i.e. the DTBook file for a given production