dicogis.ui.wdg_tab_publish module

Name:

TabPublish

Purpose:

Tab to publish previously exported metadata to a catalog (uData or GeoNetwork), from DicoGIS Notebook.

Author:

Julien Moura (@geojulien)

class dicogis.ui.wdg_tab_publish.TabPublish(parent=None)

Bases: QWidget

Tab form to publish DicoGIS metadata files to a catalog.

Parameters:

QWidget – inherited Qt widget

__init__(parent=None)

Initializes UI tab for the publication.

Parameters:

parent (QWidget | None) – Qt parent widget

clear_report()

Reset the publication report (summary + details table).

Return type:

None

get_geonetwork_authcfg()

Return the identifier of the QGIS authentication configuration to use.

Return type:

str | None

Returns:

identifier, or None if empty or outside QGIS, where it means nothing

get_geonetwork_categories()

Return the currently entered GeoNetwork category identifiers.

Return type:

list[str]

get_geonetwork_group()

Return the currently entered GeoNetwork group identifier.

Return type:

str

get_geonetwork_password()

Return the currently entered GeoNetwork password.

Return type:

str

get_geonetwork_portal()

Return the currently entered GeoNetwork portal, srv if empty.

Return type:

str

get_geonetwork_update_mode()

Return what to do with a record the catalog already has.

Return type:

GeonetworkUpdateModes

get_geonetwork_url_base()

Return the currently entered GeoNetwork URL.

Return type:

str

get_geonetwork_username()

Return the currently entered GeoNetwork username.

Return type:

str

get_input_folder()

Return the currently entered metadata folder path.

Return type:

str

get_publish_options()

Return publish options as a dict. The API key and the password are not included: they are not persisted to options.ini for security reasons. The identifier of an authentication configuration is only a reference.

Return type:

dict

get_publish_target()

Return the kind of catalog to publish to.

Return type:

PublishTargets

get_udata_api_key()

Return the currently entered uData API key.

Return type:

str

get_udata_api_url_base()

Return the currently entered uData API base URL.

Return type:

str

get_udata_api_version()

Return the currently entered uData API version.

Return type:

str

get_udata_organization_id()

Return the currently entered uData organization ID, or None if empty.

Return type:

str | None

imposed_settings()

Publication settings imposed by an environment variable: not to be saved.

Return type:

frozenset[str]

Returns:

keys of the settings, as in get_publish_options()

on_browse_input_folder()

Browse and insert the path of the folder containing metadata files.

Return type:

Path | None

Returns:

selected folder path or None if something went wrong

retranslate_ui()

Update widgets texts for the currently active language.

Return type:

None

set_input_folder(folder_path)

Set the metadata folder path, unless imposed by the environment.

Return type:

None

set_publish_options(values)

Apply publish options from options.ini. Empty values and the settings imposed by an environment variable are left as they are.

Parameters:

values (dict) – setting -> value, keys as in get_publish_options()

Return type:

None

set_publish_target(target)

Select the kind of catalog to publish to, unknown ones being ignored.

Parameters:

target (str) – value of PublishTargets

Return type:

None

show_report(report)

Display the report of a publication in the tab.

Parameters:

report (PublishReport) – outcome of the publication run.

Return type:

None