Skip to content

--opt.logical-type in rdf to-jelly does not set graph stream type #115

@adanilenka

Description

@adanilenka

As per specification, physical type triples can be accompanied with LOGICAL_STREAM_TYPE_GRAPHS, with each frame then be interpreted as a separate GRAPH.

When running

jelly-cli rdf to-jelly ./in.nt --to ./out.jelly --opt.generalized-statements=false --opt.rdf-star=false --opt.max-name-table-size=8 --opt.max-prefix-table-size=0 --opt.max-datatype-table-size=0 --opt.logical-type=GRAPHS --rows-per-frame=15

on a sample input file:

<http://example.org/resource/r1> <http://example.org/property/isSubClass> <http://example.org/resource/r0> .
<http://example.org/resource/r2> <http://example.org/property/isSubClass> <http://example.org/resource/r1> .
<http://example.org/resource/r1> <http://example.org/property/isSimilarTo> <http://example.org/resource/r3> .
<http://example.org/resource/r3> <http://example.org/property/relatedTo> _:bn2 .

<http://example.org/object/o1> <http://example.org/property/isLocatedAt> <http://example.org/place/p1> .
<http://example.org/object/o2> <http://example.org/property/isLocatedAt> <http://example.org/place/p2> .
<http://example.org/place/p1> <http://example.org/property/isCloseTo> <http://example.org/place/p2> .

the resulting stream options look like:

# Frame 0
rows {
  options {
    stream_name: ""
    physical_type: PHYSICAL_STREAM_TYPE_TRIPLES
    generalized_statements: false
    rdf_star: false
    max_name_table_size: 8
    max_prefix_table_size: 0
    max_datatype_table_size: 0
    logical_type: LOGICAL_STREAM_TYPE_FLAT_TRIPLES
    version: 1
  }
}

so it still has LOGICAL_STREAM_TYPE_FLAT_TRIPLES. Switching to full IRI https://w3id.org/stax/ontology#graphStream also does not help.

However, if you put an invalid stream type (like GRAPH_STREAM), an error appears:

Image

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions