001/** 002 * Copyright (C) 2010-2015 The Roslin Institute <contact andy.law@roslin.ed.ac.uk> 003 * 004 * This file is part of JEnsembl: a Java API to Ensembl data sources developed by the 005 * Bioinformatics Group at The Roslin Institute, The Royal (Dick) School of 006 * Veterinary Studies, University of Edinburgh. 007 * 008 * Project hosted at: http://jensembl.sourceforge.net 009 * 010 * This is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU General Public License (version 3) as published by 012 * the Free Software Foundation. 013 * 014 * This software is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * in this software distribution. If not, see: http://opensource.org/licenses/gpl-3.0.html 021 */ 022package uk.ac.roslin.ensembl.model.core; 023 024import java.util.HashMap; 025import java.util.List; 026import java.util.TreeMap; 027import java.util.TreeSet; 028import uk.ac.roslin.ensembl.config.EnsemblComparaDivision; 029import uk.ac.roslin.ensembl.exception.DAOException; 030import uk.ac.roslin.ensembl.model.database.CoreDatabase; 031import uk.ac.roslin.ensembl.model.database.Database; 032import uk.ac.roslin.ensembl.model.database.DatabaseType; 033 034/** 035 * 036 * @author paterson 037 */ 038public interface Species { 039 040 public TreeSet<String> getAliases(); 041 042 public String getCommonName() ; 043 044 public String getSpeciesBinomial() ; 045 046 public String getDatabaseStyleName(); 047 048 public String getComparaName(String version); 049 050 public String getShortName(); 051 052 public String getDisplayName(); 053 054 public void setProperty(HashMap row) ; 055 056 public CoreDatabase getMostRecentCoreDatabase(); 057 058 public Integer getHighestDBRelease() ; 059 060 public String getTaxonomyID() ; 061 062 public Integer getDBSpeciesID(String version) ; 063 064 public String getEnsemblStablePrefix() ; 065 066 public TreeSet<? extends Database> getDatabases(); 067 068 public void addDatabases(TreeSet<? extends Database> databases); 069 070 public void addDatabase(Database database); 071 072 public TreeSet<? extends Database> getDatabasesByType(DatabaseType type); 073 074 public TreeSet<? extends Database> getDatabasesByVersion(String version); 075 076 public Database getDatabaseByTypeAndVersion(DatabaseType type, String version); 077 078 public Chromosome getChromosomeByName(String name) throws DAOException ; 079 080 public Chromosome getChromosomeByName(String name, String dbVersion) throws DAOException; 081 082 public AssembledDNASequence getFragmentByName(String name) throws DAOException ; 083 084 public AssembledDNASequence getFragmentByName(String name, String dbVersion) throws DAOException; 085 086 public TreeMap<String, ? extends Chromosome> getChromosomes() throws DAOException ; 087 088 public TreeMap<String, ? extends Chromosome> getChromosomes(String dbVersion) throws DAOException; 089 090 public TreeMap<String, ? extends AssembledDNASequence> getFragments() throws DAOException ; 091 092 public TreeMap<String, ? extends AssembledDNASequence> getFragments(String dbVersion) throws DAOException; 093 094 public TreeSet<String> getSchemaVersions() ; 095 096 public TreeSet<String> getDBVersions() ; 097 098 public List<? extends Gene> getGenesForVegaID(String vegaID) throws DAOException ; 099 100 public List<? extends Gene> getGenesForVegaID(String vegaID, String dbVersion) throws DAOException ; 101 102 public List<? extends Transcript> getTranscriptsForVegaID(String vegaID) throws DAOException ; 103 104 public List<? extends Transcript> getTranscriptsForVegaID(String vegaID, String dbVersion) throws DAOException ; 105 106 public List<? extends Transcript> getTranscriptsForCcdsID(String ccdsID) throws DAOException ; 107 108 public List<? extends Transcript> getTranscriptsForCcdsID(String ccdsID, String dbVersion) throws DAOException ; 109 110 public List<? extends Translation> getTranslationsForVegaID(String vegaID) throws DAOException ; 111 112 public List<? extends Translation> getTranslationsForVegaID(String vegaID, String dbVersion) throws DAOException ; 113 114 public Gene getGeneByStableID(String stableID) throws DAOException ; 115 116 public Gene getGeneByStableID(String stableID, String dbVersion) throws DAOException ; 117 118 public Transcript getTranscriptByStableID(String stableID) throws DAOException ; 119 120 public Transcript getTranscriptByStableID(String stableID, String dbVersion) throws DAOException ; 121 122 public Translation getTranslationByStableID(String stableID) throws DAOException ; 123 124 public Translation getTranslationByStableID(String stableID, String dbVersion) throws DAOException ; 125 126 public List<? extends Gene> getGenesForExactName(String name) throws DAOException ; 127 128 public List<? extends Gene> getGenesForExactName(String name, String dbVersion) throws DAOException ; 129 130 public List<? extends Gene> getGenesForNameBeginning(String name) throws DAOException ; 131 132 public List<? extends Gene> getGenesForNameBeginning(String name, String dbVersion) throws DAOException ; 133 134 public EnsemblComparaDivision getComparaDivision() ; 135 136 public String getAssemblyAccessionStem() ; 137 138 public String getAssemblyAccessionStem(String dbVersion) ; 139 140 public String getAssemblyName(String dbVersion) ; 141 142 public String getAssemblyAccession(String dbVersion) ; 143 144 public void setAssemblyExceptions(String dbVersion) throws DAOException; 145 146 public boolean isInPanCompara(String dbVersion); 147 148}