Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdf seems to be silent about invalid JSON #14

Open
dhhepting opened this issue Apr 4, 2023 · 2 comments
Open

rdf seems to be silent about invalid JSON #14

dhhepting opened this issue Apr 4, 2023 · 2 comments

Comments

@dhhepting
Copy link

I am using rdf from the command line as recommended:

rdf serialize --input-format tabular --output-format ttl file.csv

where file.csv is accompanied by file.csv-metadata.json

I have been trying to reproduce the output of some examples and then create my own, but the output I got from my own attempt didn't match. After much head-scratching, I realized that my JSON wasn't valid -- I had put an extra comma before a closing brace. Once I corrected the metadata JSON, the expected output was generated.

Is there a way to detect that issue when creating RDF from the CSV?

@gkellogg
Copy link
Member

gkellogg commented Apr 4, 2023

It should through a ::JSON::ParserError if there's a problem parsing the metadata file, as that is native behavior of the JSON gem. You might try adding "--validate" and/or "--debug" to the CLI arguments to see if it tells you any more. Otherwise, if you can give me something to reproduce the error, I can look into it further.

@dhhepting
Copy link
Author

Thanks for your reply. I have made file.csv:

id,response,v1,t1
tst,001,vocab:FAlways,"some text"
tst,002,vocab:FOften,"more text"

and file.csv-metadata.json:

{
  "@context": ["http://www.w3.org/ns/csvw", { "@language": "en" }],
  "url": "file.csv",
  "tableSchema": {
    "columns": [{
      "name": "id",
      "datatype": "string",
      "required": true,
      "suppressOutput": true
    }, {
      "name": "response",
      "datatype": "int",
      "required": true,
      "suppressOutput": true
    }, {
      "name": "v1",
      "datatype": "QName",
      "dct:description": "Variable 1",
      "propertyUrl": "http://example.com#var1"
    }, {
      "name": "t1",
      "datatype": "string",
      "dct:description": "Text 1",
      "propertyUrl": "http://example.com#txt1"
    }, {
      "name": "type_row",
      "virtual": true,
      "propertyUrl": "rdf:type",
      "valueUrl": "schema:Thing"
    }],
    "primaryKey": ["id", "response"],
    "aboutUrl": "http://www.example.com/file#resp-{id}-{response}"
  }
}

Running this command rdf serialize --input-format tabular --output-format ttl file.csv gives the following output:

@prefix csvw: <http://www.w3.org/ns/csvw#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://www.example.com/file#resp-tst-001> a schema:Thing;
  <http://example.com#txt1> "some text";
  <http://example.com#var1> "vocab:FAlways"^^xsd:QName .

<http://www.example.com/file#resp-tst-002> a schema:Thing;
  <http://example.com#txt1> "more text";
  <http://example.com#var1> "vocab:FOften"^^xsd:QName .

 [
    a csvw:TableGroup;
    csvw:table [
      a csvw:Table;
      csvw:row [
        a csvw:Row;
        csvw:describes <http://www.example.com/file#resp-tst-001>;
        csvw:rownum 1;
        csvw:url <file:/Users/hepting/Downloads/file.csv#row=2>
      ], [
        a csvw:Row;
        csvw:describes <http://www.example.com/file#resp-tst-002>;
        csvw:rownum 2;
        csvw:url <file:/Users/hepting/Downloads/file.csv#row=3>
      ];
      csvw:url <file:/Users/hepting/Downloads/file.csv>
    ];
    prov:wasGeneratedBy [
      a prov:Activity;
      prov:endedAtTime "2023-04-05T16:23:01.237-06:00"^^xsd:dateTime;
      prov:qualifiedUsage [
        a prov:Usage;
        prov:entity <file:/Users/hepting/Downloads/file.csv>;
        prov:hadRole csvw:csvEncodedTabularData
      ], [
        a prov:Usage;
        prov:entity <file:/Users/hepting/Downloads/file.csv-metadata.json>;
        prov:hadRole csvw:tabularMetadata
      ];
      prov:startedAtTime "2023-04-05T16:23:01.204-06:00"^^xsd:dateTime;
      prov:wasAssociatedWith <https://rubygems.org/gems/rdf-tabular>
    ]
  ] .

which is what I expected to receive. If I modify the file.csv-metadata.json file as follows (removing a comma in the v1 column description and adding a comma in the t1 column description):

{
  "@context": ["http://www.w3.org/ns/csvw", { "@language": "en" }],
  "url": "file.csv",
  "tableSchema": {
    "columns": [{
      "name": "id",
      "datatype": "string",
      "required": true,
      "suppressOutput": true
    }, {
      "name": "response",
      "datatype": "int",
      "required": true,
      "suppressOutput": true
    }, {
      "name": "v1",
      "datatype": "QName",
      "dct:description": "Variable 1"
      "propertyUrl": "http://example.com#var1"
    }, {
      "name": "t1",
      "datatype": "string",
      "dct:description": "Text 1",
      "propertyUrl": "http://example.com#txt1",
    }, {
      "name": "type_row",
      "virtual": true,
      "propertyUrl": "rdf:type",
      "valueUrl": "schema:Thing"
    }],
    "primaryKey": ["id", "response"],
    "aboutUrl": "http://www.example.com/file#resp-{id}-{response}"
  }
}

I get the following output from the serialize command:

@prefix csvw: <http://www.w3.org/ns/csvw#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

 [
    a csvw:TableGroup;
    csvw:table [
      a csvw:Table;
      csvw:row [
        a csvw:Row;
        csvw:describes [
          <file:/Users/hepting/Downloads/file.csv#id> "tst";
          <file:/Users/hepting/Downloads/file.csv#response> "001";
          <file:/Users/hepting/Downloads/file.csv#t1> "some text";
          <file:/Users/hepting/Downloads/file.csv#v1> "vocab:FAlways"
        ];
        csvw:rownum 1;
        csvw:url <file:/Users/hepting/Downloads/file.csv#row=2>
      ], [
        a csvw:Row;
        csvw:describes [
          <file:/Users/hepting/Downloads/file.csv#id> "tst";
          <file:/Users/hepting/Downloads/file.csv#response> "002";
          <file:/Users/hepting/Downloads/file.csv#t1> "more text";
          <file:/Users/hepting/Downloads/file.csv#v1> "vocab:FOften"
        ];
        csvw:rownum 2;
        csvw:url <file:/Users/hepting/Downloads/file.csv#row=3>
      ];
      csvw:url <file:/Users/hepting/Downloads/file.csv>
    ];
    prov:wasGeneratedBy [
      a prov:Activity;
      prov:endedAtTime "2023-04-05T16:16:34.877-06:00"^^xsd:dateTime;
      prov:qualifiedUsage [
        a prov:Usage;
        prov:entity <file:/Users/hepting/Downloads/file.csv>;
        prov:hadRole csvw:csvEncodedTabularData
      ];
      prov:startedAtTime "2023-04-05T16:16:34.863-06:00"^^xsd:dateTime;
      prov:wasAssociatedWith <https://rubygems.org/gems/rdf-tabular>
    ]
  ] .

rdf serialize --validate --input-format tabular --output-format ttl file.csv produces the same output and rdf serialize --debug --input-format tabular --output-format ttl file.csv gives this output:

DEBUG Reader#initialize: input: #<RDF::Util::File::RemoteDocument:0x00007f7fb0466590 @base_uri="file.csv", @charset="utf-8", @code=200, @content_type="text/csv", @last_modified=#<DateTime: 2023-04-04T13:13:56-06:00 ((2460039j,69236s,0n),-21600s,2299161j)>, @headers={:content_type=>"text/csv", :last_modified=>"2023-04-04T13:13:56-06:00"}, @parameters={}, @etag=nil>, base: file:/Users/hepting/Downloads/file.csv
DEBUG  for_input: templates: ["{+url}-metadata.json", "csv-metadata.json"]
DEBUG  for_input: locs: ["file:/Users/hepting/Downloads/file.csv-metadata.json", "file:/Users/hepting/Downloads/csv-metadata.json"]
DEBUG  for_input: failed to load found metadata file:/Users/hepting/Downloads/file.csv-metadata.json: Expected input to be a JSON Object
DEBUG  for_input: failed to load found metadata file:/Users/hepting/Downloads/csv-metadata.json: No such file or directory @ rb_sysopen - /Users/hepting/Downloads/csv-metadata.json
DEBUG  Reader#initialize: input: #<RDF::Util::File::RemoteDocument:0x00007f7fb0466590>, metadata: RDF::Tabular::TableGroup{"@type"=>"AnnotatedTableGroup", "tables"=>[{"@type"=>"AnnotatedTable", "url"=>"file:/Users/hepting/Downloads/file.csv"}]}
DEBUG  each_statement: metadata: RDF::Tabular::TableGroup{"@type"=>"AnnotatedTableGroup", "tables"=>[{"@type"=>"AnnotatedTable", "url"=>"file:/Users/hepting/Downloads/file.csv"}]}
DEBUG   0: statement: _:g458620 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#TableGroup> .
DEBUG   0: statement: _:g458620 <http://www.w3.org/ns/csvw#table> _:g458640 .
DEBUG   Reader#initialize: input: #<RDF::Util::File::RemoteDocument:0x00007f7fb0466590 @base_uri="file.csv", @charset="utf-8", @code=200, @content_type="text/csv", @last_modified=#<DateTime: 2023-04-04T13:13:56-06:00 ((2460039j,69236s,0n),-21600s,2299161j)>, @headers={:content_type=>"text/csv", :last_modified=>"2023-04-04T13:13:56-06:00"}, @parameters={}, @etag=nil, @links=#<LinkHeader:0x00007f7faea1a628 @links=[]>>, base: file:/Users/hepting/Downloads/file.csv
DEBUG    embedded_metadata: notes: nil
DEBUG    embedded_metadata: table: {"@context"=>"http://www.w3.org/ns/csvw", "url"=>#<RDF::URI:0x6ffa4 URI:file:/Users/hepting/Downloads/file.csv>, "@type"=>"Table", "tableSchema"=>{"@type"=>"Schema", "columns"=>[{"titles"=>{"und"=>["id"]}}, {"titles"=>{"und"=>["response"]}}, {"titles"=>{"und"=>["v1"]}}, {"titles"=>{"und"=>["t1"]}}]}}
DEBUG    md#initialize: load embedded metadata: 
DEBUG    md#initialize: filenames: 
DEBUG    md#initialize: RDF::Tabular::Table{"@type"=>"AnnotatedTable", "url"=>"file:/Users/hepting/Downloads/file.csv", "tableSchema"=>{"@type"=>"Schema", "columns"=>[{"@id"=>"file:/Users/hepting/Downloads/file.csv#col=1", "@type"=>"Column", "number"=>1, "sourceNumber"=>1, "virtual"=>false, "name"=>"id", "titles"=>{"und"=>["id"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=2", "@type"=>"Column", "number"=>2, "sourceNumber"=>2, "virtual"=>false, "name"=>"response", "titles"=>{"und"=>["response"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=3", "@type"=>"Column", "number"=>3, "sourceNumber"=>3, "virtual"=>false, "name"=>"v1", "titles"=>{"und"=>["v1"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=4", "@type"=>"Column", "number"=>4, "sourceNumber"=>4, "virtual"=>false, "name"=>"t1", "titles"=>{"und"=>["t1"]}}]}}, parent: false, context: true
DEBUG    Reader#initialize: input: #<RDF::Util::File::RemoteDocument:0x00007f7fb0466590>, metadata: RDF::Tabular::Table{"@type"=>"AnnotatedTable", "url"=>"file:/Users/hepting/Downloads/file.csv", "tableSchema"=>{"@type"=>"Schema", "columns"=>[{"@id"=>"file:/Users/hepting/Downloads/file.csv#col=1", "@type"=>"Column", "number"=>1, "sourceNumber"=>1, "virtual"=>false, "name"=>"id", "titles"=>{"und"=>["id"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=2", "@type"=>"Column", "number"=>2, "sourceNumber"=>2, "virtual"=>false, "name"=>"response", "titles"=>{"und"=>["response"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=3", "@type"=>"Column", "number"=>3, "sourceNumber"=>3, "virtual"=>false, "name"=>"v1", "titles"=>{"und"=>["v1"]}}, {"@id"=>"file:/Users/hepting/Downloads/file.csv#col=4", "@type"=>"Column", "number"=>4, "sourceNumber"=>4, "virtual"=>false, "name"=>"t1", "titles"=>{"und"=>["t1"]}}]}}
DEBUG    0: statement: _:g458640 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#Table> .
DEBUG    0: statement: _:g458640 <http://www.w3.org/ns/csvw#url> <file:/Users/hepting/Downloads/file.csv> .
DEBUG    2: statement: _:g458640 <http://www.w3.org/ns/csvw#row> _:g458700 .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#rownum> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
DEBUG    2: statement: _:g458700 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#Row> .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#url> <file:/Users/hepting/Downloads/file.csv#row=2> .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#describes> _:g458720 .
DEBUG    2: statement: _:g458720 <file:/Users/hepting/Downloads/file.csv#id> "tst" .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#describes> _:g458720 .
DEBUG    2: statement: _:g458720 <file:/Users/hepting/Downloads/file.csv#response> "001" .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#describes> _:g458720 .
DEBUG    2: statement: _:g458720 <file:/Users/hepting/Downloads/file.csv#v1> "vocab:FAlways" .
DEBUG    2: statement: _:g458700 <http://www.w3.org/ns/csvw#describes> _:g458720 .
DEBUG    2: statement: _:g458720 <file:/Users/hepting/Downloads/file.csv#t1> "some text" .
DEBUG    3: statement: _:g458640 <http://www.w3.org/ns/csvw#row> _:g458740 .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#rownum> "2"^^<http://www.w3.org/2001/XMLSchema#integer> .
DEBUG    3: statement: _:g458740 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#Row> .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#url> <file:/Users/hepting/Downloads/file.csv#row=3> .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#describes> _:g458760 .
DEBUG    3: statement: _:g458760 <file:/Users/hepting/Downloads/file.csv#id> "tst" .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#describes> _:g458760 .
DEBUG    3: statement: _:g458760 <file:/Users/hepting/Downloads/file.csv#response> "002" .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#describes> _:g458760 .
DEBUG    3: statement: _:g458760 <file:/Users/hepting/Downloads/file.csv#v1> "vocab:FOften" .
DEBUG    3: statement: _:g458740 <http://www.w3.org/ns/csvw#describes> _:g458760 .
DEBUG    3: statement: _:g458760 <file:/Users/hepting/Downloads/file.csv#t1> "more text" .
DEBUG   0: statement: _:g458620 <http://www.w3.org/ns/prov#wasGeneratedBy> _:g458780 .
DEBUG   0: statement: _:g458780 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/prov#Activity> .
DEBUG   0: statement: _:g458780 <http://www.w3.org/ns/prov#wasAssociatedWith> <https://rubygems.org/gems/rdf-tabular> .
DEBUG   0: statement: _:g458780 <http://www.w3.org/ns/prov#startedAtTime> "2023-04-05T16:18:58.014-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
DEBUG   0: statement: _:g458780 <http://www.w3.org/ns/prov#endedAtTime> "2023-04-05T16:18:58.022-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
DEBUG   0: statement: _:g458780 <http://www.w3.org/ns/prov#qualifiedUsage> _:g458800 .
DEBUG   0: statement: _:g458800 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/prov#Usage> .
DEBUG   0: statement: _:g458800 <http://www.w3.org/ns/prov#entity> <file:/Users/hepting/Downloads/file.csv> .
DEBUG   0: statement: _:g458800 <http://www.w3.org/ns/prov#hadRole> <http://www.w3.org/ns/csvw#csvEncodedTabularData> .
INFO Parsed 31 statements with RDF::Tabular::Reader in 0.186719 seconds @ 0.0 statements/second.
DEBUG 
serialize: graph: 31
DEBUG get_pname: add standard prefix "rdf" => http://www.w3.org/1999/02/22-rdf-syntax-ns#
DEBUG get_pname: add standard prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add standard prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add standard prefix "xsd" => http://www.w3.org/2001/XMLSchema#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG get_pname: add prefix "xsd" => http://www.w3.org/2001/XMLSchema#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "xsd" => http://www.w3.org/2001/XMLSchema#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "prov" => http://www.w3.org/ns/prov#
DEBUG get_pname: add prefix "csvw" => http://www.w3.org/ns/csvw#
DEBUG start_document: {:rdf=>#<RDF::Vocabulary::Term:0x5a0 ID:http://www.w3.org/1999/02/22-rdf-syntax-ns#>, :csvw=>"http://www.w3.org/ns/csvw#", :prov=>"http://www.w3.org/ns/prov#", :xsd=>"http://www.w3.org/2001/XMLSchema#"}
@prefix csvw: <http://www.w3.org/ns/csvw#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
DEBUG statement: _:g458620, bnodePL?: true
DEBUG blankNodePropertyList: _:g458620

 [DEBUG  sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/csvw#table, http://www.w3.org/ns/prov#wasGeneratedBy
DEBUG  predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/csvw#table", "http://www.w3.org/ns/prov#wasGeneratedBy"]

    DEBUG  predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG  objectList: [#<RDF::Vocabulary::Term:0x6f0b8 ID:http://www.w3.org/ns/csvw#TableGroup>]
DEBUG  path: <http://www.w3.org/ns/csvw#TableGroup>, pos: object, ()?: false, []?: false, rc: 1
csvw:TableGroup;
    DEBUG  predicate: <http://www.w3.org/ns/csvw#table>
DEBUG  path: <http://www.w3.org/ns/csvw#table>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:table DEBUG  objectList: [#<RDF::Node:0x6ff90(_:g458640)>]
DEBUG  path: _:g458640, pos: object, ()?: false, []?: true, rc: 1
DEBUG  blankNodePropertyList: _:g458640
[DEBUG   sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/csvw#row, http://www.w3.org/ns/csvw#url
DEBUG   predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/csvw#row", "http://www.w3.org/ns/csvw#url"]

      DEBUG   predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG   objectList: [#<RDF::Vocabulary::Term:0x6f0a4 ID:http://www.w3.org/ns/csvw#Table>]
DEBUG   path: <http://www.w3.org/ns/csvw#Table>, pos: object, ()?: false, []?: false, rc: 1
csvw:Table;
      DEBUG   predicate: <http://www.w3.org/ns/csvw#row>
DEBUG   path: <http://www.w3.org/ns/csvw#row>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:row DEBUG   objectList: [#<RDF::Node:0x6ffcc(_:g458700)>, #<RDF::Node:0x6fff4(_:g458740)>]
DEBUG   path: _:g458700, pos: object, ()?: false, []?: true, rc: 1
DEBUG   blankNodePropertyList: _:g458700
[DEBUG    sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/csvw#describes, http://www.w3.org/ns/csvw#rownum, http://www.w3.org/ns/csvw#url
DEBUG    predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/csvw#describes", "http://www.w3.org/ns/csvw#rownum", "http://www.w3.org/ns/csvw#url"]

        DEBUG    predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG    objectList: [#<RDF::Vocabulary::Term:0x6f07c ID:http://www.w3.org/ns/csvw#Row>]
DEBUG    path: <http://www.w3.org/ns/csvw#Row>, pos: object, ()?: false, []?: false, rc: 2
csvw:Row;
        DEBUG    predicate: <http://www.w3.org/ns/csvw#describes>
DEBUG    path: <http://www.w3.org/ns/csvw#describes>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:describes DEBUG    objectList: [#<RDF::Node:0x6ffe0(_:g458720)>]
DEBUG    path: _:g458720, pos: object, ()?: false, []?: true, rc: 1
DEBUG    blankNodePropertyList: _:g458720
[DEBUG     sort_properties: file:/Users/hepting/Downloads/file.csv#id, file:/Users/hepting/Downloads/file.csv#response, file:/Users/hepting/Downloads/file.csv#t1, file:/Users/hepting/Downloads/file.csv#v1
DEBUG     predicateObjectList: ["file:/Users/hepting/Downloads/file.csv#id", "file:/Users/hepting/Downloads/file.csv#response", "file:/Users/hepting/Downloads/file.csv#t1", "file:/Users/hepting/Downloads/file.csv#v1"]

          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#id>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#id>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#id> DEBUG     objectList: [#<RDF::Literal:0x70080("tst")>]
DEBUG     path: "tst", pos: object, ()?: false, []?: false, rc: 2
"tst";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#response>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#response>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#response> DEBUG     objectList: [#<RDF::Literal:0x700a8("001")>]
DEBUG     path: "001", pos: object, ()?: false, []?: false, rc: 1
"001";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#t1>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#t1>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#t1> DEBUG     objectList: [#<RDF::Literal:0x700d0("some text")>]
DEBUG     path: "some text", pos: object, ()?: false, []?: false, rc: 1
"some text";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#v1>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#v1>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#v1> DEBUG     objectList: [#<RDF::Literal:0x700f8("vocab:FAlways")>]
DEBUG     path: "vocab:FAlways", pos: object, ()?: false, []?: false, rc: 1
"vocab:FAlways"
        ];
        DEBUG    predicate: <http://www.w3.org/ns/csvw#rownum>
DEBUG    path: <http://www.w3.org/ns/csvw#rownum>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:rownum DEBUG    objectList: [#<RDF::Literal::Integer:0x70044("1"^^<http://www.w3.org/2001/XMLSchema#integer>)>]
DEBUG    path: "1"^^<http://www.w3.org/2001/XMLSchema#integer>, pos: object, ()?: false, []?: false, rc: 1
1;
        DEBUG    predicate: <http://www.w3.org/ns/csvw#url>
DEBUG    path: <http://www.w3.org/ns/csvw#url>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:url DEBUG    objectList: [#<RDF::URI:0x7010c URI:file:/Users/hepting/Downloads/file.csv#row=2>]
DEBUG    path: <file:/Users/hepting/Downloads/file.csv#row=2>, pos: object, ()?: false, []?: false, rc: 1
<file:/Users/hepting/Downloads/file.csv#row=2>
      ], DEBUG   path: _:g458740, pos: object, ()?: false, []?: true, rc: 1
DEBUG   blankNodePropertyList: _:g458740
[DEBUG    sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/csvw#describes, http://www.w3.org/ns/csvw#rownum, http://www.w3.org/ns/csvw#url
DEBUG    predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/csvw#describes", "http://www.w3.org/ns/csvw#rownum", "http://www.w3.org/ns/csvw#url"]

        DEBUG    predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG    objectList: [#<RDF::Vocabulary::Term:0x6f07c ID:http://www.w3.org/ns/csvw#Row>]
DEBUG    path: <http://www.w3.org/ns/csvw#Row>, pos: object, ()?: false, []?: false, rc: 2
csvw:Row;
        DEBUG    predicate: <http://www.w3.org/ns/csvw#describes>
DEBUG    path: <http://www.w3.org/ns/csvw#describes>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:describes DEBUG    objectList: [#<RDF::Node:0x70008(_:g458760)>]
DEBUG    path: _:g458760, pos: object, ()?: false, []?: true, rc: 1
DEBUG    blankNodePropertyList: _:g458760
[DEBUG     sort_properties: file:/Users/hepting/Downloads/file.csv#id, file:/Users/hepting/Downloads/file.csv#response, file:/Users/hepting/Downloads/file.csv#t1, file:/Users/hepting/Downloads/file.csv#v1
DEBUG     predicateObjectList: ["file:/Users/hepting/Downloads/file.csv#id", "file:/Users/hepting/Downloads/file.csv#response", "file:/Users/hepting/Downloads/file.csv#t1", "file:/Users/hepting/Downloads/file.csv#v1"]

          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#id>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#id>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#id> DEBUG     objectList: [#<RDF::Literal:0x70120("tst")>]
DEBUG     path: "tst", pos: object, ()?: false, []?: false, rc: 2
"tst";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#response>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#response>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#response> DEBUG     objectList: [#<RDF::Literal:0x70134("002")>]
DEBUG     path: "002", pos: object, ()?: false, []?: false, rc: 1
"002";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#t1>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#t1>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#t1> DEBUG     objectList: [#<RDF::Literal:0x70148("more text")>]
DEBUG     path: "more text", pos: object, ()?: false, []?: false, rc: 1
"more text";
          DEBUG     predicate: <file:/Users/hepting/Downloads/file.csv#v1>
DEBUG     path: <file:/Users/hepting/Downloads/file.csv#v1>, pos: predicate, ()?: false, []?: false, rc: 0
<file:/Users/hepting/Downloads/file.csv#v1> DEBUG     objectList: [#<RDF::Literal:0x7015c("vocab:FOften")>]
DEBUG     path: "vocab:FOften", pos: object, ()?: false, []?: false, rc: 1
"vocab:FOften"
        ];
        DEBUG    predicate: <http://www.w3.org/ns/csvw#rownum>
DEBUG    path: <http://www.w3.org/ns/csvw#rownum>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:rownum DEBUG    objectList: [#<RDF::Literal::Integer:0x70058("2"^^<http://www.w3.org/2001/XMLSchema#integer>)>]
DEBUG    path: "2"^^<http://www.w3.org/2001/XMLSchema#integer>, pos: object, ()?: false, []?: false, rc: 1
2;
        DEBUG    predicate: <http://www.w3.org/ns/csvw#url>
DEBUG    path: <http://www.w3.org/ns/csvw#url>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:url DEBUG    objectList: [#<RDF::URI:0x70170 URI:file:/Users/hepting/Downloads/file.csv#row=3>]
DEBUG    path: <file:/Users/hepting/Downloads/file.csv#row=3>, pos: object, ()?: false, []?: false, rc: 1
<file:/Users/hepting/Downloads/file.csv#row=3>
      ];
      DEBUG   predicate: <http://www.w3.org/ns/csvw#url>
DEBUG   path: <http://www.w3.org/ns/csvw#url>, pos: predicate, ()?: false, []?: false, rc: 0
csvw:url DEBUG   objectList: [#<RDF::URI:0x70184 URI:file:/Users/hepting/Downloads/file.csv>]
DEBUG   path: <file:/Users/hepting/Downloads/file.csv>, pos: object, ()?: false, []?: false, rc: 2
<file:/Users/hepting/Downloads/file.csv>
    ];
    DEBUG  predicate: <http://www.w3.org/ns/prov#wasGeneratedBy>
DEBUG  path: <http://www.w3.org/ns/prov#wasGeneratedBy>, pos: predicate, ()?: false, []?: false, rc: 0
prov:wasGeneratedBy DEBUG  objectList: [#<RDF::Node:0x7001c(_:g458780)>]
DEBUG  path: _:g458780, pos: object, ()?: false, []?: true, rc: 1
DEBUG  blankNodePropertyList: _:g458780
[DEBUG   sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/prov#endedAtTime, http://www.w3.org/ns/prov#qualifiedUsage, http://www.w3.org/ns/prov#startedAtTime, http://www.w3.org/ns/prov#wasAssociatedWith
DEBUG   predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/prov#endedAtTime", "http://www.w3.org/ns/prov#qualifiedUsage", "http://www.w3.org/ns/prov#startedAtTime", "http://www.w3.org/ns/prov#wasAssociatedWith"]

      DEBUG   predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG   objectList: [#<RDF::Vocabulary::Term:0x45790 ID:http://www.w3.org/ns/prov#Activity>]
DEBUG   path: <http://www.w3.org/ns/prov#Activity>, pos: object, ()?: false, []?: false, rc: 1
prov:Activity;
      DEBUG   predicate: <http://www.w3.org/ns/prov#endedAtTime>
DEBUG   path: <http://www.w3.org/ns/prov#endedAtTime>, pos: predicate, ()?: false, []?: false, rc: 0
prov:endedAtTime DEBUG   objectList: [#<RDF::Literal::DateTime:0x70198("2023-04-05T16:18:58.022-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>)>]
DEBUG   path: "2023-04-05T16:18:58.022-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>, pos: object, ()?: false, []?: false, rc: 1
"2023-04-05T16:18:58.022-06:00"^^xsd:dateTime;
      DEBUG   predicate: <http://www.w3.org/ns/prov#qualifiedUsage>
DEBUG   path: <http://www.w3.org/ns/prov#qualifiedUsage>, pos: predicate, ()?: false, []?: false, rc: 0
prov:qualifiedUsage DEBUG   objectList: [#<RDF::Node:0x70030(_:g458800)>]
DEBUG   path: _:g458800, pos: object, ()?: false, []?: true, rc: 1
DEBUG   blankNodePropertyList: _:g458800
[DEBUG    sort_properties: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/ns/prov#entity, http://www.w3.org/ns/prov#hadRole
DEBUG    predicateObjectList: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/ns/prov#entity", "http://www.w3.org/ns/prov#hadRole"]

        DEBUG    predicate: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
a DEBUG    objectList: [#<RDF::Vocabulary::Term:0x45bdc ID:http://www.w3.org/ns/prov#Usage>]
DEBUG    path: <http://www.w3.org/ns/prov#Usage>, pos: object, ()?: false, []?: false, rc: 1
prov:Usage;
        DEBUG    predicate: <http://www.w3.org/ns/prov#entity>
DEBUG    path: <http://www.w3.org/ns/prov#entity>, pos: predicate, ()?: false, []?: false, rc: 0
prov:entity DEBUG    objectList: [#<RDF::URI:0x6ffa4 URI:file:/Users/hepting/Downloads/file.csv>]
DEBUG    path: <file:/Users/hepting/Downloads/file.csv>, pos: object, ()?: false, []?: false, rc: 2
<file:/Users/hepting/Downloads/file.csv>;
        DEBUG    predicate: <http://www.w3.org/ns/prov#hadRole>
DEBUG    path: <http://www.w3.org/ns/prov#hadRole>, pos: predicate, ()?: false, []?: false, rc: 0
prov:hadRole DEBUG    objectList: [#<RDF::Vocabulary::Term:0x6fedc ID:http://www.w3.org/ns/csvw#csvEncodedTabularData>]
DEBUG    path: <http://www.w3.org/ns/csvw#csvEncodedTabularData>, pos: object, ()?: false, []?: false, rc: 1
csvw:csvEncodedTabularData
      ];
      DEBUG   predicate: <http://www.w3.org/ns/prov#startedAtTime>
DEBUG   path: <http://www.w3.org/ns/prov#startedAtTime>, pos: predicate, ()?: false, []?: false, rc: 0
prov:startedAtTime DEBUG   objectList: [#<RDF::Literal::DateTime:0x701ac("2023-04-05T16:18:58.014-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>)>]
DEBUG   path: "2023-04-05T16:18:58.014-06:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>, pos: object, ()?: false, []?: false, rc: 1
"2023-04-05T16:18:58.014-06:00"^^xsd:dateTime;
      DEBUG   predicate: <http://www.w3.org/ns/prov#wasAssociatedWith>
DEBUG   path: <http://www.w3.org/ns/prov#wasAssociatedWith>, pos: predicate, ()?: false, []?: false, rc: 0
prov:wasAssociatedWith DEBUG   objectList: [#<RDF::URI:0x701c0 URI:https://rubygems.org/gems/rdf-tabular>]
DEBUG   path: <https://rubygems.org/gems/rdf-tabular>, pos: object, ()?: false, []?: false, rc: 1
<https://rubygems.org/gems/rdf-tabular>
    ]
  ] .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants