Skip to content

Commit

Permalink
Merge pull request #43 from kg-construct/fix/prefixes
Browse files Browse the repository at this point in the history
fixed old prefixes
  • Loading branch information
bjdmeest authored Mar 26, 2024
2 parents bd7e7aa + 807bdef commit 00b8d0a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 53 deletions.
11 changes: 5 additions & 6 deletions spec/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ For now, it is unclear how to handle a nested function where that nested Triples
```turtle "example": "use nested function"
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://w3id.org/rml/> .
<#Person_Mapping>
rml:logicalSource <#LogicalSource> ;
rr:subjectMap <#SubjectMap> ;
rr:predicateObjectMap <#NameMapping> .
rml:subjectMap <#SubjectMap> ;
rml:predicateObjectMap <#NameMapping> .
<#NameMapping>
rr:predicate dbo:title ;
rr:objectMap [
rml:predicate dbo:title ;
rml:objectMap [
rml:functionExecution <#Execution> ;
rml:return grel:stringOut
] ;
Expand Down
4 changes: 2 additions & 2 deletions spec/docs/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ The change is included below with changes highlighted in bold.

An [=Expression Map=] can have the following properties:

- 0 or 1 rr:constant
- 0 or 1 rml:constant
- 0 or 1 rml:reference
- 0 or 1 rr:template
- 0 or 1 rml:template
- **0 or 1 rml:functionExecution**

---
Expand Down
26 changes: 12 additions & 14 deletions spec/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,15 @@ graph LR
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
<#Person_Mapping>
rml:logicalSource <#LogicalSource> ;
rr:subjectMap <#SubjectMap> ;
rr:predicateObjectMap <#NameMapping> .
rml:subjectMap <#SubjectMap> ;
rml:predicateObjectMap <#NameMapping> .
<#NameMapping>
rr:predicate dbo:title ;
rr:objectMap [ # A function-valued expression map
rml:predicate dbo:title ;
rml:objectMap [ # A function-valued expression map
rml:functionExecution <#Execution> ; # Link to a Function Execution
rml:return grel:stringOut # Specify which return of the referenced function to use, if omitted, the first specified return is used
] .
Expand Down Expand Up @@ -148,37 +147,36 @@ The same example, but written without shortcuts, is as follows:
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
<#Person_Mapping>
rml:logicalSource <#LogicalSource> ; # Specify the data source
rr:subjectMap <#SubjectMap> ; # Specify the subject
rr:predicateObjectMap <#NameMapping> . # Specify the predicate-object-map
rml:subjectMap <#SubjectMap> ; # Specify the subject
rml:predicateObjectMap <#NameMapping> . # Specify the predicate-object-map
<#NameMapping>
rr:predicate dbo:title ; # Specify the predicate
rr:objectMap [ # Specify the object-map: a function-valued expression map
rml:predicate dbo:title ; # Specify the predicate
rml:objectMap [ # Specify the object-map: a function-valued expression map
rml:functionExecution <#Execution> ; # Link to a Function Execution
rml:returnMap [
a rml:ReturnMap ;
rr:constant grel:stringOut # Specify which return of the referenced function to use
rml:constant grel:stringOut # Specify which return of the referenced function to use
]
] .
<#Execution> a rml:FunctionExecution ; # A new class
rml:functionMap [
a rml:FunctionMap ;
rr:constant grel:toUppercase # Specify which FnO function
rml:constant grel:toUppercase # Specify which FnO function
] ;
rml:input # Specify the inputs
[
a rml:Input ; # A new class
rml:parameterMap [
a rml:ParameterMap ;
rr:constant grel:valueParam ; # Specify this specific parameter
rml:constant grel:valueParam ; # Specify this specific parameter
] ;
rml:inputValueMap [ # Link to the term map that creates the input value
a rr:TermMap ;
a rml:TermMap ;
rml:reference "name" # Specify the reference within the data source
]
] .
Expand Down
11 changes: 5 additions & 6 deletions spec/docs/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ but no data transformations.

```turtle "example": "RML Mapping without data transformations"
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://w3id.org/rml/> .
<#Person_Mapping>
rml:logicalSource <#LogicalSource> ; # Specify the data source
rr:subjectMap <#SubjectMap> ; # Specify the subject
rr:predicateObjectMap [ # Specify the predicate-object-map
rr:predicate dbo:title ; # Specify the predicate
rr:objectMap [ # Specify the object-map
rml:subjectMap <#SubjectMap> ; # Specify the subject
rml:predicateObjectMap [ # Specify the predicate-object-map
rml:predicate dbo:title ; # Specify the predicate
rml:objectMap [ # Specify the object-map
rml:reference "name" # Specify the reference within the data source
]
] .
Expand Down
9 changes: 4 additions & 5 deletions spec/resources/example-nested.ttl
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .

<#Person_Mapping>
rml:logicalSource <#LogicalSource> ;
rr:subjectMap <#SubjectMap> ;
rr:predicateObjectMap <#NameMapping> .
rml:subjectMap <#SubjectMap> ;
rml:predicateObjectMap <#NameMapping> .

<#NameMapping>
rr:predicate dbo:title ;
rr:objectMap [
rml:predicate dbo:title ;
rml:objectMap [
rml:functionExecution <#Execution> ;
rml:return grel:stringOut
] ;
Expand Down
17 changes: 8 additions & 9 deletions spec/resources/example-uppercase.ttl
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .

<#Person_Mapping>
rml:logicalSource <#LogicalSource> ; # Specify the data source
rr:subjectMap <#SubjectMap> ; # Specify the subject
rr:predicateObjectMap <#NameMapping> . # Specify the predicate-object-map
rml:subjectMap <#SubjectMap> ; # Specify the subject
rml:predicateObjectMap <#NameMapping> . # Specify the predicate-object-map

<#NameMapping>
rr:predicate dbo:title ; # Specify the predicate
rr:objectMap [ # Specify the object-map: a function-valued expression map
rml:predicate dbo:title ; # Specify the predicate
rml:objectMap [ # Specify the object-map: a function-valued expression map
rml:functionExecution <#Execution> ; # Link to a Function Execution
rml:returnMap [
a rml:ReturnMap ;
rr:constant grel:stringOut # Specify which return of the referenced function to use
rml:constant grel:stringOut # Specify which return of the referenced function to use
]
] .

<#Execution> a rml:FunctionExecution ; # A new class
rml:functionMap [
a rml:FunctionMap ;
rr:constant grel:toUppercase # Specify which FnO function
rml:constant grel:toUppercase # Specify which FnO function
] ;
rml:input # Specify the inputs
[
a rml:Input ; # A new class
rml:parameterMap [
a rml:ParameterMap ;
rr:constant grel:valueParam ; # Specify this specific parameter
rml:constant grel:valueParam ; # Specify this specific parameter
] ;
rml:inputValueMap [ # Link to the term map that creates the input value
a rr:TermMap ;
a rml:TermMap ;
rml:reference "name" # Specify the reference within the data source
]
] .
9 changes: 4 additions & 5 deletions spec/resources/example-uppercase_shortcut.ttl
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .

<#Person_Mapping>
rml:logicalSource <#LogicalSource> ;
rr:subjectMap <#SubjectMap> ;
rr:predicateObjectMap <#NameMapping> .
rml:subjectMap <#SubjectMap> ;
rml:predicateObjectMap <#NameMapping> .

<#NameMapping>
rr:predicate dbo:title ;
rr:objectMap [ # A function-valued expression map
rml:predicate dbo:title ;
rml:objectMap [ # A function-valued expression map
rml:functionExecution <#Execution> ; # Link to a Function Execution
rml:return grel:stringOut # Specify which return of the referenced function to use, if omitted, the first specified return is used
] .
Expand Down
11 changes: 5 additions & 6 deletions spec/resources/problem_mapping.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://w3id.org/rml/> .

<#Person_Mapping>
rml:logicalSource <#LogicalSource> ; # Specify the data source
rr:subjectMap <#SubjectMap> ; # Specify the subject
rr:predicateObjectMap [ # Specify the predicate-object-map
rr:predicate dbo:title ; # Specify the predicate
rr:objectMap [ # Specify the object-map
rml:subjectMap <#SubjectMap> ; # Specify the subject
rml:predicateObjectMap [ # Specify the predicate-object-map
rml:predicate dbo:title ; # Specify the predicate
rml:objectMap [ # Specify the object-map
rml:reference "name" # Specify the reference within the data source
]
] .

0 comments on commit 00b8d0a

Please sign in to comment.