286
Internet of Things (IoT)
Table 13.9 shows the built-in functions which are defined for XML Schema data types
such as date, time, and duration.
TABLE 13.9
Built-in Functions for Date, Time, and Duration
Built-Ins
Comment
swrlb:yearMonthDuration
- argument1 consisting of argument2( in year) and argument3
(in month)
swrlb:dayTimeDuration
- argument1 consisting of argument2(in days), argument3(in
hours), argument4(in minutes), and argument5(in seconds)
swrlb:dateTime
- argument1 consisting of argument2(in year), argument3(in month),
argument4(in day), argument5(in hours), argument6(in minutes),
argument7(in seconds), and argument8(in timezone)
swrlb:date
- argument1 consisting of argument2(in year), argument3(in
month), argument4(in day), and argument(in timezone)
swrlb:time
- argument1 consisting of argument2 (hours), argument3
(minutes), argument4 (seconds), and argument5 (timezone)
swrlb:addYearMonthDurations
- argument1 is the sum of argument2 (in yearMonthDuration)
through last argument (in yearMonthDuration)
(Continued)
TABLE 13.8 (Continued)
Built-Ins for Strings
Built-Ins
Syntax and Comment
swrlb:substring
swrlb:substring(?x,?y,?z,?n)
- argument1 is the substring starting at character offset the argument3 in the
string the argument2 with length the argument4(optional)
swrlb:upperCase
swrlb:upperCase(?x,?y)
- argument1 is the uppercase of argument2
swrlb:lower-Case
swrlb:lowercase(?x,?y)
- argument1 is the lowercase of argument2
swrlb:contains
swrlb:contains(?x,?y)
- the argument1 contains argument2
swrlb:containsIgnoreCase
swrlb:containsIgnoreCase(?x,?y)
- argument1 contains argument2
swrlb:startsWith
swrlb:startsWith(?x,?y)
- argument1 starts with argument2
swrlb:endsWith
swrlb:endsWith(?x,?y)
- argument1 ends with argument2
swrlb:substringBefore
swrlb:substringBefore(?x,?y,?z)
- argument1 is the characters of argument2 that precede the characters of
argument3
swrlb:matches
swrlb:matches(?x,?y)
- argument1 matches argument2(in regular expression)
swrlb:substringAfter
swrlb:substringAfter(?x,?y,?z)
- argument1 is the characters of argument2 that follow the characters of
argument3
swrlb:replace
swrlb:replace(?x,?y,?z,?n)
- argument1 is the value of argument2 with every substring matched by
argument3(regular expression) replaced by the replacement
argument4(string)
Précédent

- 310/358

Suivant