Loading TOC...

sem functions

The table below lists all the sem built-in functions (in this namespace: http://marklogic.com/semantics).

56 functions
Function name Description
sem.binding Creates a sem:binding object, which is a sub-type of json:object (and map:map).
sem.bnode This function returns an identifier for a blank node, allowing the construction of a triple that refers to a blank node.
sem.coalesce Returns the value of the first argument that evaluates without error.
sem.curieExpand This function expands a CURIE (Compact URI) into a sem:iri object.
sem.curieShorten This function shortens an IRI into a CURIE (Compact URI) into a sem:iri object.
sem.databaseNodes This function returns database nodes backing given triples.
sem.datatype Returns the name of the simple type of the atomic value argument as a SPARQL style IRI.
sem.defaultGraphIri Returns the iri of the default graph.
sem.describe This function implements the Concise Bounded Description (CBD) specification to describe one or more nodes in the graph.
sem.graph This function returns all triples from a named graph in the database.
sem.graphAddPermissions Add permissions to the graph specified.
sem.graphDelete This function deletes a named graph, and its graph document containing metadata, from the database.
sem.graphGetPermissions Get permissions to the graph specified.
sem.graphInsert This function inserts triples into a named graph, creating the graph if necessary.
sem.graphRemovePermissions Remove permissions from the graph specified.
sem.graphSetPermissions Set permissions to the graph specified.
sem.if 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.
sem.inMemoryStore Returns a sem:store constructor that queries from the sequence of sem:triple values passed in as an argument.
sem.invalid Returns a sem:invalid value with the given literal value and datatype IRI.
sem.invalidDatatype Returns the datatype IRI of a sem:invalid value.
sem.iri This is a constructor function that takes a string and constructs an item of type sem.iri from it.
sem.isBlank Returns true if the argument is an RDF blank node - that is, derived from type sem:blank.
sem.isIRI Returns true if the argument is an RDF IRI - that is, derived from type sem:iri, but not derived from type sem:blank.
sem.isLiteral Returns true if the argument is an RDF literal - that is, derived from type xs:anyAtomicType, but not derived from type sem:iri.
sem.isNumeric Returns true if the argument is a valid numeric RDF literal.
sem.lang Returns the language of the value passed in, or the empty string if the value has no language.
sem.langMatches Returns true if $lang-tag matches $lang-range according to the basic filtering scheme defined in RFC4647.
sem.prefixes This function returns a set of prefix mappings for use with CURIE processing.
sem.queryResultsSerialize This function implements the W3C SPARQL Query Results format.
sem.random Returns a random double between 0 and 1.
sem.rdfBuilder This function returns a function that builds triples from CURIE and blank node syntax.
sem.rdfGet This function returns sem:triples from a specified location.
sem.rdfInsert This function inserts triples into a specified database as one or more sem:triples documents.
sem.rdfLoad This function inserts an RDF document from a specified location into the designated database.
sem.rdfParse This function returns parsed sem:triple objects from a text format or XML.
sem.rdfSerialize This function returns a string or json or XML serialization of the provided triples.
sem.resolveIri Resolves a relative URI against an absolute URI.
sem.rulesetStore 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").
sem.sameTerm Returns true if the arguments are the same RDF term as defined by the RDF concepts specification.
sem.sparql Executes a SPARQL query against the database.
sem.sparqlPlan Return a node representing the query plan of the given SPARQL query.
sem.sparqlUpdate Executes a SPARQL Update operation against the database.
sem.sparqlValues This function executes a SPARQL SELECT query using passed-in bindings participating as a starting point for the query.
sem.store 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.
sem.timezoneString Returns the timezone of an xs:dateTime value as a string.
sem.transitiveClosure From a starting set of seeds, follow a given set of predicates, to a given depth, and return all unique node IRIs.
sem.triple Creates a triple object, which represents an RDF triple containing atomic values representing the subject, predicate, object, and optionally graph identifier (graph IRI).
sem.tripleGraph Returns the graph identifier (graph IRI) from a sem:triple value.
sem.tripleObject Returns the object from a sem:triple value.
sem.triplePredicate Returns the predicate from a sem:triple value.
sem.tripleSubject Returns the subject from a sem:triple value.
sem.typedLiteral Returns a value to represent the RDF typed literal with lexical value $value and datatype IRI $datatype.
sem.unknown Returns a sem:unknown value with the given literal value and datatype IRI.
sem.unknownDatatype Returns the datatype IRI of a sem:unknown value.
sem.uuid Return a UUID URN (RFC4122) as a sem:iri value.
sem.uuidString Return a string that is the scheme specific part of random UUID URN (RFC4122).