Dataset and DatasetSeries#

class fdp.dataset.Dataset(fair_data_point: FairDataPoint = None, iri: str = None, uuid: str = None, *args, **kwargs)#

Bases: Resource

Class representing a DCATv3 dcat:Dataset entity.

A Dataset is a collection of data available for access or download in one or more distributions.

This class extends fdp.resource.Resource.

RDF Class

dcat:Dataset

Base Classes
Supported inherited properties
From Resource:
Supported Dataset-specific properties
Example
>>> dataset = Dataset()
>>> dataset.title = "Population Data 2024"
>>> dataset.version = "1.0"
add_distribution(distribution: Distribution | Graph | list[Distribution]) None#

Add one or more distributions to the Dataset.

This function accepts either a single Distribution instance an rdflib.graph.Graph object containing distribution data, or a list of Distribution instances. The provided distribution(s) are added to the instance RDF graph, creating the corresponding RDF triples as needed.

Parameters:

distribution (Distribution | rdflib.Graph | list[Distribution]) –

The distribution or distributions to add. It can be one of the following:

  • An Distribution instance

  • An rdflib.graph.Graph instance

  • A list of Distribution instances

Returns:

None

Return type:

None

Raises:

TypeError – If the input type is not supported.

Note

  • When a list is provided, each element must be an instance of

    Distribution

  • When a rdflib.graph.Graph is provided and it contains

    more than one distribution description, all distributions found in the graph are added.

property distribution: dict#

The dcat:distribution property.

The setter for this property is the function add_distribution.

property hasQualityMeasurement: dict#

The dcat:hasQualityMeasurement propery of the dataset.

It provides the quality measurement associated with this resource.

This property links the dataset to a specific quality measurement instance, such as completeness or accuracy.

Parameters:

value (CompletenessMeasurement) – an instance of CompletenessMeasurement describing dataset quality.

Return type:

CompletenessMeasurement

Returns:

The CompletenessMeasurement instance representing the quality measurement.

Raises:

TypeError – If the provided value is not a CompletenessMeasurement instance.

property inSeries: dict#

The dcat:inSeries property of the dataset.

The link to the dataset series this resource belongs to.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The dataset’s series.

Returns:

The dataset’s isPartOf relationship.

Raises:

TypeError – if the provided value is not a valid IRI, UUID, or NodeIdentifier.

property isPartOf: dict#

The dcterms:isPartOf property of the dataset.

The link to the parent resource, such as a dataset or catalog.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The dataset’s isPartOf relationship.

Raises:

TypeError – if the provided value is not a valid IRI, UUID, or NodeIdentifier.

property temporal: dict#

The temporal coverage propery of the dataset.

This property represents the time period during which the described dataset is collected.

Parameters:

value (PeriodOfTime) – an instance of PeriodOfTime representing the time period of the resource.

Returns:

the PeriodOfTime instance describing the temporal coverage.

Return type:

PeriodOfTime

Raises:

TypeError – if the provided value is not a PeriodOfTime instance

property creator#

The dcterms:creator property.

Type:

str, FOAFAgent, Graph

Return type:

fdp.foaf.FOAFAgent

Returns:

The resource’s creator.

property description#

The dcterms:description property.

A free-text description of the resource.

Type:

str, rdflib.term.Literal, rdflib.graph.Graph

Return type:

str

Returns:

The resource’s description.

property issued#

The dcterms:issued property.

The date the resource was formally issued or published.

Type:

str, datetime.date, rdflib.graph.Graph, rdflib.term.Literal,

Return type:

datetime.date

Returns:

The publication or release date in ISO 8601 format.

property license#

The dcterms:license property.

The license or rights statement under which the resource is made available.

Type:

str, rdflib.term.URIRef, rdflib.graph.Graph

Return type:

str

Returns:

A reference to the license resource or a literal text description.

property publisher#

The dcterms:publisher property.

The entity responsible for making the resource available.

Type:

str, FOAFAgent, rdflib.graph.Graph

Return type:

fdp.foaf.FOAFAgent

Returns:

The publisher, typically a FOAF Agent.

property theme#

The dcat:theme property.

The main category or subject of the resource.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The resource’s theme.

Note

a list of themes can be found here: https://inspire.ec.europa.eu/theme

Warning

Currently, only a single theme value is supported. The interface may change in future versions to support multiple themes.

property title#

The dcterms:title property.

The human-readable title of the resource.

Type:

str, rdflib.term.Literal, rdflib.graph.Graph :rtype: str

Returns:

The preferred label or name of the resource.

property version#

The dcat:version property.

The version identifier for the resource.

Type:

str, int, Tuple[int, int, int], fdp.version.Version, rdflib.graph.Graph, rdflib.term.Literal

Return type:

fdp.version.Version

Returns:

The version of the resource in one of the supported formats.

class fdp.dataset.DatasetSeries(fair_data_point: FairDataPoint = None, iri: str = None, uuid: str = None)#

Bases: Dataset

Class representing a DCATv3 DatasetSerie.

Variables:

uuid (str) – the uuid that is assigned by the Fair Data Point

add_distribution(distribution: Distribution | Graph | list[Distribution]) None#

Add one or more distributions to the Dataset.

This function accepts either a single Distribution instance an rdflib.graph.Graph object containing distribution data, or a list of Distribution instances. The provided distribution(s) are added to the instance RDF graph, creating the corresponding RDF triples as needed.

Parameters:

distribution (Distribution | rdflib.Graph | list[Distribution]) –

The distribution or distributions to add. It can be one of the following:

  • An Distribution instance

  • An rdflib.graph.Graph instance

  • A list of Distribution instances

Returns:

None

Return type:

None

Raises:

TypeError – If the input type is not supported.

Note

  • When a list is provided, each element must be an instance of

    Distribution

  • When a rdflib.graph.Graph is provided and it contains

    more than one distribution description, all distributions found in the graph are added.

property creator#

The dcterms:creator property.

Type:

str, FOAFAgent, Graph

Return type:

fdp.foaf.FOAFAgent

Returns:

The resource’s creator.

property description#

The dcterms:description property.

A free-text description of the resource.

Type:

str, rdflib.term.Literal, rdflib.graph.Graph

Return type:

str

Returns:

The resource’s description.

property distribution: dict#

The dcat:distribution property.

The setter for this property is the function add_distribution.

property hasQualityMeasurement: dict#

The dcat:hasQualityMeasurement propery of the dataset.

It provides the quality measurement associated with this resource.

This property links the dataset to a specific quality measurement instance, such as completeness or accuracy.

Parameters:

value (CompletenessMeasurement) – an instance of CompletenessMeasurement describing dataset quality.

Return type:

CompletenessMeasurement

Returns:

The CompletenessMeasurement instance representing the quality measurement.

Raises:

TypeError – If the provided value is not a CompletenessMeasurement instance.

property inSeries: dict#

The dcat:inSeries property of the dataset.

The link to the dataset series this resource belongs to.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The dataset’s series.

Returns:

The dataset’s isPartOf relationship.

Raises:

TypeError – if the provided value is not a valid IRI, UUID, or NodeIdentifier.

property isPartOf: dict#

The dcterms:isPartOf property of the dataset.

The link to the parent resource, such as a dataset or catalog.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The dataset’s isPartOf relationship.

Raises:

TypeError – if the provided value is not a valid IRI, UUID, or NodeIdentifier.

property issued#

The dcterms:issued property.

The date the resource was formally issued or published.

Type:

str, datetime.date, rdflib.graph.Graph, rdflib.term.Literal,

Return type:

datetime.date

Returns:

The publication or release date in ISO 8601 format.

property license#

The dcterms:license property.

The license or rights statement under which the resource is made available.

Type:

str, rdflib.term.URIRef, rdflib.graph.Graph

Return type:

str

Returns:

A reference to the license resource or a literal text description.

property publisher#

The dcterms:publisher property.

The entity responsible for making the resource available.

Type:

str, FOAFAgent, rdflib.graph.Graph

Return type:

fdp.foaf.FOAFAgent

Returns:

The publisher, typically a FOAF Agent.

property temporal: dict#

The temporal coverage propery of the dataset.

This property represents the time period during which the described dataset is collected.

Parameters:

value (PeriodOfTime) – an instance of PeriodOfTime representing the time period of the resource.

Returns:

the PeriodOfTime instance describing the temporal coverage.

Return type:

PeriodOfTime

Raises:

TypeError – if the provided value is not a PeriodOfTime instance

property theme#

The dcat:theme property.

The main category or subject of the resource.

Type:

str, rdflib.term.URIRef

Return type:

str

Returns:

The resource’s theme.

Note

a list of themes can be found here: https://inspire.ec.europa.eu/theme

Warning

Currently, only a single theme value is supported. The interface may change in future versions to support multiple themes.

property title#

The dcterms:title property.

The human-readable title of the resource.

Type:

str, rdflib.term.Literal, rdflib.graph.Graph :rtype: str

Returns:

The preferred label or name of the resource.

property version#

The dcat:version property.

The version identifier for the resource.

Type:

str, int, Tuple[int, int, int], fdp.version.Version, rdflib.graph.Graph, rdflib.term.Literal

Return type:

fdp.version.Version

Returns:

The version of the resource in one of the supported formats.