Namespace: sem
planBuilder. sem
Builds expressions to call functions in
the sem server library for a row pipeline.
- Since:
-
- 2.1.1
Methods
-
-
QNameToIri(arg1) → {SemIri}
-
Converts a QName value to an IRI value. Provides a client interface to a server function.
Parameters:
Name Type Argument Description arg1
XsQName <optional>
- - Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
bnode(value) → {SemBlank}
-
This function returns an identifier for a blank node, allowing the construction of a triple that refers to a blank node. This XQuery function backs up the SPARQL BNODE() function. Provides a client interface to a server function. See sem.bnode
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
If provided, the same blank node identifier is returned for the same argument value passed to the function. - Since:
-
- 2.1.1
Returns:
- Type
- SemBlank
-
-
coalesce(parameter1) → {Item}
-
Returns the value of the first argument that evaluates without error. This XQuery function backs up the SPARQL COALESCE() functional form. Provides a client interface to a server function. See sem.coalesce
Parameters:
Name Type Argument Description parameter1
Item <optional>
A value. - Since:
-
- 2.1.1
Returns:
- Type
- Item
-
-
datatype(value) → {SemIri}
-
Returns the name of the simple type of the atomic value argument as a SPARQL style IRI. If the value is derived from sem:unknown or sem:invalid, the datatype IRI part of those values is returned. This XQuery function backs up the SPARQL datatype() function. Provides a client interface to a server function. See sem.datatype
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to return the type of. - Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
defaultGraphIri() → {SemIri}
-
Returns the iri of the default graph. Provides a client interface to a server function. See sem.defaultGraphIri
- Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
if(condition, then, else) → {Item}
-
The IF function form evaluates the first argument, interprets it as a effective boolean value, then returns the value of expression2 if the EBV is true, otherwise it returns the value of expression3. Only one of expression2 and expression3 is evaluated. If evaluating the first argument raises an error, then an error is raised for the evaluation of the IF expression. This XQuery function backs up the SPARQL IF() functional form. Provides a client interface to a server function. See sem.if
Parameters:
Name Type Argument Description condition
XsBoolean <optional>
The condition. then
Item <optional>
The then expression. else
Item <optional>
The else expression. - Since:
-
- 2.1.1
Returns:
- Type
- Item
-
-
invalid(string, datatype) → {SemInvalid}
-
Returns a sem:invalid value with the given literal value and datatype IRI. The sem:invalid type extends xs:untypedAtomic, and represents an RDF value whose literal string is invalid according to the schema for it's datatype. Provides a client interface to a server function. See sem.invalid
Parameters:
Name Type Argument Description string
XsString <optional>
The lexical value. datatype
SemIri <optional>
The datatype IRI. - Since:
-
- 2.1.1
Returns:
- Type
- SemInvalid
-
-
invalidDatatype(val) → {SemIri}
-
Returns the datatype IRI of a sem:invalid value. Provides a client interface to a server function. See sem.invalidDatatype
Parameters:
Name Type Argument Description val
SemInvalid <optional>
The sem:invalid value. - Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
iri(stringIri) → {SemIri}
-
This is a constructor function that takes a string and constructs an item of type sem:iri from it. Provides a client interface to a server function. See sem.iri
Parameters:
Name Type Argument Description stringIri
XsAnyAtomicType <optional>
The string with which to construct the sem:iri. - Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
iriToQName(arg1) → {XsQName}
-
Converts an IRI value to a QName value. Provides a client interface to a server function.
Parameters:
Name Type Argument Description arg1
XsString <optional>
- - Since:
-
- 2.1.1
Returns:
- Type
- XsQName
-
-
isBlank(value) → {XsBoolean}
-
Returns true if the argument is an RDF blank node - that is, derived from type sem:blank. This XQuery function backs up the SPARQL isBlank() function. Provides a client interface to a server function. See sem.isBlank
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to test. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
isIRI(value) → {XsBoolean}
-
Returns true if the argument is an RDF IRI - that is, derived from type sem:iri, but not derived from type sem:blank. This XQuery function backs up the SPARQL isIRI() and isURI() functions. Provides a client interface to a server function. See sem.isIRI
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to test. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
isLiteral(value) → {XsBoolean}
-
Returns true if the argument is an RDF literal - that is, derived from type xs:anyAtomicType, but not derived from type sem:iri. This XQuery function backs up the SPARQL isLiteral() function. Provides a client interface to a server function. See sem.isLiteral
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to test. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
isNumeric(value) → {XsBoolean}
-
Returns true if the argument is a valid numeric RDF literal. This XQuery function backs up the SPARQL isNumeric() function. Provides a client interface to a server function. See sem.isNumeric
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to test. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
lang(value) → {XsString}
-
Returns the language of the value passed in, or the empty string if the value has no language. Only values derived from rdf:langString have a language. This XQuery function backs up the SPARQL lang() function. Provides a client interface to a server function. See sem.lang
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to return the language of. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
langMatches(langTag, langRange) → {XsBoolean}
-
Returns true if lang-tag matches lang-range according to the basic filtering scheme defined in RFC4647. This XQuery function backs up the SPARQL langMatches() function. Provides a client interface to a server function. See sem.langMatches
Parameters:
Name Type Argument Description langTag
XsString <optional>
The language tag. langRange
XsString <optional>
The language range. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
random() → {XsDouble}
-
Returns a random double between 0 and 1. This XQuery function backs up the SPARQL RAND() function. Provides a client interface to a server function. See sem.random
- Since:
-
- 2.1.1
Returns:
- Type
- XsDouble
-
-
rulesetStore(locations, store, options) → {SemStore}
-
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"). Provides a client interface to a server function. See sem.rulesetStore
Parameters:
Name Type Argument Description locations
XsString <optional>
The locations of the rulesets. store
SemStore <optional>
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
XsString <optional>
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]. - Since:
-
- 2.1.1
Returns:
- Type
- SemStore
-
-
sameTerm(a, b) → {XsBoolean}
-
Returns true if the arguments are the same RDF term as defined by the RDF concepts specification. This XQuery function backs up the SPARQL sameTerm() function. Provides a client interface to a server function. See sem.sameTerm
Parameters:
Name Type Argument Description a
XsAnyAtomicType <optional>
The first value to test. b
XsAnyAtomicType <optional>
The second value to test. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
store(options, query) → {SemStore}
-
The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query"). Provides a client interface to a server function. See sem.store
Parameters:
Name Type Argument Description options
XsString <optional>
Options as a sequence of string values. Available options are: "any" Values from any fragment should be included. "document" Values from document fragments should be included. "properties" Values from properties fragments should be included. "locks" Values from locks fragments should be included. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "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]. "no-default-rulesets" Don't apply the database's default rulesets to the sem:store. "locking=read-write/write" read-write: Read-lock documents containing triples being accessed, write-lock documents being updated; write: Only write-lock documents being updated. Default is locking=read-write. Locking is ignored in query transaction. query
CtsQuery <optional>
Only include triples in fragments selected by the cts:query. The triples do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations. If a string is entered, the string is treated as a cts:word-query of the specified string. - Since:
-
- 2.1.1
Returns:
- Type
- SemStore
-
-
timezoneString(value) → {XsString}
-
Returns the timezone of an xs:dateTime value as a string. This XQuery function backs up the SPARQL TZ() function. Provides a client interface to a server function. See sem.timezoneString
Parameters:
Name Type Argument Description value
XsDateTime <optional>
The dateTime value - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
typedLiteral(value, datatype) → {XsAnyAtomicType}
-
Returns a value to represent the RDF typed literal with lexical value value and datatype IRI datatype. Returns a value of type sem:unknown for datatype IRIs for which there is no schema, and a value of type sem:invalid for lexical values which are invalid according to the schema for the given datatype. This XQuery function backs up the SPARQL STRDT() function. Provides a client interface to a server function. See sem.typedLiteral
Parameters:
Name Type Argument Description value
XsString <optional>
The lexical value. datatype
SemIri <optional>
The datatype IRI. - Since:
-
- 2.1.1
Returns:
- Type
- XsAnyAtomicType
-
-
unknown(string, datatype) → {SemUnknown}
-
Returns a sem:unknown value with the given literal value and datatype IRI. The sem:unknown type extends xs:untypedAtomic, and represents an RDF value with a datatype IRI for which no schema is available. Provides a client interface to a server function. See sem.unknown
Parameters:
Name Type Argument Description string
XsString <optional>
The lexical value. datatype
SemIri <optional>
The datatype IRI. - Since:
-
- 2.1.1
Returns:
- Type
- SemUnknown
-
-
unknownDatatype(val) → {SemIri}
-
Returns the datatype IRI of a sem:unknown value. Provides a client interface to a server function. See sem.unknownDatatype
Parameters:
Name Type Argument Description val
SemUnknown <optional>
The sem:unknown value. - Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
uuid() → {SemIri}
-
Return a UUID URN (RFC4122) as a sem:iri value. This XQuery function backs up the SPARQL UUID() function. Provides a client interface to a server function. See sem.uuid
- Since:
-
- 2.1.1
Returns:
- Type
- SemIri
-
-
uuidString() → {XsString}
-
Return a string that is the scheme specific part of random UUID URN (RFC4122). This XQuery function backs up the SPARQL STRUUID() function. Provides a client interface to a server function. See sem.uuidString
- Since:
-
- 2.1.1
Returns:
- Type
- XsString