International-Data-Spaces-Association / IDS-Messaging-Services

Latest: 7.0.0 - Lightweight and ready-to-use services to easily connect an IDS-Connector to different IDS-Infrastructure-Components.
Apache License 2.0
12 stars 6 forks source link

[Messaging] Fulltext SPARQL Query #53

Closed tmberthold closed 3 years ago

tmberthold commented 3 years ago

We need to see if we have the ability to send SPARQL-queries to the broker so that the user just has to give us a keyword, so we assemble the query and send the broker a query message.

PREFIX ids: <https://w3id.org/idsa/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?resultUri ?res { 
  GRAPH ?g { 
    { ?resultUri a ids:Resource } 
    UNION 
    { ?resultUri a ids:BaseConnector }
    ?resultUri ?predicate ?res .
    FILTER ( DATATYPE(?res) = xsd:string ) .
    FILTER(REGEX(?res, "LOREM IPSUM", "i"))
  }
} LIMIT 5 OFFSET 0
tmberthold commented 3 years ago

https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/issues/67