spdx_tools.spdx3.model.namespace_map

 1# SPDX-FileCopyrightText: 2023 spdx contributors
 2#
 3# SPDX-License-Identifier: Apache-2.0
 4from spdx_tools.common.typing.dataclass_with_properties import dataclass_with_properties
 5from spdx_tools.common.typing.type_checks import check_types_and_set_values
 6
 7
 8@dataclass_with_properties
 9class NamespaceMap:
10    prefix: str
11    namespace: str  # anyURI
12
13    def __init__(self, prefix: str, namespace: str):
14        check_types_and_set_values(self, locals())
@dataclass_with_properties
class NamespaceMap:
 9@dataclass_with_properties
10class NamespaceMap:
11    prefix: str
12    namespace: str  # anyURI
13
14    def __init__(self, prefix: str, namespace: str):
15        check_types_and_set_values(self, locals())
NamespaceMap(prefix: str, namespace: str)
14    def __init__(self, prefix: str, namespace: str):
15        check_types_and_set_values(self, locals())
prefix: str
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")
namespace: str
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")