Dynamic index resources #7

Merged
merged 7 commits into from Feb 24, 2013

Projects

None yet

2 participants

@wikier
wikier commented Apr 3, 2012

patch for dynamically generate a list of all available resources when index is requested (and IndexResource is missing in the configuration)

Sergio Ferna... added some commits Apr 3, 2012
@wikier wikier closed this Apr 3, 2012
@wikier wikier reopened this Apr 3, 2012
@wikier
wikier commented Apr 3, 2012

Useful patch for us on some of our private deployments

@cygri
Owner
cygri commented Apr 3, 2012

Nice! This is much better than the current default behaviour when no index resource is set. A couple of points though:

  • The FIXME should indeed be fixed. I think it could be done simply by checking the URI against the index address in getResourceDescription() rather than in execDescribe().
  • A note in the section on conf:indexResource in doc/index.html would be nice.
  • RDF.java is unnecessary, a file with the same constants already ships with Jena.
  • The icing on the cake would be paging of the resource list. Read a ?page=xxx value from the request params and use it to set a LIMIT/OFFSET value? Probably means there should be ORDER BY ?s too.
@wikier
wikier commented Apr 3, 2012

I pushed new commits solving the first three comments.

For the last one I'd need more time for diving deeper in the code, and find where/how should be the right way to add pagination only for the index resource without affect the main functionality and performance.

@wikier
wikier commented Apr 3, 2012

BTW, acknowledgement to the ADAPTA research project, partially funded by the INNPACTO 2011 programme (IPT-2011-0949-430000) of the Spanish Ministry of Science and Innovation and the European Regional Development Fund (FEDER).

@cygri
Owner
cygri commented Apr 3, 2012

Looks great @wikier! For pagination, the cleanest thing would probably be to add a separate IndexServlet that has the pagination, and forward from the RootServlet to the IndexServlet only if no conf:indexResource is set.

@wikier
wikier commented Apr 10, 2012

Right, maybe we should use to a separate servlet. The current implementation reuse the default rendering mechanism (both HTML and RDF) creating a fake resource resource/Index, which is of questionable accuracy.

I'll try to take a look on this issue during the week.

@cygri cygri merged commit fd3a300 into cygri:master Feb 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment