Skip to content

Commit

Permalink
Fix #169
Browse files Browse the repository at this point in the history
  • Loading branch information
pheyvaer committed Sep 14, 2020
1 parent ef63a71 commit a6ead9c
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Unreleased

### Fixed
- Fix CSVW with tab (see [issue 168](https://gitlab.ilabt.imec.be/rml/proc/rmlmapper-java/-/issues/168))
- Fix CSVW with tab (see issues [168](https://gitlab.ilabt.imec.be/rml/proc/rmlmapper-java/-/issues/168)
and [169](https://gitlab.ilabt.imec.be/rml/proc/rmlmapper-java/-/issues/169))

## [4.8.2] - 2020-08-17

Expand Down
4 changes: 2 additions & 2 deletions buildNumber.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
#Thu Sep 03 14:14:38 CEST 2020
buildNumber0=292
#Mon Sep 14 10:45:01 CEST 2020
buildNumber0=306
3 changes: 0 additions & 3 deletions src/main/java/be/ugent/rml/records/CSVW.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ private Character getDelimiter() {

if (output == null) {
return this.csvFormat.getDelimiter();
// Matches literal with value "\\t".
} else if (output.equals("\\t")) {
return '\t';
} else {
return output.toCharArray()[0];
}
Expand Down
1 change: 1 addition & 0 deletions src/test/java/be/ugent/rml/Mapper_CSVW_Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static Iterable<Object[]> data() {
{"delimiter"},
{"encoding"},
{"tabs"},
{"tabs_unicode"},
{"trim"}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
<#CSVW_source> a csvw:Table;
csvw:url "student.tsv" ;
csvw:dialect [ a csvw:Dialect;
csvw:delimiter "\\t";
csvw:delimiter "\t";
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

rml:logicalSource [
rml:source <#CSVW_source>;
rml:referenceFormulation ql:CSV
];

rr:subjectMap [
rr:template "http://example.com/{ID}/{Name}";
rr:class foaf:Person
];

rr:predicateObjectMap [
rr:predicate ex:id ;
rr:objectMap [ rml:reference "ID" ]
];

rr:predicateObjectMap [
rr:predicate foaf:name ;
rr:objectMap [ rml:reference "Name" ]
].

<#CSVW_source> a csvw:Table;
csvw:url "student.tsv" ;
csvw:dialect [ a csvw:Dialect;
csvw:delimiter "\u0009";
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10" .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ID Name
10 Venus

0 comments on commit a6ead9c

Please sign in to comment.