Library Functions

The Dydra SPARQL processor supports numerous native operators in addition to those defined by the SPARQL query language.

Many are drawn from the XPath function library while others are unique to the Dydra implementation.


boolean (EXPRESSION)

MACRO

date (EXPRESSION)

MACRO

dateTime (EXPRESSION)

MACRO

dayTimeDuration (EXPRESSION)

MACRO

decimal (EXPRESSION)

MACRO

double (EXPRESSION)

MACRO

duration (EXPRESSION)

MACRO

float (EXPRESSION)

MACRO

gDay (EXPRESSION)

MACRO

gMonth (EXPRESSION)

MACRO

gMonthDay (EXPRESSION)

MACRO

gYear (EXPRESSION)

MACRO

gYearMonth (EXPRESSION)

MACRO

integer (EXPRESSION)

MACRO

string (EXPRESSION)

MACRO

time (EXPRESSION)

MACRO

yearMonthDuration (EXPRESSION)

MACRO

abs (VALUE)

FUNCTION

ceil (VALUE)

FUNCTION

compare (TERM1 TERM2 &OPTIONAL COLLATION)

FUNCTION

concat (&REST STRINGS)

FUNCTION

contains (STRING1 STRING2 &OPTIONAL COLLATION)

FUNCTION

dateTime (DATE TIME)

FUNCTION

day-from-date (TERM)

FUNCTION

day-from-dateTime (TERM)

FUNCTION

days-from-duration (TERM)

FUNCTION

ends-with (STRING1 STRING2 &OPTIONAL COLLATION)

FUNCTION

floor (VALUE)

FUNCTION

format-date (VALUE PICTURE &OPTIONAL LANGUAGE CALENDAR PLACE)

FUNCTION

format-dateTime (VALUE PICTURE &OPTIONAL LANGUAGE CALENDAR PLACE)

FUNCTION

format-duration (VALUE PICTURE &OPTIONAL LANGUAGE CALENDAR PLACE)

FUNCTION

hours-from-dateTime (TERM)

FUNCTION

hours-from-duration (TERM)

FUNCTION

hours-from-time (TERM)

FUNCTION

lower-case (STRING)

FUNCTION

matches (TEXT PATTERN &OPTIONAL (FLAGS NIL))

FUNCTION

minutes-from-dateTime (TERM)

FUNCTION

minutes-from-duration (TERM)

FUNCTION

minutes-from-time (TERM)

FUNCTION

month-from-date (TERM)

FUNCTION

month-from-dateTime (TERM)

FUNCTION

months-from-duration (TERM)

FUNCTION

not (VALUE)

FUNCTION

replace (INPUT PATTERN REPLACEMENT &OPTIONAL (FLAGS NIL))

FUNCTION

round (VALUE)

FUNCTION

seconds-from-dateTime (TERM)

FUNCTION

seconds-from-duration (TERM)

FUNCTION

seconds-from-time (TERM)

FUNCTION

starts-with (STRING1 STRING2 &OPTIONAL COLLATION)

FUNCTION

string-length (STRING)

FUNCTION

substring (VALUE START &OPTIONAL LENGTH)

FUNCTION

substring-after (STRING SUBSTRING &OPTIONAL COLLATION)

FUNCTION

substring-before (STRING SUBSTRING &OPTIONAL COLLATION)

FUNCTION

timezone-from-date (TERM)

FUNCTION

timezone-from-dateTime (TERM)

FUNCTION

timezone-from-time (TERM)

FUNCTION

upper-case (STRING)

FUNCTION

year-from-date (TERM)

FUNCTION

year-from-dateTime (TERM)

FUNCTION

years-from-duration (TERM)

FUNCTION

Extension Functions

In addition to the standard SPARQL 1.1 filter functions, Dydra also supports several useful extension functions. The examples employ the following namespace prefix bindings:

prefix IRI
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
dydra http://dydra.com#

dydra:account-name()

This function returns the name of the current query’s owning account as a string value.

dydra:agent-id()

This function returns the id af the authenticated agent of the current query as a string value. If the agent is not authenticated the value is unbound.

dydra:agent-location()

This function returns the IP-address location af the authenticated agent of the current query as a string value. If the agent is not located the value is unbound.

dydra:query-uri()

This function returns the IRI of the current query.

dydra:repository-name()

This function returns the name of the current query’s target repository as a string value.

dydra:repository-uri()

This function returns the URI of the current query’s target repository as a string value.

dydra:revision-uri()

This function returns the IRI of the current query’s active revision.

dydra:revision-parent-uri()

This function returns the IRI of the current query’s active revision’s parent.

dydra:transaction-uri()

This function returns the IRI of the current query’s active transaction.

dydra:user-tag()

This function returns the user query id tag associated with the current query as a string value.

rdf:Seq()

This function facilitates creating RSS 1.0 feeds using CONSTRUCT queries. Succesive invocations return monotonically increasing integer values.

Table Of Contents

Previous topic

Abstract Algebra Expressions

Next topic

Sesame 2.x HTTP Protocol Interface