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.datasourceaware.core; 023 024import uk.ac.roslin.ensembl.model.core.CoordSystemType; 025import uk.ac.roslin.ensembl.model.core.CoordinateSystem; 026import uk.ac.roslin.ensembl.config.EnsemblCoordSystemType; 027 028/** 029 * 030 * @author paterson 031 */ 032public class DACoordinateSystem implements CoordinateSystem { 033 034 protected Integer id = null; 035 protected Integer speciesID = null; 036 protected EnsemblCoordSystemType type; 037 protected Integer rank; 038 protected String version; 039 protected Boolean defaultVersion = false; 040 protected Boolean sequenceLevel = false; 041 protected Boolean topLevel = false; 042 043 public DACoordinateSystem() { 044 045 } 046 047 /** 048 * returns true if this CCS is the default version CS with lowest rank number 049 * i.e. 'toplevel' default CS is actually that with 'lowestrank' 050 * @return 051 */ 052 @Override 053 public Boolean isTopLevel() { 054 return topLevel; 055 } 056 057 public void setTopLevel(boolean toplevel) { 058 topLevel = toplevel; 059 } 060 061 /** 062 * Get the value of speciesID 063 * 064 * @return the value of speciesID 065 */ 066 @Override 067 public Integer getSpeciesID() { 068 return speciesID; 069 } 070 071 /** 072 * Set the value of speciesID 073 * 074 * @param speciesID new value of speciesID 075 */ 076 @Override 077 public void setSpeciesID(Integer speciesID) { 078 this.speciesID = speciesID; 079 } 080 081 082 /** 083 * Get the value of id 084 * 085 * @return the value of id 086 */ 087 @Override 088 public Integer getId() { 089 return id; 090 } 091 092 /** 093 * Set the value of id 094 * 095 * @param id new value of id 096 */ 097 @Override 098 public void setId(Integer id) { 099 this.id = id; 100 } 101 102 /** 103 * Get the value of type 104 * 105 * @return the value of type 106 */ 107 @Override 108 public EnsemblCoordSystemType getType() { 109 return type; 110 } 111 112 /** 113 * Set the value of type 114 * 115 * @param type new value of type 116 */ 117 @Override 118 public void setType(CoordSystemType type) { 119 this.type = (EnsemblCoordSystemType) type; 120 } 121 /** 122 * Get the value of version 123 * 124 * @return the value of version 125 */ 126 @Override 127 public String getVersion() { 128 return version; 129 } 130 131 /** 132 * Set the value of version 133 * 134 * @param version new value of version 135 */ 136 @Override 137 public void setVersion(String version) { 138 this.version = version; 139 } 140 141 /** 142 * Get the value of rank 143 * 144 * @return the value of rank 145 */ 146 @Override 147 public Integer getRank() { 148 return rank; 149 } 150 151 /** 152 * Set the value of rank 153 * 154 * @param rank new value of rank 155 */ 156 @Override 157 public void setRank(Integer rank) { 158 this.rank = rank; 159 } 160 161 @Override 162 public Boolean isDefaultVersion() { 163 return defaultVersion; 164 } 165 166 @Override 167 public void setDefaultVersion(Boolean defaultVersion) { 168 this.defaultVersion = defaultVersion; 169 } 170 171 @Override 172 public Boolean isSequenceLevel() { 173 return sequenceLevel; 174 } 175 176 @Override 177 public void setSequenceLevel(Boolean sequenceLevel) { 178 this.sequenceLevel = sequenceLevel; 179 } 180 181}