InaSAFE Disaster risk assessment tool developed by AusAid - Exception Classes.
Custom exception classes for the IS application.
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.
Make a valid ISO 19115 XML using the values of safe.get_defaults
This method will create XML based on the iso_19115_template.py template The $placeholders there will be replaced by the values returned from safe.defaults.get_defaults. Note that get_defaults takes care of using the values set in QGIS settings if available.
Parameters: | keywords (dict) – The metadata keywords to write (which should be provided as a dict of key value pairs). |
---|---|
Returns: | str valid XML |
Try to extract keywords from an xml file
Parameters: | keyword_filename (str) – Name of keywords file. |
---|---|
Returns: | metadata: a dictionary containing the metadata. the keywords element contains the content of the ISO_METADATA_KW_TAG as list so that it can be read line per line as if it was a file. |
Raises: | ReadMetadataError, IOError |
add the necessary tags into an existing xml file or create a new one
Parameters: | xml_filename – name of the xml file |
---|---|
Returns: | tree the parsed ElementTree |
Make a valid ISO 19115 XML file using the values of safe.get_defaults
This method will create a file based on the iso_19115_template.py template The $placeholders there will be replaced by the values returned from safe.defaults.get_defaults. Note that get_defaults takes care of using the values set in QGIS settings if available.
Parameters: | xml_filename – full path to the file to be generated |
---|---|
Returns: |