Closed tian3rd closed 1 year ago
Updated change-log for RDFLib
package:
graph.dart
: add support for parsing and writing @base and @prefix : in namespace prefixes sectionconstants.dart
: create constants in this file to be imported to other files if necessaryFor example, if we have base <http://www.example.com/> .
and a triple of <bob#me> rdf:type owl:NamedIndividual .
, we now can interpret the subject <bob#me>
correctly and save the triple to the graph. And when exporting back to external file, it will be in the form of <bob#me>
as well (instead of the full uri)
Example file 1: https://github.com/anusii/rdflib/blob/main/example/ex_base.ttl as an input Example file 2: https://github.com/anusii/rdflib/blob/main/example/ex_base_output.ttl as the output file
Read Example file 1 into the Graph, and serialize the Graph to a turtle file Example file 2.
Looks good - so RDFLib can now do this - read's file 1 and writes file 2. If that is the case we can close this issue now.
When the turtle file contains
:
or@base
in the namespace prefixes, they'll be ignored in current RDFLib implementation. Need to save them in the graph, and parse and serialize correctly in theGraph
class.