This is from the TBC Help page for SPARQL Property functions:

SPARQL Property Functions

   - tops:statementDefinedIn


   - *Syntax:* (?subject ?predicate ?object) tops:statementDefinedIn
      ?baseURI
      - *Description:* Returns the defining ontology base URI for a given
      statement. The statement should exist in or be imported into the current
      graph.
      - *Example:* If ?baseURI variable is bound as a literal or a uri
      node:


      SELECT ?baseURI
      WHERE {
        (geotravel:Accommodation rdf:type owl:Class)
tops:statementDefinedIn ?baseURI
      }
                

      The above query returns the base URI of geotravel ontology.


On Mon, May 18, 2020 at 2:33 PM lip vault <lipva...@gmail.com> wrote:

>
> In a SPARQL query, is there a simple way to return the graph where a
> triple pattern is defined?  In topbraid hovering over a restriction
> statement will give one a blurb of information.
> One of the statements in the blurb is the specific rdf file where the
> restriction is defined.  Can you do something like this in SPARQL.
> I tried it and was hoping to have all the ?g IRIs returned, but it didn't
> work.
>
>
> SELECT DISTINCT ?s ?p ?g
> WHERE{
> ?s rdfs:subClassOf ?p .
> GRAPH ?g
> {
> ?p a owl:Restriction .
> ?p owl:onProperty propertyICareAbout .
> ?p owl:someValuesFrom classICareAbout .
> }
> }
>
>
> Thanks in advance, and any help appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to topbraid-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/8aa4b9d6-d2b0-467e-af85-0151e6cb6b50%40googlegroups.com
> <https://groups.google.com/d/msgid/topbraid-users/8aa4b9d6-d2b0-467e-af85-0151e6cb6b50%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/CAF0WbnLbkZrrhJfdN9%3D_CTd4KmHg-q7OHJuk_yP%2BLPC_MiXNew%40mail.gmail.com.

Reply via email to