-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@prefix prov: <http://www.w3.org/ns/prov#> . | ||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
@prefix setl: <http://purl.org/twc/vocab/setl/> . | ||
@prefix csvw: <http://www.w3.org/ns/csvw#> . | ||
@prefix pv: <http://purl.org/net/provenance/ns#> . | ||
@prefix : <http://example.com/setl/> . | ||
|
||
:table a csvw:Table, setl:Table; | ||
csvw:delimiter ","; | ||
prov:wasGeneratedBy [ | ||
a setl:Extract; | ||
prov:used <social.csv>; | ||
]. | ||
|
||
|
||
<http://example.com/social> a void:Dataset; | ||
prov:wasGeneratedBy [ | ||
a setl:Transform, setl:JSLDT; | ||
prov:used :table; | ||
setl:hasContext '''{ | ||
"@vocab" : "http://example.com/ns/" | ||
}'''; | ||
prov:value '''[{ | ||
"@for" : "p, o in row.iteritems()", | ||
"@do" : { | ||
"@if" : "not isempty(o)", | ||
"@id" : "https://example.com/social/{{name}}", | ||
"http://example.com/ns/{{p}}" : "{{o}}" | ||
} | ||
}]''']. | ||
|
||
<social-naive.ttl> a pv:File; | ||
dcterms:format "text/turtle"; | ||
prov:wasGeneratedBy [ | ||
a setl:Load; | ||
prov:used <http://example.com/social> ; | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@prefix : <http://example.com/ns/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
<https://example.com/social/0> :DOB "1/12/1983" ; | ||
:ID "Alice" ; | ||
:Knows "Bob; Charles" ; | ||
:MarriedTo "Bob" ; | ||
:Name "Alice Smith" . | ||
|
||
<https://example.com/social/1> :DOB "3/23/1985" ; | ||
:ID "Bob" ; | ||
:Knows "Alice; Charles" ; | ||
:MarriedTo "Alice" ; | ||
:Name "Bob Smith" . | ||
|
||
<https://example.com/social/2> :DOB "12/15/1955" ; | ||
:ID "Charles" ; | ||
:Knows "Alice; Bob" ; | ||
:Name "Charles Brown" . | ||
|
||
<https://example.com/social/3> :DOB "4/25/1967" ; | ||
:ID "Dave" ; | ||
:Name "Dave Jones" . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID,Name,MarriedTo,Knows,DOB | ||
Alice,Alice Smith,Bob,Bob; Charles,1/12/1983 | ||
Bob,Bob Smith,Alice,Alice; Charles,3/23/1985 | ||
Charles,Charles Brown,,Alice; Bob,12/15/1955 | ||
Dave,Dave Jones,,,4/25/1967 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@prefix prov: <http://www.w3.org/ns/prov#> . | ||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
@prefix setl: <http://purl.org/twc/vocab/setl/> . | ||
@prefix csvw: <http://www.w3.org/ns/csvw#> . | ||
@prefix pv: <http://purl.org/net/provenance/ns#> . | ||
@prefix : <http://example.com/setl/> . | ||
|
||
:table a csvw:Table, setl:Table; | ||
csvw:delimiter ","; | ||
prov:wasGeneratedBy [ | ||
a setl:Extract; | ||
prov:used <social.csv>; | ||
]. | ||
|
||
|
||
<http://example.com/social> a void:Dataset; | ||
prov:wasGeneratedBy [ | ||
a setl:Transform, setl:JSLDT; | ||
prov:used :table; | ||
setl:hasContext '''{ | ||
"foaf" : "http://xmlns.com/foaf/0.1/" | ||
}'''; | ||
prov:value '''[{ | ||
"@id": "https://example.com/social/{{row.ID}}", | ||
"@type": "foaf:Person", | ||
"foaf:name": "{{row.Name}}", | ||
"http://schema.org/spouse": [{ | ||
"@if" : "not isempty(row.MarriedTo)", | ||
"@id" : "https://example.com/social/{{row.ID}}" | ||
}], | ||
"foaf:knows": [{ | ||
"@if" : "not isempty(row.Knows)", | ||
"@for" : "friend in row.Knows.split('; ')", | ||
"@do" : { "@id" : "https://example.com/social/{{friend}}" } | ||
}] | ||
}]''']. | ||
|
||
<social.ttl> a pv:File; | ||
dcterms:format "text/turtle"; | ||
prov:wasGeneratedBy [ | ||
a setl:Load; | ||
prov:used <http://example.com/social> ; | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix ns1: <http://schema.org/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
<https://example.com/social/Dave> a foaf:Person ; | ||
foaf:name "Dave Jones" . | ||
|
||
<https://example.com/social/Charles> a foaf:Person ; | ||
foaf:knows <https://example.com/social/Alice>, | ||
<https://example.com/social/Bob> ; | ||
foaf:name "Charles Brown" . | ||
|
||
<https://example.com/social/Alice> a foaf:Person ; | ||
ns1:spouse <https://example.com/social/Alice> ; | ||
foaf:knows <https://example.com/social/Bob>, | ||
<https://example.com/social/Charles> ; | ||
foaf:name "Alice Smith" . | ||
|
||
<https://example.com/social/Bob> a foaf:Person ; | ||
ns1:spouse <https://example.com/social/Bob> ; | ||
foaf:knows <https://example.com/social/Alice>, | ||
<https://example.com/social/Charles> ; | ||
foaf:name "Bob Smith" . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
description-file = README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters