safe.metadata.provenance.provenance_step module

InaSAFE Disaster risk assessment tool developed by AusAid - metadata module.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.metadata.provenance.provenance_step.ProvenanceStep(title, description, timestamp=None, data=None)[source]

Bases: object

Class to store a provenance step.

Each step can be instantiated passing a time or it will automatically generate a timestamp. Each step can represent itself as xml or dict

New in version 3.2.

data(key=None)[source]

additional data stored in the step.

Parameters:key (str) – The name of a key stored in the data
Returns:the stored data
Return type:dict
description[source]

the description.

Returns:the description
Return type:str
dict[source]

the dict representation.

Returns:the dict
Return type:dict
time[source]

the time.

Returns:the time
Return type:datetime
title[source]

the title.

Returns:the title
Return type:str
xml[source]

the xml string representation.

Returns:the xml
Return type:str