diff --git a/.pytest_cache/v/cache/nodeids b/.pytest_cache/v/cache/nodeids new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/.pytest_cache/v/cache/nodeids @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/pygeometa/schemas/dcat/__init__.py b/pygeometa/schemas/dcat/__init__.py index 009588f..6971ff7 100644 --- a/pygeometa/schemas/dcat/__init__.py +++ b/pygeometa/schemas/dcat/__init__.py @@ -44,13 +44,104 @@ # ================================================================= import os -from typing import Union +import json +import logging +import uuid +from shapely import from_wkt +from typing import Dict, Any, List, Optional, Union +from rdflib import Graph, URIRef, Namespace, Literal, BNode +from rdflib.namespace import RDF, SKOS, DCTERMS, DCAT, PROV, FOAF from pygeometa.helpers import json_dumps from pygeometa.schemas.base import BaseOutputSchema +LOGGER = logging.getLogger(__name__) THISDIR = os.path.dirname(os.path.realpath(__file__)) +# Namespaces +SCHEMA = Namespace('http://schema.org/') +ADMS = Namespace('http://www.w3.org/ns/adms#') +LOCN = Namespace('http://www.w3.org/ns/locn#') +VCARD = Namespace('http://www.w3.org/2006/vcard/ns#') + +# Default DCAT-AP 3.1 context URL for missing JSON-LD contexts +_DCAT_AP_CONTEXT_URL = "https://github.com/SEMICeu/DCAT-AP/raw/refs/heads/master/releases/3.0.1/context/dcat-ap.jsonld" # noqa + +# default mapping aligning common DCAT/DCT terms to MCF paths +DEFAULT_MAPPING = { + 'dct:title': 'identification.title', + 'dct:description': 'identification.abstract', + 'dct:abstract': 'identification.abstract', + 'dct:license': 'identification.licence', + 'dct:language': 'metadata.language', + 'dct:modified': 'identification.modification', + 'dct:created': 'identification.creation', + 'dct:issued': 'identification.publication', + 'dct:source': 'identification.source', + 'dct:accessRights': 'identification.rights', + 'dct:conformsTo': 'identification.conformsto', + 'dct:format': 'identification.format', + 'dcat:landingPage': 'identification.landingpage', + 'dct:accrualPeriodicity': 'identification.maintenancefrequency', + 'dcat:version': 'identification.edition', + 'dct:identifier': 'metadata.identifier', + 'dct:isPartOf': 'metadata.relations', + 'dcat:hasVersion': 'metadata.relations', + 'dcat:inSeries': 'metadata.relations', + 'dct:isReferencedBy': 'metadata.relations', + 'dct:provenance': 'identification.provenance', + 'dct:relation': 'metadata.relations', + 'adms:sample': 'identification.sample', + 'dcat:spatialResolutionInMeters': 'identification.spatialResolutionInMeters', # noqa + 'dcat:temporalResolution': 'identification.temporalResolution', + 'dct:type': 'metadata.hierarchylevel', + 'adms:versionNotes': 'identification.edition', + 'prov:wasGeneratedBy': 'dataquality.lineage' +} + +DISTRIBUTION_MAPPING = { + "dct:format": "type", + "dct:title": "name", + "dct:description": "description", + "dcat:accessService": "url", + "dcat:downloadURL": "url", + "dcat:byteSize": "size", + "dcat:mediaType": "type", + "dcat:accessURL": "url", + "dcat:landingPage": "url", + "dct:rights": "rights", + "dct:license": "license", + "dct:identifier": "identifier", + "dcat:packageFormat": "type" +} + +CONTACT_MAPPING = { + "foaf:name": "individualname", + "foaf:mbox": "email", + "foaf:homepage": "url", + "locn:address": "address", + "vcard:hasEmail": "email", + "vcard:fn": "individualname", + "vcard:hasAddress": "address", + "vcard:country-name": "country", + "vcard:locality": "city", + "vcard:postal-code": "postcode", + "vcard:street-address": "address", + "vcard:hasTelephone": "phone", + "vcard:nickname": "individualname", +} + +INTL_MCF_FIELDS = ["identification.abstract", "identification.title"] + +# Parser formats to try in order +_PARSER_FORMATS = [ + 'json-ld', + 'xml', + 'turtle', + 'n3', + 'trig', +] + class DCATOutputSchema(BaseOutputSchema): """dcat output schema""" @@ -65,6 +156,461 @@ def __init__(self): description = 'DCAT' super().__init__('dcat', description, 'json', THISDIR) + def _inject_jsonld_context(self, content: str) -> str: + """ + Inject DCAT-AP context into JSON content if missing. + + Returns modified JSON string if '@context' not found. + If parsing fails, returns original content. + """ + try: + data = json.loads(content) + if isinstance(data, dict) and '@context' not in data: + LOGGER.debug('Adding DCAT context to json-ld document') + data['@context'] = _DCAT_AP_CONTEXT_URL + return json.dumps(data) + except Exception: + pass + return content + + def _parse_dcat_content(self, content: str, base: Optional[str] = None) -> Graph: # noqa + """ + Parse content into an rdflib.Graph, trying a set of common RDF serialisations. # noqa + + Raises ValueError if none of the attempted formats succeed. + """ + last_exc = None + + for fmt in _PARSER_FORMATS: + try: + g = Graph() + g.parse(data=content, format=fmt, publicID=base) + return g + except Exception as exc: + last_exc = exc + raise ValueError(f"Unable to parse content as a known RDF serialisation. Last error: {last_exc}") # noqa + + def _get_keywords(self, g, main): + qry = f""" + PREFIX dcat: + PREFIX dct: + PREFIX skos: + + SELECT DISTINCT + ?prop + ?term + ?keywordLiteral + ?prefLabel + ?scheme + ?schemeTitle + WHERE {{ + VALUES ?dataset {{ <{main}> }} + VALUES ?prop {{ dcat:keyword dct:subject dcat:theme }} + ?dataset ?prop ?term . + + # literal → string, resource → "" + BIND( IF(isLiteral(?term), STR(?term), "") AS ?keywordLiteral ) + + OPTIONAL {{ + FILTER(!isLiteral(?term)) + ?term skos:prefLabel ?prefLabel . + }} + OPTIONAL {{ + FILTER(!isLiteral(?term)) + ?term (skos:inScheme | skos:conceptScheme) ?scheme . + ?scheme dct:title ?schemeTitle . + }} + }} + ORDER BY ?prop ?term + """ + keywords = {} + for row in g.query(qry): + rscheme = 'default' + if row[5]: + rscheme = str(row[5]) + if rscheme not in keywords.keys(): + keywords[rscheme] = {'keywords': []} + keywords[rscheme]['keywords'].append(str(row[3] or row[2] or row[1])) # noqa + return keywords + + def _to_uriref(self, key: str) -> URIRef: + """Convert a mapping key into a URIRef. + + Accepts full URIs or qnames like 'dct:title' or 'dcat:keyword'. + Unknown prefixes default to the DCTERMS namespace. + """ + if key.startswith('http://') or key.startswith('https://'): + return URIRef(key) + if ':' in key: + prefix, local = key.split(':', 1) + ns = { + 'dct': DCTERMS, + 'dcat': DCAT, + 'skos': SKOS, + 'prov': PROV, + 'foaf': FOAF, + 'adms': ADMS, + 'locn': LOCN, + 'vcard': VCARD, + 'schema': SCHEMA + }.get(prefix) + if ns is not None: + return ns[local] + return DCTERMS[key] + + def _collect_literals_by_lang(self, values: List[Any], g, deflang) -> Dict[str, List[str]]: # noqa + """ + Given a list of rdflib nodes, return dict lang -> list(strings). + + Literals without language tags go under the empty-string key ''. + Non-literals (URIRefs) are converted to their string representation + and put under ''. + """ + out: Dict[str, List[str]] = {} + for v in values: + if isinstance(v, Literal): + s = str(v) + lang = v.language or deflang + else: + s = str(self._get_rdfval(g, v)) + lang = deflang + if s not in (None, ''): + out.setdefault(lang, []).append(s) + return out + + def _identify_main_entity(self, g: Graph): + """ + The main entity can be Dataset, DataService + Other entities can be skos-concept, vcard:organization, + dcat.distribution, dcat.catalogue or dcat.catalogueRecord + """ + for s, p, o in g.triples((None, RDF.type, None)): + if o in (DCAT.Dataset, DCAT.DataService, DCAT.Resource): + LOGGER.debug(f'Main type is {str(o)}, {str(s)}') + return s + # fallback to first subject of any type + for s, p, o in g.triples((None, RDF.type, None)): + LOGGER.debug(f'No main type found, use first {str(o)}, {str(s)}') + return s + # fallback to any subject + for s, p, o in g.triples((None, None, None)): + LOGGER.debug(f'No type found, using first subject {str(s)}') + return s + + def _get_contact(self, g, main_entity, lang, type): + pred_ref = self._to_uriref(type) + values = [o for o in g.objects(subject=main_entity, predicate=pred_ref)] # noqa + if not values or len(values) == 0: + return {} + contacts = {} + for contact in values: + cid = str(uuid.uuid1()) + contacts[cid] = self._build_mcf_dict(g, CONTACT_MAPPING, contact, lang) # noqa + if contacts[cid]: + contacts[cid]['role'] = type.split('.').pop() + return contacts + + def _get_rdfval(self, g, v): + # takes the string from literal or uuidref, if it does not resolve + if isinstance(v, URIRef) or isinstance(v, BNode): + values = [o for o in g.objects(subject=v, predicate=None)] + if not values or len(values) == 0: + return str(v) + return ", ".join([str(i) for i in values if i != '']) + else: + return str(v) + + def _join_arr(self, vals): + # merges the content of a dict from _extract_literals to a string + if isinstance(vals, list): + return " ".join([v for v in vals if isinstance(v, str)]) + if isinstance(vals, dict): + return "".join([" ".join(v) for v in vals.values() if isinstance(v, list)]) # noqa + + def _join_vals_of_dict(self, adict): + """ + for any dict with lists as values, merge the values to a single string + """ + vls = [] + if isinstance(adict, dict): + for v in adict.values(): # dict of pred:obj + if not isinstance(v, list): + v = [v] + for v2 in v: # list of vals + if v2 not in vls: # prevent duplicates + vls.append(v2) + elif isinstance(adict, list): + for v2 in adict: + if v2 not in vls: # prevent duplicates + vls.append(v2) + else: + if adict not in vls: # prevent duplicates + vls.append(adict) + return vls + + def _build_mcf_dict(self, g: Graph, mapping: Dict[str, str], main_entity, lang: str) -> Dict[str, Any]: # noqa + """ + Build an MCF-compatible nested dict from the provided graph. + + :param g: rdflib.Graph containing DCAT metadata + :param mapping: dict mapping source DCAT/ DCTERMS property (qname or URI) to + a dot-separated MCF path (e.g. 'identification.title') + :param dataset_uri: optional URI to focus extraction on a single dataset + :returns: nested dict suitable for YAML serialization according to pygeometa's MCF # noqa + """ + mcf: Dict[str, Any] = {} + + for src_prop, tgt_path in mapping.items(): + prop_ref = self._to_uriref(src_prop) + values = [o for o in g.objects(subject=main_entity, predicate=prop_ref)] # noqa + if not values or len(values) == 0: + continue + + LOGGER.debug(f'Parsing {str(prop_ref)} to {tgt_path} as {values}') + if tgt_path in INTL_MCF_FIELDS: + lang_map = self._collect_literals_by_lang(values, g, lang) + # Convert lists to single scalar per language + scalar_lang_map: Dict[str, str] = {} + for alang, vals in lang_map.items(): + if not isinstance(vals, list): + vals = [vals] + vals2 = [] + for v in vals: + v2 = self._extract_literals(g, v) + for v2 in self._join_vals_of_dict(v): + vals2.append(v2) + if len(vals2) > 0: + scalar_lang_map[(alang or lang)] = " ".join([v for v in vals2 if v != '']) # noqa + if len(scalar_lang_map.keys()) == 0: + scalar_lang_map = "" + elif len(scalar_lang_map.keys()) == 1: + scalar_lang_map = list(scalar_lang_map.values())[0] + else: + vals2 = [] + for v in values: + v2 = self._extract_literals(g, v) + for v2 in self._join_vals_of_dict(v): + vals2.append(v2) + if len(vals2) > 0: + scalar_lang_map = " ".join([v for v in vals2 if v != '']) + + # Insert into nested mcf by splitting tgt_path + parts = tgt_path.split('.') + cur = mcf + for part in parts[:-1]: + cur = cur.setdefault(part, {}) + final_key = parts[-1] + + existing = cur.get(final_key) + if existing is None: + # set the language-keyed scalar mapping + cur[final_key] = scalar_lang_map + else: + if tgt_path in INTL_MCF_FIELDS: + # merge: preserve existing languages and overwrite/append others # noqa + for lang, val in scalar_lang_map.items(): + if lang in existing and existing[lang]: + # if an existing value is present, join with the new one # noqa + existing[lang] = existing[lang] + ' | ' + val + else: + existing[lang] = val + else: + existing = existing + ' | ' + scalar_lang_map + cur[final_key] = existing + + return mcf + + def _get_lang(self, g: Graph, main_entity): + values = [o for o in g.objects(subject=main_entity, predicate= DCTERMS.language)] # noqa + lang = str(next(iter(values), '')) + if '/' in lang or '#' in lang: # sometimes lang is a URI + lang = lang.split('/').pop().split('#').pop() + LOGGER.debug(f'Languag identified: {lang}') + return lang + + def _get_distribution(self, g: Graph, main_entity, lang): + values = [o for o in g.objects(subject=main_entity, predicate=DCAT.distribution)] # noqa + if not values or len(values) == 0: + return {} + dists = {} + for dist in values: + did = str(uuid.uuid1()) + dists[did] = self._build_mcf_dict(g, DISTRIBUTION_MAPPING, dist, lang) # noqa + LOGGER.debug(f"process distribution {dists[did].get('url')}") # noqa + return dists + + def _parse_geom(self, geom): + """ + tries to parse various types of geometry (wkt, bbox) + """ + if isinstance(geom, list): + return geom + try: + # return the bounds around wkt string, parsed by shapely + # in some cases asWKT is prepended with + box = geom + if '>' in geom: + box = geom.split('>').pop() + # crs = geom.split('>')[0].replace('<', '') + return list(from_wkt(box).bounds) + except Exception as e: + LOGGER.debug(f'wkt parse {geom} failed, {e}') + try: # Try as bbox Array + geom2 = str(geom) + geom3 = [c for c in geom2.replace(' ', ', ').split(', ') if c != ''] # noqa + if len(geom3) == 4: + return geom3 + except Exception as e: + LOGGER.debug(f'Geom {geom} can not be parsed, {e}') + + LOGGER.debug(f'Geom {geom} can not be parsed') + return None + + def _get_rdfvals(self, g, main, type): + pred_ref = self._to_uriref(type) + values = [o for o in g.objects(subject=main, predicate=pred_ref)] + items = [] + for elm in (values or []): + items2 = self._extract_literals(g, elm, pred_ref) + if items2: + items.append(items2) + return items + + def _extract_literals(self, graph, start_node, pred=''): + """ + Recursively traverses RDF graph starting from `start_node`, + collecting all literals encountered. + """ + results = {} + visited = set() + + def node_has_triples(node): + # Returns True if graph has any triples with `node` as subject. + return any(graph.predicate_objects(node)) + + def return_val(predicate, obj): + if isinstance(obj, Literal): + results.setdefault(str(predicate), []).append(str(obj)) + + elif isinstance(obj, URIRef): + if node_has_triples(obj): + recurse(obj) + else: + # Unresolved URIRef: return it as a string under the pred + results.setdefault(str(predicate), []).append(str(obj)) + + elif isinstance(obj, BNode): + if node_has_triples(obj): + recurse(obj) + else: # Unresolved BNode: skip it + None + + def recurse(node): + if node in visited: + return + visited.add(node) + for predicate, obj in graph.predicate_objects(node): + if predicate == RDF.type: # skip type triples + continue + return_val(predicate, obj) + + if node_has_triples(start_node): + recurse(start_node) + else: + return_val(pred, start_node) + + return results + + def import_(self, metadata: str) -> dict: + """ + Import metadata into MCF + + :param metadata: string of metadata content + + :returns: `dict` of MCF content + """ + + # Try detect if JSON-LD and may need context injection + try: + sample = metadata.strip()[:100].lstrip() + if sample.startswith('{') or sample.startswith('['): + metadata = self._inject_jsonld_context(metadata) + except Exception as e: + LOGGER(f'Intial json check failed, {e}') + # Either xml, ttl, n3 or jsonld + g = self._parse_dcat_content(metadata) + if not g or len(g) == 0: + raise ValueError('Document is an empty graph') + main_entity = self._identify_main_entity(g) # returns None, URI or BN + if main_entity is None: + raise ValueError('No main entity found in the provided graph') + lang = self._get_lang(g, main_entity) + if not lang: + lang = 'en' + mcf = self._build_mcf_dict(g, DEFAULT_MAPPING, main_entity, lang) + + if 'identification' not in mcf: + raise ValueError(f'Empty document after parsing of main entity {str(main_entity)}') # noqa + + # use identifier if no identifier, else set as additional + if isinstance(main_entity, URIRef): + if 'identifier' in mcf.get('metadata', {}): + if str(main_entity) not in [i.get('identifier') for i in mcf['metadata'].get('additional_identifiers',[])]: # noqa + mcf['metadata'].setdefault('additional_identifiers',[]).append({'identifier': str(main_entity)}) # noqa + else: + mcf['metadata']['identifier'] = str(main_entity) + # distributions + mcf['distribution'] = self._get_distribution(g, main_entity, lang) + # duplicate license/right to main, if they are not in main + if 'license' not in mcf['identification']: + for v in mcf['distribution'].values(): + if 'license' in v: + mcf['identification']['license'] = v['license'] + if 'rights' in v and 'rights' not in mcf['identification']: + mcf['identification']['rights'] = v['rights'] + break + + # contacts + for tp in "dct:creator, dct:publisher, dcat:contactPoint".split(', '): # noqa + for k,v in (self._get_contact(g, main_entity, lang, tp).items() or {}): # noqa + mcf.setdefault('contact', {})[k] = v + # dates + for d in "creation,modification,publication".split(', '): + if d in mcf['identification'].keys(): + mcf['identification'].setdefault('dates', {})[d] = mcf['identification'].pop(d) # noqa + + # coverage + geoms = [] + for geom2 in (self._get_rdfvals(g, main_entity, 'dct:spatial') or []): + for k, v in (geom2 or {}).items(): + if k == str(SKOS.prefLabel): + geoms.append({'description': v}) + else: # various flavour of geom + LOGGER.debug(f'Parsing geom for {k}:{v}') + for v2 in v: + bounds = self._parse_geom(v2) + if bounds and len(bounds) == 4: + geoms.append({'bbox': bounds, 'crs': 4326}) + if len(geoms) > 0: + mcf['identification'].setdefault('extents', {})['spatial'] = geoms # noqa + temps = [] + for temp in (self._get_rdfvals(g, main_entity, 'dct:temporal') or []): + temp2 = {} + for k, v in (temp or {}).items(): + if k == str(DCAT.startDate) or k == str(SCHEMA.startDate): + temp2['begin'] = str(next(iter(v), '')) + elif k == str(DCAT.endDate) or k == str(SCHEMA.endDate): + temp2['end'] = str(next(iter(v), '')) + else: + LOGGER.debug(f'Not a known period property {str(k)} for {v}') # noqa + if 'begin' in temp2 or 'end' in temp2: + temps.append(temp2) + mcf['identification'].setdefault('extents', {})['temporal'] = temps + + mcf['identification']['keywords'] = self._get_keywords(g, main_entity) + + return mcf + def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]: """ Write MCF to DCAT diff --git a/requirements.txt b/requirements.txt index e9394a0..4e960f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,5 @@ jsonschema lxml OWSLib pyyaml +rdflib +shapely \ No newline at end of file diff --git a/tests/dcat.jsonld.json b/tests/dcat.jsonld.json new file mode 100644 index 0000000..531ee89 --- /dev/null +++ b/tests/dcat.jsonld.json @@ -0,0 +1,113 @@ +PREFIX dcat: +PREFIX dct: +PREFIX foaf: +PREFIX locn: +PREFIX prov: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +PREFIX vcard: + + + rdf:type dcat:Dataset; + + ; + + ; + + ; + dct:accrualPeriodicity ; + dct:created "2025-10-31"^^; + dct:description "Vertikalno širenje slojeva dubine"@hr-t-de-t0-mtec , "Vertikální rozšíření hloubkových vrstev"@cs-t-de-t0-mtec , "Expansão vertical das camadas de profundidade"@pt-t-de-t0-mtec , "Expansiunea verticală a straturilor de adâncime"@ro-t-de-t0-mtec , "Espansjoni vertikali tas-saffi tal-fond"@mt-t-de-t0-mtec , "Vertikalus gylio sluoksnių plėtimasis"@lt-t-de-t0-mtec , "Vertikalna širitev globinskih plasti"@sl-t-de-t0-mtec , "Vertikálne rozšírenie vrstiev hĺbky"@sk-t-de-t0-mtec , "Expansión vertical de las capas de profundidad"@es-t-de-t0-mtec , "Espansione verticale degli strati di profondità"@it-t-de-t0-mtec , "Вертикальне розширення глибинних шарів"@uk-t-de-t0-mtec , "Schichtdicken des operationellen Zirkulationsmodells des Bundesamtes für Seeschifffahrt und Hydrographie (BSH) in der deutschen Bucht und der westlichen Ostsee (horizontale Auflösung ca. 900 m). Das Modell (HBM, HIROMB-BOOS-Modell) läuft viermal am Tag in einer Konfiguration mit einem feineren Gitter in der Deutschen Bucht und westlichen Ostsee (900 m Auflösung, dieser Datensatz) und einem gröberen Gitter, das die gesamte Nord- und Ostsee abdeckt (5 km Auflösung, separater Datensatz). Das Modell wird von aktuellen Wettervorhersagen des Deutschen Wetterdienstes (DWD) angetrieben. Genauere Informationen über die Modellkonfiguration sind in Brüning et al. (2021); https://doi.org/10.23784/HN118-01; zu finden."@de , "Sügavuskihtide vertikaalne paisumine"@et-t-de-t0-mtec , "A mélységrétegek függőleges tágulása"@hu-t-de-t0-mtec , "Verticale uitbreiding van de dieptelagen"@nl-t-de-t0-mtec , "Leathnú Ingearach na sraitheanna doimhneacht"@ga-t-de-t0-mtec , "Layer thickness of the operational circulation model of the Federal Maritime and Hydrographic Agency of Germany (BSH), in the German Bight and the western Baltic Sea (horizontal resolution ca. 900 m). The model (HBM, HIROMB-BOOS-Model) is run four times each day in a configuration with a fine grid in the German Bight and western Baltic Sea (900 m resolution, this dataset) and a coarser grid which covers the North and Baltic Sea (5 km resolution, separate dataset). The model is forced by the weather forecast of the German Weather Service (DWD). More detailed information about the model configuration can be found in Brüning et al. (2021); https://doi.org/10.23784/HN118-01."@en , "Syvyyskerrosten pystysuora laajeneminen"@fi-t-de-t0-mtec , "Vertikal expansion av djupskikten"@sv-t-de-t0-mtec , "Вертикално разширяване на дълбочинните слоеве"@bg-t-de-t0-mtec , "Dziļuma slāņu vertikālā izplešanās"@lv-t-de-t0-mtec , "Κατακόρυφη επέκταση των στρωμάτων βάθους"@el-t-de-t0-mtec , "Pionowa ekspansja warstw głębokości"@pl-t-de-t0-mtec , "Lodret udvidelse af dybdelagene"@da-t-de-t0-mtec , "Extension verticale des couches profondes"@fr-t-de-t0-mtec; + dct:identifier "https://gdi.bsh.de/de/metadata/Layer-thickness-of-the-operational-circulation-model-of-BSH-in-the-German-Bight-and-the-western-Baltic-Sea-horizontal-resolution-900-m-00.xml"^^; + dct:isPartOf [ dct:identifier + "504273c2-4174-4ce2-85f6-5a9f47255655" ]; + dct:issued "2025-10-31"^^; + dct:language ; + dct:modified "2025-10-31"^^; + dct:provenance [ rdf:type dct:ProvenanceStatement; + rdfs:label "Bundesamt für Seeschifffahrt und Hydrographie (BSH)"@de , "Federal Maritime and Hydrographic Agency (BSH)"@en + ]; + dct:spatial [ rdf:type dct:Location; + rdfs:seeAlso [ rdf:type skos:Concept; + skos:prefLabel "000000000000"@de + ] + ]; + dct:spatial [ rdf:type dct:Location; + dcat:bbox "POLYGON((6.1736 56.4458,14.9097 56.4458,14.9097 53.2292,6.1736 53.2292,6.1736 56.4458))"^^ + ]; + dct:title "Sejtvastagság előrejelzés 00"@hu-t-de-t0-mtec , "Previsione dello spessore delle cellule 00"@it-t-de-t0-mtec , "Schichtdicken des operationellen Zirkulationsmodells des BSH in der deutschen Bucht und der westlichen Ostsee (horizontale Auflösung 900 m) 00"@de , "Šūnu biezuma prognoze 00"@lv-t-de-t0-mtec , "Förutsägelse av celltjocklek 00"@sv-t-de-t0-mtec , "Прогнозування товщини клітин 00"@uk-t-de-t0-mtec , "Previsão da espessura telemóvel 00"@pt-t-de-t0-mtec , "Tuar tiús cille 00"@ga-t-de-t0-mtec , "Forudsigelse af celletykkelse 00"@da-t-de-t0-mtec , "Predicția grosimii celulei 00"@ro-t-de-t0-mtec , "Πρόβλεψη πάχους κυττάρων 00"@el-t-de-t0-mtec , "Solujen paksuuden ennuste 00"@fi-t-de-t0-mtec , "Tbassir tal-ħxuna taċ-ċellula 00"@mt-t-de-t0-mtec , "Layer thickness of the operational circulation model of BSH in the German Bight and the western Baltic Sea (horizontal resolution 900 m) 00"@en , "Predviđanje debljine ćelije 00"@hr-t-de-t0-mtec , "Predicción del espesor de la célula 00"@es-t-de-t0-mtec , "Ląstelių storio prognozė 00"@lt-t-de-t0-mtec , "Raku paksuse prognoos 00"@et-t-de-t0-mtec , "Napovedovanje debeline celice 00"@sl-t-de-t0-mtec , "Przewidywanie grubości komórek 00"@pl-t-de-t0-mtec , "Predpovedanie hrúbky bunky 00"@sk-t-de-t0-mtec , "Celdikte voorspelling 00"@nl-t-de-t0-mtec , "Predikce tloušťky buněk 00"@cs-t-de-t0-mtec , "Prévision de l’épaisseur des cellules 00"@fr-t-de-t0-mtec , "Прогноза за дебелината на клетката 00"@bg-t-de-t0-mtec; + dcat:contactPoint [ rdf:type vcard:Organization; + vcard:hasAddress [ rdf:type vcard:Address; + vcard:country-name "Deutschland" , "Deutschland\n \n \n Germany"; + vcard:locality "Hamburg"; + vcard:postal-code "20359"; + vcard:region "Hamburg"; + vcard:street-address "Bernhard-Nocht-Str. 78" + ]; + vcard:hasEmail ; + vcard:organization-name "Bundesamt für Seeschifffahrt und Hydrographie (BSH)" + ]; + dcat:distribution , ; + dcat:keyword "Nordsee"@de , "Open Data"@en , "operational model forecast"@en , "open data"@de , "Westliche Ostsee"@de , "Open Data"@de , "circulation model"@en , "Bundesamt für Seeschifffahrt und Hydrographie"@de , "Baltic Sea"@en , "Western Baltic Sea"@en , "Ozeanographie"@de , "model layer thickness"@en , "Deutsche Bucht"@de , "North Sea"@en , "oceanography"@en , "German Bight"@en , "Federal Maritime and Hydrographic Agency"@en , "Ostsee"@de , "opendata"@de , "open data"@en , "BSH"@en , "operationelle Modellvorhersage"@de , "Modell-Schichtdicken"@de , "BSH"@de , "Zirkulationsmodell"@de , "opendata"@en; + dcat:theme ; + dcat:theme [ rdf:type skos:Concept; + skos:inScheme [ rdf:type skos:ConceptScheme; + dct:issued "2019-05-22"^^; + dct:title "Spatial scope"@de + ]; + skos:prefLabel "National" + ]; + prov:qualifiedAttribution [ rdf:type prov:Attribution; + dcat:hadRole ; + prov:agent [ rdf:type foaf:Organization; + locn:address [ rdf:type locn:Address; + locn:adminUnitL1 "Deutschland" , "Deutschland\n \n \n Germany"; + locn:adminUnitL2 "Hamburg"; + locn:postCode "20359"; + locn:postName "Hamburg"; + locn:thoroughfare "Bernhard-Nocht-Str. 78" + ]; + foaf:mbox ; + foaf:name "Bundesamt für Seeschifffahrt und Hydrographie (BSH)" + ] + ]; + foaf:isPrimaryTopicOf [] . + + + rdf:type dct:Standard; + dct:type . + + + rdf:type dcat:Distribution; + dct:format ; + dct:identifier "https://gdi.bsh.de/de/data/Layer-thickness-of-the-operational-circulation-model-of-BSH-in-the-German-Bight-and-the-western-Baltic-Sea-horizontal-resolution-900-m-00.zip"; + dct:license [ rdf:type dct:LicenseDocument; + rdfs:label "Dieser Datensatz kann gemäß der \"Datenlizenz Deutschland – Namensnennung – Version 2.0\" (www.govdata.de/dl-de/by-2-0) genutzt werden."@de + ]; + dct:rights [ rdf:type dct:RightsStatement; + rdfs:label "Es gelten keine Zugriffsbeschränkungen"@de + ]; + + "UTF-8"; + dcat:accessURL . + + + rdf:type dct:Frequency . + + + rdf:type dcat:Distribution; + dct:format ; + dct:identifier "https://gdi.bsh.de/de/feed/Layer-thickness-of-the-operational-circulation-model-of-BSH-in-the-German-Bight-and-the-western-Baltic-Sea-horizontal-resolution-900-m-00.xml"; + dct:license [ rdf:type dct:LicenseDocument; + rdfs:label "Dieser Datensatz kann gemäß der \"Datenlizenz Deutschland – Namensnennung – Version 2.0\" (www.govdata.de/dl-de/by-2-0) genutzt werden."@de + ]; + dct:rights [ rdf:type dct:RightsStatement; + rdfs:label "Es gelten keine Zugriffsbeschränkungen"@de + ]; + + "UTF-8"; + dcat:accessURL . + + + rdf:type dct:MediaType . \ No newline at end of file diff --git a/tests/dcat.rdf.xml b/tests/dcat.rdf.xml new file mode 100644 index 0000000..5e691a4 --- /dev/null +++ b/tests/dcat.rdf.xml @@ -0,0 +1,199 @@ + + + + Catalogue interministériel de données géographiques + + Catalogue interministériel de données géographiques (GEO-IDE Catalogue FrontOffice Internet) + + + eng/portal.opensearch + eng/rdf.search?any= + + + + + dut + + + + + GEO-IDE Catalogue FrontOffice Internet + + + Continents, countries, sea regions of the world. + http://catalogue.geo-ide.developpement-durable.gouv.fr:/catalogue/srv/eng/thesaurus.download?ref=external.place.regions + + + GEMET - INSPIRE themes, version 1.0 + http://catalogue.geo-ide.developpement-durable.gouv.fr:/catalogue/srv/eng/thesaurus.download?ref=external.theme.inspire-theme + + + GEMET - INSPIRE themes, version 1.0 + http://catalogue.geo-ide.developpement-durable.gouv.fr:/catalogue/srv/eng/thesaurus.download?ref=local.theme.inspire-theme + + + + 2016-07-06 + 2016-07-06 + + + + + application/xml + XML + + + + + + + + + text/html + HTML + + + + + + + fr-120066022-ldd-d3dd26af-d7bd-4697-a892-2baf212b393c + Plan de Prévention des Risques Naturels (PPRN) de Campan, approuvé le 10/07/2012 + Numérisation vectorielle du PPRN de Campan (65123). +Numérisation réalisée en Novembre 2012, reprise selon le cahier des charges COVADIS Midi-Pyrénées. + +Cette représentation du PPRN, ne peut se substituer au document papier, seul document opposable. + nuisance + ressources - nuisances + source de nuisance (inclut risques industriels et naturels) + données ouvertes + + + + + + + + <http://www.opengis.net/def/crs/OGC/1.3/CRS84> + Polygon((0.3126432895660400390625 42.87058258056640625, 0.3126432895660400390625 43.02680206298828125, 0.139534175395965576171875 43.02680206298828125, 0.139534175395965576171875 42.87058258056640625, 0.3126432895660400390625 42.87058258056640625)) + + + + 2013-01-17 + + fre + otherRestrictions + license + Pas de restriction d'accès public selon INSPIRE + + + + Saisie interne, d'après les fichiers fournis par le service métier (BRNT). +Saisie sur BD-Parcellaire image 2010. + +Il s'agit d'une représentation du zonage du PPRN. +En effet, il n'est pas toujours possible de reproduire le zonage de façon strictement identique au plan approuvé, du fait de la qualité du plan d'origine, des échelles de définition variables, de l'évolution du cadastre, ... +Dans ce cas, les interprétations nécessaires pour numériser le zonage, sont listées ci-dessus dans le paragraphe ''Particularités''. +Pour ces raisons, cette donnée ne peut pas se substituer au document opposable ; pour consulter le PPRN opposable, se reporter au site des risques majeurs : +http://www.risquesmajeurs-hautes-pyrenees.pref.gouv.fr/ + + +Méthodologie de saisie : +Le plan de zonage est constitué de zones graphiques (polygones fermés), correspondant chacune à un règlement opposable aux tiers. +En général, on aura trois grands types de zones : zone rouge où il est interdit de construire, zone bleue où la construction est autorisée sous conditions, zone jaune où la construction est interdite sauf dérogation. +Chacune des zones se décline en sous-ensembles correspondant au type d'aléa rencontré. + +La numérisation inclut également le tracé des cours d'eau lorsqu'il figure sur le plan opposable. +En effet, certains documents graphiques ont été établis avec un fond parcellaire où figure un tracé spécifique des cours d'eau à l'origine des phénomènes d'inondations. Ces tracés des cours d'eau sont en général différents de ceux du Référentiel à Grand Echelle, sachant que des écarts importants existent entre le cadastre (et donc la BD-Parcellaire®) et l'orthophotographie. Ces écarts sont liés à la définition à une date donnée du parcellaire, parfois fort ancienne, et l'évolution des cours d'eau parfois très dynamique (voir, par exemple, l'Adour au Nord du département des Hautes-Pyrénées). +Il est donc nécessaire que l'information sur le tracé du cours d'eau référence soit également véhiculée au travers du PPRN numérisé, sous peine de rendre sinon incompréhensible la définition des limites de zonage. Ne sont saisis que les cours d'eau explicitement désignés sur le document joint à l'arrêté préfectoral. +Lorsque le cours d'eau est intégré au zonage sur le document joint à l'arrêté préfectoral, il en est de même lors de la numérisation. + +Par ailleurs, sur certaines communes l'étude du PPR, porte uniquement sur un périmètre défini. +Pour obtenir une couverture communale complète, les zones « hors périmètre d'études » sont également saisies au sein de la table « zonages », avec le code « hpe » et représentées par un hachurage spécifique. +Ainsi la numérisation du PPR couvre systématiquement la totalité de la surface de la commune. + +Enfin, sur certains PPRN, figurent des éléments ponctuels, repérant des côtes de submersion, des côtes de référence, des seuils de submersion, des déversoirs, des profils en travers, des ponts. +Ce traitement n'étant pas homogène sur l'ensemble des PPRN du département, cette information n'a pas été reprise lors de la numérisation. +Dans ce cas, cette information sera également mentionnée dans le paragraphe ''Particularités''. + + + +Particularités : +Le PPRN de Campan, présente une zone d'étude, sur laquelle sont définies les zones réglementées du PPRN. +Cette zone d'étude présente la particularité de ne pas correspondre strictement à la limité communale. +Si cette divergence peut être attribuée à un référentiel ou un millésime différent, elle a pour autant été conservée, conformément au plan opposable. +Pour cette raison, la zone d'étude ne peut être dissociée du zonage PPRN ; elle permet de justifier les zones réglementaires, au delà de la limite communale, qui n'aurait pas lieu d'être selon le cahier des charges de numérisation. +Au delà de la zone d'étude, le reste de la commune se situe hors périmètre d'étude. + + + +QUALITÉ DES DONNÉES : Echelle de travail (pour garantir un degré de précision de l'ordre de celle du RGE) : +- Zone urbaine : 1/500° recommandé, 1/750° obligatoire +- Zone peu dense : 1/1500° obligatoire +Vérification selon la méthode arrêtée dans le cahier des charges (régions, vérifications précision des points par sondage, etc.). +Interprétation sur les raccords de section non contigus (hors tolérance DGI). +Les limites de zones sont raccordées sur les limites communales de la BD Parcellaire. + + + + Risque/Zonages Risque naturel + + + + Zones de gestion, de restriction ou de réglementation et unités de déclaration + + + http://catalogue.geo-ide.developpement-durable.gouv.fr/catalogue/srv/fre/catalog.search#/metadata/fr-120066022-ldd-ee9f1327-d8b8-4827-9c5b-bda8bb82770e + Vue HTML des métadonnées sur internet + + + WWW:DOWNLOAD-1.0-http--download + WWW:DOWNLOAD-1.0-http--download + + + + + http://ogc.geo-ide.developpement-durable.gouv.fr/csw/all-dataset?REQUEST=GetRecordById&SERVICE=CSW&VERSION=2.0.2&RESULTTYPE=results&elementSetName=full&TYPENAMES=gmd:MD_Metadata&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ID=fr-120066022-ldd-ee9f1327-d8b8-4827-9c5b-bda8bb82770e + Vue XML des métadonnées + + + WWW:DOWNLOAD-1.0-http--download + WWW:DOWNLOAD-1.0-http--download + + + + + http://www.risquesmajeurs-hautes-pyrenees.pref.gouv.fr/ + Site des Risques Majeurs dans les Hautes-Pyrénées + + + WWW:LINK-1.0-http--link + WWW:LINK-1.0-http--link + + + + + DDT 65 (Direction Départementale des Territoires des Hautes-Pyrénées) + + + + + + \ No newline at end of file diff --git a/tests/dcat2.ttl b/tests/dcat2.ttl new file mode 100644 index 0000000..ecd79c0 --- /dev/null +++ b/tests/dcat2.ttl @@ -0,0 +1,118 @@ +PREFIX dcat: +PREFIX dcatapde: +PREFIX dct: +PREFIX foaf: +PREFIX rdf: +PREFIX rdfs: + + + rdf:type rdfs:Resource , dcat:Distribution; + dct:description "Dargestellt wird der Durchschnitt aller Messwerte eines Sensors der letzten 5 Minuten\r\n\r\nDie dargestellten Messwerte wurden auf hohe und niedrige Ausreißer gefiltert. - Hohe Ausreißer sind alles jenseits des 3. Quartils + 1,5 * des Inter-Quartils-Bereichs (IQB) - Niedrige Ausreißer sind alles unterhalb des 1. Quartils - 1,5 * IQB\r\n\r\n"; + dct:format ; + dct:identifier "https://daten.digitale-mrn.de/dataset/4e85fa95-cd25-4578-a5b8-a5a3cbdcc33e/resource/c3daa0c1-7e90-4279-b610-81476ae757c6#distribution"; + dct:issued "2022-07-27T12:37:29.035092"^^; + dct:license ; + dct:modified "2025-11-12T00:03:13.537791"^^; + dct:title "LuftDatenInfo - Luftdruck auf Meereshöhe (GPKG)"; + dcat:accessURL ; + dcat:downloadURL . + + + rdf:type dcat:Distribution , rdfs:Resource; + dct:description "Dargestellt wird der Durchschnitt aller Messwerte eines Sensors der letzten 5 Minuten\r\n\r\nDie dargestellten Messwerte wurden auf hohe und niedrige Ausreißer gefiltert. - Hohe Ausreißer sind alles jenseits des 3. Quartils + 1,5 * des Inter-Quartils-Bereichs (IQB) - Niedrige Ausreißer sind alles unterhalb des 1. Quartils - 1,5 * IQB\r\n\r\n"; + dct:format ; + dct:identifier "https://daten.digitale-mrn.de/dataset/4e85fa95-cd25-4578-a5b8-a5a3cbdcc33e/resource/4f62fd1b-41f1-4931-8108-e9453386fe07#distribution"; + dct:issued "2022-07-27T12:37:29.035083"^^; + dct:license ; + dct:modified "2025-11-12T00:03:13.537343"^^; + dct:title "LuftDatenInfo - Luftdruck auf Meereshöhe (GeoJSON)"; + dcat:accessURL ; + dcat:downloadURL . + +dct:MediaTypeOrExtent + rdf:type rdfs:Class , rdfs:Resource . + + + rdf:type dcat:Dataset , dcat:Resource; + dcatapde:contributorID ; + dct:description "Dargestellt wird der Durchschnitt aller Messwerte eines Sensors der letzten 5 Minuten\r\n\r\nDie dargestellten Messwerte wurden auf hohe und niedrige Ausreißer gefiltert. - Hohe Ausreißer sind alles jenseits des 3. Quartils + 1,5 * des Inter-Quartils-Bereichs (IQB) - Niedrige Ausreißer sind alles unterhalb des 1. Quartils - 1,5 * IQB\r\n\r\n"; + dct:identifier ; + dct:issued "2022-04-05T12:06:22.900384"^^; + dct:modified "2025-11-12T00:03:13.524842"^^; + dct:publisher ; + dct:title "LuftDatenInfo - Luftdruck auf Meereshöhe"; + dcat:distribution , , , ; + dcat:theme . + +dct:LicenseDocument rdf:type rdfs:Resource , rdfs:Class . + + + rdf:type dct:MediaTypeOrExtent . + +dcat:Distribution rdf:type rdfs:Resource , rdfs:Class . + + + rdf:type dct:MediaTypeOrExtent . + +rdfs:Resource rdf:type rdfs:Resource , rdfs:Class . + + + rdf:type rdfs:Resource . + + + rdf:type rdfs:Resource , dcat:Distribution; + dct:description "Dargestellt wird der Durchschnitt aller Messwerte eines Sensors der letzten 5 Minuten\r\n\r\nDie dargestellten Messwerte wurden auf hohe und niedrige Ausreißer gefiltert. - Hohe Ausreißer sind alles jenseits des 3. Quartils + 1,5 * des Inter-Quartils-Bereichs (IQB) - Niedrige Ausreißer sind alles unterhalb des 1. Quartils - 1,5 * IQB\r\n\r\n"; + dct:format ; + dct:identifier "https://daten.digitale-mrn.de/dataset/4e85fa95-cd25-4578-a5b8-a5a3cbdcc33e/resource/efc56e03-2fa5-4e7d-a6f7-e36a571cbda3#distribution"; + dct:issued "2022-07-27T12:37:29.035090"^^; + dct:license ; + dct:modified "2025-11-12T00:03:13.537634"^^; + dct:title "LuftDatenInfo - Luftdruck auf Meereshöhe (CSV)"; + dcat:accessURL ; + dcat:downloadURL . + + + rdf:type dcat:Distribution , rdfs:Resource; + dct:description "Dargestellt wird der Durchschnitt aller Messwerte eines Sensors der letzten 5 Minuten\r\n\r\nDie dargestellten Messwerte wurden auf hohe und niedrige Ausreißer gefiltert. - Hohe Ausreißer sind alles jenseits des 3. Quartils + 1,5 * des Inter-Quartils-Bereichs (IQB) - Niedrige Ausreißer sind alles unterhalb des 1. Quartils - 1,5 * IQB\r\n\r\n"; + dct:format ; + dct:identifier "https://daten.digitale-mrn.de/dataset/4e85fa95-cd25-4578-a5b8-a5a3cbdcc33e/resource/bc7dadda-ffd3-4559-a55a-cf9dff2c233f#distribution"; + dct:issued "2022-07-27T12:37:29.035088"^^; + dct:license ; + dct:modified "2025-11-12T00:03:13.537938"^^; + dct:title "LuftDatenInfo - Luftdruck auf Meereshöhe (WMS)"; + dcat:accessURL ; + dcat:downloadURL . + + + rdf:type foaf:Agent; + foaf:name "Metropolregion Rhein-Neckar" . + + + rdf:type dct:LicenseDocument; + dct:type . + +dcat:Dataset rdf:type rdfs:Resource , rdfs:Class; + rdfs:subClassOf dcat:Dataset , dcat:Resource . + +foaf:Agent rdf:type rdfs:Resource , rdfs:Class . + + + rdf:type rdfs:Resource . + + + rdf:type rdfs:Resource . + + + rdf:type dct:MediaTypeOrExtent . + +dcat:Resource rdf:type rdfs:Resource , rdfs:Class; + rdfs:subClassOf dcat:Resource . + + + rdf:type rdfs:Resource . + + + rdf:type dct:MediaTypeOrExtent . + +rdfs:Class rdf:type rdfs:Resource , rdfs:Class; + rdfs:subClassOf rdfs:Class , rdfs:Resource . \ No newline at end of file diff --git a/tests/dcat3.json b/tests/dcat3.json new file mode 100644 index 0000000..ccd50c5 --- /dev/null +++ b/tests/dcat3.json @@ -0,0 +1,1057 @@ +{ + "@graph": [ + { + "@id": "rdf:Property", + "rdfs:subClassOf": [ + { + "@id": "rdfs:Resource" + }, + { + "@id": "rdf:Property" + } + ], + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ] + }, + { + "@id": "http://data.europa.eu/88u/dataset/f178f1ef-6be3-4377-8441-433e3531c11f", + "dcat:keyword": [ + "Loans", + "Remaining Assets", + "Deposits redeemable at notice", + "Total Liabilities", + "Deposits", + "Households", + "Current Accounts", + "Post Office Savings Accounts", + "Other Household Loans", + "Overnight Deposits", + "Debt Securities", + "Capital and Reserves", + "Repurchase Agreements", + "Remaining Liabilities", + "Accrued Interest", + "Irish Private Sector", + "M1", + "Borrowing from the Eurosystem relating to monetary policy operations", + "Other Euro Area residents", + "M2", + "Private Sector Credit", + "Central Bank balances", + "Pension Funds", + "General Government", + "Debt Securities Issued", + "Lending to Non-Bank IFSCs", + "Total Assets", + "Shares and Other Equity Held", + "On-balance sheet", + "Monetary Financial Institutions", + "Deposits with agreed maturity", + "Private sector", + "Insurance Corporations", + "M3", + "Consumer Credit", + "Non-MMF Investment Funds", + "Other Financial Intermediaries", + "Rest of the World", + "Shares and Other Equity", + "Currency in circulation", + "Non-Euro Area residents", + "Holdings of securities", + "Securitised", + "Affiliated interbank", + "Non-Financial Corporations", + "Securities Other Than Shares", + "Loans for House Purchase", + "Financial Vehicle Corporations", + "Debt Securities Held" + ], + "dct:description": [ + { + "@language": "ro-t-ga-t0-mtec", + "@value": "Statisticile monetare și bancare conțin date privind pasivele și activele oficiilor de stat ale instituțiilor de credit. Aceste date sunt defalcate în continuare în funcţie de sectorul instituţional, rezidenţa contrapartidelor, precum şi în funcţie de tipul şi scadenţa activului principal (împrumuturi, deţineri de titluri de valoare) şi a instrumentelor de pasiv (depozite, titluri emise) de interes. Sunt disponibile statistici detaliate privind evoluțiile de pe piețele irlandeze ale creditelor ipotecare, ale bunurilor de consum și ale depozitelor." + }, + { + "@language": "sk-t-ga-t0-mtec", + "@value": "Peňažná a banková štatistika obsahuje údaje o pasívach a aktívach štátnych úradov úverových inštitúcií. Tieto údaje sú ďalej členené podľa inštitucionálneho sektora, rezidentskej príslušnosti protistrán a podľa druhu a splatnosti hlavného aktíva (úvery, držba cenných papierov) a nástrojov pasív (vklady, emitované cenné papiere). K dispozícii sú podrobné štatistiky o vývoji na írskych hypotekárnych, spotrebiteľských a vkladových trhoch." + }, + { + "@language": "pl-t-ga-t0-mtec", + "@value": "Statystyka pieniężna i bankowa zawiera dane dotyczące pasywów i aktywów wewnątrzpaństwowych biur instytucji kredytowych. Dane te są dalej przedstawiane w podziale na sektor instytucjonalny, rezydencję kontrahentów oraz rodzaj i termin zapadalności głównego składnika aktywów (pożyczki, portfele papierów wartościowych) i instrumentów pasywów (depozyty, wyemitowane papiery wartościowe) będących przedmiotem zainteresowania. Dostępne są szczegółowe statystyki dotyczące rozwoju sytuacji na irlandzkich rynkach kredytów hipotecznych, konsumenckich i depozytowych." + }, + { + "@language": "nl-t-ga-t0-mtec", + "@value": "De monetaire en bancaire statistieken bevatten gegevens over de passiva en activa van de nationale kantoren van kredietinstellingen. Deze gegevens worden verder uitgesplitst naar institutionele sector, ingezetenschap van tegenpartijen en naar het type en de looptijd van het belangrijkste actief (leningen, aangehouden effecten) en passiefinstrumenten (deposito's, uitgegeven effecten) van de rente. Gedetailleerde statistieken zijn beschikbaar over de ontwikkelingen op de Ierse hypotheek-, consumenten- en depositomarkten." + }, + { + "@language": "sv-t-ga-t0-mtec", + "@value": "Penning- och bankstatistiken innehåller uppgifter om skulder och tillgångar hos kreditinstitutens statliga kontor. Dessa uppgifter delas upp ytterligare efter institutionell sektor, motparternas hemvist och efter typ och löptid för den viktigaste tillgången (lån, innehav av värdepapper) och skuldinstrument (inlåning, emitterade värdepapper) av intresse. Detaljerad statistik finns tillgänglig om utvecklingen på de irländska bolåne-, konsument- och inlåningsmarknaderna." + }, + { + "@language": "pt-t-ga-t0-mtec", + "@value": "As Estatísticas Monetárias e Bancárias contêm dados sobre os passivos e activos das sedes estaduais das instituições de crédito. Estes dados são ainda desagregados por setor institucional, residência das contrapartes e por tipo e prazo de vencimento do principal ativo (empréstimos, detenções de títulos) e dos instrumentos de passivo (depósitos, títulos emitidos) de interesse. Estão disponíveis estatísticas pormenorizadas sobre a evolução dos mercados irlandeses de crédito hipotecário, de consumo e de depósitos." + }, + { + "@language": "hu-t-ga-t0-mtec", + "@value": "A pénz- és bankstatisztikák a hitelintézetek állami hivatalainak kötelezettségeire és eszközeire vonatkozó adatokat tartalmaznak. Ezeket az adatokat tovább bontják a gazdasági szektor, az ügyfelek rezidens státusza, valamint a legfontosabb kamatozó eszközök (hitelek, értékpapír-állományok) és kötelezettséginstrumentumok (betétek, kibocsátott értékpapírok) típusa és lejárata szerint. Részletes statisztikák állnak rendelkezésre az ír jelzálog-, fogyasztói és betéti piacok alakulásáról." + }, + { + "@language": "de-t-ga-t0-mtec", + "@value": "Die Geld- und Bankenstatistik enthält Daten über die Verbindlichkeiten und Vermögenswerte von Kreditinstituten innerhalb der staatlichen Ämter. Diese Daten werden weiter nach institutionellem Sektor, Ansässigkeit der Gegenparteien sowie nach Art und Fälligkeit des wichtigsten Vermögenswerts (Darlehen, Wertpapierbestände) und der Schuldinstrumente (Einlagen, begebene Wertpapiere) von Interesse aufgeschlüsselt. Detaillierte Statistiken über die Entwicklungen auf den irischen Hypotheken-, Verbraucher- und Einlagenmärkten stehen zur Verfügung." + }, + { + "@language": "lv-t-ga-t0-mtec", + "@value": "Naudas un banku statistika ietver datus par kredītiestāžu valsts iestāžu pasīviem un aktīviem. Šos datus sīkāk iedala pēc institucionālā sektora, darījuma partneru rezidences vietas un pēc galveno procentu aktīvu (aizdevumi, vērtspapīru turējumi) un saistību instrumentu (noguldījumi, emitētie vērtspapīri) veida un termiņa. Ir pieejama detalizēta statistika par norisēm Īrijas hipotēku, patēriņa un noguldījumu tirgos." + }, + { + "@language": "cs-t-ga-t0-mtec", + "@value": "Měnová a bankovní statistika obsahuje údaje o pasivech a aktivech vnitrostátních úřadů úvěrových institucí. Tyto údaje jsou dále členěny podle institucionálního sektoru, rezidentské příslušnosti protistran a podle druhu a splatnosti hlavních aktiv (úvěry, držba cenných papírů) a závazkových nástrojů (vklady, emitované cenné papíry) úroků. K dispozici jsou podrobné statistiky o vývoji na irském hypotečním, spotřebitelském a depozitním trhu." + }, + { + "@language": "hr-t-ga-t0-mtec", + "@value": "Novčana i bankovna statistika sadržava podatke o obvezama i imovini unutar državnih ureda kreditnih institucija. Ti se podaci dalje raščlanjuju prema institucionalnom sektoru, rezidentnosti drugih ugovornih strana te prema vrsti i dospijeću glavne imovine (krediti, držanje vrijednosnih papira) i instrumenata obveza (depoziti, izdani vrijednosni papiri) od interesa. Dostupni su detaljni statistički podaci o kretanjima na irskom tržištu hipotekarnih kredita, potrošačkih tržišta i tržišta depozita." + }, + { + "@language": "et-t-ga-t0-mtec", + "@value": "Raha- ja pangandusstatistika sisaldab andmeid krediidiasutuste riiklike büroode kohustuste ja varade kohta. Need andmed jaotatakse täiendavalt institutsionaalse sektori, vastaspoolte residentsuse ning peamise huvipakkuva vara (laenud, väärtpaberipositsioonid) ja kohustuste instrumentide (hoiused, emiteeritud väärtpaberid) liigi ja tähtaja järgi. Iirimaa hüpoteeklaenu-, tarbija- ja hoiuseturgude arengu kohta on olemas üksikasjalikud statistilised andmed." + }, + { + "@language": "da-t-ga-t0-mtec", + "@value": "Penge- og bankstatistikken indeholder data om kreditinstitutternes passiver og aktiver i de enkelte lande. Disse data opdeles yderligere efter institutionel sektor, modparternes hjemsted og efter type og løbetid for det vigtigste aktiv (udlån, beholdninger af værdipapirer) og passivinstrumenter (indlån, udstedte værdipapirer) af interesse. Der foreligger detaljerede statistikker om udviklingen på de irske realkredit-, forbruger- og indlånsmarkeder." + }, + { + "@language": "ga", + "@value": "Sonraí faoi dhliteanais agus faoi shócmhainní oifigí de chuid na bhforas creidmheasa atá sa Stát a áirítear faoi Ábhar Staidrimh maidir le hAirgead agus Baincéireacht. Déantar na sonraí sin a bhriseadh síos níos mine i ndáil le hearnálacha na bhforas, cónaitheacht na bhfrithpháirtithe, agus cineál agus aibíocht na príomh-shócmhainne (iasacht, sealbhú urrús) agus na n-ionstraimí dliteanais (taisce, urrús arna eisiúint) faoi chaibidil. Bíonn ábhar mionsonraithe staidrimh ar fáil faoi chora i margadh morgáistí, tomhaltóirí agus taiscí na hÉireann." + }, + { + "@language": "mt-t-ga-t0-mtec", + "@value": "L-Istatistika dwar il-Flus u l-Banek fiha data dwar l-obbligazzjonijiet u l-assi ta’ uffiċċji fi ħdan l-Istat ta’ istituzzjonijiet ta’ kreditu. Din id-data tkompli titqassam skont is-settur istituzzjonali, ir-residenza tal-kontropartijiet, u skont it-tip u l-maturità tal-assi ewlieni (self, investimenti f’titoli) u l-istrumenti ta’ obbligazzjoni (depożiti, titoli maħruġa) ta’ interess. Statistika dettaljata hija disponibbli dwar l-iżviluppi fis-swieq Irlandiżi tal-ipoteki, tal-konsumaturi u tad-depożiti." + }, + { + "@language": "sl-t-ga-t0-mtec", + "@value": "Denarna in bančna statistika vsebuje podatke o obveznostih in sredstvih znotraj državnih uradov kreditnih institucij. Ti podatki so nadalje razčlenjeni po institucionalnem sektorju, rezidenčnosti nasprotnih strank ter po vrsti in zapadlosti glavnih sredstev (posojila, imetja vrednostnih papirjev) in instrumentov obveznosti (vloge, izdani vrednostni papirji) obresti. Na voljo so podrobni statistični podatki o gibanjih na irskem hipotekarnem, potrošniškem in depozitnem trgu." + }, + { + "@language": "fr-t-ga-t0-mtec", + "@value": "Les statistiques monétaires et bancaires contiennent des données sur les passifs et les actifs des bureaux nationaux des établissements de crédit. Ces données sont ensuite ventilées par secteur institutionnel, par résidence des contreparties et par type et échéance des principaux actifs (prêts, détentions de titres) et instruments de passif (dépôts, titres émis) d’intérêt. Des statistiques détaillées sont disponibles sur l'évolution des marchés irlandais des prêts hypothécaires, de la consommation et des dépôts." + }, + { + "@language": "en", + "@value": "The Money and Banking Statistics contain data on the liabilities and assets of within-the-State offices of credit institutions. These data are further broken down by institutional sector, residency of counterparties, and by the type and maturity of the main asset (loans, holdings of securities) and liability instruments (deposits, securities issued) of interest. Detailed statistics are available on developments in Irish mortgage, consumer and deposit markets." + }, + { + "@language": "bg-t-ga-t0-mtec", + "@value": "Паричната и банковата статистика съдържа данни за пасивите и активите на вътрешните държавни служби на кредитните институции. Тези данни са допълнително разбити по институционални сектори, постоянно пребиваване на контрагентите и по вид и падеж на основния актив (кредити, държани ценни книжа) и инструменти на пасивите (депозити, емитирани ценни книжа). Налични са подробни статистически данни за развитието на ирландските ипотечни, потребителски и депозитни пазари." + }, + { + "@language": "el-t-ga-t0-mtec", + "@value": "Οι νομισματικές και τραπεζικές στατιστικές περιέχουν στοιχεία σχετικά με τις υποχρεώσεις και τα περιουσιακά στοιχεία των εντός των κρατικών υπηρεσιών των πιστωτικών ιδρυμάτων. Τα στοιχεία αυτά αναλύονται περαιτέρω ανά θεσμικό τομέα, κατοικία των αντισυμβαλλομένων, καθώς και κατά είδος και διάρκεια του κύριου περιουσιακού στοιχείου (δάνεια, διακρατήσεις τίτλων) και μέσων υποχρέωσης (καταθέσεις, εκδοθέντες τίτλοι) που παρουσιάζουν ενδιαφέρον. Λεπτομερή στατιστικά στοιχεία είναι διαθέσιμα σχετικά με τις εξελίξεις στις ιρλανδικές αγορές ενυπόθηκων δανείων, καταναλωτών και καταθέσεων." + }, + { + "@language": "uk-t-ga-t0-mtec", + "@value": "Грошова та банківська статистика містить дані про зобов'язання та активи внутрішньодержавних відділень кредитних установ. Ці дані додатково розбивають інституційний сектор, резидентність контрагентів, а також за типом та терміном погашення основного активу (кредитів, холдингів цінних паперів) та інструментами відповідальності (депозитів, емітованих цінних паперів) відсотків. Детальна статистика доступна щодо подій на ірландському іпотечному, споживчому та депозитному ринках." + }, + { + "@language": "it-t-ga-t0-mtec", + "@value": "Le statistiche monetarie e bancarie contengono dati sulle passività e sulle attività degli uffici statali degli enti creditizi. Tali dati sono ulteriormente disaggregati per settore istituzionale, residenza delle controparti e tipologia e scadenza delle principali attività (prestiti, disponibilità di titoli) e passività (depositi, titoli emessi) di interesse. Sono disponibili statistiche dettagliate sugli sviluppi nei mercati irlandesi dei mutui ipotecari, dei consumatori e dei depositi." + }, + { + "@language": "fi-t-ga-t0-mtec", + "@value": "Raha- ja pankkitilasto sisältää tietoja luottolaitosten valtionsisäisten toimipaikkojen veloista ja varoista. Nämä tiedot eritellään edelleen institutionaalisen sektorin, vastapuolten kotipaikan sekä pääsaamisen (lainat, hallussa olevat arvopaperit) ja velkainstrumenttien (talletukset, liikkeeseen lasketut arvopaperit) tyypin ja maturiteetin mukaan. Irlannin asuntolaina-, kuluttaja- ja talletusmarkkinoiden kehityksestä on saatavilla yksityiskohtaisia tilastoja." + }, + { + "@language": "lt-t-ga-t0-mtec", + "@value": "Pinigų ir bankų statistikoje pateikiami duomenys apie kredito įstaigų valstybės vidaus įstaigų įsipareigojimus ir turtą. Šie duomenys toliau skirstomi pagal institucinį sektorių, sandorio šalių rezidavimo vietą, pagrindinio palūkanų turto (paskolų, turimų vertybinių popierių) ir įsipareigojimų priemonių (indėlių, išleistų vertybinių popierių) rūšį ir terminą. Yra išsamių statistinių duomenų apie Airijos hipotekos, vartotojų ir indėlių rinkų pokyčius." + }, + { + "@language": "es-t-ga-t0-mtec", + "@value": "Las estadísticas monetarias y bancarias contienen datos sobre los pasivos y activos de las oficinas estatales de las entidades de crédito. Estos datos se desglosan además por sector institucional, residencia de las contrapartes y por tipo y vencimiento del activo principal (préstamos, tenencias de valores) e instrumentos de pasivo (depósitos, valores emitidos) de interés. Se dispone de estadísticas detalladas sobre la evolución de los mercados hipotecarios, de consumo y de depósitos irlandeses." + } + ], + "dct:title": [ + { + "@language": "lt-t-ga-t0-mtec", + "@value": "Pinigų ir bankų statistika" + }, + { + "@language": "hr-t-ga-t0-mtec", + "@value": "Statistika novca i bankarstva" + }, + { + "@language": "fi-t-ga-t0-mtec", + "@value": "Raha- ja pankkitilastot" + }, + { + "@language": "en-t-ga-t0-mtec", + "@value": "Money and Banking Statistics" + }, + { + "@language": "mt-t-ga-t0-mtec", + "@value": "Statistika dwar il-Flus u l-Banek" + }, + { + "@language": "fr-t-ga-t0-mtec", + "@value": "Statistiques monétaires et bancaires" + }, + { + "@language": "it-t-ga-t0-mtec", + "@value": "Statistiche monetarie e bancarie" + }, + { + "@language": "sv-t-ga-t0-mtec", + "@value": "Penning- och bankstatistik" + }, + { + "@language": "sl-t-ga-t0-mtec", + "@value": "Denarna in bančna statistika" + }, + { + "@language": "cs-t-ga-t0-mtec", + "@value": "Peněžní a bankovní statistika" + }, + { + "@language": "ro-t-ga-t0-mtec", + "@value": "Bani și statistici bancare" + }, + { + "@language": "da-t-ga-t0-mtec", + "@value": "Penge- og bankstatistik" + }, + { + "@language": "pt-t-ga-t0-mtec", + "@value": "Estatísticas monetárias e bancárias" + }, + { + "@language": "el-t-ga-t0-mtec", + "@value": "Χρηματικές και τραπεζικές στατιστικές" + }, + { + "@language": "sk-t-ga-t0-mtec", + "@value": "Peňažná a banková štatistika" + }, + { + "@language": "es-t-ga-t0-mtec", + "@value": "Estadísticas de Dinero y Banca" + }, + { + "@language": "nl-t-ga-t0-mtec", + "@value": "Geld- en bankstatistieken" + }, + "Money and Banking Statistics", + { + "@language": "uk-t-ga-t0-mtec", + "@value": "Грошова та банківська статистика" + }, + { + "@language": "pl-t-ga-t0-mtec", + "@value": "Statystyka pieniężna i bankowa" + }, + { + "@language": "bg-t-ga-t0-mtec", + "@value": "Парична и банкова статистика" + }, + { + "@language": "et-t-ga-t0-mtec", + "@value": "Raha- ja pangandusstatistika" + }, + { + "@language": "hu-t-ga-t0-mtec", + "@value": "Pénz- és bankstatisztikák" + }, + { + "@language": "lv-t-ga-t0-mtec", + "@value": "Naudas un banku statistika" + }, + { + "@language": "de-t-ga-t0-mtec", + "@value": "Geld- und Bankenstatistik" + } + ], + "dcat:theme": [ + { + "@id": "https://data.gov.ie/Government" + }, + { + "@id": "http://publications.europa.eu/resource/authority/data-theme/GOVE" + } + ], + "dct:issued": { + "@value": "2025-10-31", + "@type": "http://www.w3.org/2001/XMLSchema#date" + }, + "dct:language": { + "@id": "http://publications.europa.eu/resource/authority/language/ENG" + }, + "@type": [ + "dcat:Resource", + "rdfs:Resource", + "dcat:Dataset" + ], + "dct:temporal": [ + { + "@id": "_:b0" + }, + { + "@id": "_:b2" + } + ], + "dct:accrualPeriodicity": "Monthly", + "dcat:contactPoint": { + "@id": "_:b1" + }, + "dct:identifier": "f178f1ef-6be3-4377-8441-433e3531c11f", + "dct:publisher": { + "@id": "https://data.gov.ie/organization/central-bank-of-ireland" + }, + "dct:created": { + "@value": "2024-07-17T17:28:08", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "dcat:distribution": { + "@id": "http://data.europa.eu/88u/distribution/84e3f199-10c4-407d-a378-1c6c60ebff95" + }, + "dct:modified": { + "@value": "2025-11-07T17:50:08", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + } + }, + { + "@id": "http://publications.europa.eu/resource/authority/language/ENG", + "@type": [ + "rdfs:Resource", + "dct:LinguisticSystem" + ] + }, + { + "@id": "dcat:Resource", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "dcat:Resource" + }, + { + "@id": "rdfs:Resource" + } + ] + }, + { + "@id": "_:b0", + "@type": [ + "rdfs:Resource", + "dct:PeriodOfTime" + ], + "http://schema.org/startDate": { + "@value": "2003-01-31", + "@type": "http://www.w3.org/2001/XMLSchema#date" + }, + "http://schema.org/endDate": { + "@value": "2025-09-30", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + }, + { + "@id": "_:b1", + "@type": [ + "rdfs:Resource", + "vcard:Organization" + ], + "vcard:hasEmail": { + "@id": "mailto:creditinst@centralbank.ie" + } + }, + { + "@id": "https://data.gov.ie/organization/central-bank-of-ireland", + "@type": [ + "foaf:Organization", + "rdfs:Resource", + "foaf:Agent" + ], + "foaf:name": "Central Bank of Ireland" + }, + { + "@id": "dcat:Dataset", + "rdfs:subClassOf": [ + { + "@id": "dcat:Dataset" + }, + { + "@id": "dcat:Resource" + }, + { + "@id": "rdfs:Resource" + } + ], + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ] + }, + { + "@id": "http://data.europa.eu/88u/distribution/84e3f199-10c4-407d-a378-1c6c60ebff95", + "dct:title": [ + { + "@language": "ro-t-ga-t0-mtec", + "@value": "Bani și statistici bancare" + }, + { + "@language": "da-t-ga-t0-mtec", + "@value": "Penge- og bankstatistik" + }, + { + "@language": "pl-t-ga-t0-mtec", + "@value": "Statystyka pieniężna i bankowa" + }, + { + "@language": "cs-t-ga-t0-mtec", + "@value": "Peněžní a bankovní statistika" + }, + { + "@language": "en-t-ga-t0-mtec", + "@value": "Money and Banking Statistics" + }, + { + "@language": "hu-t-ga-t0-mtec", + "@value": "Pénz- és bankstatisztikák" + }, + { + "@language": "el-t-ga-t0-mtec", + "@value": "Χρηματικές και τραπεζικές στατιστικές" + }, + { + "@language": "nl-t-ga-t0-mtec", + "@value": "Geld- en bankstatistieken" + }, + { + "@language": "de-t-ga-t0-mtec", + "@value": "Geld- und Bankenstatistik" + }, + { + "@language": "fi-t-ga-t0-mtec", + "@value": "Raha- ja pankkitilastot" + }, + { + "@language": "bg-t-ga-t0-mtec", + "@value": "Парична и банкова статистика" + }, + { + "@language": "uk-t-ga-t0-mtec", + "@value": "Грошова та банківська статистика" + }, + { + "@language": "fr-t-ga-t0-mtec", + "@value": "Statistiques monétaires et bancaires" + }, + { + "@language": "et-t-ga-t0-mtec", + "@value": "Raha- ja pangandusstatistika" + }, + { + "@language": "sk-t-ga-t0-mtec", + "@value": "Peňažná a banková štatistika" + }, + { + "@language": "it-t-ga-t0-mtec", + "@value": "Statistiche monetarie e bancarie" + }, + { + "@language": "mt-t-ga-t0-mtec", + "@value": "Statistika dwar il-Flus u l-Banek" + }, + { + "@language": "lv-t-ga-t0-mtec", + "@value": "Naudas un banku statistika" + }, + "Money and Banking Statistics", + { + "@language": "hr-t-ga-t0-mtec", + "@value": "Statistika novca i bankarstva" + }, + { + "@language": "sv-t-ga-t0-mtec", + "@value": "Penning- och bankstatistik" + }, + { + "@language": "pt-t-ga-t0-mtec", + "@value": "Estatísticas monetárias e bancárias" + }, + { + "@language": "sl-t-ga-t0-mtec", + "@value": "Denarna in bančna statistika" + }, + { + "@language": "es-t-ga-t0-mtec", + "@value": "Estadísticas de Dinero y Banca" + }, + { + "@language": "lt-t-ga-t0-mtec", + "@value": "Pinigų ir bankų statistika" + } + ], + "@type": [ + "rdfs:Resource", + "dcat:Distribution" + ], + "dcat:downloadURL": { + "@id": "https://opendata.centralbank.ie/dataset/f178f1ef-6be3-4377-8441-433e3531c11f/resource/ea2149b9-3429-4f9f-ab4f-99803f32b537/download/money-and-banking-statistics.csv" + }, + "dct:modified": { + "@value": "2025-11-07T17:50:08", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "dct:identifier": "https://data.gov.ie/dataset/f178f1ef-6be3-4377-8441-433e3531c11f/resource/ea2149b9-3429-4f9f-ab4f-99803f32b537", + "dct:issued": { + "@value": "2024-07-05T14:42:33", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "dcat:byteSize": { + "@value": "28353886", + "@type": "http://www.w3.org/2001/XMLSchema#decimal" + }, + "spdx:checksum": { + "@id": "_:b6" + }, + "dct:format": { + "@id": "_:b4" + }, + "dcat:accessURL": { + "@id": "https://opendata.centralbank.ie/dataset/f178f1ef-6be3-4377-8441-433e3531c11f/resource/ea2149b9-3429-4f9f-ab4f-99803f32b537/download/money-and-banking-statistics.csv" + } + }, + { + "@id": "_:b2", + "dcat:startDate": { + "@value": "2003-01-31", + "@type": "http://www.w3.org/2001/XMLSchema#date" + }, + "@type": [ + "rdfs:Resource", + "dct:PeriodOfTime" + ], + "dcat:endDate": { + "@value": "2025-09-30", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + }, + { + "@id": "rdfs:ContainerMembershipProperty", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:ContainerMembershipProperty" + }, + { + "@id": "rdf:Property" + } + ] + }, + { + "@id": "_:b3", + "foaf:name": "Fraunhofer FOKUS (DPS)", + "foaf:homepage": { + "@id": "https://www.fokus.fraunhofer.de/de/dps.html/" + } + }, + { + "@id": "_:b4", + "@type": [ + "dct:MediaTypeOrExtent", + "rdfs:Resource" + ], + "rdf:value": "CSV", + "rdfs:label": "CSV" + }, + { + "@id": "dct:MediaTypeOrExtent", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Resource" + }, + { + "@id": "dct:MediaTypeOrExtent" + } + ] + }, + { + "@id": "rdf:Statement", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": { + "@id": "rdfs:Resource" + } + }, + { + "@id": "owl:Ontology", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ] + }, + { + "@id": "rdfs:domain", + "rdfs:range": { + "@id": "rdfs:Class" + }, + "rdfs:domain": { + "@id": "rdf:Property" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ] + }, + { + "@id": "dcat:Distribution", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "dcat:Distribution" + }, + { + "@id": "rdfs:Resource" + } + ] + }, + { + "@id": "rdf:object", + "rdfs:subPropertyOf": { + "@id": "rdf:object" + }, + "rdfs:domain": { + "@id": "rdf:Statement" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ] + }, + { + "@id": "_:b5", + "http://schema.org/affiliation": { + "@id": "_:b3" + }, + "foaf:name": "Simon Dutkowski" + }, + { + "@id": "dcat:DataService", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": [ + { + "@id": "dcat:Resource" + }, + { + "@id": "rdfs:Resource" + }, + { + "@id": "dcat:DataService" + } + ] + }, + { + "@id": "rdfs:comment", + "@type": [ + "rdf:Property", + "rdfs:Resource" + ], + "rdfs:range": { + "@id": "rdfs:Literal" + } + }, + { + "@id": "rdfs:Literal", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": { + "@id": "rdfs:Resource" + } + }, + { + "@id": "dct:PeriodOfTime", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Resource" + }, + { + "@id": "dct:PeriodOfTime" + } + ] + }, + { + "@id": "rdfs:range", + "rdfs:range": { + "@id": "rdfs:Class" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ], + "rdfs:domain": { + "@id": "rdf:Property" + } + }, + { + "@id": "rdf:List", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": { + "@id": "rdfs:Resource" + } + }, + { + "@id": "_:b6", + "@type": [ + "rdfs:Resource", + "spdx:Checksum" + ], + "spdx:checksumValue": { + "@value": "04deb10f64a577363e629f1fa3198df1", + "@type": "http://www.w3.org/2001/XMLSchema#hexBinary" + } + }, + { + "@id": "rdf:Bag", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Container" + }, + { + "@id": "rdf:Bag" + } + ] + }, + { + "@id": "rdfs:Container", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": { + "@id": "rdfs:Container" + } + }, + { + "@id": "dct:LinguisticSystem", + "rdfs:subClassOf": [ + { + "@id": "rdfs:Resource" + }, + { + "@id": "dct:LinguisticSystem" + } + ], + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ] + }, + { + "@id": "https://piveau.io/solution/dcat-ap", + "owl:versionInfo": "1.0.0", + "rdfs:comment": { + "@language": "en", + "@value": "This ontology is meant for piveau internal use only" + }, + "rdfs:label": { + "@language": "en", + "@value": "piveau ontology for DCAT-AP" + }, + "@type": "owl:Ontology", + "dct:creator": { + "@id": "_:b5" + } + }, + { + "@id": "rdf:first", + "rdfs:subPropertyOf": { + "@id": "rdf:first" + }, + "rdfs:domain": { + "@id": "rdf:List" + }, + "@type": [ + "rdfs:Resource", + "rdf:Property" + ] + }, + { + "@id": "rdf:Alt", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Container" + }, + { + "@id": "rdf:Alt" + } + ] + }, + { + "@id": "foaf:Organization", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "foaf:Organization" + }, + { + "@id": "rdfs:Resource" + } + ] + }, + { + "@id": "foaf:Agent", + "rdfs:subClassOf": [ + { + "@id": "rdfs:Resource" + }, + { + "@id": "foaf:Agent" + } + ], + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ] + }, + { + "@id": "rdfs:isDefinedBy", + "rdfs:subPropertyOf": [ + { + "@id": "rdfs:seeAlso" + }, + { + "@id": "rdfs:isDefinedBy" + } + ], + "@type": [ + "rdf:Property", + "rdfs:Resource" + ] + }, + { + "@id": "rdfs:seeAlso", + "@type": [ + "rdfs:Resource", + "rdf:Property" + ], + "rdfs:subPropertyOf": { + "@id": "rdfs:seeAlso" + } + }, + { + "@id": "rdfs:Datatype", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Class" + }, + { + "@id": "rdfs:Datatype" + }, + { + "@id": "rdfs:Resource" + } + ] + }, + { + "@id": "vcard:Organization", + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ], + "rdfs:subClassOf": [ + { + "@id": "vcard:Organization" + }, + { + "@id": "rdfs:Resource" + } + ] + }, + { + "@id": "rdfs:subClassOf", + "rdfs:domain": { + "@id": "rdfs:Class" + }, + "rdfs:range": { + "@id": "rdfs:Class" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ] + }, + { + "@id": "rdf:subject", + "@type": [ + "rdfs:Resource", + "rdf:Property" + ], + "rdfs:domain": { + "@id": "rdf:Statement" + }, + "rdfs:subPropertyOf": { + "@id": "rdf:subject" + } + }, + { + "@id": "rdf:nil", + "@type": [ + "rdf:List", + "rdfs:Resource" + ] + }, + { + "@id": "rdf:Seq", + "@type": [ + "rdfs:Resource", + "rdfs:Class" + ], + "rdfs:subClassOf": [ + { + "@id": "rdfs:Container" + }, + { + "@id": "rdf:Seq" + } + ] + }, + { + "@id": "rdf:type", + "rdfs:range": { + "@id": "rdfs:Class" + }, + "@type": [ + "rdfs:Resource", + "rdf:Property" + ] + }, + { + "@id": "dcat:DatasetSeries", + "rdfs:subClassOf": [ + { + "@id": "dcat:Resource" + }, + { + "@id": "rdfs:Resource" + }, + { + "@id": "dcat:DatasetSeries" + } + ], + "@type": [ + "rdfs:Class", + "rdfs:Resource" + ] + }, + { + "@id": "rdfs:subPropertyOf", + "rdfs:domain": { + "@id": "rdf:Property" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ], + "rdfs:range": { + "@id": "rdf:Property" + } + }, + { + "@id": "rdf:rest", + "rdfs:domain": { + "@id": "rdf:List" + }, + "rdfs:range": { + "@id": "rdf:List" + }, + "rdfs:subPropertyOf": { + "@id": "rdf:rest" + }, + "@type": [ + "rdf:Property", + "rdfs:Resource" + ] + }, + { + "@id": "rdfs:label", + "@type": [ + "rdfs:Resource", + "rdf:Property" + ], + "rdfs:range": { + "@id": "rdfs:Literal" + } + }, + { + "@id": "rdf:XMLLiteral", + "@type": [ + "rdfs:Datatype", + "rdfs:Resource", + "rdfs:Class" + ] + }, + { + "@id": "rdf:predicate", + "rdfs:subPropertyOf": { + "@id": "rdf:predicate" + }, + "@type": [ + "rdfs:Resource", + "rdf:Property" + ], + "rdfs:domain": { + "@id": "rdf:Statement" + } + } + ], + "@context": { + "dct": "http://purl.org/dc/terms/", + "spdx": "http://spdx.org/rdf/terms#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "owl": "http://www.w3.org/2002/07/owl#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "vcard": "http://www.w3.org/2006/vcard/ns#", + "dcat": "http://www.w3.org/ns/dcat#", + "foaf": "http://xmlns.com/foaf/0.1/" + } +} \ No newline at end of file diff --git a/tests/run_tests.py b/tests/run_tests.py index a01fe21..f66c7ec 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -452,6 +452,8 @@ def test_import_metadata(self): 'WIS/GTS bulletin SMJP01 RJTD in FM12 SYNOP', 'Expected specific title') + def test_import_autodetect(self): + """test metadata autodetect""" with open(get_abspath('md-SMJP01RJTD-gmd.xml')) as fh: mcf = import_metadata('autodetect', fh.read()) @@ -499,13 +501,48 @@ def test_transform_metadata(self): with open(get_abspath('md-SMJP01RJTD-gmd.xml')) as fh: m = transform_metadata('autodetect', 'oarec-record', fh.read()) - m = json.loads(m) self.assertEqual( m['properties']['title'], 'WIS/GTS bulletin SMJP01 RJTD in FM12 SYNOP', 'Expected specific title') + def test_dcat_import_rdf(self): + """Test dcat rdf-xml""" + with open(get_abspath('dcat.rdf.xml')) as fh: + m = import_metadata('dcat', fh.read()) + self.assertEqual( + str(m['identification']['title']), + "Plan de Prévention des Risques Naturels (PPRN) de Campan, approuvé le 10/07/2012", # noqa + 'Expected specific title (dcat-rdf/xml)') + + def test_dcat_import_jsonld(self): + """Test dcat json-ld""" + with open(get_abspath('dcat.jsonld.json')) as fh: + m = import_metadata('dcat', fh.read()) + self.assertEqual( + str(m['identification']['title']['nl-t-de-t0-mtec']), + "Celdikte voorspelling 00", + 'Expected specific title (dcat-json-ld)') + + def test_dcat_import2(self): + """Test dcat as turtle""" + with open(get_abspath('dcat2.ttl')) as fh: + m = import_metadata('dcat', fh.read()) + self.assertEqual( + str(m['identification']['license']), + "http://dcat-ap.de/def/licenses/other-opensource", + 'Expected specific license') + + def test_dcat_timeperiod_autodetect(self): + """Test dcat with time period and autodetect""" + with open(get_abspath('dcat3.json')) as fh: + m = import_metadata('autodetect', fh.read()) + self.assertEqual( + str(m['identification']['extents']['temporal'][0]['begin']), + "2003-01-31", + 'Expected specific begin date temporal coverage') + def get_abspath(filepath): """helper function absolute file access"""