All Downloads are FREE. Search and download functionalities are using the official Maven repository.

x.jenax-arq-relations.5.2.0-1.source-code.concept-path-finder-type-local.sparql Maven / Gradle / Ivy

There is a newer version: 5.0.0-1
Show newest version
PREFIX eg: 
PREFIX owl: 

CONSTRUCT {
  ?x
    a eg:Transition ;
    owl:annotatedSubject ?st ;
    owl:annotatedProperty ?p ;
    owl:annotatedObject ?ot ;
    eg:count ?c .

  ?st ?x ?ot .
  ?ot ?y ?st .
  
  ?y owl:inverseOf ?x .
} {
  { SELECT DISTINCT ?st ?p ?ot (COUNT(*) AS ?c) {
    ?s ?p ?o
    FILTER(!STRSTARTS(STR(?p), 'http://www.w3.org/1999/02/22-rdf-syntax-ns#_'))
    FILTER(?p NOT IN (rdf:type))
    # FILTER(!isLiteral(?o))

    OPTIONAL { ?s a ?stmp }
    OPTIONAL { ?o a ?otmp }
    BIND(IF(BOUND(?stmp), ?stmp, eg:unbound) AS ?st)
    BIND(IF(BOUND(?otmp), ?otmp, eg:unbound) AS ?ot)
    
  } GROUP BY ?st ?p ?ot }

  BIND(MD5(CONCAT(STR(?st), STR(?p), STR(?ot))) AS ?hash)
  BIND(IRI(CONCAT("http://www.example.org/transition-", ?hash)) AS ?x)
  BIND(IRI(CONCAT("http://www.example.org/transition-inverse-", ?hash)) AS ?y)  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy