From 242239c1d08ba9c992e36d98e507346c5a0b1222 Mon Sep 17 00:00:00 2001 From: Sarath Date: Sat, 21 Sep 2024 21:29:50 +0200 Subject: [PATCH] bug fix for property creation --- atomrdf/graph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atomrdf/graph.py b/atomrdf/graph.py index 10977dd..b291d86 100644 --- a/atomrdf/graph.py +++ b/atomrdf/graph.py @@ -669,7 +669,8 @@ def add_calculated_quantity(self, sample, propertyname, value, unit=None): >>> sample = graph.create_node("Sample1", CMSO.Sample) >>> graph.add_calculated_quantity(sample, "energy", "10.5", "eV") """ - prop = self.create_node(propertyname, CMSO.CalculatedProperty) + + prop = self.create_node(f"{sample}_{propertyname}", CMSO.CalculatedProperty) self.add((sample, CMSO.hasCalculatedProperty, prop)) self.add((prop, RDFS.label, Literal(propertyname))) self.add((prop, ASMO.hasValue, Literal(value)))