gdcc / xoai

OAI-PMH Java Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make identifiers in data-provider ItemIdentifier interface a URI or custom type

poikilotherm opened this issue · comments

To avoid non-spec conformant identifier values returned to a client by an unaware application, the interface should enforce proper responses by either enforcing an URI type or a custom type reflecting the schema, authority and path parts (so much less than URI does)

Addendum: the identifier should also be checked for being spec conformant within the request parsing.

Obviously, it could remain to be a String passed to the application, making the library only check for identifier spec conformance in RequestBuilder. (That wouldn't be a breaking change then and allow a 5.0 release, making the spec conformance a 5.(0+x) feature)

Opinionated decision after discussing with @landreev: the endpoint isn't meant to be "explored" usually by people not knowing what they are doing. Proper identifier examples can always be found via ListIdentifiers.

Closing for now.