mjordan / iipqa

Command-line tool for applying Quality Assurance checks against Islandora import packages in preparation for importing them into Islandora.
GNU General Public License v3.0
3 stars 0 forks source link

Add test to find empty MODS title elements and title elements that are longer than 255 characters #9

Closed mjordan closed 7 years ago

mjordan commented 7 years ago

Title says it all.

mjordan commented 7 years ago

Reason we need to check for title length is that MODS titles end up being the Fedora object labels, which are limited to 255 characters:

mysql> describe doFields;
+---------------+--------------+------+-----+---------+-------+
| Field         | Type         | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| pid           | varchar(64)  | NO   | MUL | NULL    |       |
| label         | varchar(255) | YES  |     | NULL    |       |
| state         | varchar(1)   | NO   |     | A       |       |
| ownerId       | varchar(64)  | YES  |     | NULL    |       |
| cDate         | bigint(20)   | NO   |     | NULL    |       |
| mDate         | bigint(20)   | NO   |     | NULL    |       |
| dcmDate       | bigint(20)   | YES  |     | NULL    |       |
| dcTitle       | text         | YES  |     | NULL    |       |
| dcCreator     | text         | YES  |     | NULL    |       |
| dcSubject     | text         | YES  |     | NULL    |       |
| dcDescription | text         | YES  |     | NULL    |       |
| dcPublisher   | text         | YES  |     | NULL    |       |
| dcContributor | text         | YES  |     | NULL    |       |
| dcDate        | text         | YES  |     | NULL    |       |
| dcType        | text         | YES  |     | NULL    |       |
| dcFormat      | text         | YES  |     | NULL    |       |
| dcIdentifier  | text         | YES  |     | NULL    |       |
| dcSource      | text         | YES  |     | NULL    |       |
| dcLanguage    | text         | YES  |     | NULL    |       |
| dcRelation    | text         | YES  |     | NULL    |       |
| dcCoverage    | text         | YES  |     | NULL    |       |
| dcRights      | text         | YES  |     | NULL    |       |
+---------------+--------------+------+-----+---------+-------+
mjordan commented 7 years ago

Perhaps this test would make a good sample post-iipqa script.

mjordan commented 7 years ago

Added as a post-iipqa script in 2e650a6e5f5540b102c77ff4ef76ceffcb63c8e7.