001 /** 002 * Copyright (C) 2010 The Roslin Institute <contact andy.law@roslin.ed.ac.uk> 003 * 004 * This file is part of the Ensembl Java API demonstration project developed by the 005 * Bioinformatics Group at The Roslin Institute, The Royal (Dick) School of 006 * Veterinary Studies, University of Edinburgh. 007 * 008 * This is free software: you can redistribute it and/or modify 009 * it under the terms of the GNU General Public License (version 3) as published by 010 * the Free Software Foundation. 011 * 012 * This software is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 015 * GNU General Public License for more details. 016 * 017 * You should have received a copy of the GNU General Public License 018 * in this software distribution. If not, see <http://www.gnu.org/licenses/gpl-3.0.html/>. 019 */ 020 021 package uk.ac.roslin.ensembl.model.database; 022 023 import java.util.List; 024 import java.util.Set; 025 import uk.ac.roslin.ensembl.exception.DAOException; 026 import uk.ac.roslin.ensembl.model.ObjectType; 027 import uk.ac.roslin.ensembl.model.core.Chromosome; 028 import uk.ac.roslin.ensembl.model.core.CoordinateSystem; 029 030 /** 031 * 032 * @author tpaterso 033 */ 034 public interface SingleSpeciesCoreDatabase extends SingleSpeciesDatabase, CoreDatabase { 035 036 public Object getCoreFactory() ; 037 038 //note these methods are mirrored in CollectionCoreDatabase 039 //where they take the required Species parameter 040 041 public CoordinateSystem getTopLevelCoordSystem() throws DAOException; 042 043 public CoordinateSystem getChromosomeLevelCoordSystem()throws DAOException; 044 045 public CoordinateSystem getSequenceLevelCoordSystem() throws DAOException; 046 047 public CoordinateSystem getCSByID(Integer id) throws DAOException; 048 049 public CoordinateSystem getBuildCoordSystem(String featureType) throws DAOException ; 050 051 public Set<? extends CoordinateSystem> getCSForFeature(ObjectType featureType) throws DAOException; 052 053 public Chromosome getChromosomeByName(String name) throws DAOException ; 054 055 public List<? extends Chromosome> getChromosomes() throws DAOException ; 056 057 public void setBuildLevel(String featureKey, String level) ; 058 059 public String getBuildLevel(String featureType) throws DAOException ; 060 061 public List<? extends ObjectType> getFeaturesForCS(CoordinateSystem coordSys) throws DAOException ; 062 063 public Integer getMaxLengthForFeature(ObjectType featureType, CoordinateSystem cs) throws DAOException ; 064 065 public void addFeatureCS(String featureType, Integer csID, Integer maxLength) ; 066 067 }