Skip to content

Add version check to rdf validate #89

@adanilenka

Description

@adanilenka

Currently, rdf validate allows version tag being set to 0.

Example input:

# Frame 0
rows {
  options {
    stream_name: ""
    physical_type: PHYSICAL_STREAM_TYPE_TRIPLES
    generalized_statements: false
    rdf_star: false
    max_name_table_size: 4000
    max_prefix_table_size: 150
    max_datatype_table_size: 32
    logical_type: LOGICAL_STREAM_TYPE_FLAT_TRIPLES
    version: 0
  }
}
rows {
  prefix {
    id: 0
    value: "http://example.org/"
  }
}
rows {
  name {
    id: 0
    value: "subject"
  }
}
rows {
  name {
    id: 0
    value: "predicate"
  }
}
rows {
  name {
    id: 0
    value: "object"
  }
}
rows {
  triple {
    s_iri {
      prefix_id: 1
      name_id: 0
    }
    p_iri {
      prefix_id: 0
      name_id: 0
    }
    o_iri {
      prefix_id: 0
      name_id: 0
    }
  }
}

transforming to jelly with:
jelly-cli rdf to-jelly ./text.txt --to ./in.jelly --in-format jelly-text

and running jelly-cli rdf validate ./in.jelly gives no error

jelly-cli rdf from-jelly ./in.jelly also decodes the triple with no issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions