perlrdf / RDF-LinkedData

RDF::LinkedData is a Perl module for setting up Linked Data server
14 stars 7 forks source link

Provide hypermedia controls for “all” resource #18

Closed RubenVerborgh closed 7 years ago

RubenVerborgh commented 8 years ago

Given that the implementation does not support paging yet, the ?s ?p ?o fragment is shielded with

"you are not allowed to retrieve the entire database"

There is no hypermedia control available on the initial resource, which makes hypermedia-based discovery of the interface not possible.

As a workaround, I suggest to have a first page with just the metadata and controls in there, and zero data. There is a next link to the second page, which contains the data.

kjetilk commented 7 years ago

OK, got a second to look at it, and produced some tests, see commit.

The test will make return the usual templates, and then this:

<http://localhost/fragments?subject=&predicate=&object=> <http://purl.org/dc/terms/source> <http://localhost/#dataset-0> ;
        void:triples 4 ;
        a void:Dataset ;
        hydra:next <http://localhost/fragments?subject=&predicate=&object=&allow_dump_dataset=1> ;

i.e., the next page is the same fragment with &allow_dump_dataset=1 appended. If the client requests this, they will get it all.

Is this what you wanted, @RubenVerborgh ?

kjetilk commented 7 years ago

Actually, I figured the next URI may always be <http://localhost/fragments?allow_dump_dataset=1>. No need to keep the other parameters around. So, that's what I have implemented. Nice if you have a look. I have a developer release 0.75_03 at CPAN now. Will release a proper package in a few days.

kjetilk commented 7 years ago

Should be fixed in 0.76