Skip to content

manage_05_deleting_rts

cspayne edited this page Jul 12, 2023 · 1 revision

Deleting Resource Templates

Steps:

1. Remove Property Templates from map_storage prop_sets

Property templates associated with a resource template can be deleted using delete_pts.py.

This script (run from the top-level map_storage folder), accepts a resource template id as input and iterates through each prop_set file, removing the resource template's property templates.

If a property template is solely used for this resource template, the entire sinopia element is removed (including all guidance). If there are multiple RT ids within the property template, only the id for this resource template is removed along with any guidance specific to the resource template.

2. Remove Resource Template from Sinopia platform

002_delete_loaded_RTs_resources.py is run from the top-level sinopia_maps folder and takes a JWT, Sinopia platform name, and either a single resource template name or the path to a text file with a list of resource template names (one per line) as input. It then sends an https request to delete these resources from the Sinopia platform.

A 204 status code indicates the resource(s) have been successfully deleted from the platform.

3. Delete Resource Template from sinopia_maps

The RDF/XML, JSON, and HTML serializations of the resource template must be manually deleted from the sinopia_maps repository.

4. Remove RT id from Validation Schemas

Each resource template id is stored in sinopia_maps.xml. The rt element can be manually deleted, or the @output_load attribute can be removed.

Removing @output_load="true" prevents the resource template from being processed when 001_output_publish_load.py is run.

NOTE: If the resource template still has RDF/XML and JSON files in sinopia_maps, this version of the resource template will still be uploaded during 001_output_publish_load.py

The xs:enumeration element with the @value attribute matching the resource template's id should also be manually deleted from uwsinopia.xsd's <xs:simpleType name="rt_id_type"> element.