public class URLIdentifier extends Object implements StructureIdentifier
SubstructureIdentifier
Modifier and Type | Field and Description |
---|---|
static String |
CHAINID_PARAM
URL parameter specifying a single chain to include; overridden by residues
|
static String |
FORMAT_PARAM
URL parameter specifying the file format (PDB or CIF)
|
static String |
PDBID_PARAM
URL parameter specifying the PDB ID
|
static String |
RESIDUES_PARAM
URL parameter specifying residue ranges to include, e.g.
|
Constructor and Description |
---|
URLIdentifier(String url) |
URLIdentifier(URL url) |
Modifier and Type | Method and Description |
---|---|
String |
getIdentifier()
Get the String form of this identifier.
|
URL |
getURL() |
static String |
guessPDBID(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 String FORMAT_PARAM
public static final String PDBID_PARAM
public static final String CHAINID_PARAM
public static final String RESIDUES_PARAM
SubstructureIdentifier
,
Constant Field Valuespublic URLIdentifier(URL url)
public URLIdentifier(String url) throws MalformedURLException
MalformedURLException
public 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, IOException
loadStructure
in interface StructureIdentifier
StructureException
- For errors loading and parsing the structureIOException
- Errors reading the structure from diskpublic static String guessPDBID(String name)
name
- Input filenameCopyright © 2000–2018 BioJava. All rights reserved.