Class RemotePDPProvider
- java.lang.Object
-
- org.biojava.nbio.structure.domain.SerializableCache<String,SortedSet<String>>
-
- org.biojava.nbio.structure.domain.RemotePDPProvider
-
- All Implemented Interfaces:
PDPProvider
public class RemotePDPProvider extends SerializableCache<String,SortedSet<String>> implements PDPProvider
A class that provided PDP assignments that are loaded from a remote web server- Author:
- Andreas Prlic
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SERVER
-
Fields inherited from class org.biojava.nbio.structure.domain.SerializableCache
cacheFileName, serializedCache
-
-
Constructor Summary
Constructors Constructor Description RemotePDPProvider()
RemotePDPProvider(boolean useCache)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Structure
getDomain(String pdpDomainName, AtomCache cache)
Get the structure for a particular PDP domainPDPDomain
getPDPDomain(String pdpDomainName)
Get a StructureIdentifier representing the specified PDP domain.SortedSet<String>
getPDPDomainNamesForPDB(String pdbId)
Get a list of all PDP domains for a given PDB entryString
getServer()
static void
main(String[] args)
void
setServer(String server)
-
Methods inherited from class org.biojava.nbio.structure.domain.SerializableCache
cache, disableCache, enableCache, flushCache, get, isCacheEnabled, reloadFromFile
-
-
-
-
Field Detail
-
DEFAULT_SERVER
public static final String DEFAULT_SERVER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemotePDPProvider
public RemotePDPProvider()
-
RemotePDPProvider
public RemotePDPProvider(boolean useCache) throws IOException
- Parameters:
useCache
-- Throws:
IOException
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException, StructureException
- Throws:
IOException
StructureException
-
getDomain
public Structure getDomain(String pdpDomainName, AtomCache cache) throws IOException, StructureException
Get the structure for a particular PDP domain- Specified by:
getDomain
in interfacePDPProvider
- Parameters:
pdpDomainName
- PDP identifier, e.g. "PDP:4HHBAa"cache
- AtomCache, responsible for fetching and storing the coordinates- Returns:
- Structure representing the PDP domain
- Throws:
IOException
- if the server cannot be reachedStructureException
- For errors parsing the structure
-
getPDPDomain
public PDPDomain getPDPDomain(String pdpDomainName) throws IOException
Get a StructureIdentifier representing the specified PDP domain.- Specified by:
getPDPDomain
in interfacePDPProvider
- Parameters:
pdpDomainName
- PDP domain name- Returns:
- a PDPDomain representing this domain name
- Throws:
IOException
- if the server cannot be reached
-
getPDPDomainNamesForPDB
public SortedSet<String> getPDPDomainNamesForPDB(String pdbId) throws IOException
Get a list of all PDP domains for a given PDB entry- Specified by:
getPDPDomainNamesForPDB
in interfacePDPProvider
- Parameters:
pdbId
- PDB ID- Returns:
- Set of domain names, e.g. "PDP:4HHBAa"
- Throws:
IOException
- if the server cannot be reached
-
-