Catalog#
- class fdp.catalog.Catalog(fair_data_point: FairDataPoint = None, iri: str = None, uuid: str = None, *args, **kwargs)#
Bases:
DatasetClass representing a DCATv3
dcat:Catalogentity.A Catalog is a curated collection of DCAT resources such as datasets, data services, or data series. It serves as a central entry point that provides metadata, discovery, and access to the resources it contains.
This class extends both
fdp.dataset.Datasetandfdp.resource.Resource, inheriting descriptive, provenance, and administrative metadata such astitle,description,creator, andissued.- RDF Class
dcat:Catalog- Base Classes
- Supported Inherited Properties
- Supported Catalog-specific Properties
homepage— the catalog’s landing page
- Example
>>> from fdp.catalog import Catalog >>> cat = Catalog() >>> cat.title = "Open Data Catalog" >>> cat.homepage = "https://data.example.org/catalog"
Note
Some properties inherited from
DatasetandResourcemay be specialized or extended in this class to reflect the semantics ofdcat:Catalog. For instance,homepageidentifies the human-readable catalog landing page, whiledatasetlists contained datasets.See also
DatasetResource
- Variables:
uuid (str) – the uuid that is assigned by the Fair Data Point
- property homepage#
The
foaf:homepageproperty.The homepage or landing page of the catalog.
- Type:
str,rdflib.term.Literal,rdflib.graph.Graph- Return type:
str- Returns:
The catalog’s homepage.
- add_distribution(distribution: Distribution | Graph | list[Distribution]) None#
Add one or more distributions to the Dataset.
This function accepts either a single
Distributioninstance anrdflib.graph.Graphobject containing distribution data, or a list ofDistributioninstances. 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
DistributioninstanceAn
rdflib.graph.GraphinstanceA list of
Distributioninstances
- 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.Graphis provided and it contains more than one distribution description, all distributions found in the graph are added.
- When a
- property creator#
The
dcterms:creatorproperty.- Type:
str,FOAFAgent,Graph- Return type:
- Returns:
The resource’s creator.
- property description#
The
dcterms:descriptionproperty.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:distributionproperty.The setter for this property is the function
add_distribution.
- property issued#
The
dcterms:issuedproperty.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:licenseproperty.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.
Note
must follow recommendation from: https://joinup.ec.europa.eu/release/dcat-ap-how-refer-licence-documents-and-licence-uris
- property publisher#
The
dcterms:publisherproperty.The entity responsible for making the resource available.
- Type:
str,FOAFAgent,rdflib.graph.Graph- Return type:
- 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
PeriodOfTimerepresenting the time period of the resource.- Returns:
the
PeriodOfTimeinstance describing the temporal coverage.- Return type:
PeriodOfTime
- Raises:
TypeError – if the provided value is not a
PeriodOfTimeinstance
- property theme#
The
dcat:themeproperty.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:titleproperty.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:versionproperty.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.