Skip to content

Commit

Permalink
Extend DCAT US profile from DCAT AP 3
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Oct 7, 2024
1 parent 82d1e09 commit 60009fb
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ckanext/dcat/profiles/dcat_us_3.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
from rdflib import Literal, BNode

from ckanext.dcat.profiles import (
DCAT,
XSD,
SKOS,
ADMS,
RDF,
DCT,
)
from ckanext.dcat.utils import resource_uri

from .euro_dcat_ap_2 import EuropeanDCATAP2Profile
from .euro_dcat_ap_scheming import EuropeanDCATAPSchemingProfile
from .base import URIRefOrLiteral, CleanedURIRef
from .euro_dcat_ap_3 import EuropeanDCATAP3Profile


class DCATUS3Profile(EuropeanDCATAP2Profile, EuropeanDCATAPSchemingProfile):
class DCATUS3Profile(EuropeanDCATAP3Profile):
"""
An RDF profile based on the DCAT-US 3 for data portals in the US
"""
Expand All @@ -28,6 +23,9 @@ def parse_dataset(self, dataset_dict, dataset_ref):
# DCAT AP v2 scheming fields
dataset_dict = self._parse_dataset_v2_scheming(dataset_dict, dataset_ref)

# DCAT US v3 properties also applied to higher versions
self._parse_dataset_v3_us(dataset_dict, dataset_ref)

return dataset_dict

def graph_from_dataset(self, dataset_dict, dataset_ref):
Expand All @@ -44,6 +42,9 @@ def graph_from_dataset(self, dataset_dict, dataset_ref):
# DCAT AP v3 properties also applied to higher versions
self._graph_from_dataset_v3(dataset_dict, dataset_ref)

# DCAT US v3 properties also applied to higher versions
self._graph_from_dataset_v3_us(dataset_dict, dataset_ref)

def graph_from_catalog(self, catalog_dict, catalog_ref):

self._graph_from_catalog_base(catalog_dict, catalog_ref)
Expand Down

0 comments on commit 60009fb

Please sign in to comment.