Added handling of date-type PURLs
@@ -14,7 +14,7 @@ term_browser: custom
entries:
-##### PURLs using major.minor style to indicate the release #####
+##### PURLs using major.minor style to indicate the release; this is the versioning format used by PRO #####
# major releases prior to release 43.0; no reasoned version produced so default to non-reasoned; no OWL produced
# The regex matches three sets of version numbers:
# - 0-9: \d
@@ -89,6 +89,26 @@ entries:
# same file, as the extraneous trailing period stems from an error on the data-version line
# in releases prior to 54.0
+# As indicated above, PRO uses a major.minor release versioning system. However, OBO Foundry guidelines
+# specify that versioned PURLs should use a yyyy-mm-dd format. For PRO this requires special handling,
+# which is achieved by sending such requests to a special handler script called getPRO. The script
+# uses a lookup table to return a PURL of the type above. This return-a-PURL method is done so that
+# failovers will be handled in a consistent way. Special note: the script will actually handle ANY date,
+# returning the release that was active on that date. This obviates the need for a user to know the
+# precise dates of releases, and allows us to bypass the need to create a new PURL for every release.
+
+-regex: (?i)^/obo/pr/((2\d\d\d\-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]))/(pr|pr-asserted)\.(obo|owl))$
+ replacement: https://hershey.dbi.udel.edu/natale-cgi/getPRO?request=$1
+ tests:
+ - from: /2011-03-29/pr.obo
+ to: https://research.bioinformatics.udel.edu/PRO/data/release_17.0/pro_nonreasoned.obo
+ - from: /2011-04-01/pr.obo
+ to: https://research.bioinformatics.udel.edu/PRO/data/release_17.0/pro_nonreasoned.obo
+ - from: /2017-02-01/pr.owl
+ to: https://research.bioinformatics.udel.edu/PRO/data/release_51.0/pro_reasoned.owl
+ - from: /2017-02-01/pr-asserted.owl
+ to: https://research.bioinformatics.udel.edu/PRO/data/release_51.0/pro_nonreasoned.owl
+
### OBO Foundry ID-policy compliant PURLs
- prefix: /about/
