From 3bfae0c94ac2e561c6d477b6429aec9f991dfff9 Mon Sep 17 00:00:00 2001 From: Robert Isele Date: Thu, 30 Nov 2023 11:27:27 +0100 Subject: [PATCH] Added is_attribute to EntityPath --- cmem_plugin_base/dataintegration/entity.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmem_plugin_base/dataintegration/entity.py b/cmem_plugin_base/dataintegration/entity.py index 2fd417d..92d736f 100644 --- a/cmem_plugin_base/dataintegration/entity.py +++ b/cmem_plugin_base/dataintegration/entity.py @@ -7,12 +7,18 @@ class EntityPath: :param path: The path string using the Silk path language. :param is_uri: If true, values for this path must only contain URIs that point to - a sub entity. + a sub entity. + :param is_attribute If true, a single value is expected and supporting datasets will + not use arrays etc. For instance, in XML, attributes will be + used instead of nested elements. """ - def __init__(self, path: str, is_uri: bool = False) -> None: + def __init__(self, path: str, + is_uri: bool = False, + is_attribute: bool = False) -> None: self.path = path self.is_uri = is_uri + self.is_attribute = is_attribute class EntitySchema: