Class RemotePDPProvider
- java.lang.Object
-
- org.biojava.nbio.structure.domain.SerializableCache<java.lang.String,java.util.SortedSet<java.lang.String>>
-
- org.biojava.nbio.structure.domain.RemotePDPProvider
-
- All Implemented Interfaces:
PDPProvider
public class RemotePDPProvider extends SerializableCache<java.lang.String,java.util.SortedSet<java.lang.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 java.lang.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(java.lang.String pdpDomainName, AtomCache cache)
Get the structure for a particular PDP domainPDPDomain
getPDPDomain(java.lang.String pdpDomainName)
Get a StructureIdentifier representing the specified PDP domain.java.util.SortedSet<java.lang.String>
getPDPDomainNamesForPDB(java.lang.String pdbId)
Get a list of all PDP domains for a given PDB entryjava.lang.String
getServer()
static void
main(java.lang.String[] args)
void
setServer(java.lang.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 java.lang.String DEFAULT_SERVER
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException, StructureException
- Throws:
java.io.IOException
StructureException
-
getServer
public java.lang.String getServer()
-
setServer
public void setServer(java.lang.String server)
-
getDomain
public Structure getDomain(java.lang.String pdpDomainName, AtomCache cache) throws java.io.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:
java.io.IOException
- if the server cannot be reachedStructureException
- For errors parsing the structure
-
getPDPDomain
public PDPDomain getPDPDomain(java.lang.String pdpDomainName) throws java.io.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:
java.io.IOException
- if the server cannot be reached
-
getPDPDomainNamesForPDB
public java.util.SortedSet<java.lang.String> getPDPDomainNamesForPDB(java.lang.String pdbId) throws java.io.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:
java.io.IOException
- if the server cannot be reached
-
-