From af87d03b24c21301639c23606993cfebcfbe3088 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jan 2025 11:27:00 +0100 Subject: Add GroupID support for PKLs (DoM #2943). --- src/pkl.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pkl.cc') diff --git a/src/pkl.cc b/src/pkl.cc index 67c9067c..cb654158 100644 --- a/src/pkl.cc +++ b/src/pkl.cc @@ -97,6 +97,7 @@ PKL::PKL(boost::filesystem::path file, vector* notes) _issue_date = pkl.string_child ("IssueDate"); _issuer = pkl.string_child ("Issuer"); _creator = pkl.string_child ("Creator"); + _group_id = remove_urn_uuid(pkl.optional_string_child("GroupId")); for (auto i: pkl.node_child("AssetList")->node_children("Asset")) { _assets.push_back(make_shared(i)); @@ -129,6 +130,9 @@ PKL::write_xml (boost::filesystem::path file, shared_ptr cxml::add_text_child(pkl, "IssueDate", _issue_date); cxml::add_text_child(pkl, "Issuer", _issuer); cxml::add_text_child(pkl, "Creator", _creator); + if (_group_id) { + cxml::add_text_child(pkl, "GroupId", "urn:uuid:" + *_group_id); + } auto asset_list = cxml::add_child(pkl, "AssetList"); for (auto i: _assets) { -- cgit v1.2.3