dicogis.export.catalog_record module¶
Catalog record: what a metadata catalog gets to know about a dataset.
Pivot between the metadatasets and the catalog formats, and the single list of the fields managed by DicoGIS: each format serializes it, and completing a record already in a catalog relies on it too. It holds no absolute path unless asked to: a catalog is made to be read by people who have no business knowing the local file tree.
- class dicogis.export.catalog_record.CatalogRecord(identifier, title, abstract, language, metadata_date, spatial_representation, keywords=(), date_created=None, date_revised=None, bbox_wgs84=None, crs_codes=(), formats=(), contact_organisation=None, contact_email=None, original_path=None)¶
Bases:
objectA metadata record, independent of the format it ends up in.
- identifier¶
stable identifier, see MetaDataset.uuid
- title¶
title of the dataset
- abstract¶
description of the dataset, never empty
- language¶
language of the record, as an ISO 639-2/B code
- metadata_date¶
date of the record itself
- spatial_representation¶
“vector” or “grid”
- keywords¶
unique keywords
- date_created¶
creation date of the dataset, if known
- date_revised¶
last revision date of the dataset, if known
- bbox_wgs84¶
(west, south, east, north) in degrees, if known
- crs_codes¶
unique CRS, as “registry:code”
- formats¶
names of the formats of the dataset
- contact_organisation¶
organisation to contact about the metadata
- contact_email¶
email address to contact about the metadata
- original_path¶
location of the dataset, only if asked for
- __init__(identifier, title, abstract, language, metadata_date, spatial_representation, keywords=(), date_created=None, date_revised=None, bbox_wgs84=None, crs_codes=(), formats=(), contact_organisation=None, contact_email=None, original_path=None)¶
- classmethod from_metadataset(metadataset, settings=None)¶
Build the record of a dataset. A flat database makes one record, covering all its layers.
- Parameters:
metadataset (
MetaDataset) – dataset to describesettings (
CatalogRecordSettings|None) – record settings. Defaults to the default ones.
- Raises:
ValueError – if the dataset has no name or no location to be identified by
- Return type:
- Returns:
catalog record
- class dicogis.export.catalog_record.CatalogRecordSettings(language='eng', contact_organisation=None, contact_email=None, include_original_path=False)¶
Bases:
objectWhat a catalog record needs on top of the metadataset.
- language¶
language of the record, as an ISO 639-2/B code
- contact_organisation¶
organisation to contact about the metadata
- contact_email¶
email address to contact about the metadata
- include_original_path¶
publish the location of the dataset
- __init__(language='eng', contact_organisation=None, contact_email=None, include_original_path=False)¶
- classmethod from_environment(language=None, include_original_path=None)¶
Build the settings, from the environment for what isn’t given.
- Parameters:
- Return type:
- Returns:
settings