public class URLIdentifier extends java.lang.Object implements StructureIdentifier
SubstructureIdentifier
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHAINID_PARAM
URL parameter specifying a single chain to include; overridden by residues
|
static java.lang.String |
FORMAT_PARAM
URL parameter specifying the file format (PDB or CIF)
|
static java.lang.String |
PDBID_PARAM
URL parameter specifying the PDB ID
|
static java.lang.String |
RESIDUES_PARAM
URL parameter specifying residue ranges to include, e.g.
|
Constructor and Description |
---|
URLIdentifier(java.lang.String url) |
URLIdentifier(java.net.URL url) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIdentifier()
Get the String form of this identifier.
|
java.net.URL |
getURL() |
static java.lang.String |
guessPDBID(java.lang.String name)
Recognizes PDB IDs that occur at the beginning of name followed by some
delimiter.
|
Structure |
loadStructure(AtomCache cache)
Load the structure from the URL
|
Structure |
reduce(Structure input)
Takes a complete structure as input and reduces it to the substructure
represented by this StructureIdentifier.
|
SubstructureIdentifier |
toCanonical()
Convert to a canonical SubstructureIdentifier.
|
public static final java.lang.String FORMAT_PARAM
public static final java.lang.String PDBID_PARAM
public static final java.lang.String CHAINID_PARAM
public static final java.lang.String RESIDUES_PARAM
SubstructureIdentifier
,
Constant Field Valuespublic URLIdentifier(java.net.URL url)
public URLIdentifier(java.lang.String url) throws java.net.MalformedURLException
java.net.MalformedURLException
public java.net.URL getURL()
public java.lang.String getIdentifier()
StructureIdentifier
#toString()
method also return the
identifier, for consistency during serialization.getIdentifier
in interface StructureIdentifier
public SubstructureIdentifier toCanonical()
StructureIdentifier
This allows all domains to be converted to a standard format String.
toCanonical
in interface StructureIdentifier
public Structure reduce(Structure input) throws StructureException
StructureIdentifier
The returned structure may be a shallow copy of the input, with shared Chains, Residues, etc.
reduce
in interface StructureIdentifier
input
- A full structure, e.g. as loaded from the PDB. The structure
ID should match that returned by getPdbId(), if applicable.StructureException
StructureTools.getReducedStructure(Structure, String)
public Structure loadStructure(AtomCache cache) throws StructureException, java.io.IOException
loadStructure
in interface StructureIdentifier
StructureException
- For errors loading and parsing the structurejava.io.IOException
- Errors reading the structure from diskpublic static java.lang.String guessPDBID(java.lang.String name)
name
- Input filename