-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from TheRazorace/dev
Addition of in-memory YARRRML test cases (dev branch)
- Loading branch information
Showing
25 changed files
with
1,166 additions
and
0 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,18 @@ | ||
# In-Memory YARRRML | ||
Syntax proposal test cases for in-memory YARRRML. | ||
|
||
IMTC001: Pandas dataframe as source | ||
|
||
IMTC002: Pandas dataframe as source without specifying software characteristics | ||
|
||
IMTC003: Pandas dataframe as source without specifying software characteristics - short version | ||
|
||
IMTC004: Python dictionary as source | ||
|
||
IMTC005: Python dictionary as source without specifying software characteristics - short version | ||
|
||
IMTC006: Multiple Pandas dataframes as sources | ||
|
||
IMTC007: Multiple Python dictionaries as sources | ||
|
||
IMTC008: Combination of in-memory and localy stored source |
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,42 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rml: <http://w3id.org/rml/>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rml:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
sd:hasDataTransformation [ | ||
sd:hasSoftwareRequirements "pandas>=1.1.0"; | ||
sd:hasSourceCode [ | ||
sd:programmingLanguage "Python3.9"; | ||
]; | ||
]; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rml:subjectMap [ | ||
a rml:SubjectMap; | ||
rml:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rml:predicateObjectMap [ | ||
rml:predicateMap [ | ||
a rml:PredicateMap; | ||
rml:constant rdf:type; | ||
]; | ||
rml:objectMap [ | ||
a rml:ObjectMap; | ||
rml:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,43 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rr: <http://www.w3.org/ns/r2rml#>. | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rr:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
sd:hasDataTransformation [ | ||
sd:hasSoftwareRequirements "pandas>=1.1.0"; | ||
sd:hasSourceCode [ | ||
sd:programmingLanguage "Python3.9"; | ||
]; | ||
]; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rr:subjectMap [ | ||
a rr:SubjectMap; | ||
rr:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rr:predicateObjectMap [ | ||
rr:predicateMap [ | ||
a rr:PredicateMap; | ||
rr:constant rdf:type; | ||
]; | ||
rr:objectMap [ | ||
a rr:ObjectMap; | ||
rr:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,23 @@ | ||
prefixes: | ||
insta: "http://instagram.com/data/" | ||
rr: "http://www.w3.org/ns/r2rml#" | ||
rml: "http://semweb.mmlab.be/ns/rml#" | ||
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
rdfs: "http://www.w3.org/2000/01/rdf-schema#" | ||
xsd: "http://www.w3.org/2001/XMLSchema#" | ||
foaf: "http://xmlns.com/foaf/0.1/" | ||
sd: "https://w3id.org/okn/o/sd/" | ||
kg4di: "https://w3id.org/kg4di/" | ||
|
||
mappings: | ||
df_map: | ||
sources: | ||
access: $(output_dataframe) | ||
referenceFormulation: DataFrame | ||
structureDefiner: Pandas | ||
softwareSpecification: | ||
programmingLanguage: Python3.9 | ||
softwareRequirements: “pandas>=1.1.0” | ||
s: http://instagram.com/data/user{Id} | ||
po: | ||
- [a, insta:User] |
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,36 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rml: <http://w3id.org/rml/>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rml:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rml:subjectMap [ | ||
a rml:SubjectMap; | ||
rml:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rml:predicateObjectMap [ | ||
rml:predicateMap [ | ||
a rml:PredicateMap; | ||
rml:constant rdf:type; | ||
]; | ||
rml:objectMap [ | ||
a rml:ObjectMap; | ||
rml:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,37 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rr: <http://www.w3.org/ns/r2rml#>. | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rr:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rr:subjectMap [ | ||
a rr:SubjectMap; | ||
rr:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rr:predicateObjectMap [ | ||
rr:predicateMap [ | ||
a rr:PredicateMap; | ||
rr:constant rdf:type; | ||
]; | ||
rr:objectMap [ | ||
a rr:ObjectMap; | ||
rr:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,20 @@ | ||
prefixes: | ||
insta: "http://instagram.com/data/" | ||
rr: "http://www.w3.org/ns/r2rml#" | ||
rml: "http://semweb.mmlab.be/ns/rml#" | ||
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
rdfs: "http://www.w3.org/2000/01/rdf-schema#" | ||
xsd: "http://www.w3.org/2001/XMLSchema#" | ||
foaf: "http://xmlns.com/foaf/0.1/" | ||
sd: "https://w3id.org/okn/o/sd/" | ||
kg4di: "https://w3id.org/kg4di/" | ||
|
||
mappings: | ||
df_map: | ||
sources: | ||
access: $(output_dataframe) | ||
referenceFormulation: DataFrame | ||
structureDefiner: Pandas | ||
s: http://instagram.com/data/user{Id} | ||
po: | ||
- [a, insta:User] |
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,36 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rml: <http://w3id.org/rml/>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rml:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rml:subjectMap [ | ||
a rml:SubjectMap; | ||
rml:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rml:predicateObjectMap [ | ||
rml:predicateMap [ | ||
a rml:PredicateMap; | ||
rml:constant rdf:type; | ||
]; | ||
rml:objectMap [ | ||
a rml:ObjectMap; | ||
rml:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,37 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rr: <http://www.w3.org/ns/r2rml#>. | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<df_map> a rr:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dataframe"; | ||
]; | ||
rml:referenceFormulation ql:DataFrame; | ||
]; | ||
rr:subjectMap [ | ||
a rr:SubjectMap; | ||
rr:template "http://instagram.com/data/user{Id}"; | ||
]; | ||
rr:predicateObjectMap [ | ||
rr:predicateMap [ | ||
a rr:PredicateMap; | ||
rr:constant rdf:type; | ||
]; | ||
rr:objectMap [ | ||
a rr:ObjectMap; | ||
rr:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:DataFrame a rml:ReferenceFormulation; | ||
kg4di:definedBy "Pandas". |
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,18 @@ | ||
prefixes: | ||
insta: "http://instagram.com/data/" | ||
rr: "http://www.w3.org/ns/r2rml#" | ||
rml: "http://semweb.mmlab.be/ns/rml#" | ||
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
rdfs: "http://www.w3.org/2000/01/rdf-schema#" | ||
xsd: "http://www.w3.org/2001/XMLSchema#" | ||
foaf: "http://xmlns.com/foaf/0.1/" | ||
sd: "https://w3id.org/okn/o/sd/" | ||
kg4di: "https://w3id.org/kg4di/" | ||
|
||
mappings: | ||
df_map: | ||
sources: | ||
- [$(output_dataframe)~Pandas-DataFrame] | ||
s: http://instagram.com/data/user{Id} | ||
po: | ||
- [a, insta:User] |
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,42 @@ | ||
@prefix insta: <http://instagram.com/data/>. | ||
@prefix rml: <http://w3id.org/rml/>. | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. | ||
@prefix sd: <https://w3id.org/okn/o/sd/>. | ||
@prefix kg4di: <https://w3id.org/kg4di/definedBy>. | ||
|
||
|
||
<dict_map> a rml:TriplesMap; | ||
|
||
rml:logicalSource [ | ||
a rml:LogicalSource; | ||
rml:source [ | ||
a sd:DatasetSpecification; | ||
sd:name "output_dict"; | ||
sd:hasDataTransformation [ | ||
sd:hasSourceCode [ | ||
sd:programmingLanguage "Python3.9"; | ||
]; | ||
]; | ||
]; | ||
rml:referenceFormulation ql:Dictionary; | ||
rml:iterator "$.users[*]"; | ||
]; | ||
rml:subjectMap [ | ||
a rml:SubjectMap; | ||
rml:template "http://instagram.com/data/user{id}"; | ||
]; | ||
rml:predicateObjectMap [ | ||
rml:predicateMap [ | ||
a rml:PredicateMap; | ||
rml:constant rdf:type; | ||
]; | ||
rml:objectMap [ | ||
a rml:ObjectMap; | ||
rml:constant insta:User; | ||
]; | ||
]. | ||
|
||
ql:Dictionary a rml:ReferenceFormulation; | ||
kg4di:definedBy "Python". |
Oops, something went wrong.