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 java.lang.Object implements CathDatabase
- Author:
- Daniel Asarnow
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CATH_DOWNLOAD_ALL_RELEASES_DIR
static java.lang.String
CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
static java.lang.String
CATH_DOWNLOAD_URL
static java.lang.String
DEFAULT_VERSION
static java.lang.String
domainDescriptionFileName
static java.lang.String
domainListFileName
static java.lang.String
domallFileName
static java.lang.String
FILESPLIT
static java.lang.String
NEWLINE
static java.lang.String
nodeListFileName
-
Constructor Summary
Constructors Constructor Description CathInstallation()
CathInstallation(java.lang.String cacheLocation)
CathInstallation(java.lang.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(java.net.URL remoteURL, java.io.File localFile)
protected void
downloadNodeListFile()
void
ensureDomainDescriptionInstalled()
void
ensureDomainListInstalled()
void
ensureDomallInstalled()
void
ensureNodeListInstalled()
java.util.List<CathDomain>
filterByCathCode(java.lang.String query)
Return list of CATH descriptions whose CATH codes (e.g.java.util.List<CathDomain>
filterByDescription(java.lang.String query)
Return list of CATH descriptions whose descriptions (name field) starts with the query.java.util.List<CathDomain>
filterByNodeName(java.lang.String query)
Return list of CATH domains whose node name (e.g.java.util.List<CathDomain>
getByCategory(CathCategory category)
Return list of CATH descriptions for node representatives at a CATH category (e.g.java.lang.String
getCacheLocation()
java.lang.String
getCathDownloadUrl()
CathNode
getCathNode(java.lang.String nodeId)
Return the CathNode for a node ID.java.lang.String
getCathVersion()
Return the CATH release version.CathDomain
getDescriptionByCathId(java.lang.String cathId)
Return CATH description for CATH domain ID.CathDomain
getDescriptionByNodeId(java.lang.String nodeId)
Return CATH description for node representative by node ID.CathDomain
getDomainByCathId(java.lang.String cathId)
Return CATH domain for CATH domain ID.java.lang.String
getDomainDescriptionFileName()
java.lang.String
getDomainListFileName()
java.util.List<CathDomain>
getDomainsByNodeId(java.lang.String nodeId)
Return all CATH domains for a particular CATH node.java.util.List<CathDomain>
getDomainsForPdb(java.lang.String pdbId)
Return all CATH domains for a PDB ID.java.lang.String
getDomallFileName()
java.util.List<CathFragment>
getFragmentsByPdbId(java.lang.String pdbId)
java.util.concurrent.atomic.AtomicBoolean
getInstalledDomainDescription()
java.util.concurrent.atomic.AtomicBoolean
getInstalledDomainList()
java.util.concurrent.atomic.AtomicBoolean
getInstalledDomall()
java.util.concurrent.atomic.AtomicBoolean
getInstalledNodeList()
java.lang.String
getNodeListFileName()
java.util.List<CathNode>
getTree(CathDomain domain)
Return the CATH sub-tree for a particular domain.void
setCacheLocation(java.lang.String cacheLocation)
void
setCathDownloadUrl(java.lang.String cathDownloadUrl)
void
setCathVersion(java.lang.String cathVersion)
void
setInstalledDomainDescription(java.util.concurrent.atomic.AtomicBoolean installedDomainDescription)
void
setInstalledDomainList(java.util.concurrent.atomic.AtomicBoolean installedDomainList)
void
setInstalledDomall(java.util.concurrent.atomic.AtomicBoolean installedDomall)
void
setInstalledNodeList(java.util.concurrent.atomic.AtomicBoolean installedNodeList)
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final java.lang.String DEFAULT_VERSION
- See Also:
- Constant Field Values
-
domainListFileName
public static final java.lang.String domainListFileName
- See Also:
- Constant Field Values
-
domainDescriptionFileName
public static final java.lang.String domainDescriptionFileName
- See Also:
- Constant Field Values
-
nodeListFileName
public static final java.lang.String nodeListFileName
- See Also:
- Constant Field Values
-
domallFileName
public static final java.lang.String domallFileName
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_URL
public static final java.lang.String CATH_DOWNLOAD_URL
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_ALL_RELEASES_DIR
public static final java.lang.String CATH_DOWNLOAD_ALL_RELEASES_DIR
- See Also:
- Constant Field Values
-
CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
public static final java.lang.String CATH_DOWNLOAD_CLASSIFICATION_DATA_DIR
- See Also:
- Constant Field Values
-
NEWLINE
public static final java.lang.String NEWLINE
-
FILESPLIT
public static final java.lang.String FILESPLIT
-
-
Method Detail
-
getDomainListFileName
public java.lang.String getDomainListFileName()
-
getDomainDescriptionFileName
public java.lang.String getDomainDescriptionFileName()
-
getNodeListFileName
public java.lang.String getNodeListFileName()
-
getDomallFileName
public java.lang.String getDomallFileName()
-
getCathDownloadUrl
public java.lang.String getCathDownloadUrl()
-
setCathDownloadUrl
public void setCathDownloadUrl(java.lang.String cathDownloadUrl)
-
getCacheLocation
public java.lang.String getCacheLocation()
-
setCacheLocation
public void setCacheLocation(java.lang.String cacheLocation)
-
getInstalledDomainList
public java.util.concurrent.atomic.AtomicBoolean getInstalledDomainList()
-
setInstalledDomainList
public void setInstalledDomainList(java.util.concurrent.atomic.AtomicBoolean installedDomainList)
-
getInstalledDomainDescription
public java.util.concurrent.atomic.AtomicBoolean getInstalledDomainDescription()
-
setInstalledDomainDescription
public void setInstalledDomainDescription(java.util.concurrent.atomic.AtomicBoolean installedDomainDescription)
-
getInstalledNodeList
public java.util.concurrent.atomic.AtomicBoolean getInstalledNodeList()
-
getInstalledDomall
public java.util.concurrent.atomic.AtomicBoolean getInstalledDomall()
-
setInstalledNodeList
public void setInstalledNodeList(java.util.concurrent.atomic.AtomicBoolean installedNodeList)
-
setInstalledDomall
public void setInstalledDomall(java.util.concurrent.atomic.AtomicBoolean installedDomall)
-
getCathVersion
public java.lang.String getCathVersion()
Description copied from interface:CathDatabase
Return the CATH release version.- Specified by:
getCathVersion
in interfaceCathDatabase
- Returns:
- CATH version
-
getCathNode
public CathNode getCathNode(java.lang.String nodeId)
Description copied from interface:CathDatabase
Return the CathNode for a node ID.- Specified by:
getCathNode
in interfaceCathDatabase
- Returns:
- CATH node
-
getByCategory
public java.util.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 java.util.List<CathDomain> filterByCathCode(java.lang.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 java.util.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 java.util.List<CathDomain> filterByNodeName(java.lang.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 java.util.List<CathDomain> filterByDescription(java.lang.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(java.lang.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 java.util.List<CathDomain> getDomainsForPdb(java.lang.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(java.lang.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(java.lang.String cathId)
Description copied from interface:CathDatabase
Return CATH description for CATH domain ID.- Specified by:
getDescriptionByCathId
in interfaceCathDatabase
- Returns:
-
getDomainsByNodeId
public java.util.List<CathDomain> getDomainsByNodeId(java.lang.String nodeId)
Description copied from interface:CathDatabase
Return all CATH domains for a particular CATH node.- Specified by:
getDomainsByNodeId
in interfaceCathDatabase
- Returns:
-
getFragmentsByPdbId
public java.util.List<CathFragment> getFragmentsByPdbId(java.lang.String pdbId)
- Specified by:
getFragmentsByPdbId
in interfaceCathDatabase
-
downloadFileFromRemote
protected void downloadFileFromRemote(java.net.URL remoteURL, java.io.File localFile) throws java.io.IOException
- Throws:
java.io.IOException
-
downloadDomainListFile
protected void downloadDomainListFile() throws java.io.IOException
- Throws:
java.io.IOException
-
downloadDomainDescriptionFile
protected void downloadDomainDescriptionFile() throws java.io.IOException
- Throws:
java.io.IOException
-
downloadNodeListFile
protected void downloadNodeListFile() throws java.io.IOException
- Throws:
java.io.IOException
-
downloadDomallFile
protected void downloadDomallFile() throws java.io.IOException
- Throws:
java.io.IOException
-
ensureDomainListInstalled
public void ensureDomainListInstalled()
-
ensureDomainDescriptionInstalled
public void ensureDomainDescriptionInstalled()
-
ensureNodeListInstalled
public void ensureNodeListInstalled()
-
ensureDomallInstalled
public void ensureDomallInstalled()
-
setCathVersion
public void setCathVersion(java.lang.String cathVersion)
-
-