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
dam-number
(dam-number {id :id})
Return an id for a production as it is expected by legacy systems
delete-all-dirs!
(delete-all-dirs! production)
Delete all artifacts on the file system for a production
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-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
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
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
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
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
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