285
Semantic Technologies for IoT
Table 13.7 shows built-ins which are defined for various arithmetic operations.
Table 13.8 shows the built-in functions which are defined for strings.
TABLE 13.7
Mathematics Built-Ins
Built-Ins
Syntax and Comment
swrlb:add
swrlb:add(?x,?y,?z)
- argument1 is addition of argument2 and argument3
swrlb:multiply
swrlb:multiply(?x,?y,?z)
- argument1 is multiplication of argument2 and argument3
swrlb:subtract
swrlb:subtract(?x,?y,?z)
- argument1 is the difference of argument2 and argument3
swrlb:mod
swrlb:mod(?x,?y,?z)
- argument1 is the remainder resulting from dividing argument2(dividend) by
argument3(divisor)
swrlb:divide
swrlb:divide(?x,?y.?z)
- argument1 is the quotient of argument2 divided by argument3
swrlb:pow
swrlb:pow(?x,?y,?z)
- argument1 is the result of argument2 raised to argument3(power)
swrlb:unaryMinus
swrlb:unaryMinus(?x,?y)
- argument1 is argument2 with its sign reversed
swrlb:unaryPlus
swrlb:unaryPlus(?x,?y)
- argument1 is argument2 with its sign unchanged
swrlb:abs
swrlb:abs (?x,?y)
- argument1 is the absolute value of argument2
swrlb:round
swrlb:round(?x,?y)
- argument1 is the nearest number to argument2 without fractional part
swrlb:floor
swrlb:floor(?x,?y)
- argument1 is the largest number without fractional part
swrlb:ceiling
swrlb:ceiling(?x,?y)
- argument1 is the smallest number without fractional part
swrlb:tan
swrlb:tan(?x,?y)
- argument1 is the tangent of argument2(in radian)
swrlb:sin
swrlb:sin(?x,?y)
- argument1 is the sine of argument2(in radian)
swrlb:cos
swrlb:cos(?x,?y)
- argument1 is the cosine of argument2(in radian)
TABLE 13.8
Built-Ins for Strings
Built-Ins
Syntax and Comment
swrlb:stringEqualIgnoreCase
swrlb:stringEqualIgnoreCase(?x,?y)
- argument1 is the same as argument2
swrlb:stringConcat
swrlb:stringConcat(?x,?y,?z)
- argument1(string) is concatenation of argument2 through the last argument
swrlb:stringLength
swrlb:stringLength(?x,?y)
- argument1 is the length of argument2
(Continued)
Précédent

- 309/358

Suivant