Class DensityMapRequest
java.lang.Object
org.biojava.nbio.structure.io.density.DensityMapRequest
A request for a density map, describing what is wanted and how hard to look
for it.
Instances are immutable; build them with builder(PdbId) or
builder(String).
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DensityMapRequest.BuilderStarts a request from an identifier string.static DensityMapRequest.BuilderStarts a request for a PDB entry.static StringemdbNumber(String emdbId) Extracts the numeric part of an EMDB identifier, as used in file names and some URL templates.getKind()longgetPdbId()booleanWhether sources that deliver something a viewer cannot contour directly — currently only map coefficients — may be used.static StringnormalizeEmdbId(String emdbId) Normalises an EMDB identifier to the canonicalEMD-1234form.toString()withEmdbId(String newEmdbId) Returns a copy of this request with the EMDB entry filled in.withKind(DensityMapKind newKind) Returns a copy of this request with a different map kind, used when expandingDensityMapKind.AUTO.
-
Method Details
-
builder
Starts a request for a PDB entry.- Parameters:
pdbId- the entry- Returns:
- a new builder
-
builder
Starts a request from an identifier string. An identifier beginning withEMD-(case-insensitively) is taken as an EMDB entry, anything else as a PDB entry.- Parameters:
id- a PDB or EMDB identifier- Returns:
- a new builder
-
normalizeEmdbId
Normalises an EMDB identifier to the canonicalEMD-1234form.- Parameters:
emdbId- an identifier such asemd-1234,EMD_1234or a bare number- Returns:
- the canonical form
-
emdbNumber
Extracts the numeric part of an EMDB identifier, as used in file names and some URL templates.- Parameters:
emdbId- an EMDB identifier in any accepted form- Returns:
- the digits, without the
EMD-prefix
-
getPdbId
- Returns:
- the PDB entry requested, or
nullfor an EMDB-only request
-
getEmdbId
- Returns:
- the EMDB entry, if known or explicitly requested; otherwise
null
-
getKind
- Returns:
- the kind of map wanted; never
null
-
getFetchBehavior
- Returns:
- how aggressively to re-fetch, or
nullto use the cache's setting
-
getCacheDir
- Returns:
- an override for the cache directory, or
nullto use the cache's own
-
isAllowNonRenderableFormats
public boolean isAllowNonRenderableFormats()Whether sources that deliver something a viewer cannot contour directly — currently only map coefficients — may be used.- Returns:
trueby default; a viewer should set it tofalse
-
getMaxDownloadBytes
public long getMaxDownloadBytes()- Returns:
- the download size limit in bytes, or 0 for no limit
-
getSourceChain
- Returns:
- an explicit source order, or
nullto let the cache choose
-
withKind
Returns a copy of this request with a different map kind, used when expandingDensityMapKind.AUTO.- Parameters:
newKind- the kind to use- Returns:
- a new request
-
withEmdbId
Returns a copy of this request with the EMDB entry filled in.- Parameters:
newEmdbId- the EMDB identifier- Returns:
- a new request
-
toString
-