Discovery

Configuration

The configuration have to be defined in a json format. It should a contains a list of “source” definition and a general settings.

example

{
     "sources" : [{
       "id"  : "dbpedia",
       "url" : "https://dbpedia.org/sparql",
       "mimetype" : "application/sparql-query",
       "method" : "POST"
     }],
     "settings" : {
       "cache" : true,
       "logLevel" : "info",
       "sizeBatchProcessing" : 10,
       "pageSize" : 10
     }
}

Sources definition

each source defined un identifier.

Three types of RDF sources can be exploited : SPARQL endpoint, RDF Files, RDF inlining content

SPARQL endpoint

optional argument

example

source definition to query the DBpedia SPARQL endpoint.

{
   "id"       : "dbpedia",
   "url"      : "https://dbpedia.org/sparql",
   "mimetype" : "application/sparql-query",
   "method"   : "POST"
 }

RDF files

example

{
   "id"       : "fileMetabo",
   "mimetype" : "text/turtle",
   "file"     : "https://raw.githubusercontent.com/p2m2/discovery/develop/shared/src/test/resources/metabo.ttl"
 } 

RDF inline content

example

{
   "id"       : "local_content",
   "mimetype" : "text/turtle",
   "content"  : "<http://example.org/#subject1> <http://example.org/#predicate1> <http://example.org/#object1> ."
 } 

General settings

disable/unable cache query results

control the logging output with the log level

"warn" is the default value.

customize pool batch processing (see datatype block)

150 is the default value.

customize selectByPage

10 is the default value.