src/org/gel/mauve/format/RichDelegatingSequence.java

Go to the documentation of this file.
00001 package org.gel.mauve.format;
00002 
00003 import java.io.File;
00004 
00005 import java.io.FileNotFoundException;
00006 import java.util.Set;
00007 
00008 import org.biojava.bio.seq.Feature;
00009 import org.biojava.bio.seq.Sequence;
00010 import org.biojava.bio.symbol.SymbolList;
00011 import org.biojava.utils.ChangeVetoException;
00012 import org.biojavax.Comment;
00013 import org.biojavax.Namespace;
00014 import org.biojavax.RankedCrossRef;
00015 import org.biojavax.RankedDocRef;
00016 import org.biojavax.RichAnnotation;
00017 import org.biojavax.bio.BioEntryRelationship;
00018 import org.biojavax.bio.seq.RichSequence;
00019 import org.biojavax.bio.taxa.NCBITaxon;
00020 import org.gel.mauve.SupportedFormat;
00021 
00022 public class RichDelegatingSequence extends DelegatingSequence implements
00023                 RichSequence {
00024         
00025     public RichDelegatingSequence(Sequence s, SupportedFormat format, File source, int index) throws FileNotFoundException
00026     {
00027         super(s,format,source,index);
00028         richInit(s);
00029     }
00030     
00031     void richInit(Sequence s)
00032     {
00033         RichSequence rs = (RichSequence)s;
00034         featureSet = rs.getFeatureSet();
00035         seqVersion = rs.getSeqVersion();
00036         intSymList = rs.getInternalSymbolList();
00037         accession = rs.getAccession();
00038         comments = rs.getComments();
00039         description = rs.getDescription();
00040         division = rs.getDivision();
00041         identifier = rs.getIdentifier();
00042         bioname = rs.getName();
00043         ns = rs.getNamespace();
00044         rankedDocRefs = rs.getRankedDocRefs();
00045         relationships = rs.getRelationships();
00046         taxon = rs.getTaxon();
00047         bioVersion = rs.getVersion();
00048         noteSet = rs.getNoteSet();
00049         rankedCrossRefs = rs.getRankedCrossRefs();
00050         circular = rs.getCircular();
00051     }
00052 
00053     Set featureSet = null;
00054     Double seqVersion = null;
00055     SymbolList intSymList = null;
00056     
00057     //  RichSequence methods
00058         public Double getSeqVersion(){
00059                 return seqVersion;
00060         }
00061         public void setSeqVersion(Double version) throws ChangeVetoException{
00062         throw new ChangeVetoException();
00063         }
00064         public Set getFeatureSet(){
00065                 return featureSet;
00066         }
00067         public void setFeatureSet(Set s) throws ChangeVetoException{
00068         throw new ChangeVetoException();
00069         }
00070         public void setCircular(boolean circular) throws ChangeVetoException{
00071         throw new ChangeVetoException();
00072         }
00073         public boolean getCircular(){
00074                 return circular;
00075         }
00076         public SymbolList getInternalSymbolList(){
00077                 return intSymList;
00078         }
00079         
00080 
00081         // BioEntry methods
00082         public void addComment(Comment comment) throws ChangeVetoException {
00083         throw new ChangeVetoException();
00084         }
00085         public void addRankedDocRef(RankedDocRef docref) throws ChangeVetoException {        
00086                 throw new ChangeVetoException();
00087         }
00088         public void addRelationship(BioEntryRelationship relation) throws ChangeVetoException {
00089                 throw new ChangeVetoException();
00090         }
00091         String accession = null;
00092         Set comments = null;
00093         String description = null;
00094         String division = null;
00095         String identifier = null;
00096         String bioname = null;
00097         Namespace ns = null;
00098         Set rankedDocRefs = null;
00099         Set relationships = null;
00100         NCBITaxon taxon = null;
00101         int bioVersion = 0;
00102 
00103         public String getAccession(){return accession;}
00104         public Set getComments(){return comments;}
00105         public String getDescription(){return description;}
00106         public String getDivision(){return division;}
00107         public String getIdentifier(){return identifier;}
00108         public String getName(){return bioname;}
00109         public Namespace getNamespace(){return ns;}
00110         public Set getRankedDocRefs(){return rankedDocRefs;}
00111         public Set getRelationships(){return relationships;}
00112         public NCBITaxon getTaxon(){return taxon;}
00113         public int getVersion(){return bioVersion;}
00114         public void removeComment(Comment comment) throws ChangeVetoException {
00115                 throw new ChangeVetoException();
00116         }
00117         public void removeRankedDocRef(RankedDocRef docref) throws ChangeVetoException {
00118                 throw new ChangeVetoException();
00119         }
00120         public void removeRelationship(BioEntryRelationship relation) throws ChangeVetoException {
00121                 throw new ChangeVetoException();
00122         }
00123         public void setDescription(String description) throws ChangeVetoException {
00124                 throw new ChangeVetoException();
00125         }
00126         public void setDivision(String division) throws ChangeVetoException {
00127                 throw new ChangeVetoException();
00128         }
00129         public void setIdentifier(String identifier) throws ChangeVetoException {
00130                 throw new ChangeVetoException();
00131         }
00132         public void setTaxon(NCBITaxon taxon) throws ChangeVetoException {
00133                 throw new ChangeVetoException();
00134         }
00135 
00136         // comparable methods
00137         public int compareTo(Object o){
00138                 return -1;
00139         }
00140         
00141         // RichAnnotatable methods
00142         Set noteSet = null;
00143         public Set getNoteSet(){ return noteSet; }
00144         public void setNoteSet(Set notes) throws ChangeVetoException {
00145                 throw new ChangeVetoException();
00146         }
00147         
00148         // RankedCrossRefable methods
00149         Set rankedCrossRefs = null;
00150         public Set getRankedCrossRefs()
00151     {
00152                 return rankedCrossRefs;
00153     }
00154         public void setRankedCrossRefs(Set refs) throws ChangeVetoException
00155     {
00156                 throw new ChangeVetoException();
00157     }
00158         public void addRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
00159     {           
00160                 throw new ChangeVetoException();
00161     }
00162         public void removeRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
00163     {           
00164                 throw new ChangeVetoException();
00165     }
00166 
00167         public RichAnnotation getRichAnnotation() {
00168                 // TODO Auto-generated method stub
00169                 return null;
00170         }
00171 }

Generated on Mon Aug 19 06:03:41 2013 for Mauve by doxygen 1.3.6