-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinternalTestFunctions.ttl
More file actions
84 lines (68 loc) · 2.33 KB
/
internalTestFunctions.ttl
File metadata and controls
84 lines (68 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix fno: <https://w3id.org/function/ontology#> .
@prefix fnoi: <https://w3id.org/function/vocabulary/implementation#> .
@prefix fnom: <https://w3id.org/function/vocabulary/mapping#> .
@prefix ex: <http://example.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#############
# FUNCTIONS #
#############
ex:sum a fno:Function ;
fno:name "Sum of two integers" ;
rdfs:label "Sum of two integers" ;
dcterms:description "Returns the sum of two given integers" ;
fno:expects ( ex:int1 ex:int2 ) ;
fno:returns ( ex:intOut ) .
ex:rawListLen a fno:Function ;
fno:name "length of a raw list" ;
rdfs:label "length of a raw list" ;
dcterms:description "Returns the length of a raw list, i.e. without parameterized type" ;
fno:expects ( ex:rawList ) ;
fno:returns ( ex:intOut ) .
#####################
# FUNCTION MAPPINGS #
#####################
ex:sumMapping a fno:Mapping ;
fno:function ex:sum ;
fno:implementation ex:internalTestFunctions ;
fno:methodMapping [ a fnom:StringMethodMapping ; fnom:method-name "sum" ] .
ex:rawListLenMapping a fno:Mapping ;
fno:function ex:rawListLen ;
fno:implementation ex:internalTestFunctions ;
fno:methodMapping [ a fnom:StringMethodMapping ; fnom:method-name "rawListLen" ] .
##############
# PARAMETERS #
##############
ex:int1 a fno:Parameter ;
fno:name "integer 1" ;
rdfs:label "integer 1" ;
fno:predicate ex:p_int1 ;
fno:type xs:integer ;
fno:required "true"^^xs:boolean .
ex:int2 a fno:Parameter ;
fno:name "integer 2" ;
rdfs:label "integer 2" ;
fno:predicate ex:p_int2 ;
fno:type xs:integer ;
fno:required "true"^^xs:boolean .
ex:rawList a fno:Parameter ;
fno:name "a raw list" ;
rdfs:label "a raw list" ;
fno:predicate ex:p_rawList ;
fno:type rdf:List ;
fno:required "true"^^xs:boolean .
###########
# OUTPUTS #
###########
ex:intOut a fno:Output ;
fno:name "integer output" ;
rdfs:label "integer output" ;
fno:predicate ex:o_int ;
fno:type xs:integer .
###########
# CLASSES #
###########
ex:internalTestFunctions a fnoi:JavaClass ;
fnoi:class-name "be.ugent.idlab.knows.functions.internalfunctions.InternalTestFunctions" .