fcrepo-exts / fcrepo-import-export

Apache License 2.0
15 stars 19 forks source link

Only validate BagIt fields for active profile #73

Closed whikloj closed 7 years ago

whikloj commented 7 years ago

Resolves FCREPO-2365

ruebot commented 7 years ago

We got an extra space in all our bag tag files:

Payload-Oxum : 502683.55
Bag-Size : 490 KB
Bagging-Date : 2016-12-16
Source-Organization : TOM JONES
Organization-Address : 123 University Ave, University City, 99999
Bag-Group-Identifier : ???
External-Identifier : ???
Internal-Sender-Identifier : ???
Contact-Email : anyone@university.edu
Contact-Phone : +19999999999
Internal-Sender-Description : ???
External-Description : ???
Contact-Name : My Name
escowles commented 7 years ago

@ruebot: the spec says: "A metadata element MUST consist of a label, a colon, and a value, each separated by optional whitespace."

So I think it's legal — but it would certainly be easy enough to remove the space before the colons if that looks better.

ruebot commented 7 years ago

I'm happy to merge it as is then, and we can create another ticket if need be.

whikloj commented 7 years ago

@escowles All good points, I'm not sure what to say about the map accessors. I could claim I was confused by the Jackson get(), but I think I just didn't look. So good catches on them all. I also added 2 tests to test for not having an entire file section (ie. aptrust-info.txt) in your config. First that it is okay if the section is not required and then that it throws an Exception if the section has required fields.

escowles commented 7 years ago

👍