dbmdz / iiif-presentation-api

Java library implementing the IIIF Presentation API
MIT License
13 stars 8 forks source link

Sequence constructor: id, label(?) #2

Closed ksclarke closed 8 years ago

ksclarke commented 8 years ago

Hi,

First, thanks for this library! I've started working with it and have noticed a general pattern in the model's constructors (where id and label can be passed in together in the creation of the object). Sequence seems to be an exception, though, as it just takes label. I was wondering about changing its constructor to be new Sequence(id, label) instead. What do you think? Just a suggestion. Thanks!

datazuul commented 8 years ago

according to http://iiif.io/api/presentation/2.0/#b-summary-of-metadata-requirements Sequence and Annotation are the only ressources that have an optional id. I tend to offer a constructor only with required fields. but for convenience I added constructors in sequence and annotation classes.

ksclarke commented 8 years ago

Ah, okay, thanks for the explanation!