Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-580

Remove Dependency for "stanbol.commons.web.sparql" to "stanbol.contenthub.servicesapi"

    XMLWordPrintableJSON

Details

    Description

      Commons Module MUST NOT depend on any other Stanbol modules other than Commons. Because of that the "org.apache.stanbol.commons.web.sparql" MUST NOT depend on "org.apache.stanbol.contenthub.servicesapi"

      Possible Solution:

      I would suggest to use the Whiteboard pattern to register TripleCollections that should be exposed by SPARQL. The SparqlEndpointResource could than lookup all NamedGraphs - the registered TripleCollections - by using the BundleContext or a ServiceTracker.

      Additional Notes:

      • This solution would allow to expose multiple query-able RDF graphs via {stanbol}

        /sparql

      • SPARQL already allows to specify the graph to query by using the "default-graph-uri" parameter. This parameter should be supported by "stanbol.commons.web.sparql" to allow requests to select a specific registered TripleCollection for the query
      • If no "default-graph-uri" is specified the TripleCollection registered with the higest "service.ranking" (if multiple lowest "service.id") is used to execute the query

      The following properties are supported for ServiceRegistrations of TripleCollections:

      • "graph.uri" (requried) : The URI of the graph. This is the same as used with the TcManager
      • "service.ranking" : If not than '0' will be used as default
      • "graph.name" : The name of the graph. Human readable name intended to be used in the UI of the SparqlEndpointResource (dropdown box to select one of the registered TripleCollections)
      • "graph.description" : A human readable description providing additional information about the RDF graph.

      NOTE: I would not recommend to directly use the TcManager because

      1. we might not want to make all grpahs public available
      2. we might want to publish graphs hold in-memory that are not registered with any TcManager (e.g. the configuration of the Stanbol instance)

      If this proposal is accepted I would recommend to copy this description to an own sub-task

      Attachments

        Issue Links

          Activity

            People

              suat.gonul Suat Gonul
              rwesten Rupert Westenthaler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: