geonode.resource.utils

Attributes

logger

ogc_settings

Classes

KeywordHandler

Object needed to handle the keywords coming from the XML

Functions

update_resource(instance[, xml_file, regions, ...])

call_storers(instance[, custom])

get_alternate_name(instance)

document_post_save(instance, *args, **kwargs)

dataset_post_save(instance, *args, **kwargs)

metadata_post_save(instance, *args, **kwargs)

resourcebase_post_save(instance, *args, **kwargs)

Used to fill any additional fields after the save.

Module Contents

geonode.resource.utils.logger[source]
geonode.resource.utils.ogc_settings[source]
class geonode.resource.utils.KeywordHandler(instance, keywords)[source]

Object needed to handle the keywords coming from the XML The expected input are:

  • instance (Dataset/Document/Map): instance of any object inherited from ResourceBase.

  • keywords (list(dict)): Is required to analyze the keywords to find if some thesaurus is available.

instance[source]
keywords[source]
set_keywords()[source]

Method with the responsible to set the keywords (free and thesaurus) to the object. At return there is always a call to final_step to let it hookable.

handle_metadata_keywords()[source]

Method the extract the keyword from the dict. If the keyword are passed, try to extract them from the dict by splitting free-keyword from the thesaurus

static is_thesaurus_available(thesaurus, keyword)[source]
_set_free_keyword(keywords)[source]
_set_tkeyword(tkeyword)[source]
geonode.resource.utils.update_resource(instance: geonode.base.models.ResourceBase, xml_file: str = None, regions: list = [], keywords: list = [], vals: dict = {}, extra_metadata: list = [])[source]
geonode.resource.utils.call_storers(instance, custom={})[source]
geonode.resource.utils.get_alternate_name(instance)[source]
geonode.resource.utils.document_post_save(instance, *args, **kwargs)[source]
geonode.resource.utils.dataset_post_save(instance, *args, **kwargs)[source]
geonode.resource.utils.metadata_post_save(instance, *args, **kwargs)[source]
geonode.resource.utils.resourcebase_post_save(instance, *args, **kwargs)[source]

Used to fill any additional fields after the save. Has to be called by the children