Loading TOC...

MarkLogic 12 EA 2 Product Documentation
sem:ruleset-store

sem:ruleset-store(
   $locations as xs:string*,
   [$store as sem:store*],
   [$options as xs:string*]
) as sem:store

Summary

The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in $store ("the triples that can be inferred from these rules").

If graph URIs are included with a sem:sparql query that includes sem:ruleset-store, the query will include "triples in the $store that are also in these graphs".

This function is a built-in.

Parameters
locations The locations of the rulesets.
store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database.
options Options as a sequence of string values. Available options are:
"size=number of MB"
The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE].

Required Privileges

http://marklogic.com/xdmp/privileges/sem-sparql

Example

xquery version "1.0-ml";

import module namespace sem = "http://marklogic.com/semantics" 
      at "/MarkLogic/semantics.xqy";     

let $store := sem:store((), cts:word-query("Alfa Romeo"))
return
sem:ruleset-store("my-location", $store)
=>
Returns a sem:store() derived from specified triples using
the specified ruleset.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.