Hydra Expectations of LDP Implementations
Beginning with Hydra 9, the repository interactions underlying the Hydra platform are informed by theĀ W3C Linked Data Platform specification. The first implementation of this specification that Hydra is built and tested against isĀ Fedora Commons 4. Redesigning the repository interaction layer around LDP has identified areas in the LDP specification delegated to the implementation for which Hydra has its own requirements.
Clear Requirements of the LDP Implementation
- Support for Containers
- Support for NonRDFResources of arbitrary MIME type
- Because these may include descriptions of external entities, this must include MIMEs associated with RDF, but not managed as such by the LDP implementationĀ
- Hydra indicates this by use of a Content-Disposition:attachment header
- HTTP PATCH support that accepts updates withĀ Content-Type: application/sparql-update, cfĀ Sparql insert behavior in Hydra base classes
- Path segments including a colon (':') character, like a namespace-prefixed element
- NonRDFResources must have a RDFResource describing them given in the object of a Link:<>; rel=ldp:describedBy header
Possible Requirements of the LDP Implementation
- Hydra expects a successful PUT to a URI to result in a containment triple if it creates a resource (eg, PUT /a/b creates /a/b, and adds <a> ldp:contains <a/b>)Ā
- Hydra expects the implementation to parse the filename out of the Content-Disposition header of a NonRDFSource, and:
- use it as the object of a <http://www.loc.gov/premis/rdf/v1#hasOriginalName> statementĀ in its description
- return it in a Content-Disposition header in the response
- Hydra expects the implementation toĀ checksum the contents when creating a NonRDFSource, and expects the checksum to be added to the resource's description as the URI object of a <http://fedora.info/definitions/v4/repository#digest> statementĀ
- Hydra expects a NonRDFSource to contain a RDFSource description of fixity status, with a literalĀ <http://fedora.info/definitions/v4/repository#status> property equal to 'SUCCESS' if the checksum is verified
- Unclear whether Hydra's interaction with versioned data is driven by navigation of properties generic to LDP, or whether the implementation is required to supply versions
Non-LDP Requirements
- Hydra expects NonRdfSource URIs to respect Content-Range
- Hydra expects NonRdfSource descriptions to include a checksum of the binary content
- Hydra expects the repository to track date of creation and modification in RDF descriptions
Ā
Bugs in Hydra
- Hydra relies on an implementation-specific URI pattern to identify the description of a NonRDFResourceĀ github issue 727Ā rather than the describedBy Link header indicated by LDP 1.0 sections 5.2.3.12, 5.2.6, and 4.2.8
- Hydra expects PUT operations to include a Location response header
RDF Datastream implementations don't include Prefer headers for their expected serialization?Not relevant if they are correctly stored as NonRDFSource
Testing Requirements
- The Cleaner test rig expects to both delete objects and free their URIs up (this seems like a bug)
- Testing resources hard-code /fedora/rest as the LDP REST endpoint
Related Documents
A Brief Comparison of LDP-inspired and Traditional Fedora APIs
Ā