Server.js
Server.js copied to clipboard
Support metadata about datasources coming from datasources
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
Datasourceinterface should be extended with an optional method to fetch metadata about the datasource - the
IndexDatasourceclass needs to call this method to get additional triples from a datasource - the
titleof a data source is also used on instantiation inbin/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.
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 Yes, but do we have an extension point for this specific case, i.e., datasources adding in extra metadata?
@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.