Class UrlTemplates
The recognised placeholders are:
{pdbid}- the PDB identifier as given
{pdbid_lc}- the PDB identifier in lower case
{pdbid_uc}- the PDB identifier in upper case
{mid}- the two-character divided-archive directory,
e.g.
cbfor1cbs {extid}- the extended identifier in lower case, the
spelling the archive itself uses, e.g.
pdb_00001cbsfor1cbs {emdb_id}- the EMDB identifier, e.g.
EMD-0262 {emdb_num}- the EMDB number alone, e.g.
0262 {detail}- the density-server detail level
{mid} and {extid} exist for mirrors rather than for
the default URLs. The services BioJava fetches from resolve an entry by name
alone, but a site pointing this code at its own copy of the archive has to
spell out a directory path — and so does any mirror that publishes one,
such as EBI. Both the present divided layout and the per-entry layout that
replaces it in July 2027 are directory paths, and between them the two
placeholders express either without a code change:
{mid}/{pdbid_lc}/{pdbid_lc}_validation_2fo-fc_map_coef.cif.gz
entries/{mid}/{extid}/validation_reports/{extid}_validation_2fo-fc_map_coef.cif.gz
This is deliberately separate from the template mechanism in
DownloadChemCompProvider, which resolves a single chemical-component
identifier with optional substring indices. The two solve different problems:
here several distinct values are substituted by name.
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Method Summary
-
Method Details
-
expand
Expands a template against a set of named values.- Parameters:
template- the template stringvalues- the values, keyed by placeholder name without the braces- Returns:
- the expanded string
-
values
Builds the standard value map for an entry.- Parameters:
pdbId- the PDB identifier, may benullemdbId- the EMDB identifier in any accepted form, may benulldetail- the density-server detail level, or a negative value to omit it- Returns:
- a map suitable for
expand(String, Map)
-