Repository: Informasjonsforvaltning/fdk-rdf-parser

Issue:
Feltet dctType for datasett må støtte data fra beskrivende begrep
ref https://data.norge.no/specification/dcat-ap-no#Datasett-type

Dette feltet må støtte at verdien er en referanse til et beskrivende begrep, feks fra kodelisten dataset-type.

-----
https://github.com/Informasjonsforvaltning/fdk-issue-tracker/issues/534
https://github.com/Informasjonsforvaltning/behov/issues/759
https://github.com/Informasjonsforvaltning/behov/issues/758

Discussion:

Patch:
diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt
index 2dcd9ec..8a2e1cf 100644
--- a/.github/workflows/constraints.txt
+++ b/.github/workflows/constraints.txt
@@ -1,4 +1,4 @@
-pip==24.0
+pip==24.2
 pipx==1.4.3
 nox==2024.4.15
 nox-poetry==1.0.3
diff --git a/poetry.lock b/poetry.lock
index 532b15e..bb6486f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -560,38 +560,38 @@ files = [
 
 [[package]]
 name = "mypy"
-version = "1.11.0"
+version = "1.11.1"
 description = "Optional static typing for Python"
 optional = false
 python-versions = ">=3.8"
 files = [
-    {file = "mypy-1.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3824187c99b893f90c845bab405a585d1ced4ff55421fdf5c84cb7710995229"},
-    {file = "mypy-1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:96f8dbc2c85046c81bcddc246232d500ad729cb720da4e20fce3b542cab91287"},
-    {file = "mypy-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1a5d8d8dd8613a3e2be3eae829ee891b6b2de6302f24766ff06cb2875f5be9c6"},
-    {file = "mypy-1.11.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72596a79bbfb195fd41405cffa18210af3811beb91ff946dbcb7368240eed6be"},
-    {file = "mypy-1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:35ce88b8ed3a759634cb4eb646d002c4cef0a38f20565ee82b5023558eb90c00"},
-    {file = "mypy-1.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:98790025861cb2c3db8c2f5ad10fc8c336ed2a55f4daf1b8b3f877826b6ff2eb"},
-    {file = "mypy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25bcfa75b9b5a5f8d67147a54ea97ed63a653995a82798221cca2a315c0238c1"},
-    {file = "mypy-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bea2a0e71c2a375c9fa0ede3d98324214d67b3cbbfcbd55ac8f750f85a414e3"},
-    {file = "mypy-1.11.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2b3d36baac48e40e3064d2901f2fbd2a2d6880ec6ce6358825c85031d7c0d4d"},
-    {file = "mypy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:d8e2e43977f0e09f149ea69fd0556623919f816764e26d74da0c8a7b48f3e18a"},
-    {file = "mypy-1.11.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d44c1e44a8be986b54b09f15f2c1a66368eb43861b4e82573026e04c48a9e20"},
-    {file = "mypy-1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cea3d0fb69637944dd321f41bc896e11d0fb0b0aa531d887a6da70f6e7473aba"},
-    {file = "mypy-1.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a83ec98ae12d51c252be61521aa5731f5512231d0b738b4cb2498344f0b840cd"},
-    {file = "mypy-1.11.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c7b73a856522417beb78e0fb6d33ef89474e7a622db2653bc1285af36e2e3e3d"},
-    {file = "mypy-1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:f2268d9fcd9686b61ab64f077be7ffbc6fbcdfb4103e5dd0cc5eaab53a8886c2"},
-    {file = "mypy-1.11.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:940bfff7283c267ae6522ef926a7887305945f716a7704d3344d6d07f02df850"},
-    {file = "mypy-1.11.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:14f9294528b5f5cf96c721f231c9f5b2733164e02c1c018ed1a0eff8a18005ac"},
-    {file = "mypy-1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7b54c27783991399046837df5c7c9d325d921394757d09dbcbf96aee4649fe9"},
-    {file = "mypy-1.11.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:65f190a6349dec29c8d1a1cd4aa71284177aee5949e0502e6379b42873eddbe7"},
-    {file = "mypy-1.11.0-cp38-cp38-win_amd64.whl", hash = "sha256:dbe286303241fea8c2ea5466f6e0e6a046a135a7e7609167b07fd4e7baf151bf"},
-    {file = "mypy-1.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:104e9c1620c2675420abd1f6c44bab7dd33cc85aea751c985006e83dcd001095"},
-    {file = "mypy-1.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f006e955718ecd8d159cee9932b64fba8f86ee6f7728ca3ac66c3a54b0062abe"},
-    {file = "mypy-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:becc9111ca572b04e7e77131bc708480cc88a911adf3d0239f974c034b78085c"},
-    {file = "mypy-1.11.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6801319fe76c3f3a3833f2b5af7bd2c17bb93c00026a2a1b924e6762f5b19e13"},
-    {file = "mypy-1.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:c1a184c64521dc549324ec6ef7cbaa6b351912be9cb5edb803c2808a0d7e85ac"},
-    {file = "mypy-1.11.0-py3-none-any.whl", hash = "sha256:56913ec8c7638b0091ef4da6fcc9136896914a9d60d54670a75880c3e5b99ace"},
-    {file = "mypy-1.11.0.tar.gz", hash = "sha256:93743608c7348772fdc717af4aeee1997293a1ad04bc0ea6efa15bf65385c538"},
+    {file = "mypy-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a32fc80b63de4b5b3e65f4be82b4cfa362a46702672aa6a0f443b4689af7008c"},
+    {file = "mypy-1.11.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c1952f5ea8a5a959b05ed5f16452fddadbaae48b5d39235ab4c3fc444d5fd411"},
+    {file = "mypy-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1e30dc3bfa4e157e53c1d17a0dad20f89dc433393e7702b813c10e200843b03"},
+    {file = "mypy-1.11.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2c63350af88f43a66d3dfeeeb8d77af34a4f07d760b9eb3a8697f0386c7590b4"},
+    {file = "mypy-1.11.1-cp310-cp310-win_amd64.whl", hash = "sha256:a831671bad47186603872a3abc19634f3011d7f83b083762c942442d51c58d58"},
+    {file = "mypy-1.11.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7b6343d338390bb946d449677726edf60102a1c96079b4f002dedff375953fc5"},
+    {file = "mypy-1.11.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4fe9f4e5e521b458d8feb52547f4bade7ef8c93238dfb5bbc790d9ff2d770ca"},
+    {file = "mypy-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:886c9dbecc87b9516eff294541bf7f3655722bf22bb898ee06985cd7269898de"},
+    {file = "mypy-1.11.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fca4a60e1dd9fd0193ae0067eaeeb962f2d79e0d9f0f66223a0682f26ffcc809"},
+    {file = "mypy-1.11.1-cp311-cp311-win_amd64.whl", hash = "sha256:0bd53faf56de9643336aeea1c925012837432b5faf1701ccca7fde70166ccf72"},
+    {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"},
+    {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"},
+    {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"},
+    {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"},
+    {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"},
+    {file = "mypy-1.11.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:749fd3213916f1751fff995fccf20c6195cae941dc968f3aaadf9bb4e430e5a2"},
+    {file = "mypy-1.11.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b639dce63a0b19085213ec5fdd8cffd1d81988f47a2dec7100e93564f3e8fb3b"},
+    {file = "mypy-1.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c956b49c5d865394d62941b109728c5c596a415e9c5b2be663dd26a1ff07bc0"},
+    {file = "mypy-1.11.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45df906e8b6804ef4b666af29a87ad9f5921aad091c79cc38e12198e220beabd"},
+    {file = "mypy-1.11.1-cp38-cp38-win_amd64.whl", hash = "sha256:d44be7551689d9d47b7abc27c71257adfdb53f03880841a5db15ddb22dc63edb"},
+    {file = "mypy-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2684d3f693073ab89d76da8e3921883019ea8a3ec20fa5d8ecca6a2db4c54bbe"},
+    {file = "mypy-1.11.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:79c07eb282cb457473add5052b63925e5cc97dfab9812ee65a7c7ab5e3cb551c"},
+    {file = "mypy-1.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11965c2f571ded6239977b14deebd3f4c3abd9a92398712d6da3a772974fad69"},
+    {file = "mypy-1.11.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a2b43895a0f8154df6519706d9bca8280cda52d3d9d1514b2d9c3e26792a0b74"},
+    {file = "mypy-1.11.1-cp39-cp39-win_amd64.whl", hash = "sha256:1a81cf05975fd61aec5ae16501a091cfb9f605dc3e3c878c0da32f250b74760b"},
+    {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"},
+    {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"},
 ]
 
 [package.dependencies]
@@ -784,13 +784,13 @@ diagrams = ["jinja2", "railroad-diagrams"]
 
 [[package]]
 name = "pytest"
-version = "8.3.1"
+version = "8.3.2"
 description = "pytest: simple powerful testing with Python"
 optional = false
 python-versions = ">=3.8"
 files = [
-    {file = "pytest-8.3.1-py3-none-any.whl", hash = "sha256:e9600ccf4f563976e2c99fa02c7624ab938296551f280835ee6516df8bc4ae8c"},
-    {file = "pytest-8.3.1.tar.gz", hash = "sha256:7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6"},
+    {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"},
+    {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"},
 ]
 
 [package.dependencies]
@@ -962,13 +962,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"]
 
 [[package]]
 name = "setuptools"
-version = "71.1.0"
+version = "72.1.0"
 description = "Easily download, build, install, upgrade, and uninstall Python packages"
 optional = false
 python-versions = ">=3.8"
 files = [
-    {file = "setuptools-71.1.0-py3-none-any.whl", hash = "sha256:33874fdc59b3188304b2e7c80d9029097ea31627180896fb549c578ceb8a0855"},
-    {file = "setuptools-71.1.0.tar.gz", hash = "sha256:032d42ee9fb536e33087fb66cac5f840eb9391ed05637b3f2a76a7c8fb477936"},
+    {file = "setuptools-72.1.0-py3-none-any.whl", hash = "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1"},
+    {file = "setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec"},
 ]
 
 [package.extras]
@@ -1074,4 +1074,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.8.1,<4.0"
-content-hash = "c6909871328092e1843183031cbf1edc60c80e0b5f6e4fb21ddcf24ec38fb5fd"
+content-hash = "afaf946c04aa821f7ff3dd58b3533c935c4afe909c189a337b2fcd6c24139285"
diff --git a/pyproject.toml b/pyproject.toml
index a1e625c..36c3974 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "fdk-rdf-parser"
-version = "2.7.5"
+version = "2.8.0"
 description = ""
 authors = ["NilsOveTen <nils.ove.tendenes@digdir.no>"]
 
@@ -8,14 +8,14 @@ authors = ["NilsOveTen <nils.ove.tendenes@digdir.no>"]
 python = ">=3.8.1,<4.0"
 rdflib = "^7.0.0"
 isodate = "^0.6.1"
-requests = "^2.32.2"
+requests = "^2.32.3"
 
 [tool.poetry.dev-dependencies]
-pytest = "^8.3.1"
+pytest = "^8.3.2"
 coverage = {extras = ["toml"], version = "^7.6.0"}
 pytest-cov = "^5.0.0"
 black = "^24.4.2"
-flake8 = "^7.0.0"
+flake8 = "^7.1.0"
 flake8-bandit = "^4.1.1"
 flake8-black = "^0.3.6"
 flake8-bugbear = "^24.4.26"
@@ -24,7 +24,7 @@ pep8-naming = "^0.14.1"
 pytest-mock = "^3.14.0"
 codecov = "^2.1.13"
 flake8-annotations = "^3.1.1"
-mypy = "^1.11.0"
+mypy = "^1.11.1"
 nox = "^2024.4.15"
 nox-poetry = "^1.0.3"
 
diff --git a/src/fdk_rdf_parser/classes/dataservice.py b/src/fdk_rdf_parser/classes/dataservice.py
index e300a40..ed5fadb 100644
--- a/src/fdk_rdf_parser/classes/dataservice.py
+++ b/src/fdk_rdf_parser/classes/dataservice.py
@@ -16,6 +16,7 @@ from .skos_concept import SkosConcept
 @dataclass
 class DataService(PartialDcatResource):
     id: Optional[str] = None
+    dctType: Optional[str] = None
     harvest: Optional[HarvestMetaData] = None
     endpointDescription: Optional[Set[str]] = None
     endpointURL: Optional[Set[str]] = None
@@ -40,7 +41,6 @@ class DataService(PartialDcatResource):
         self.eurovocThemes = values.eurovocThemes
         self.keyword = values.keyword
         self.contactPoint = values.contactPoint
-        self.dctType = values.dctType
         self.issued = values.issued
         self.modified = values.modified
         self.landingPage = values.landingPage
diff --git a/src/fdk_rdf_parser/classes/dataset.py b/src/fdk_rdf_parser/classes/dataset.py
index 21ff674..80979aa 100644
--- a/src/fdk_rdf_parser/classes/dataset.py
+++ b/src/fdk_rdf_parser/classes/dataset.py
@@ -25,6 +25,7 @@ from .temporal import Temporal
 @dataclass
 class PartialDataset(PartialDcatResource):
     id: Optional[str] = None
+    dctType: Optional[ReferenceDataCode] = None
     harvest: Optional[HarvestMetaData] = None
     accessRightsComment: Optional[List[str]] = None
     distribution: Optional[List[Distribution]] = None
@@ -71,7 +72,6 @@ class PartialDataset(PartialDcatResource):
         self.eurovocThemes = values.eurovocThemes
         self.keyword = values.keyword
         self.contactPoint = values.contactPoint
-        self.dctType = values.dctType
         self.issued = values.issued
         self.modified = values.modified
         self.landingPage = values.landingPage
diff --git a/src/fdk_rdf_parser/classes/dcat_resource.py b/src/fdk_rdf_parser/classes/dcat_resource.py
index 8cbd916..c479294 100644
--- a/src/fdk_rdf_parser/classes/dcat_resource.py
+++ b/src/fdk_rdf_parser/classes/dcat_resource.py
@@ -31,7 +31,6 @@ class PartialDcatResource:
     eurovocThemes: Optional[List[Eurovoc]] = None
     keyword: Optional[List[Dict[str, str]]] = None
     contactPoint: Optional[List[DCATContactPoint]] = None
-    dctType: Optional[str] = None
     issued: Optional[str] = None
     modified: Optional[str] = None
     landingPage: Optional[Set[str]] = None
diff --git a/src/fdk_rdf_parser/classes/info_model.py b/src/fdk_rdf_parser/classes/info_model.py
index 585e125..13a1589 100644
--- a/src/fdk_rdf_parser/classes/info_model.py
+++ b/src/fdk_rdf_parser/classes/info_model.py
@@ -21,6 +21,7 @@ from .temporal import Temporal
 @dataclass
 class InformationModel(PartialDcatResource):
     id: Optional[str] = None
+    dctType: Optional[str] = None
     harvest: Optional[HarvestMetaData] = None
     catalog: Optional[Catalog] = None
     conformsTo: Optional[List[DctStandard]] = None
@@ -58,7 +59,6 @@ class InformationModel(PartialDcatResource):
         self.eurovocThemes = values.eurovocThemes
         self.keyword = values.keyword
         self.contactPoint = values.contactPoint
-        self.dctType = values.dctType
         self.issued = values.issued
         self.modified = values.modified
         self.language = values.language
diff --git a/src/fdk_rdf_parser/parse_functions/dataservice.py b/src/fdk_rdf_parser/parse_functions/dataservice.py
index 03755eb..bb4f8ee 100644
--- a/src/fdk_rdf_parser/parse_functions/dataservice.py
+++ b/src/fdk_rdf_parser/parse_functions/dataservice.py
@@ -27,6 +27,7 @@ def _parse_data_service(
 ) -> DataService:
     data_service = DataService(
         id=object_value(data_services_graph, record_uri, DCTERMS.identifier),
+        dctType=object_value(data_services_graph, data_service_uri, DCTERMS.type),
         harvest=extract_meta_data(data_services_graph, record_uri),
         endpointURL=value_set(
             data_services_graph, data_service_uri, dcat_uri("endpointURL")
diff --git a/src/fdk_rdf_parser/parse_functions/dataset.py b/src/fdk_rdf_parser/parse_functions/dataset.py
index 2f875fd..e6c0025 100644
--- a/src/fdk_rdf_parser/parse_functions/dataset.py
+++ b/src/fdk_rdf_parser/parse_functions/dataset.py
@@ -46,6 +46,7 @@ from .harvest_meta_data import extract_meta_data
 from .qualified_attribution import extract_qualified_attributions
 from .quality_annotation import extract_quality_annotation
 from .reference_data_code import (
+    extract_reference_dataset_type,
     extract_reference_frequency,
     extract_reference_provenance,
 )
@@ -65,6 +66,7 @@ def _parse_dataset(
 
     dataset = PartialDataset(
         id=object_value(datasets_graph, record_uri, DCTERMS.identifier),
+        dctType=extract_reference_dataset_type(datasets_graph, dataset_uri),
         admsIdentifier=value_set(datasets_graph, dataset_uri, adms_uri("identifier")),
         harvest=extract_meta_data(datasets_graph, record_uri),
         accessRightsComment=value_list(
diff --git a/src/fdk_rdf_parser/parse_functions/dcat_resource.py b/src/fdk_rdf_parser/parse_functions/dcat_resource.py
index 99a1ef8..20b68cf 100644
--- a/src/fdk_rdf_parser/parse_functions/dcat_resource.py
+++ b/src/fdk_rdf_parser/parse_functions/dcat_resource.py
@@ -17,7 +17,6 @@ from fdk_rdf_parser.rdf_utils import (
     date_value,
     dcat_uri,
     node_value,
-    object_value,
     resource_uri_value,
     value_list,
     value_set,
@@ -58,7 +57,6 @@ def parse_dcat_resource(graph: Graph, subject: URIRef) -> PartialDcatResource:
         eurovocThemes=map_eurovoc_themes(graph, theme_refs["eurovocs"]),
         keyword=extract_key_words(graph, subject),
         contactPoint=extract_contact_points(graph, subject),
-        dctType=object_value(graph, subject, DCTERMS.type),
         issued=date_value(graph, subject, DCTERMS.issued),
         modified=date_value(graph, subject, DCTERMS.modified),
         landingPage=value_set(graph, subject, dcat_uri("landingPage")),
diff --git a/src/fdk_rdf_parser/parse_functions/info_model.py b/src/fdk_rdf_parser/parse_functions/info_model.py
index 86a35a5..9f2b327 100644
--- a/src/fdk_rdf_parser/parse_functions/info_model.py
+++ b/src/fdk_rdf_parser/parse_functions/info_model.py
@@ -53,6 +53,7 @@ def _parse_information_model(
 
     info_model = InformationModel(
         id=object_value(graph, fdk_record_uri, DCTERMS.identifier),
+        dctType=object_value(graph, info_model_uri, DCTERMS.type),
         harvest=extract_meta_data(graph, fdk_record_uri),
         catalog=parse_catalog(graph, fdk_record_uri),
         conformsTo=extract_dct_standard_list(graph, info_model_uri, DCTERMS.conformsTo),
diff --git a/src/fdk_rdf_parser/parse_functions/reference_data_code.py b/src/fdk_rdf_parser/parse_functions/reference_data_code.py
index 58bc41e..4e9d928 100644
--- a/src/fdk_rdf_parser/parse_functions/reference_data_code.py
+++ b/src/fdk_rdf_parser/parse_functions/reference_data_code.py
@@ -103,6 +103,17 @@ def extract_reference_frequency(
         return None
 
 
+def extract_reference_dataset_type(
+    graph: Graph, subject: URIRef
+) -> Optional[ReferenceDataCode]:
+    type_ref = graph.value(subject, DCTERMS.type)
+    if type_ref:
+        dct_type = parse_reference_code(graph, type_ref, DC.identifier, SKOS.prefLabel)
+        return filter_reference_data_code(dct_type)
+    else:
+        return None
+
+
 def extract_reference_provenance(
     graph: Graph, subject: URIRef
 ) -> Optional[ReferenceDataCode]:


Test patch:
diff --git a/tests/test_dataset.py b/tests/test_dataset.py
index b9dc3d0..20127c1 100644
--- a/tests/test_dataset.py
+++ b/tests/test_dataset.py
@@ -997,6 +997,8 @@ def test_parse_single_dataset() -> None:
 
         <https://testdirektoratet.no/model/dataset/0>
                 a                         dcat:Dataset ;
+                dct:type
+                    <http://publications.europa.eu/resource/authority/dataset-type/TEST_DATA> ;
                 dct:accrualPeriodicity
                     <http://publications.europa.eu/resource/authority/frequency/ANNUAL> ;
                 dct:identifier
@@ -1019,6 +1021,10 @@ def test_parse_single_dataset() -> None:
             dc:identifier  "ANNUAL";
             skos:prefLabel  "annual"@en , "årleg"@nn , "årlig"@nb , "årlig"@no .
 
+        <http://publications.europa.eu/resource/authority/dataset-type/TEST_DATA>
+            dc:identifier   "TEST_DATA" ;
+            skos:prefLabel  "Testdata"@nn , "Test data"@en , "Testdata"@no , "Testdata"@nb .
+
         <https://data.geonorge.no/administrativeEnheter/fylke/id/34>
                 a               dct:Location;
                 dct:identifier  "34";
@@ -1042,6 +1048,16 @@ def test_parse_single_dataset() -> None:
         publisher=Publisher(
             uri="http://data.brreg.no/enhetsregisteret/enhet/987654321"
         ),
+        dctType=ReferenceDataCode(
+            uri="http://publications.europa.eu/resource/authority/dataset-type/TEST_DATA",
+            code="TEST_DATA",
+            prefLabel={
+                "en": "Test data",
+                "nn": "Testdata",
+                "nb": "Testdata",
+                "no": "Testdata",
+            },
+        ),
         page={"https://testdirektoratet.no"},
         subject=[
             Subject(uri="https://testdirektoratet.no/model/concept/0"),
diff --git a/tests/test_dcat_resource.py b/tests/test_dcat_resource.py
index 352d5ee..dadfbb0 100644
--- a/tests/test_dcat_resource.py
+++ b/tests/test_dcat_resource.py
@@ -148,7 +148,6 @@ def test_dcat_resource_parser() -> None:
             )
         ],
         landingPage={"https://testdirektoratet.no"},
-        dctType="Kodelister",
     )
 
     graph = Graph().parse(data=src, format="turtle")