Skip to content

Commit

Permalink
add html alternate link to process description (relates to #622)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Apr 29, 2024
1 parent 031f3fc commit 8536e1e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion weaver/datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,13 @@ def links(self, container=None):
{"href": proc_self, "rel": "self", "title": "Current process description."},
{"href": f"{proc_desc}?f=xml", "rel": "alternate",
"title": "Alternate process description.", "type": ContentType.APP_XML},
]
if self.service:
links.append(
{"href": f"{proc_desc}?f=html", "rel": "alternate",
"title": "Alternate process description.", "type": ContentType.TEXT_HTML}
)
links.extend([
{"href": proc_desc, "rel": "process-meta", "title": "Process definition."},
{"href": proc_exec, "rel": "http://www.opengis.net/def/rel/ogc/1.0/execute",
"title": "Process execution endpoint for job submission."},
Expand All @@ -2413,7 +2420,7 @@ def links(self, container=None):
{"href": jobs_list, "rel": "http://www.opengis.net/def/rel/ogc/1.0/job-list",
"title": "List of job executions corresponding to this process."},
{"href": proc_list, "rel": "up", "title": "List of processes registered under the service."},
]
])
if self.version:
proc_tag = f"{proc_list}/{self.tag}"
proc_hist = f"{proc_list}?detail=false&revisions=true&process={self.id}"
Expand Down

0 comments on commit 8536e1e

Please sign in to comment.