001/*
002 * BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 */
020
021package org.biojava.nbio.structure.ecod;
022
023import java.io.IOException;
024import java.util.List;
025
026/** General API for interacting with ECOD.
027 *
028 * @author Spencer Bliven
029 */
030public interface EcodDatabase {
031
032        /** Return the release version.
033         *
034         * @return version
035         * @throws IOException
036         */
037        public String getVersion() throws IOException;
038
039        /**
040         * Get a particular ECOD domain by the domain ID (e.g. "e4hhbA1")
041         * @param ecodId
042         * @return
043         * @throws IOException
044         */
045        public EcodDomain getDomainsById(String ecodId) throws IOException;
046
047        /**
048         * Get a list of all ECOD domains for a particular PDB ID
049         * @param pdbId
050         * @return the list of domains, or null if no matching domains were found
051         * @throws IOException
052         */
053        public List<EcodDomain> getDomainsForPdb(String pdbId) throws IOException;
054
055        /**
056         * Get a list of domains within a particular level of the hierarchy
057         * @param hierarchy A dot-separated list giving the X-group, H-group, and/or
058         *  T-group (e.g. "1.1" for all members of the RIFT-related H-group)
059         * @return
060         * @throws IOException
061         */
062        public List<EcodDomain> filterByHierarchy(String hierarchy) throws IOException;
063
064        /**
065         * Get all ECOD domains
066         * @return
067         * @throws IOException
068         */
069        public List<EcodDomain> getAllDomains() throws IOException;
070}