Server.js icon indicating copy to clipboard operation
Server.js copied to clipboard

Support metadata about datasources coming from datasources

Open nichtich opened this issue 7 years ago • 3 comments

Metadata of data sources (title, description, license, licenseUrl, copyright, homepage...) needs to hard-coded in config.json but data sources should be able to provide their own metadata. Some thoughts:

  • the Datasource interface should be extended with an optional method to fetch metadata about the datasource
  • the IndexDatasource class needs to call this method to get additional triples from a datasource
  • the title of a data source is also used on instantiation in bin/ldf-server. It should better be access by an accessor of the created data source instead of (or as fallback to) its raw configuration.

By the way this should also allow for VoID files as data sources (new class VoidDatasource):

  • data source is configured with location of the VoID file
  • VoID file contains title, description... and URL of SPARQL endpoint or RDF data dump

By the way my use case of this feature is BEACON files as data sources. A BEACON link dump contains a list of links and additional metadata about this data set.

nichtich avatar Dec 19 '17 10:12 nichtich

FYI, a new major version of the server is in the works, which will make (possibly external) extensions like these very easy to make.

rubensworks avatar Dec 20 '17 09:12 rubensworks

@rubensworks Yes, but do we have an extension point for this specific case, i.e., datasources adding in extra metadata?

RubenVerborgh avatar Dec 20 '17 10:12 RubenVerborgh

@RubenVerborgh No, not at the moment. It's currently implemented in the same way as in the current version. But we could add a hook for that.

rubensworks avatar Dec 20 '17 10:12 rubensworks