From c8a39de44402e6213814216823ba67265235cf5b Mon Sep 17 00:00:00 2001 From: Thomas Hanke <38633260+ThHanke@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:06:45 +0200 Subject: [PATCH] Update csvw_parser.py --- csvw_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csvw_parser.py b/csvw_parser.py index 07f9b5d..2cd9f1d 100644 --- a/csvw_parser.py +++ b/csvw_parser.py @@ -4,7 +4,7 @@ from rdflib import BNode, URIRef, Literal, Graph, Namespace from rdflib.collection import Collection from rdflib.util import guess_format -from rdflib.namespace import CSVW, RDF, XSD, PROV, RDFS +from rdflib.namespace import CSVW, RDF, XSD, PROV, RDFS, DC from datetime import datetime from urllib.request import urlopen from urllib.parse import urlparse, unquote @@ -309,8 +309,8 @@ def add_table_data(self, g: Graph) -> Graph: g.add((value_node, RDF.type, OA.Annotation)) g.add((value_node, OA.hasBody, body_node)) g.add((body_node, RDF.type, OA.TextualBody)) - g.add((body_node, OA["format"], Literal("text/plain"))) - g.add((body_node, OA.value, Literal(cell, datatype=format))) + g.add((body_node, DC.format, Literal("text/plain"))) + g.add((body_node, RDF.value, Literal(cell, datatype=format))) # if isinstance(column,URIRef) and str(self.meta_root)!='file:///src/': #has proper uri # g.add((value_node, column, Literal(cell)))