Package org.biojava.nbio.structure.cath
Class CathInstallation
- java.lang.Object
-
- org.biojava.nbio.structure.cath.CathInstallation
-
- All Implemented Interfaces:
CathDatabase
public class CathInstallation extends Object implements CathDatabase
- Author:
- Daniel Asarnow
-
-
Field Summary
Fields Modifier and Type Field Description static String
CATH_DOWNLOAD_ALL_RELEASES_DIR
static String
CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
static String
CATH_DOWNLOAD_URL
static String
DEFAULT_VERSION
static String
domainDescriptionFileName
static String
domainListFileName
static String
domallFileName
static String
FILESPLIT
static String
NEWLINE
static String
nodeListFileName
-
Constructor Summary
Constructors Constructor Description CathInstallation()
CathInstallation(String cacheLocation)
CathInstallation(String cacheLocation, boolean usingCDDF, boolean parseCF)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
downloadDomainDescriptionFile()
protected void
downloadDomainListFile()
protected void
downloadDomallFile()
protected void
downloadFileFromRemote(URL remoteURL, File localFile)
protected void
downloadNodeListFile()
void
ensureDomainDescriptionInstalled()
void
ensureDomainListInstalled()
void
ensureDomallInstalled()
void
ensureNodeListInstalled()
List<CathDomain>
filterByCathCode(String query)
Return list of CATH descriptions whose CATH codes (e.g. 1.4.6.10) start with the query.List<CathDomain>
filterByDescription(String query)
Return list of CATH descriptions whose descriptions (name field) starts with the query.List<CathDomain>
filterByNodeName(String query)
Return list of CATH domains whose node name (e.g.List<CathDomain>
getByCategory(CathCategory category)
Return list of CATH descriptions for node representatives at a CATH category (e.g.String
getCacheLocation()
String
getCathDownloadUrl()
CathNode
getCathNode(String nodeId)
Return the CathNode for a node ID.String
getCathVersion()
Return the CATH release version.CathDomain
getDescriptionByCathId(String cathId)
Return CATH description for CATH domain ID.CathDomain
getDescriptionByNodeId(String nodeId)
Return CATH description for node representative by node ID.CathDomain
getDomainByCathId(String cathId)
Return CATH domain for CATH domain ID.String
getDomainDescriptionFileName()
String
getDomainListFileName()
List<CathDomain>
getDomainsByNodeId(String nodeId)
Return all CATH domains for a particular CATH node.List<CathDomain>
getDomainsForPdb(String pdbId)
Return all CATH domains for a PDB ID.String
getDomallFileName()
List<CathFragment>
getFragmentsByPdbId(String pdbId)
AtomicBoolean
getInstalledDomainDescription()
AtomicBoolean
getInstalledDomainList()
AtomicBoolean
getInstalledDomall()
AtomicBoolean
getInstalledNodeList()
String
getNodeListFileName()
List<CathNode>
getTree(CathDomain domain)
Return the CATH sub-tree for a particular domain.void
setCacheLocation(String cacheLocation)
void
setCathDownloadUrl(String cathDownloadUrl)
void
setCathVersion(String cathVersion)
void
setInstalledDomainDescription(AtomicBoolean installedDomainDescription)
void
setInstalledDomainList(AtomicBoolean installedDomainList)
void
setInstalledDomall(AtomicBoolean installedDomall)
void
setInstalledNodeList(AtomicBoolean installedNodeList)
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final String DEFAULT_VERSION
- See Also:
- Constant Field Values
-
domainListFileName
public static final String domainListFileName
- See Also:
- Constant Field Values
-
domainDescriptionFileName
public static final String domainDescriptionFileName
- See Also:
- Constant Field Values
-
nodeListFileName
public static final String nodeListFileName
- See Also:
- Constant Field Values
-
domallFileName
public static final String domallFileName
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_URL
public static final String CATH_DOWNLOAD_URL
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_ALL_RELEASES_DIR
public static final String CATH_DOWNLOAD_ALL_RELEASES_DIR
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
public static final String CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CathInstallation
public CathInstallation(String cacheLocation, boolean usingCDDF, boolean parseCF)
-
CathInstallation
public CathInstallation(String cacheLocation)
-
CathInstallation
public CathInstallation()
-
-
Method Detail
-
getDomainListFileName
public String getDomainListFileName()
-
getDomainDescriptionFileName
public String getDomainDescriptionFileName()
-
getNodeListFileName
public String getNodeListFileName()
-
getDomallFileName
public String getDomallFileName()
-
getCathDownloadUrl
public String getCathDownloadUrl()
-
setCathDownloadUrl
public void setCathDownloadUrl(String cathDownloadUrl)
-
getCacheLocation
public String getCacheLocation()
-
setCacheLocation
public void setCacheLocation(String cacheLocation)
-
getInstalledDomainList
public AtomicBoolean getInstalledDomainList()
-
setInstalledDomainList
public void setInstalledDomainList(AtomicBoolean installedDomainList)
-
getInstalledDomainDescription
public AtomicBoolean getInstalledDomainDescription()
-
setInstalledDomainDescription
public void setInstalledDomainDescription(AtomicBoolean installedDomainDescription)
-
getInstalledNodeList
public AtomicBoolean getInstalledNodeList()
-
getInstalledDomall
public AtomicBoolean getInstalledDomall()
-
setInstalledNodeList
public void setInstalledNodeList(AtomicBoolean installedNodeList)
-
setInstalledDomall
public void setInstalledDomall(AtomicBoolean installedDomall)
-
getCathVersion
public String getCathVersion()
Description copied from interface:CathDatabase
Return the CATH release version.- Specified by:
getCathVersion
in interfaceCathDatabase
- Returns:
- CATH version
-
getCathNode
public CathNode getCathNode(String nodeId)
Description copied from interface:CathDatabase
Return the CathNode for a node ID.- Specified by:
getCathNode
in interfaceCathDatabase
- Returns:
- CATH node
-
getByCategory
public List<CathDomain> getByCategory(CathCategory category)
Description copied from interface:CathDatabase
Return list of CATH descriptions for node representatives at a CATH category (e.g. "T").- Specified by:
getByCategory
in interfaceCathDatabase
- Returns:
- CATH descriptions
-
filterByCathCode
public List<CathDomain> filterByCathCode(String query)
Description copied from interface:CathDatabase
Return list of CATH descriptions whose CATH codes (e.g. 1.4.6.10) start with the query. This is currently redundant with getDescriptionsByNodeId.- Specified by:
filterByCathCode
in interfaceCathDatabase
- Returns:
- CATH descriptions
-
getTree
public List<CathNode> getTree(CathDomain domain)
Description copied from interface:CathDatabase
Return the CATH sub-tree for a particular domain.- Specified by:
getTree
in interfaceCathDatabase
- Returns:
- CATH sub-tree
-
filterByNodeName
public List<CathDomain> filterByNodeName(String query)
Description copied from interface:CathDatabase
Return list of CATH domains whose node name (e.g. Orthogonal Bundle) starts with the query.- Specified by:
filterByNodeName
in interfaceCathDatabase
- Returns:
- CATH domains
-
filterByDescription
public List<CathDomain> filterByDescription(String query)
Description copied from interface:CathDatabase
Return list of CATH descriptions whose descriptions (name field) starts with the query.- Specified by:
filterByDescription
in interfaceCathDatabase
- Returns:
- CATH descriptions
-
getDescriptionByNodeId
public CathDomain getDescriptionByNodeId(String nodeId)
Description copied from interface:CathDatabase
Return CATH description for node representative by node ID.- Specified by:
getDescriptionByNodeId
in interfaceCathDatabase
- Returns:
- CATH description
-
getDomainsForPdb
public List<CathDomain> getDomainsForPdb(String pdbId)
Description copied from interface:CathDatabase
Return all CATH domains for a PDB ID.- Specified by:
getDomainsForPdb
in interfaceCathDatabase
- Returns:
- CATH domains
-
getDomainByCathId
public CathDomain getDomainByCathId(String cathId)
Description copied from interface:CathDatabase
Return CATH domain for CATH domain ID.- Specified by:
getDomainByCathId
in interfaceCathDatabase
- Returns:
- CATH domain
-
getDescriptionByCathId
public CathDomain getDescriptionByCathId(String cathId)
Description copied from interface:CathDatabase
Return CATH description for CATH domain ID.- Specified by:
getDescriptionByCathId
in interfaceCathDatabase
- Returns:
-
getDomainsByNodeId
public List<CathDomain> getDomainsByNodeId(String nodeId)
Description copied from interface:CathDatabase
Return all CATH domains for a particular CATH node.- Specified by:
getDomainsByNodeId
in interfaceCathDatabase
- Returns:
-
getFragmentsByPdbId
public List<CathFragment> getFragmentsByPdbId(String pdbId)
- Specified by:
getFragmentsByPdbId
in interfaceCathDatabase
-
downloadFileFromRemote
protected void downloadFileFromRemote(URL remoteURL, File localFile) throws IOException
- Throws:
IOException
-
downloadDomainListFile
protected void downloadDomainListFile() throws IOException
- Throws:
IOException
-
downloadDomainDescriptionFile
protected void downloadDomainDescriptionFile() throws IOException
- Throws:
IOException
-
downloadNodeListFile
protected void downloadNodeListFile() throws IOException
- Throws:
IOException
-
downloadDomallFile
protected void downloadDomallFile() throws IOException
- Throws:
IOException
-
ensureDomainListInstalled
public void ensureDomainListInstalled()
-
ensureDomainDescriptionInstalled
public void ensureDomainDescriptionInstalled()
-
ensureNodeListInstalled
public void ensureNodeListInstalled()
-
ensureDomallInstalled
public void ensureDomallInstalled()
-
setCathVersion
public void setCathVersion(String cathVersion)
-
-