LibraryOfCongress / bagit-java

Java library to support the BagIt specification.
Other
73 stars 49 forks source link

Support for 'repeatable' property of BagIt profiles #107

Closed ThomasJejkal closed 6 years ago

ThomasJejkal commented 6 years ago

According to the BagIt Profile Specification elements listed in BagInfo can have the attribute 'repeatable' if multiple occurences of the according element are allowed.

Despite of the fact, that Metadata allows to hold a list of values for each key, neither BagInfoRequirement contains this value, nor does BagProfileChecker take this property into account while checking the bag.

johnscancella commented 6 years ago

Hi @ThomasJejkal, thanks for reporting this. This should be implemented in version 5.1.0

UkDv commented 2 years ago

To fix this issue, you can add the following code in parseBagInfo function of BagitProfileDeserializer.java class

final JsonNode repeatableNode = node.getValue().get("repeatable"); if(repeatableNode != null){ entry.setRepeatable(repeatableNode.asBoolean()); }