Package org.biojava.nbio.structure.scop
Class CachedRemoteScopInstallation
- java.lang.Object
-
- org.biojava.nbio.structure.domain.SerializableCache<String,ScopDomain>
-
- org.biojava.nbio.structure.scop.CachedRemoteScopInstallation
-
- All Implemented Interfaces:
ScopDatabase
public class CachedRemoteScopInstallation extends SerializableCache<String,ScopDomain> implements ScopDatabase
An extension of the RemoteScopInstallation that caches some of the data locally.- Author:
- Andreas Prlic
-
-
Field Summary
-
Fields inherited from class org.biojava.nbio.structure.domain.SerializableCache
cacheFileName, serializedCache
-
-
Constructor Summary
Constructors Constructor Description CachedRemoteScopInstallation()
CachedRemoteScopInstallation(boolean useCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ScopDescription>
filterByClassificationId(String query)
Get all scop descriptions that start with a classification ID, e.g. b.1.18List<ScopDescription>
filterByDescription(String query)
Get all scop descriptions that start with a certain name. e.g.List<ScopDomain>
filterByDomainName(String query)
search through SCOP and filter based on domain namevoid
flushCache()
List<ScopDescription>
getByCategory(ScopCategory category)
Get all records of a particular classification.List<String>
getComments(int sunid)
Get comments about a SCOP domain by its sunidScopDomain
getDomainByScopID(String scopId)
get a ScopDomain by its SCOP ID (warning, they are not stable between releases!)List<ScopDomain>
getDomainsForPDB(String pdbId)
Get a list of ScopDomains that have been assigned to a PDB IDScopDescription
getScopDescriptionBySunid(int sunid)
Return the SCOP description for a node in the hierarchy by its "sunid" id.List<ScopDomain>
getScopDomainsBySunid(Integer sunid)
Get a SCOP domain by its sunidScopNode
getScopNode(int sunid)
Access a particular ScopNode.String
getScopVersion()
Returns the SCOP versionList<ScopNode>
getTree(ScopDomain domain)
get the SCOP sub-tree for a particular domain.void
setScopVersion(String version)
Sets the scop version used.-
Methods inherited from class org.biojava.nbio.structure.domain.SerializableCache
cache, disableCache, enableCache, get, isCacheEnabled, reloadFromFile
-
-
-
-
Constructor Detail
-
CachedRemoteScopInstallation
public CachedRemoteScopInstallation() throws IOException
- Throws:
IOException
-
CachedRemoteScopInstallation
public CachedRemoteScopInstallation(boolean useCache) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getByCategory
public List<ScopDescription> getByCategory(ScopCategory category)
Description copied from interface:ScopDatabase
Get all records of a particular classification.- Specified by:
getByCategory
in interfaceScopDatabase
- Parameters:
category
- e.g. "superfamily"- Returns:
- all records of this type
-
filterByClassificationId
public List<ScopDescription> filterByClassificationId(String query)
Description copied from interface:ScopDatabase
Get all scop descriptions that start with a classification ID, e.g. b.1.18- Specified by:
filterByClassificationId
in interfaceScopDatabase
- Returns:
- list of scop descriptions
-
getTree
public List<ScopNode> getTree(ScopDomain domain)
Description copied from interface:ScopDatabase
get the SCOP sub-tree for a particular domain.- Specified by:
getTree
in interfaceScopDatabase
- Returns:
- list of ScopNodes providing the path to this domain
-
filterByDomainName
public List<ScopDomain> filterByDomainName(String query)
Description copied from interface:ScopDatabase
search through SCOP and filter based on domain name- Specified by:
filterByDomainName
in interfaceScopDatabase
- Parameters:
query
- a (part) of a name- Returns:
- list of matchin ScopDomains
-
filterByDescription
public List<ScopDescription> filterByDescription(String query)
Description copied from interface:ScopDatabase
Get all scop descriptions that start with a certain name. e.g. Globin- Specified by:
filterByDescription
in interfaceScopDatabase
- Returns:
- list of scop descriptions
-
getScopDescriptionBySunid
public ScopDescription getScopDescriptionBySunid(int sunid)
Description copied from interface:ScopDatabase
Return the SCOP description for a node in the hierarchy by its "sunid" id.- Specified by:
getScopDescriptionBySunid
in interfaceScopDatabase
- Returns:
- a ScopDescription object
-
getDomainsForPDB
public List<ScopDomain> getDomainsForPDB(String pdbId)
Description copied from interface:ScopDatabase
Get a list of ScopDomains that have been assigned to a PDB ID- Specified by:
getDomainsForPDB
in interfaceScopDatabase
- Parameters:
pdbId
- the PDB entry- Returns:
- a list of ScopDomains
-
getDomainByScopID
public ScopDomain getDomainByScopID(String scopId)
Description copied from interface:ScopDatabase
get a ScopDomain by its SCOP ID (warning, they are not stable between releases!)- Specified by:
getDomainByScopID
in interfaceScopDatabase
- Parameters:
scopId
- e.g. d2bq6a1- Returns:
- a ScopDomain or null if no domain with the particular ID could be found
-
getScopNode
public ScopNode getScopNode(int sunid)
Description copied from interface:ScopDatabase
Access a particular ScopNode. The scopNode then allows to traverse through the scop hierarchy...- Specified by:
getScopNode
in interfaceScopDatabase
- Parameters:
sunid
- the scop unique id- Returns:
- a ScopNode that matches this sunid
-
getScopVersion
public String getScopVersion()
Description copied from interface:ScopDatabase
Returns the SCOP version- Specified by:
getScopVersion
in interfaceScopDatabase
- Returns:
- version of SCOP
-
setScopVersion
public void setScopVersion(String version)
Description copied from interface:ScopDatabase
Sets the scop version used.- Specified by:
setScopVersion
in interfaceScopDatabase
-
getScopDomainsBySunid
public List<ScopDomain> getScopDomainsBySunid(Integer sunid)
Description copied from interface:ScopDatabase
Get a SCOP domain by its sunid- Specified by:
getScopDomainsBySunid
in interfaceScopDatabase
- Parameters:
sunid
- the scop unique id- Returns:
- a list of scop domains that match this sunid
-
flushCache
public void flushCache()
- Overrides:
flushCache
in classSerializableCache<String,ScopDomain>
-
getComments
public List<String> getComments(int sunid)
Description copied from interface:ScopDatabase
Get comments about a SCOP domain by its sunid- Specified by:
getComments
in interfaceScopDatabase
- Returns:
-
-